AnimatLab  2
Test
Program.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 
6 using System.IO;
7 
8 namespace AnimatWizard
9 {
10  class Program
11  {
12  static void PrintHelp()
13  {
14  Console.WriteLine("Usage:");
15  Console.WriteLine("AnimatProjGen [-b] [-v] [-r] -name ProjName");
16  Console.WriteLine("-b: Optional include bullet references");
17  Console.WriteLine("-v: Optional include vortex references");
18  Console.WriteLine("-r: Optional include robotics references");
19  Console.WriteLine("-name ProjName: Name of the new GUI and sim projects. GUI and Sim will be appended to them.");
20  }
21 
22 
23  static void Main(string[] args)
24  {
25  bool bBulletIncludes = false;
26  bool bVortexIncludes = false;
27  bool bRoboticsIncludes = false;
28  bool bNextName = false;
29  string strProjName = "";
30  string strSDKRoot = "C:\\Projects\\AnimatLabSDK\\AnimatLabPublicSource";
31 
32  foreach (string strArg in args)
33  {
34  if (strArg.Trim().ToLower() == "-b")
35  bBulletIncludes = true;
36  else if (strArg.Trim().ToLower() == "-v")
37  bVortexIncludes = true;
38  else if (strArg.Trim().ToLower() == "-r")
39  bRoboticsIncludes = true;
40  else if (strArg.Trim().ToLower() == "-name")
41  bNextName = true;
42  else if (bNextName == true)
43  strProjName = strArg;
44  }
45 
46  if (strProjName.Trim().Length == 0)
47  {
48  Console.WriteLine("Project name is blank. ");
49  PrintHelp();
50  return;
51  }
52 
53  //First create new GUI and Sim folders
54  string strGuiPath = strSDKRoot + "\\Libraries\\" + strProjName + "GUI";
55  string strGuiVsPath = strGuiPath + "\\Projects_VisualStudio";
56  string strGuiMonoPath = strGuiPath + "\\Projects_Mono";
57  string strGuiCbPath = strGuiPath + "\\Projects_CodeBlocks";
58  Directory.CreateDirectory(strGuiPath);
59  Directory.CreateDirectory(strGuiVsPath);
60  Directory.CreateDirectory(strGuiMonoPath);
61  Directory.CreateDirectory(strGuiCbPath);
62 
63  string strSimPath = strSDKRoot + "\\Libraries\\" + strProjName + "Sim";
64  string strSimVsPath = strSimPath + "\\Projects_VisualStudio";
65  string strSimMonoPath = strSimPath + "\\Projects_Mono";
66  string strSimCbPath = strSimPath + "\\Projects_CodeBlocks";
67  Directory.CreateDirectory(strSimPath);
68  Directory.CreateDirectory(strSimVsPath);
69  Directory.CreateDirectory(strSimMonoPath);
70  Directory.CreateDirectory(strSimCbPath);
71 
72 
73  }
74  }
75 }