mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-12 07:00:36 +02:00
IDE: string lit to const
git-svn-id: branches/fixes_2_0@64269 -
This commit is contained in:
parent
c476a94462
commit
3e0f2f5e68
@ -45,6 +45,7 @@ uses
|
|||||||
LazConf;
|
LazConf;
|
||||||
|
|
||||||
const
|
const
|
||||||
|
// IDE cmd line options
|
||||||
ShowSetupDialogOptLong='--setup';
|
ShowSetupDialogOptLong='--setup';
|
||||||
PrimaryConfPathOptLong='--primary-config-path=';
|
PrimaryConfPathOptLong='--primary-config-path=';
|
||||||
PrimaryConfPathOptShort='--pcp=';
|
PrimaryConfPathOptShort='--pcp=';
|
||||||
@ -59,6 +60,10 @@ const
|
|||||||
DebugLogOptEnable='--debug-enable=';
|
DebugLogOptEnable='--debug-enable=';
|
||||||
LanguageOpt='--language=';
|
LanguageOpt='--language=';
|
||||||
LazarusDirOpt ='--lazarusdir=';
|
LazarusDirOpt ='--lazarusdir=';
|
||||||
|
const
|
||||||
|
// startlazarus options
|
||||||
|
StartLazarusPidOpt = '--lazarus-pid=';
|
||||||
|
StartLazarusDebugOpt = '--debug';
|
||||||
|
|
||||||
procedure ParseCommandLine(aCmdLineParams: TStrings; out IDEPid : Integer;
|
procedure ParseCommandLine(aCmdLineParams: TStrings; out IDEPid : Integer;
|
||||||
out ShowSplashScreen: boolean);
|
out ShowSplashScreen: boolean);
|
||||||
@ -198,9 +203,6 @@ end;
|
|||||||
|
|
||||||
procedure ParseCommandLine(aCmdLineParams: TStrings; out IDEPid: Integer; out
|
procedure ParseCommandLine(aCmdLineParams: TStrings; out IDEPid: Integer; out
|
||||||
ShowSplashScreen: boolean);
|
ShowSplashScreen: boolean);
|
||||||
const
|
|
||||||
LazarusPidOpt = '--lazarus-pid=';
|
|
||||||
LazarusDebugOpt = '--debug';
|
|
||||||
var
|
var
|
||||||
i : Integer;
|
i : Integer;
|
||||||
Param : string;
|
Param : string;
|
||||||
@ -213,14 +215,14 @@ begin
|
|||||||
if Param='' then continue;
|
if Param='' then continue;
|
||||||
if SysUtils.CompareText(LeftStr(Param, length(DebugLogOpt)), DebugLogOpt) = 0 then
|
if SysUtils.CompareText(LeftStr(Param, length(DebugLogOpt)), DebugLogOpt) = 0 then
|
||||||
HasDebugLog := HasDebugLog or (length(Param) > length(DebugLogOpt));
|
HasDebugLog := HasDebugLog or (length(Param) > length(DebugLogOpt));
|
||||||
if (Param=LazarusDebugOpt) and (not HasDebugLog) then begin
|
if (Param=StartLazarusDebugOpt) and (not HasDebugLog) then begin
|
||||||
aCmdLineParams.Add('--debug-log=' +
|
aCmdLineParams.Add('--debug-log=' +
|
||||||
AppendPathDelim(UTF8ToSys(GetPrimaryConfigPath)) + 'debug.log');
|
AppendPathDelim(UTF8ToSys(GetPrimaryConfigPath)) + 'debug.log');
|
||||||
end;
|
end;
|
||||||
if LeftStr(Param,length(LazarusPidOpt))=LazarusPidOpt then begin
|
if LeftStr(Param,length(StartLazarusPidOpt))=StartLazarusPidOpt then begin
|
||||||
try
|
try
|
||||||
IDEPid :=
|
IDEPid :=
|
||||||
StrToInt(RightStr(Param,Length(Param)-Length(LazarusPidOpt)));
|
StrToInt(RightStr(Param,Length(Param)-Length(StartLazarusPidOpt)));
|
||||||
except
|
except
|
||||||
DebugLn('Failed to parse %s',[Param]);
|
DebugLn('Failed to parse %s',[Param]);
|
||||||
IDEPid := 0;
|
IDEPid := 0;
|
||||||
|
@ -7339,7 +7339,7 @@ const
|
|||||||
end;
|
end;
|
||||||
//DebugLn('Setting CommandLine');
|
//DebugLn('Setting CommandLine');
|
||||||
StartLazProcess.Executable:=ExeName;
|
StartLazProcess.Executable:=ExeName;
|
||||||
StartLazProcess.Parameters.Add('--lazarus-pid='+IntToStr(GetProcessID));
|
StartLazProcess.Parameters.Add(StartLazarusPidOpt+IntToStr(GetProcessID));
|
||||||
StartLazProcess.Parameters.AddStrings(Params);
|
StartLazProcess.Parameters.AddStrings(Params);
|
||||||
|
|
||||||
i:=StartLazProcess.Parameters.Count-1;
|
i:=StartLazProcess.Parameters.Count-1;
|
||||||
|
Loading…
Reference in New Issue
Block a user