diff --git a/ide/idecmdline.pas b/ide/idecmdline.pas index 2f9b5ad598..1a0d19a03c 100644 --- a/ide/idecmdline.pas +++ b/ide/idecmdline.pas @@ -210,6 +210,7 @@ begin HasDebugLog := False; for i := 1 to ParamsAndCfgCount do begin Param := ParamsAndCfgStr(i); + if Param='' then continue; if SysUtils.CompareText(LeftStr(Param, length(DebugLogOpt)), DebugLogOpt) = 0 then HasDebugLog := HasDebugLog or (length(Param) > length(DebugLogOpt)); if (Param=LazarusDebugOpt) and (not HasDebugLog) then begin diff --git a/ide/lazarusmanager.pas b/ide/lazarusmanager.pas index 80f79858b5..b081bcdd77 100644 --- a/ide/lazarusmanager.pas +++ b/ide/lazarusmanager.pas @@ -372,11 +372,7 @@ begin {$IFDEF darwin} if DirectoryExistsUTF8(FLazarusPath+'.app') then begin // start the bundle instead - {$IFDEF LCLCocoa} - FLazarusPath:= FLazarusPath+'.app/Contents/MacOS/'+ExtractFileName(FLazarusPath); - {$ELSE} FLazarusPath:= FLazarusPath+'.app';// /Contents/MacOS/'+ExtractFileName(FLazarusPath); - {$ENDIF} end; {$ENDIF} @@ -415,6 +411,7 @@ begin // clear the command line files, so that they are passed only once. FCmdLineFiles:=''; FLazarusProcess.OnStart := @LazarusProcessStart; + DebugLn(['Info: (startlazarus) [TLazarusManager.Run] exe',FLazarusProcess.Process.Executable,' Params=[',FLazarusProcess.Process.Parameters.Text,']']); FLazarusProcess.Execute; FLazarusProcess.WaitOnExit; Restart := FLazarusProcess.WantsRestart;