2023-11-27 18:21:07 +01:00
|
|
|
|
unit InitSubProcess;
|
2021-01-31 16:53:07 +01:00
|
|
|
|
|
2021-02-16 18:12:13 +01:00
|
|
|
|
{$mode ObjFPC}{$H+}
|
2023-11-27 18:21:07 +01:00
|
|
|
|
{$IFDEF MSWINDOWS}{$I ..\..\..\source\cef.inc}{$ELSE}{$I ../../../source/cef.inc}{$ENDIF}
|
2021-01-31 16:53:07 +01:00
|
|
|
|
|
2021-02-16 18:12:13 +01:00
|
|
|
|
interface
|
2018-07-22 11:12:41 +02:00
|
|
|
|
|
|
|
|
|
uses
|
2021-02-17 23:25:29 +01:00
|
|
|
|
GlobalCefApplication, uCEFApplication, uCEFWorkScheduler;
|
2021-02-16 18:12:13 +01:00
|
|
|
|
|
|
|
|
|
implementation
|
2018-07-22 11:12:41 +02:00
|
|
|
|
|
2021-02-16 18:12:13 +01:00
|
|
|
|
initialization
|
|
|
|
|
CreateGlobalCEFApp;
|
2021-02-17 23:25:29 +01:00
|
|
|
|
if not GlobalCEFApp.StartMainProcess then begin
|
|
|
|
|
if GlobalCEFWorkScheduler <> nil then
|
|
|
|
|
GlobalCEFWorkScheduler.StopScheduler;
|
|
|
|
|
DestroyGlobalCEFApp;
|
|
|
|
|
DestroyGlobalCEFWorkScheduler;
|
2021-02-16 18:12:13 +01:00
|
|
|
|
halt(0); // exit the subprocess
|
2021-02-17 23:25:29 +01:00
|
|
|
|
end;
|
2018-07-22 11:12:41 +02:00
|
|
|
|
|
|
|
|
|
end.
|
2021-01-31 16:53:07 +01:00
|
|
|
|
|