mirror of
				https://bitbucket.org/chromiumembedded/cef
				synced 2025-06-05 21:39:12 +02:00 
			
		
		
		
	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:
		| @@ -115,6 +115,17 @@ | |||||||
| #     > "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat" | #     > "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat" | ||||||
| #     > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug .. | #     > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug .. | ||||||
| #     > ninja cefclient cefsimple | #     > 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. | # Global setup. | ||||||
|   | |||||||
| @@ -26,7 +26,9 @@ endif() | |||||||
|  |  | ||||||
| # Determine the project architecture. | # Determine the project architecture. | ||||||
| if(NOT DEFINED PROJECT_ARCH) | 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") |     set(PROJECT_ARCH "x86_64") | ||||||
|   else() |   else() | ||||||
|     set(PROJECT_ARCH "x86") |     set(PROJECT_ARCH "x86") | ||||||
| @@ -462,7 +464,6 @@ if(OS_WINDOWS) | |||||||
|   # List of CEF binary files. |   # List of CEF binary files. | ||||||
|   set(CEF_BINARY_FILES |   set(CEF_BINARY_FILES | ||||||
|     chrome_elf.dll |     chrome_elf.dll | ||||||
|     d3dcompiler_47.dll |  | ||||||
|     libcef.dll |     libcef.dll | ||||||
|     libEGL.dll |     libEGL.dll | ||||||
|     libGLESv2.dll |     libGLESv2.dll | ||||||
| @@ -471,6 +472,12 @@ if(OS_WINDOWS) | |||||||
|     swiftshader |     swiftshader | ||||||
|     ) |     ) | ||||||
|  |  | ||||||
|  |   if(NOT PROJECT_ARCH STREQUAL "arm64") | ||||||
|  |     list(APPEND CEF_BINARY_FILES | ||||||
|  |       d3dcompiler_47.dll | ||||||
|  |       ) | ||||||
|  |   endif() | ||||||
|  |  | ||||||
|   # List of CEF resource files. |   # List of CEF resource files. | ||||||
|   set(CEF_RESOURCE_FILES |   set(CEF_RESOURCE_FILES | ||||||
|     cef.pak |     cef.pak | ||||||
| @@ -490,12 +497,15 @@ if(OS_WINDOWS) | |||||||
|  |  | ||||||
|     # Libraries required by cef_sandbox.lib. |     # Libraries required by cef_sandbox.lib. | ||||||
|     set(CEF_SANDBOX_STANDARD_LIBS |     set(CEF_SANDBOX_STANDARD_LIBS | ||||||
|  |       Advapi32.lib | ||||||
|       dbghelp.lib |       dbghelp.lib | ||||||
|       Delayimp.lib |       Delayimp.lib | ||||||
|  |       OleAut32.lib | ||||||
|       PowrProf.lib |       PowrProf.lib | ||||||
|       Propsys.lib |       Propsys.lib | ||||||
|       psapi.lib |       psapi.lib | ||||||
|       SetupAPI.lib |       SetupAPI.lib | ||||||
|  |       Shell32.lib | ||||||
|       version.lib |       version.lib | ||||||
|       wbemuuid.lib |       wbemuuid.lib | ||||||
|       winmm.lib |       winmm.lib | ||||||
|   | |||||||
| @@ -985,7 +985,7 @@ else: | |||||||
|   sys.exit() |   sys.exit() | ||||||
|  |  | ||||||
| if options.clientdistrib or options.clientdistribonly: | if options.clientdistrib or options.clientdistribonly: | ||||||
|   if platform == 'linux': |   if platform == 'linux' or (platform == 'windows' and options.arm64build): | ||||||
|     client_app = 'cefsimple' |     client_app = 'cefsimple' | ||||||
|   else: |   else: | ||||||
|     client_app = 'cefclient' |     client_app = 'cefclient' | ||||||
|   | |||||||
| @@ -100,7 +100,7 @@ class cef_json_builder: | |||||||
|   def get_platforms(): |   def get_platforms(): | ||||||
|     """ Returns the list of supported platforms. """ |     """ Returns the list of supported platforms. """ | ||||||
|     return ('linux32', 'linux64', 'linuxarm', 'linuxarm64', 'macosarm64', 'macosx64', |     return ('linux32', 'linux64', 'linuxarm', 'linuxarm64', 'macosarm64', 'macosx64', | ||||||
|             'windows32', 'windows64') |             'windows32', 'windows64', 'windowsarm64') | ||||||
|  |  | ||||||
|   @staticmethod |   @staticmethod | ||||||
|   def get_distrib_types(): |   def get_distrib_types(): | ||||||
|   | |||||||
| @@ -860,7 +860,9 @@ if platform == 'windows': | |||||||
|   # yapf: enable |   # yapf: enable | ||||||
|  |  | ||||||
|   if mode == 'client': |   if mode == 'client': | ||||||
|     binaries.append({'path': 'cefclient.exe'}) |     binaries.append({ | ||||||
|  |         'path': 'cefsimple.exe' if platform_arch == 'arm64' else 'cefclient.exe' | ||||||
|  |     }) | ||||||
|   else: |   else: | ||||||
|     binaries.append({'path': libcef_dll_lib, 'out_path': 'libcef.lib'}) |     binaries.append({'path': libcef_dll_lib, 'out_path': 'libcef.lib'}) | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user