From 62753fa7f9d160d969c58ae74dae7dbe7dd2525a Mon Sep 17 00:00:00 2001 From: Salvador Diaz Fau Date: Fri, 8 Jan 2021 16:01:06 +0100 Subject: [PATCH] Update to CEF 87.1.13 Fixed some FMX compilation issues in Linux thanks to Christoph Schneider. --- README.md | 14 +++++++------- packages/cef4delphi_lazarus.lpk | 2 +- source/uCEFApplicationCore.pas | 6 +++--- source/uCEFLibFunctions.pas | 3 ++- source/uCEFMiscFunctions.pas | 14 ++++++++------ source/uCEFTypes.pas | 6 +++++- update_CEF4Delphi.json | 4 ++-- 7 files changed, 28 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index c7cdbc2e..2a7cc54a 100644 --- a/README.md +++ b/README.md @@ -3,14 +3,14 @@ CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chro CEF4Delphi is based on DCEF3, made by Henri Gourvest. The original license of DCEF3 still applies to CEF4Delphi. Read the license terms in the first lines of any *.pas file. -CEF4Delphi uses CEF 87.1.12 which includes Chromium 87.0.4280.88. +CEF4Delphi uses CEF 87.1.13 which includes Chromium 87.0.4280.141. The CEF binaries used by CEF4Delphi are available for download at spotify : -* [Windows 32 bits](https://cef-builds.spotifycdn.com/cef_binary_87.1.12%2Bg03f9336%2Bchromium-87.0.4280.88_windows32.tar.bz2) -* [Windows 64 bits](https://cef-builds.spotifycdn.com/cef_binary_87.1.12%2Bg03f9336%2Bchromium-87.0.4280.88_windows64.tar.bz2) -* [Linux x86 32 bits](https://cef-builds.spotifycdn.com/cef_binary_87.1.12%2Bg03f9336%2Bchromium-87.0.4280.88_linux32.tar.bz2) -* [Linux x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_87.1.12%2Bg03f9336%2Bchromium-87.0.4280.88_linux64.tar.bz2) -* [Linux ARM 32 bits](https://cef-builds.spotifycdn.com/cef_binary_87.1.12%2Bg03f9336%2Bchromium-87.0.4280.88_linuxarm.tar.bz2) -* [Linux ARM 64 bits](https://cef-builds.spotifycdn.com/cef_binary_87.1.12%2Bg03f9336%2Bchromium-87.0.4280.88_linuxarm64.tar.bz2) +* [Windows 32 bits](https://cef-builds.spotifycdn.com/cef_binary_87.1.13%2Bg481a82a%2Bchromium-87.0.4280.141_windows32.tar.bz2) +* [Windows 64 bits](https://cef-builds.spotifycdn.com/cef_binary_87.1.13%2Bg481a82a%2Bchromium-87.0.4280.141_windows64.tar.bz2) +* [Linux x86 32 bits](https://cef-builds.spotifycdn.com/cef_binary_87.1.13%2Bg481a82a%2Bchromium-87.0.4280.141_linux32.tar.bz2) +* [Linux x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_87.1.13%2Bg481a82a%2Bchromium-87.0.4280.141_linux64.tar.bz2) +* [Linux ARM 32 bits](https://cef-builds.spotifycdn.com/cef_binary_87.1.13%2Bg481a82a%2Bchromium-87.0.4280.141_linuxarm.tar.bz2) +* [Linux ARM 64 bits](https://cef-builds.spotifycdn.com/cef_binary_87.1.13%2Bg481a82a%2Bchromium-87.0.4280.141_linuxarm64.tar.bz2) CEF4Delphi was developed and tested on Delphi 10.4.1 and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2, Delphi 10.3 and Lazarus 2.0.10/FPC 3.2.0. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components. diff --git a/packages/cef4delphi_lazarus.lpk b/packages/cef4delphi_lazarus.lpk index 09048a4b..e2344b96 100644 --- a/packages/cef4delphi_lazarus.lpk +++ b/packages/cef4delphi_lazarus.lpk @@ -21,7 +21,7 @@ - + diff --git a/source/uCEFApplicationCore.pas b/source/uCEFApplicationCore.pas index d70076c3..d9ee9701 100644 --- a/source/uCEFApplicationCore.pas +++ b/source/uCEFApplicationCore.pas @@ -59,19 +59,19 @@ uses {$ELSE} {$IFDEF MSWINDOWS}Windows,{$ENDIF} Classes, {$IFDEF FPC}dynlibs,{$ENDIF} {$ENDIF} - {$IFDEF LINUX}xlib,{$ENDIF} + {$IFDEF LINUX}{$IFDEF FPC}xlib,{$ENDIF}{$ENDIF} uCEFTypes, uCEFInterfaces, uCEFBaseRefCounted, uCEFSchemeRegistrar; const CEF_SUPPORTED_VERSION_MAJOR = 87; CEF_SUPPORTED_VERSION_MINOR = 1; - CEF_SUPPORTED_VERSION_RELEASE = 12; + CEF_SUPPORTED_VERSION_RELEASE = 13; CEF_SUPPORTED_VERSION_BUILD = 0; CEF_CHROMEELF_VERSION_MAJOR = 87; CEF_CHROMEELF_VERSION_MINOR = 0; CEF_CHROMEELF_VERSION_RELEASE = 4280; - CEF_CHROMEELF_VERSION_BUILD = 88; + CEF_CHROMEELF_VERSION_BUILD = 141; {$IFDEF MSWINDOWS} LIBCEF_DLL = 'libcef.dll'; diff --git a/source/uCEFLibFunctions.pas b/source/uCEFLibFunctions.pas index da90ba00..5be713e1 100644 --- a/source/uCEFLibFunctions.pas +++ b/source/uCEFLibFunctions.pas @@ -54,7 +54,8 @@ uses {$ELSE} {$IFDEF MSWINDOWS}Windows,{$ENDIF} Math, {$ENDIF} - {$IFDEF LINUX}xlib,{$ENDIF} uCEFTypes; + {$IFDEF LINUX}{$IFDEF FPC}xlib,{$ENDIF}{$ENDIF} + uCEFTypes; var // /include/capi/cef_app_capi.h diff --git a/source/uCEFMiscFunctions.pas b/source/uCEFMiscFunctions.pas index 6309cdb9..b7a913cc 100644 --- a/source/uCEFMiscFunctions.pas +++ b/source/uCEFMiscFunctions.pas @@ -76,8 +76,8 @@ uses const Kernel32DLL = 'kernel32.dll'; SHLWAPIDLL = 'shlwapi.dll'; - NTDLL = 'ntdll.dll'; - User32DLL = 'User32.dll'; + NTDLL = 'ntdll.dll'; + User32DLL = 'User32.dll'; type TOSVersionInfoEx = record @@ -762,14 +762,16 @@ end; {$ENDIF} {$IFDEF LINUX} -procedure WindowInfoAsChild(var aWindowInfo : TCefWindowInfo; aParent : TCefWindowHandle; aRect : TRect; const aWindowName : ustring = ''); +procedure WindowInfoAsChild(var aWindowInfo : TCefWindowInfo; aParent : TCefWindowHandle; aRect : TRect; const aWindowName : ustring = ''); var TempParent : TCefWindowHandle; begin + // TODO: Find a way to get the right "parent_window" in FMX + TempParent := aParent; + {$IFDEF FPC} if ValidCefWindowHandle(aParent) and (PGtkWidget(aParent)^.window <> nil) then - TempParent := gdk_window_xwindow(PGtkWidget(aParent)^.window) - else - TempParent := aParent; + TempParent := gdk_window_xwindow(PGtkWidget(aParent)^.window); + {$ENDIF} aWindowInfo.window_name := CefString(aWindowName); aWindowInfo.x := aRect.left; diff --git a/source/uCEFTypes.pas b/source/uCEFTypes.pas index 62ae0317..f4eac77a 100644 --- a/source/uCEFTypes.pas +++ b/source/uCEFTypes.pas @@ -250,7 +250,11 @@ type PCefMediaSinkDeviceInfo = ^TCefMediaSinkDeviceInfo; {$IFDEF LINUX} - PXEvent = Pointer; + PXEvent = pointer; + {$IFNDEF FPC} + // TODO: Find the FMX unit where PXDisplay is declared + PXDisplay = pointer; + {$ENDIF} {$ENDIF} diff --git a/update_CEF4Delphi.json b/update_CEF4Delphi.json index 842f1509..3c09ae19 100644 --- a/update_CEF4Delphi.json +++ b/update_CEF4Delphi.json @@ -2,9 +2,9 @@ "UpdateLazPackages" : [ { "ForceNotify" : true, - "InternalVersion" : 226, + "InternalVersion" : 227, "Name" : "cef4delphi_lazarus.lpk", - "Version" : "87.1.12.0" + "Version" : "87.1.13.0" } ], "UpdatePackageData" : {