Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit b7d1441

Browse files
committed
[[ CEF ]] Automate prebuilts for CEF
This patch automates the process of downloading and repackaging CEF distributions into the format required for our builds. It also changes windows to output CEF resources to Externals/CEF instead of CEF as that is where the engine looks for them.
1 parent b705967 commit b7d1441

File tree

13 files changed

+227
-108
lines changed

13 files changed

+227
-108
lines changed

Installer/package.txt

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -788,26 +788,32 @@ component Externals.CEF.Linux
788788
file linux-[[TargetArchitecture]]:icudtl.dat
789789
file linux-[[TargetArchitecture]]:natives_blob.bin
790790
file linux-[[TargetArchitecture]]:snapshot_blob.bin
791+
file linux-[[TargetArchitecture]]:v8_context_snapshot.bin
791792
executable linux-[[TargetArchitecture]]:revbrowser-cefprocess
792793
executable linux-[[TargetArchitecture]]:libbrowser-cefprocess
793794

794795
component Externals.CEF.Windows
795796
into [[TargetFolder]]/Externals/CEF place
796797
executable windows:libbrowser-cefprocess.exe
797798
executable windows:revbrowser-cefprocess.exe
798-
executable windows:CEF/libcef.dll
799-
executable windows:CEF/d3dcompiler_43.dll
800-
executable windows:CEF/d3dcompiler_47.dll
801-
executable windows:CEF/libEGL.dll
802-
executable windows:CEF/libGLESv2.dll
803-
rfolder windows:CEF/locales
804-
file windows:CEF/cef.pak
805-
file windows:CEF/cef_100_percent.pak
806-
file windows:CEF/cef_200_percent.pak
807-
file windows:CEF/cef_extensions.pak
808-
file windows:CEF/icudtl.dat
809-
file windows:CEF/natives_blob.bin
810-
file windows:CEF/snapshot_blob.bin
799+
executable windows:Externals/CEF/libcef.dll
800+
executable windows:Externals/CEF/d3dcompiler_43.dll
801+
executable windows:Externals/CEF/d3dcompiler_47.dll
802+
executable windows:Externals/CEF/libEGL.dll
803+
executable windows:Externals/CEF/libGLESv2.dll
804+
executable windows:Externals/CEF/chrome_elf.dll
805+
rfolder windows:Externals/CEF/locales
806+
file windows:Externals/CEF/cef.pak
807+
file windows:Externals/CEF/cef_100_percent.pak
808+
file windows:Externals/CEF/cef_200_percent.pak
809+
file windows:Externals/CEF/cef_extensions.pak
810+
file windows:Externals/CEF/icudtl.dat
811+
file windows:Externals/CEF/natives_blob.bin
812+
file windows:Externals/CEF/snapshot_blob.bin
813+
file windows:Externals/CEF/v8_context_snapshot.bin
814+
into [[TargetFolder]]/Externals/CEF/swiftshader place
815+
executable windows:Externals/CEF/swiftshader/libEGL.dll
816+
executable windows:Externals/CEF/swiftshader/libGLESv2.dll
811817

812818
////////////////////////////////////////////////////////////////////////////////
813819

libbrowser/libbrowser.gyp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@
254254
'copies':
255255
[
256256
{
257-
'destination':'<(PRODUCT_DIR)\CEF',
257+
'destination':'<(PRODUCT_DIR)\Externals\CEF',
258258
'files':
259259
[
260260
'<(PRODUCT_DIR)\libbrowser-cefprocess.exe',
@@ -264,7 +264,7 @@
264264

265265
'library_dirs':
266266
[
267-
'../prebuilt/lib/win32/<(target_arch)/CEF/',
267+
'../prebuilt/unpacked/cef/<(uniform_arch)-win32-$(PlatformToolset)_static_$(ConfigurationName)/lib/CEF/',
268268
],
269269

270270
'libraries':

prebuilt/build-all-libs.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ IF "%2"=="" (
2222
SET ARCH=%2
2323
)
2424

25-
SET PREBUILT_LIBS=openssl curl icu
25+
SET PREBUILT_LIBS=openssl curl icu cef
2626

2727
ECHO Building Libs %PREBUILT_LIBS%
2828

prebuilt/build-libraries.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ case "${PLATFORM}" in
4141
PREBUILT_LIBS="openssl icu"
4242
;;
4343
win32)
44-
PREBUILT_LIBS="openssl curl icu"
44+
PREBUILT_LIBS="openssl curl icu cef"
4545
;;
4646
linux)
47-
PREBUILT_LIBS="openssl curl icu"
47+
PREBUILT_LIBS="openssl curl icu cef"
4848
;;
4949
emscripten)
5050
PREBUILT_LIBS="icu"

prebuilt/build-libs.bat

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ REM #
66
REM # CONFIGURE VERSIONS AND FOLDERS
77
REM #
88

9-
REM If called with no arguments ICU, OpenSSL and Curl will be built.
9+
REM If called with no arguments ICU, OpenSSL, CEF and Curl will be built.
1010
REM Otherwise it can be called with one or two arguments. The first argument is
1111
REM the library to build, the second is either not present or 'prepare'. If
1212
REM 'prepare', then the source will be downloaded and unpacked into a unique
@@ -192,6 +192,10 @@ IF %1=="" (
192192
REM Build ICU
193193
CALL "scripts\build-icu.bat"
194194
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
195+
196+
REM Build CEF
197+
CALL "scripts\build-cef.bat"
198+
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
195199
) ELSE (
196200
CALL "scripts\build-%1.bat" %2
197201
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%

prebuilt/fetch-libraries.sh

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,7 @@ function fetchLibrary {
5858
# We now use standard GNU triple ordering for the naming of windows prebuilts
5959
local NAME=""
6060
if [ "${PLATFORM}" = "win32" ]; then
61-
if [ "${LIB}" = "CEF" ]; then
62-
if [ "${ARCH}" = "x86" ]; then
63-
NAME="CEF-${VERSION}-win32-i386"
64-
elif [ "${ARCH}" = "x86_64" ]; then
65-
NAME="CEF-${VERSION}-win32-x86_64"
66-
fi
67-
else
68-
NAME="${LIB}-${VERSION}-${ARCH}-${PLATFORM}-${SUBPLATFORM}"
69-
fi
61+
NAME="${LIB}-${VERSION}-${ARCH}-${PLATFORM}-${SUBPLATFORM}"
7062
else
7163
NAME="${LIB}-${VERSION}-${PLATFORM}-${ARCH}"
7264
if [ ! -z "${SUBPLATFORM}" ] ; then
@@ -104,12 +96,8 @@ function fetchLibrary {
10496
echo "Extracting library: ${NAME}"
10597
DIR="`pwd`"
10698
if [ "${PLATFORM}" = "win32" ]; then
107-
if [ "${LIB}" = "CEF" ]; then
108-
cd "${EXTRACT_DIR}"
109-
else
110-
mkdir -p "${WIN32_EXTRACT_DIR}/${LIB}"
111-
cd "${WIN32_EXTRACT_DIR}/${LIB}"
112-
fi
99+
mkdir -p "${WIN32_EXTRACT_DIR}/${LIB}"
100+
cd "${WIN32_EXTRACT_DIR}/${LIB}"
113101
else
114102
cd "${EXTRACT_DIR}"
115103
fi

0 commit comments

Comments
 (0)