IDE: startlazarus on darwin start the bundle, open with exe does not work anymore since big sur

git-svn-id: trunk@64255 -
This commit is contained in:
mattias 2020-12-20 15:02:38 +00:00
parent deba76613b
commit 80ce4d3432
2 changed files with 2 additions and 4 deletions

View File

@ -210,6 +210,7 @@ begin
HasDebugLog := False; HasDebugLog := False;
for i := 1 to ParamsAndCfgCount do begin for i := 1 to ParamsAndCfgCount do begin
Param := ParamsAndCfgStr(i); Param := ParamsAndCfgStr(i);
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=LazarusDebugOpt) and (not HasDebugLog) then begin

View File

@ -372,11 +372,7 @@ begin
{$IFDEF darwin} {$IFDEF darwin}
if DirectoryExistsUTF8(FLazarusPath+'.app') then begin if DirectoryExistsUTF8(FLazarusPath+'.app') then begin
// start the bundle instead // start the bundle instead
{$IFDEF LCLCocoa}
FLazarusPath:= FLazarusPath+'.app/Contents/MacOS/'+ExtractFileName(FLazarusPath);
{$ELSE}
FLazarusPath:= FLazarusPath+'.app';// /Contents/MacOS/'+ExtractFileName(FLazarusPath); FLazarusPath:= FLazarusPath+'.app';// /Contents/MacOS/'+ExtractFileName(FLazarusPath);
{$ENDIF}
end; end;
{$ENDIF} {$ENDIF}
@ -415,6 +411,7 @@ begin
// clear the command line files, so that they are passed only once. // clear the command line files, so that they are passed only once.
FCmdLineFiles:=''; FCmdLineFiles:='';
FLazarusProcess.OnStart := @LazarusProcessStart; FLazarusProcess.OnStart := @LazarusProcessStart;
DebugLn(['Info: (startlazarus) [TLazarusManager.Run] exe',FLazarusProcess.Process.Executable,' Params=[',FLazarusProcess.Process.Parameters.Text,']']);
FLazarusProcess.Execute; FLazarusProcess.Execute;
FLazarusProcess.WaitOnExit; FLazarusProcess.WaitOnExit;
Restart := FLazarusProcess.WantsRestart; Restart := FLazarusProcess.WantsRestart;