Windows: Add ARM64 distribution support (see issue #2773)
To generate Windows ARM64 builds set the CEF_ENABLE_ARM64=1 environment variable and pass the "--arm64-build --build-target=cefsimple" command-line arguments to automate-git.py. We can't build cefclient.exe for ARM64 due to missing OpenGL library support so build cefsimple.exe instead.
This commit is contained in:
parent
2a64387259
commit
b798147c33
|
@ -115,6 +115,17 @@
|
|||
# > "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat"
|
||||
# > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug ..
|
||||
# > ninja cefclient cefsimple
|
||||
#
|
||||
# To perform a Windows build using an ARM64 CEF binary distribution:
|
||||
# Using the Visual Studio 2019 IDE:
|
||||
# > cmake -G "Visual Studio 16" -A arm64 ..
|
||||
# Open build\cef.sln in Visual Studio and select Build > Build Solution.
|
||||
#
|
||||
# Using Ninja with Visual Studio 2019 command-line tools:
|
||||
# (this path may be different depending on your Visual Studio installation)
|
||||
# > "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsamd64_arm64.bat"
|
||||
# > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug ..
|
||||
# > ninja cefsimple
|
||||
|
||||
#
|
||||
# Global setup.
|
||||
|
|
|
@ -26,7 +26,9 @@ endif()
|
|||
|
||||
# Determine the project architecture.
|
||||
if(NOT DEFINED PROJECT_ARCH)
|
||||
if(CMAKE_SIZEOF_VOID_P MATCHES 8)
|
||||
if(OS_WINDOWS AND ${CMAKE_GENERATOR_PLATFORM} STREQUAL "arm64")
|
||||
set(PROJECT_ARCH "arm64")
|
||||
elseif(CMAKE_SIZEOF_VOID_P MATCHES 8)
|
||||
set(PROJECT_ARCH "x86_64")
|
||||
else()
|
||||
set(PROJECT_ARCH "x86")
|
||||
|
@ -462,7 +464,6 @@ if(OS_WINDOWS)
|
|||
# List of CEF binary files.
|
||||
set(CEF_BINARY_FILES
|
||||
chrome_elf.dll
|
||||
d3dcompiler_47.dll
|
||||
libcef.dll
|
||||
libEGL.dll
|
||||
libGLESv2.dll
|
||||
|
@ -471,6 +472,12 @@ if(OS_WINDOWS)
|
|||
swiftshader
|
||||
)
|
||||
|
||||
if(NOT PROJECT_ARCH STREQUAL "arm64")
|
||||
list(APPEND CEF_BINARY_FILES
|
||||
d3dcompiler_47.dll
|
||||
)
|
||||
endif()
|
||||
|
||||
# List of CEF resource files.
|
||||
set(CEF_RESOURCE_FILES
|
||||
cef.pak
|
||||
|
@ -490,12 +497,15 @@ if(OS_WINDOWS)
|
|||
|
||||
# Libraries required by cef_sandbox.lib.
|
||||
set(CEF_SANDBOX_STANDARD_LIBS
|
||||
Advapi32.lib
|
||||
dbghelp.lib
|
||||
Delayimp.lib
|
||||
OleAut32.lib
|
||||
PowrProf.lib
|
||||
Propsys.lib
|
||||
psapi.lib
|
||||
SetupAPI.lib
|
||||
Shell32.lib
|
||||
version.lib
|
||||
wbemuuid.lib
|
||||
winmm.lib
|
||||
|
|
|
@ -985,7 +985,7 @@ else:
|
|||
sys.exit()
|
||||
|
||||
if options.clientdistrib or options.clientdistribonly:
|
||||
if platform == 'linux':
|
||||
if platform == 'linux' or (platform == 'windows' and options.arm64build):
|
||||
client_app = 'cefsimple'
|
||||
else:
|
||||
client_app = 'cefclient'
|
||||
|
|
|
@ -100,7 +100,7 @@ class cef_json_builder:
|
|||
def get_platforms():
|
||||
""" Returns the list of supported platforms. """
|
||||
return ('linux32', 'linux64', 'linuxarm', 'linuxarm64', 'macosarm64', 'macosx64',
|
||||
'windows32', 'windows64')
|
||||
'windows32', 'windows64', 'windowsarm64')
|
||||
|
||||
@staticmethod
|
||||
def get_distrib_types():
|
||||
|
|
|
@ -860,7 +860,9 @@ if platform == 'windows':
|
|||
# yapf: enable
|
||||
|
||||
if mode == 'client':
|
||||
binaries.append({'path': 'cefclient.exe'})
|
||||
binaries.append({
|
||||
'path': 'cefsimple.exe' if platform_arch == 'arm64' else 'cefclient.exe'
|
||||
})
|
||||
else:
|
||||
binaries.append({'path': libcef_dll_lib, 'out_path': 'libcef.lib'})
|
||||
|
||||
|
|
Loading…
Reference in New Issue