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

Fix Lazarus build issue in Windows

Fix Delphi build issue in MacOS
Added TCefApplicationCore.CheckCEFResources
Added TCefApplicationCore.CheckCEFDLL
Set TCefApplicationCore.CheckCEFFiles to false by default in MacOS
This commit is contained in:
Salvador Diaz Fau
2021-02-21 18:41:25 +01:00
parent 51d8c20f63
commit 92da537bf7
9 changed files with 176 additions and 111 deletions

View File

@ -291,6 +291,7 @@ implementation
uses
{$IFDEF LINUX}{$IFDEF FMX}Posix.Unistd, Posix.Stdio,{$ENDIF}{$ENDIF}
{$IFDEF MACOS}Posix.Unistd, Posix.Stdio,{$ENDIF}
uCEFApplicationCore, uCEFSchemeHandlerFactory, uCEFValue,
uCEFBinaryValue, uCEFStringList;
@ -677,7 +678,11 @@ begin
aWindowInfo.windowless_rendering_enabled := ord(False);
aWindowInfo.shared_texture_enabled := ord(False);
aWindowInfo.external_begin_frame_enabled := ord(False);
{$IFDEF FPC}
aWindowInfo.view := 0;
{$ELSE}
aWindowInfo.view := nil;
{$ENDIF}
end;
procedure WindowInfoAsPopUp(var aWindowInfo : TCefWindowInfo; aParent : TCefWindowHandle; const aWindowName : ustring; aHidden : boolean);
@ -692,7 +697,11 @@ begin
aWindowInfo.windowless_rendering_enabled := ord(False);
aWindowInfo.shared_texture_enabled := ord(False);
aWindowInfo.external_begin_frame_enabled := ord(False);
{$IFDEF FPC}
aWindowInfo.view := 0;
{$ELSE}
aWindowInfo.view := nil;
{$ENDIF}
end;
procedure WindowInfoAsWindowless(var aWindowInfo : TCefWindowInfo; aParent : TCefWindowHandle; const aWindowName : ustring; aHidden : boolean);
@ -707,7 +716,11 @@ begin
aWindowInfo.windowless_rendering_enabled := ord(True);
aWindowInfo.shared_texture_enabled := ord(False);
aWindowInfo.external_begin_frame_enabled := ord(False);
{$IFDEF FPC}
aWindowInfo.view := 0;
{$ELSE}
aWindowInfo.view := nil;
{$ENDIF}
end;
{$ENDIF}
@ -1528,10 +1541,15 @@ begin
{$IFDEF MACOSX}
Result := IncludeTrailingPathDelimiter(ExtractFileDir(ParamStr(0)));
{$IFDEF FPC}
if copy(Result, Length(Result) + 1 - Length(MAC_APP_POSTFIX) - Length(MAC_APP_SUBPATH)) = MAC_APP_POSTFIX + MAC_APP_SUBPATH then
SetLength(Result, Length(Result) - Length(MAC_APP_SUBPATH));
Result := CreateAbsolutePath(Result, GetCurrentDirUTF8);
{$ELSE}
if Result.Contains(MAC_APP_POSTFIX + MAC_APP_SUBPATH) then
Result := Result.Remove(Result.LastIndexOf(MAC_APP_SUBPATH));
{$ENDIF}
{$ENDIF}
end;