startlazarus: cocoa: do not use open -a, execute bundle exe, else menu is not visible

git-svn-id: trunk@63620 -
This commit is contained in:
mattias 2020-07-22 12:35:50 +00:00
parent efdce59d90
commit e6f3bd3f8f
2 changed files with 6 additions and 2 deletions

View File

@ -370,17 +370,21 @@ 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}
DebugLn(['TLazarusManager.Run starting ',FLazarusPath,' ...']); DebugLn(['Info: (startlazarus) [TLazarusManager.Run] starting ',FLazarusPath,' ...']);
EnvOverrides:=TStringList.Create; EnvOverrides:=TStringList.Create;
try try
{$IFDEF Linux} {$IFDEF Linux}
EnvOverrides.Values['LIBOVERLAY_SCROLLBAR']:='0'; EnvOverrides.Values['LIBOVERLAY_SCROLLBAR']:='0';
{$ENDIF} {$ENDIF}
{$IFDEF darwin} {$IFDEF LCLCarbon}
// "open" process runs a bundle, but doesn't wait for it to finish execution // "open" process runs a bundle, but doesn't wait for it to finish execution
// "startlazarus" logic suggests that the Lazarus process would be waited // "startlazarus" logic suggests that the Lazarus process would be waited
// and if the special 99 (ExitCodeRestartLazarus) code is received, // and if the special 99 (ExitCodeRestartLazarus) code is received,

Binary file not shown.