forked from eldon689/TInject-whatsapp-delphi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTInject.dpr
64 lines (49 loc) · 1.86 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
program TInject;
{$I cef.inc}
uses
{$IFDEF DELPHI16_UP}
Vcl.Forms,
{$ELSE}
Forms,
Windows,
{$ENDIF }
uCEFApplication,
uCEFConstants,
u_principal in 'u_principal.pas' {frm_principal},
UnitCEFHandlerSessionChromium in 'Services\UnitCEFHandlerSessionChromium.pas',
UnitCEFLoadHandlerChromium in 'Services\UnitCEFLoadHandlerChromium.pas',
uClasses in 'Model\uClasses.pas';
{$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 := 'BIN';
//GlobalCEFApp.ResourcesDirPath := 'BIN';
//GlobalCEFApp.LocalesDirPath := 'BIN\locales';
// Enable hardware acceleration
GlobalCEFApp.EnableGPU := True;
GlobalCEFApp.cache := 'DATA\cache';
//Ativa log de depuração
//GlobalCEFApp.LogFile := 'DATA\log';
//GlobalCEFApp.LogSeverity := LOGSEVERITY_VERBOSE; // use LOGSEVERITY_VERBOSE if you want more details
//GlobalCEFApp.UserDataPath := 'BIN\User Data';
//Ativa escuta http na porta 8077 ex: localhost:8077
//GlobalCEFApp.RemoteDebuggingPort := 8077;
// 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.