-
Notifications
You must be signed in to change notification settings - Fork 17
/
TInject.dpr
50 lines (43 loc) · 1.44 KB
/
TInject.dpr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
program TInject;
{$I cef.inc}
uses
{$IFDEF DELPHI16_UP}
Vcl.Forms,
{$ELSE}
Forms,
Windows,
{$ENDIF }
uCEFApplication,
uCEFConstants,
controller.injetaJS in 'Controller\controller.injetaJS.pas',
u_principal in 'u_principal.pas' {frm_principal};
{$R *.res}
begin
GlobalCEFApp := TCefApplication.Create;
// In case you want to use custom directories for the CEF3 binaries, cache and user data.
// If you don't set a cache directory the browser will use in-memory cache.
{
GlobalCEFApp.FrameworkDirPath := 'cef';
GlobalCEFApp.ResourcesDirPath := 'cef';
GlobalCEFApp.LocalesDirPath := 'cef\locales';
GlobalCEFApp.EnableGPU := True; // Enable hardware acceleration
GlobalCEFApp.cache := 'cef\cache';
GlobalCEFApp.UserDataPath := 'cef\User Data';
}
// Disabling some features to improve stability
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
// You *MUST* call GlobalCEFApp.StartMainProcess in a if..then clause
// with the Application initialization inside the begin..end.
// Read this https://www.briskbard.com/index.php?lang=en&pageid=cef
if GlobalCEFApp.StartMainProcess then
begin
Application.Initialize;
{$IFDEF DELPHI11_UP}
Application.MainFormOnTaskbar := True;
{$ENDIF}
Application.CreateForm(Tfrm_principal, frm_principal);
Application.Run;
end;
GlobalCEFApp.Free;
GlobalCEFApp := nil;
end.