diff --git a/demos/Lazarus_Mac/AppHelper/00-Delete.bat b/demos/Lazarus_any_OS/AppHelper/00-Delete.bat similarity index 100% rename from demos/Lazarus_Mac/AppHelper/00-Delete.bat rename to demos/Lazarus_any_OS/AppHelper/00-Delete.bat diff --git a/demos/Lazarus_Mac/AppHelper/AppHelper.ico b/demos/Lazarus_any_OS/AppHelper/AppHelper.ico similarity index 100% rename from demos/Lazarus_Mac/AppHelper/AppHelper.ico rename to demos/Lazarus_any_OS/AppHelper/AppHelper.ico diff --git a/demos/Lazarus_Mac/AppHelper/AppHelper.lpi b/demos/Lazarus_any_OS/AppHelper/AppHelper.lpi similarity index 100% rename from demos/Lazarus_Mac/AppHelper/AppHelper.lpi rename to demos/Lazarus_any_OS/AppHelper/AppHelper.lpi diff --git a/demos/Lazarus_Mac/AppHelper/AppHelper.lpr b/demos/Lazarus_any_OS/AppHelper/AppHelper.lpr similarity index 96% rename from demos/Lazarus_Mac/AppHelper/AppHelper.lpr rename to demos/Lazarus_any_OS/AppHelper/AppHelper.lpr index 94707950..6ff93e06 100644 --- a/demos/Lazarus_Mac/AppHelper/AppHelper.lpr +++ b/demos/Lazarus_any_OS/AppHelper/AppHelper.lpr @@ -21,7 +21,9 @@ begin // The main process and the subprocess *MUST* have the same GlobalCEFApp // properties and events, specially FrameworkDirPath, ResourcesDirPath, // LocalesDirPath, cache and UserDataPath paths. + {$IFDEF MACOSX} GlobalCEFApp.InitLibLocationFromArgs; + {$ENDIF} GlobalCEFApp.StartSubProcess; GlobalCEFApp.Free; diff --git a/demos/Lazarus_Mac/AppHelper/AppHelper.res b/demos/Lazarus_any_OS/AppHelper/AppHelper.res similarity index 100% rename from demos/Lazarus_Mac/AppHelper/AppHelper.res rename to demos/Lazarus_any_OS/AppHelper/AppHelper.res diff --git a/demos/Lazarus_Mac/AppHelper/cef.inc b/demos/Lazarus_any_OS/AppHelper/cef.inc similarity index 100% rename from demos/Lazarus_Mac/AppHelper/cef.inc rename to demos/Lazarus_any_OS/AppHelper/cef.inc diff --git a/demos/Lazarus_Mac/AppHelper/create_mac_helper_apps.sh b/demos/Lazarus_any_OS/AppHelper/create_mac_helper_apps.sh similarity index 100% rename from demos/Lazarus_Mac/AppHelper/create_mac_helper_apps.sh rename to demos/Lazarus_any_OS/AppHelper/create_mac_helper_apps.sh diff --git a/demos/Lazarus_any_OS/ExternalPumpBrowser/create_mac_helper.sh b/demos/Lazarus_any_OS/ExternalPumpBrowser/create_mac_helper.sh index d1683040..83d700b3 100755 --- a/demos/Lazarus_any_OS/ExternalPumpBrowser/create_mac_helper.sh +++ b/demos/Lazarus_any_OS/ExternalPumpBrowser/create_mac_helper.sh @@ -3,6 +3,6 @@ CDIR=$(pwd) cd "$(dirname "$0")" -../../Lazarus_Mac/AppHelper/create_mac_helper_apps.sh ../../../bin/ExternalPumpBrowser.app +../AppHelper/create_mac_helper_apps.sh ../../../bin/ExternalPumpBrowser.app cd "$CDIR" diff --git a/demos/Lazarus_any_OS/ExternalPumpBrowser/globalcefapplication.pas b/demos/Lazarus_any_OS/ExternalPumpBrowser/globalcefapplication.pas index 4595c5d7..03eda838 100644 --- a/demos/Lazarus_any_OS/ExternalPumpBrowser/globalcefapplication.pas +++ b/demos/Lazarus_any_OS/ExternalPumpBrowser/globalcefapplication.pas @@ -6,7 +6,7 @@ unit GlobalCefApplication; interface uses - uCEFApplication, uCEFWorkScheduler; + uCEFApplication, uCEFWorkScheduler, FileUtil; procedure CreateGlobalCEFApp; @@ -33,6 +33,11 @@ begin GlobalCEFApp.MultiThreadedMessageLoop := False; GlobalCEFApp.OnScheduleMessagePumpWork := @GlobalCEFApp_OnScheduleMessagePumpWork; + {$IFnDEF MACOSX} + (* Use AppHelper as subprocess, instead of the main exe *) + //GlobalCEFApp.BrowserSubprocessPath := 'AppHelper' + GetExeExt; + {$ENDIF} + {$IFDEF MACOSX} (* Enable the below to prevent being asked for permission to access "Chromium Safe Storage" If set to true, Cookies will not be encrypted.