-
Notifications
You must be signed in to change notification settings - Fork 78
/
niu_new.dpr
52 lines (48 loc) · 1.45 KB
/
niu_new.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
program niu_new;
{$I cef.inc}
uses
Forms,
Windows,
SysUtils,
uCEFApplication,
uCEFConstants,
ufrmMain in 'ufrmMain.pas' { frmMain },
unConfig in 'unConfig.pas',
unRunOne in 'unRunOne.pas',
ufrmSplash in 'ufrmSplash.pas' { frmSplash },
ufrmModal in 'ufrmModal.pas' { frmModal },
uframeChrome in 'uframeChrome.pas' { frameChrome: TFrame},
unV8Extension in 'unV8Extension.pas',
unMoudle in 'unMoudle.pas' { dbMoudle: TDataModule},
unChromeMessage in 'unChromeMessage.pas',
unCmdCli in 'unCmdCli.pas',
unCEF in 'unCEF.pas';
{$R *.res}
// CEF3 needs to set the LARGEADDRESSAWARE flag which allows 32-bit processes to use up to 3GB of RAM.
{$SETPEFLAGS IMAGE_FILE_LARGE_ADDRESS_AWARE}
begin
{$IF CompilerVersion> 18}
ReportMemoryLeaksOnShutdown := True;
{$IFEND}
CreateGlobalCEFApp; // 必须放在主窗口单元里,否则有内存泄漏
try
if GlobalCEFApp.StartMainProcess then
begin
Application.Initialize;
if unRunOne.AppHasRun(Application.Handle,
'{89304366-F0B6-432A-870B-3FAB2B7C5514}') then
begin
Exit;
end;
{$IFDEF DELPHI11_UP}
Application.MainFormOnTaskBar := False; // 主窗口激活,会导致show窗口,透明阴影居顶
{$ENDIF}
Application.Title := FCaption;
Application.CreateForm(TdbMoudle, dbMoudle);
Application.CreateForm(TfrmMain, frmMain);
Application.Run;
end;
finally // 必须finally里释放,防止unRunOne.AppHasRun退出后不释放子进程
DestroyGlobalCEFApp;
end;
end.