1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-06-12 22:07:39 +02:00

improve: allow to require specific locales only

Some projects may use specific languages only, so, there is not need to
include unused languages into a project, but CEF4Delphi requires it.

Make able to require specific locales only.
This commit is contained in:
Alexey Shumkin
2017-10-24 18:36:12 +03:00
parent 365bd1eeaf
commit e40716e7aa
2 changed files with 95 additions and 56 deletions

View File

@ -80,6 +80,7 @@ type
FUserAgent : ustring;
FProductVersion : ustring;
FLocale : ustring;
FLocalesRequired : ustring;
FLogFile : ustring;
FBrowserSubprocessPath : ustring;
FFrameworkDirPath : ustring;
@ -269,6 +270,7 @@ type
property ReRaiseExceptions : boolean read FReRaiseExceptions write FReRaiseExceptions;
property DeviceScaleFactor : single read FDeviceScaleFactor;
property CheckDevToolsResources : boolean read FCheckDevToolsResources write FCheckDevToolsResources;
property LocalesRequired : ustring read FLocalesRequired write FLocalesRequired;
end;
TCefAppOwn = class(TCefBaseRefCountedOwn, ICefApp)
@ -372,6 +374,7 @@ begin
FSetCurrentDir := False;
FUpdateChromeVer := aUpdateChromeVer;
FCheckDevToolsResources := True;
FLocalesRequired := '';
UpdateDeviceScaleFactor;
@ -569,7 +572,7 @@ begin
end;
if not(CheckLocales(FLocalesDirPath)) then
if not(CheckLocales(FLocalesDirPath, FLocalesRequired)) then
begin
TempString := 'CEF locale files missing !' + CRLF + CRLF;