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