mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-04 12:00:18 +02:00
IDE: passing primary-config-path to startlazarus, startlazarus: fixed passing parameters with spaces
git-svn-id: trunk@13473 -
This commit is contained in:
parent
bb930dbf27
commit
040d583e20
@ -86,7 +86,7 @@ end;
|
||||
---------------------------------------------------------------------------}
|
||||
procedure SetPrimaryConfigPath(const NewValue: String);
|
||||
begin
|
||||
//writeln('SetPrimaryConfigPath NewValue="',NewValue,'" -> "',ExpandFileName(NewValue),'"');
|
||||
debugln('SetPrimaryConfigPath NewValue="',NewValue,'" -> "',ExpandFileName(NewValue),'"');
|
||||
PrimaryConfigPath:=ExpandFileName(NewValue);
|
||||
end;
|
||||
|
||||
@ -95,6 +95,7 @@ end;
|
||||
---------------------------------------------------------------------------}
|
||||
procedure SetSecondaryConfigPath(const NewValue: String);
|
||||
begin
|
||||
debugln('SetSecondaryConfigPath NewValue="',NewValue,'" -> "',ExpandFileName(NewValue),'"');
|
||||
SecondaryConfigPath:=ExpandFileName(NewValue);
|
||||
end;
|
||||
|
||||
|
@ -169,7 +169,7 @@ var
|
||||
begin
|
||||
Result := ' --no-splash-screen --started-by-startlazarus';
|
||||
for i := 0 to FCmdLineParams.Count - 1 do
|
||||
Result := Result + ' ' + FCmdLineParams[i];
|
||||
Result := Result + ' "' + FCmdLineParams[i] + '"';
|
||||
if FLazarusDebug then
|
||||
Result := Result + ' --debug-log=' +
|
||||
AppendPathDelim(GetPrimaryConfigPath) + 'debug.log';
|
||||
|
@ -46,7 +46,7 @@ interface
|
||||
{$endif}
|
||||
|
||||
uses
|
||||
SysUtils, Classes, DefineTemplates, FileUtil, InterfaceBase;
|
||||
SysUtils, Classes, LCLProc, DefineTemplates, FileUtil, InterfaceBase;
|
||||
|
||||
type
|
||||
TLCLPlatforms = set of TLCLPlatform;
|
||||
|
@ -998,6 +998,7 @@ begin
|
||||
exit;
|
||||
end;
|
||||
for i:=1 to ParamCount do begin
|
||||
//DebugLn(['TMainIDE.ParseCmdLineOptions ',i,' "',ParamStr(i),'"']);
|
||||
if ParamIsOptionPlusValue(i,PrimaryConfPathOptLong,AValue) then begin
|
||||
SetPrimaryConfigPath(AValue);
|
||||
end;
|
||||
@ -8690,8 +8691,9 @@ procedure TMainIDE.DoRestart;
|
||||
[LineEnding, ExeName]),mtError,[mbCancel]);
|
||||
exit;
|
||||
end;
|
||||
StartLazProcess.CommandLine := format('%s --lazarus-pid=%d',
|
||||
[ExeName, GetProcessID]);
|
||||
StartLazProcess.CommandLine := ExeName
|
||||
+' --lazarus-pid='+IntToStr(GetProcessID)
|
||||
+' ''--primary-config-path='+GetPrimaryConfigPath+'''';
|
||||
StartLazProcess.Execute;
|
||||
finally
|
||||
StartLazProcess.Free;
|
||||
@ -12132,7 +12134,6 @@ var
|
||||
var
|
||||
i: LongInt;
|
||||
RegComp: TRegisteredComponent;
|
||||
ConflictingUnitInfo: TUnitInfo;
|
||||
ConflictingClass: TClass;
|
||||
s: string;
|
||||
begin
|
||||
|
@ -48,7 +48,6 @@
|
||||
<Filename Value="D:/lazarus/source/lazarus/startlazarus.exe"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<UnitOutputDirectory Value="D:/lazarus/source/lazarus/units/i386-win32"/>
|
||||
<SrcPath Value="$(LazarusDir)/lcl/;$(LazarusDir)/lcl/interfaces/$(LCLWidgetType)/"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
|
Loading…
Reference in New Issue
Block a user