mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-05 23:32:33 +02:00
IDE: small improvements to the command line handling
git-svn-id: trunk@15724 -
This commit is contained in:
parent
2c7d835569
commit
e6859b987a
@ -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;
|
||||
|
||||
|
@ -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]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user