Changeset 3745
- Timestamp:
- 05/10/10 16:32:55 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab 3.3/HeuristicLab 3.3.csproj
r3737 r3745 158 158 set Configuration=$(ConfigurationName) 159 159 160 call CreateConsoleApplication.cmd161 160 call MergeConfigs.cmd 162 161 call CopyAssemblies.cmd -
trunk/sources/HeuristicLab.PluginInfrastructure/Main.cs
r3289 r3745 34 34 public static class Main { 35 35 /// <summary> 36 /// Main entry point of the plugin infrastructure. Either loads a starter form or a console dialog.36 /// Main entry point of the plugin infrastructure. Loads the starter form. 37 37 /// </summary> 38 38 /// <param name="args">Command line arguments</param> 39 39 public static void Run(string[] args) { 40 if (args.Length == 0) { // normal mode 41 try { 42 Application.EnableVisualStyles(); 43 Application.SetCompatibleTextRenderingDefault(false); 44 Application.Run(new StarterForm()); 45 } 46 catch (Exception ex) { 47 ShowErrorMessageBox(ex); 48 } 49 50 } else { 51 var cmd = args[0].ToUpperInvariant(); 52 string pluginDir = Path.GetFullPath(Application.StartupPath); 53 switch (cmd) { 54 case "START": { 55 if (args.Length != 2) { 56 PrintUsage(); 57 } else { 58 Application.EnableVisualStyles(); 59 Application.SetCompatibleTextRenderingDefault(false); 60 Application.Run(new StarterForm(args[1])); 61 } 62 break; 63 } 64 case "SHOW": { 65 InstallationManagerConsole managerConsole = new InstallationManagerConsole(pluginDir); 66 managerConsole.Show(args.Skip(1)); 67 break; 68 } 69 case "INSTALL": { 70 InstallationManagerConsole managerConsole = new InstallationManagerConsole(pluginDir); 71 managerConsole.Install(args.Skip(1)); 72 break; 73 } 74 case "UPDATE": { 75 InstallationManagerConsole managerConsole = new InstallationManagerConsole(pluginDir); 76 managerConsole.Update(args.Skip(1)); 77 break; 78 } 79 case "REMOVE": { 80 InstallationManagerConsole managerConsole = new InstallationManagerConsole(pluginDir); 81 managerConsole.Remove(args.Skip(1)); 82 break; 83 } 84 default: PrintUsage(); break; 85 } 40 try { 41 Application.EnableVisualStyles(); 42 Application.SetCompatibleTextRenderingDefault(false); 43 Application.Run(new StarterForm()); 86 44 } 87 } 88 89 private static void PrintUsage() { 90 Console.WriteLine("Usage: HeuristicLab.exe <command> <args>"); 91 Console.WriteLine("Commands:"); 92 Console.WriteLine("\tstart <application name>"); 93 Console.WriteLine("\tshow <plugin name(s)>"); 94 Console.WriteLine("\tupdate <plugin name(s)>"); 95 Console.WriteLine("\tremove <plugin name(s)>"); 96 Console.WriteLine("\tinstall <plugin name(s)>"); 45 catch (Exception ex) { 46 ShowErrorMessageBox(ex); 47 } 97 48 } 98 49
Note: See TracChangeset
for help on using the changeset viewer.