mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-08 22:32:37 +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,7 +124,7 @@ end;
|
|||||||
|
|
||||||
function IsHelpRequested (index : Integer = 1) : Boolean;
|
function IsHelpRequested (index : Integer = 1) : Boolean;
|
||||||
begin
|
begin
|
||||||
Result := (ParamCount>0) and
|
Result := (ParamCount>=index) and
|
||||||
((CompareText (ParamStr(index), '--help') = 0) or
|
((CompareText (ParamStr(index), '--help') = 0) or
|
||||||
(CompareText (ParamStr(index), '-help') = 0) or
|
(CompareText (ParamStr(index), '-help') = 0) or
|
||||||
(CompareText (ParamStr(index), '-?') = 0) or
|
(CompareText (ParamStr(index), '-?') = 0) or
|
||||||
|
@ -9436,8 +9436,7 @@ procedure TMainIDE.DoRestart;
|
|||||||
end;
|
end;
|
||||||
//DebugLn('Setting CommandLine');
|
//DebugLn('Setting CommandLine');
|
||||||
StartLazProcess.CommandLine := ExeName +
|
StartLazProcess.CommandLine := ExeName +
|
||||||
' --lazarus-pid='+IntToStr(GetProcessID) +
|
' --lazarus-pid='+IntToStr(GetProcessID) + ' ' +
|
||||||
' ' +
|
|
||||||
GetCommandLineParameters(Params, False);
|
GetCommandLineParameters(Params, False);
|
||||||
|
|
||||||
//DebugLn('CommandLine 1 : %s', [StartLazProcess.CommandLine]);
|
//DebugLn('CommandLine 1 : %s', [StartLazProcess.CommandLine]);
|
||||||
@ -9445,7 +9444,7 @@ procedure TMainIDE.DoRestart;
|
|||||||
if (pos(PrimaryConfPathOptLong, StartLazProcess.CommandLine) = 0) and
|
if (pos(PrimaryConfPathOptLong, StartLazProcess.CommandLine) = 0) and
|
||||||
(pos(PrimaryConfPathOptShort, StartLazProcess.CommandLine) = 0) then
|
(pos(PrimaryConfPathOptShort, StartLazProcess.CommandLine) = 0) then
|
||||||
StartLazProcess.CommandLine := StartLazProcess.CommandLine +
|
StartLazProcess.CommandLine := StartLazProcess.CommandLine +
|
||||||
' ' + PrimaryConfPathOptLong + '="'+GetPrimaryConfigPath+'"';
|
' "' + PrimaryConfPathOptLong + '='+GetPrimaryConfigPath+'"';
|
||||||
|
|
||||||
//DebugLn('CommandLine 2 : %s', [StartLazProcess.CommandLine]);
|
//DebugLn('CommandLine 2 : %s', [StartLazProcess.CommandLine]);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user