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

View File

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