@@ -64,24 +64,34 @@ void Start()
64
64
string [ ] args = Environment . GetCommandLineArgs ( ) ;
65
65
if ( args != null && args . Length > 2 )
66
66
{
67
+ // first argument needs to be -projectPath
67
68
var commandLineArgs = args [ 1 ] ;
68
69
if ( commandLineArgs == "-projectPath" )
69
70
{
70
71
SetStatus ( "Launching from commandline.." ) ;
71
72
73
+ // path
72
74
var projectPathArgument = args [ 2 ] ;
75
+
73
76
var version = Tools . GetProjectVersion ( projectPathArgument ) ;
74
77
75
- // try launching it
76
- LaunchProject ( projectPathArgument , version , true ) ;
78
+ // take extra arguments also
79
+ var commandLineArguments = "" ;
80
+ for ( int i = 3 , len = args . Length ; i < len ; i ++ )
81
+ {
82
+ commandLineArguments += " " + args [ i ] ;
83
+ }
77
84
78
- SetStatus ( "Ready" ) ;
85
+ // try launching it
86
+ LaunchProject ( projectPathArgument , version , openProject : true , commandLineArguments : commandLineArguments ) ;
79
87
80
88
// quit after launch if enabled in settings
81
89
if ( Properties . Settings . Default . closeAfterExplorer == true )
82
90
{
83
91
Application . Exit ( ) ;
84
92
}
93
+
94
+ SetStatus ( "Ready" ) ;
85
95
}
86
96
else
87
97
{
@@ -329,7 +339,7 @@ void UpdateRecentProjectsList()
329
339
SetStatus ( "Ready" ) ;
330
340
}
331
341
332
- void LaunchProject ( string projectPath , string version , bool openProject = true )
342
+ void LaunchProject ( string projectPath , string version , bool openProject = true , string commandLineArguments = "" )
333
343
{
334
344
if ( Directory . Exists ( projectPath ) == true )
335
345
{
@@ -372,7 +382,7 @@ void LaunchProject(string projectPath, string version, bool openProject = true)
372
382
pars += " " + customArguments ;
373
383
}
374
384
375
- myProcess . StartInfo . Arguments = pars ;
385
+ myProcess . StartInfo . Arguments = pars + commandLineArguments ;
376
386
}
377
387
myProcess . Start ( ) ;
378
388
0 commit comments