IDE: small improvements to the command line handling

git-svn-id: trunk@15724 -
This commit is contained in:
vincents 2008-07-09 14:59:04 +00:00
parent 2c7d835569
commit e6859b987a
2 changed files with 8 additions and 9 deletions

View File

@ -124,7 +124,7 @@ end;
function IsHelpRequested (index : Integer = 1) : Boolean;
begin
Result := (ParamCount>0) and
Result := (ParamCount>=index) and
((CompareText (ParamStr(index), '--help') = 0) or
(CompareText (ParamStr(index), '-help') = 0) or
(CompareText (ParamStr(index), '-?') = 0) or

View File

@ -9436,8 +9436,7 @@ procedure TMainIDE.DoRestart;
end;
//DebugLn('Setting CommandLine');
StartLazProcess.CommandLine := ExeName +
' --lazarus-pid='+IntToStr(GetProcessID) +
' ' +
' --lazarus-pid='+IntToStr(GetProcessID) + ' ' +
GetCommandLineParameters(Params, False);
//DebugLn('CommandLine 1 : %s', [StartLazProcess.CommandLine]);
@ -9445,7 +9444,7 @@ procedure TMainIDE.DoRestart;
if (pos(PrimaryConfPathOptLong, StartLazProcess.CommandLine) = 0) and
(pos(PrimaryConfPathOptShort, StartLazProcess.CommandLine) = 0) then
StartLazProcess.CommandLine := StartLazProcess.CommandLine +
' ' + PrimaryConfPathOptLong + '="'+GetPrimaryConfigPath+'"';
' "' + PrimaryConfPathOptLong + '='+GetPrimaryConfigPath+'"';
//DebugLn('CommandLine 2 : %s', [StartLazProcess.CommandLine]);