From 1d50a88fc0f39873aa09657dd18b01e585a42a4d Mon Sep 17 00:00:00 2001 From: Emil Axelsson Date: Sat, 27 Apr 2019 15:45:09 +0200 Subject: [PATCH] Feature/upgrade cef (#833) * Upgrade CEF only on Windows * Disable sandbox on windows --- modules/webbrowser/CMakeLists.txt | 17 +++++++++++++++-- modules/webbrowser/cmake/cef_support.cmake | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/modules/webbrowser/CMakeLists.txt b/modules/webbrowser/CMakeLists.txt index 8dd1e2bf62..75ee3f18a7 100644 --- a/modules/webbrowser/CMakeLists.txt +++ b/modules/webbrowser/CMakeLists.txt @@ -51,7 +51,20 @@ set_property(GLOBAL PROPERTY OS_FOLDERS ON) cmake_policy(SET CMP0074 NEW) # Specify the CEF distribution version. -set(CEF_VERSION "3.3578.1867.g0f6d65a") + +# Release from 04/24/2019 verified to work on Windows. +set(CEF_VERSION "73.1.13+g6e3c989+chromium-73.0.3683.75") + +# 73.1.13 has an issue on MacOS: The GUI freezing upon interaction. +# Therefore, we fall back to 3.3578.1867 from 01/29/2019 +if (APPLE) + set(CEF_VERSION "3.3578.1867.g0f6d65a") +endif () + +# CEF Sandbox is not working with the latest Visual Studio, so we disable it for now. +if (WIN32) + option(USE_SANDBOX OFF) +endif () # Add this project's cmake/ directory to the module path. set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake") @@ -61,7 +74,7 @@ include(cef_support) set_current_cef_build_platform() # Download and extract the CEF binary distribution (executes DownloadCEF.cmake). -download_cef("${CEF_PLATFORM}" "${CEF_VERSION}" "${CMAKE_CURRENT_SOURCE_DIR}/ext/cef") +download_cef("${CEF_PLATFORM}" "${CEF_VERSION}" "${CMAKE_CURRENT_BINARY_DIR}/ext/cef") ########################################################################################## # Apply cmake patch diff --git a/modules/webbrowser/cmake/cef_support.cmake b/modules/webbrowser/cmake/cef_support.cmake index 260d581a42..23c1d78fa2 100644 --- a/modules/webbrowser/cmake/cef_support.cmake +++ b/modules/webbrowser/cmake/cef_support.cmake @@ -68,7 +68,7 @@ function(download_cef platform version download_dir) set(CEF_DOWNLOAD_FILENAME "${CEF_DISTRIBUTION}.tar.bz2") set(CEF_DOWNLOAD_PATH "${CEF_DOWNLOAD_DIR}/${CEF_DOWNLOAD_FILENAME}") if(NOT EXISTS "${CEF_DOWNLOAD_PATH}") - set(CEF_DOWNLOAD_URL "http://opensource.spotify.com/cefbuilds/${CEF_DOWNLOAD_FILENAME}") + string(REPLACE "+" "%2B" CEF_DOWNLOAD_URL "http://opensource.spotify.com/cefbuilds/${CEF_DOWNLOAD_FILENAME}") # Download the SHA1 hash for the binary distribution. message(STATUS "Downloading CEF: ${CEF_DOWNLOAD_PATH}.sha1...")