Fixed issue #527 : Demo ExternalPumpBrowser Helper (GPU) crash on MacOs 14 Sonoma - Lazarus x86_64-darwin

This commit is contained in:
Salvador Díaz Fau 2024-09-09 13:16:03 +02:00
parent e2815ed2f4
commit a42f3dfd5f
8 changed files with 32 additions and 11 deletions

View File

@ -64,6 +64,9 @@
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf3"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
@ -71,7 +74,8 @@
</Options>
</Linking>
<Other>
<CustomOptions Value="-dUseCthreads"/>
<CustomOptions Value="-WM11.0
-dUseCthreads"/>
</Other>
</CompilerOptions>
<Debugging>

View File

@ -29,8 +29,8 @@ uses
begin
RequireDerivedFormResource:=True;
Application.Title := 'External Pump Browser';
Application.Scaled := True;
Application.Title:='External Pump Browser';
Application.Scaled:=True;
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;

View File

@ -18,7 +18,12 @@ You should have:
Libraries/*
Resources/*
3) Open project "AppHelper" (from demos/Lazarus_any_OS ), create App Bundle and compile the AppHelper.
Run create_mac_helper.sh
Run demos/Lazarus_Mac/ExternalPumpBrowser/create_mac_helper.sh
4) Open project ExternalPumpBrowser, compile and run
CEF4Delphi may report an invalid macOS version. In that case, use the -WMxx.y custom option to set a higher minimum macOS version for that project.
You might also need to sign the application with an "Outgoing network socket" entitlement in the helpers.
Set LSUIElement=1 in the info.plist to hide the helpers in the dock.

View File

@ -6,7 +6,7 @@ unit GlobalCefApplication;
interface
uses
uCEFApplication, uCEFWorkScheduler;
uCEFApplication, uCEFWorkScheduler, uCEFConstants;
procedure CreateGlobalCEFApp;
@ -36,12 +36,11 @@ begin
(* Enable the below to prevent being asked for permission to access "Chromium Safe Storage"
If set to true, Cookies will not be encrypted.
*)
//GlobalCEFApp.UseMockKeyChain := True;
GlobalCEFApp.UseMockKeyChain := True;
//GlobalCEFApp.EnableGPU := False;
//GlobalCEFApp.LogFile := 'debug.log';
//GlobalCEFApp.LogSeverity := LOGSEVERITY_VERBOSE;
{
GlobalCEFApp.LogFile := 'cef.log';
GlobalCEFApp.LogSeverity := LOGSEVERITY_VERBOSE;
}
end;
end.

View File

@ -79,5 +79,8 @@
</Win32>
</Options>
</Linking>
<Other>
<CustomOptions Value="-WM11.0"/>
</Other>
</CompilerOptions>
</CONFIG>

View File

@ -27,6 +27,11 @@ begin
GlobalCEFApp.InitLibLocationFromArgs;
{$ENDIF}
GlobalCEFApp.UseMockKeyChain := True;
//GlobalCEFApp.EnableGPU := False;
//GlobalCEFApp.LogFile := 'debug.log';
//GlobalCEFApp.LogSeverity := LOGSEVERITY_VERBOSE;
GlobalCEFApp.StartSubProcess;
GlobalCEFApp.Free;
GlobalCEFApp := nil;

View File

@ -0,0 +1,5 @@
CEF4Delphi may report an invalid macOS version. In that case, use the -WMxx.y custom option to set a higher minimum macOS version for that project.
You might also need to sign the application with an "Outgoing network socket" entitlement in the helpers.
Set LSUIElement=1 in the info.plist to hide the helpers in the dock.

View File

@ -2,7 +2,7 @@
"UpdateLazPackages" : [
{
"ForceNotify" : true,
"InternalVersion" : 652,
"InternalVersion" : 653,
"Name" : "cef4delphi_lazarus.lpk",
"Version" : "128.4.9"
}