mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 13:30:39 +02:00
StartLazarus: Fix finding PCP, if it contains spaces.
git-svn-id: trunk@42507 -
This commit is contained in:
parent
49e9300fb6
commit
9b35e9069f
@ -196,25 +196,25 @@ begin
|
||||
aCmdLineParams.Add(Param);
|
||||
end;
|
||||
end;
|
||||
// make sure that command line parameters are still
|
||||
// double quoted, if they contain spaces
|
||||
for i := 0 to aCmdLineParams.Count -1 do
|
||||
begin
|
||||
if pos(' ',aCmdLineParams[i])>0 then
|
||||
aCmdLineParams[i] := '"' + aCmdLineParams[i] + '"';
|
||||
end;
|
||||
end;
|
||||
|
||||
function GetCommandLineParameters(aCmdLineParams : TStrings; isStartLazarus : Boolean = False) : String;
|
||||
var
|
||||
i: Integer;
|
||||
s: String;
|
||||
begin
|
||||
if isStartLazarus then
|
||||
Result := ' --no-splash-screen --started-by-startlazarus'
|
||||
else
|
||||
Result := '';
|
||||
for i := 0 to aCmdLineParams.Count - 1 do
|
||||
Result := Result + ' ' + aCmdLineParams[i];
|
||||
for i := 0 to aCmdLineParams.Count - 1 do begin
|
||||
s := aCmdLineParams[i];
|
||||
// make sure that command line parameters are still
|
||||
// double quoted, if they contain spaces
|
||||
if pos(' ', s) > 0 then
|
||||
s := '"' + s + '"';
|
||||
Result := Result + ' ' + s;
|
||||
end;
|
||||
end;
|
||||
|
||||
function ExtractPrimaryConfigPath(aCmdLineParams: TStrings): string;
|
||||
|
Loading…
Reference in New Issue
Block a user