Skip to content

Commit

Permalink
Fix compiling CEF on intel mac (#928)
Browse files Browse the repository at this point in the history
  • Loading branch information
noituri authored Jan 21, 2025
1 parent 3f63431 commit fad0316
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/package_for_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
path: smelter_linux_aarch64.tar.gz

macos_x86_64:
runs-on: macos-12
runs-on: macos-13
steps:
- name: 🛠 Install system dependencies
run: brew install ffmpeg
Expand Down
1 change: 0 additions & 1 deletion compositor_chromium/chromium_sys/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set(PROJECT_NAME rustium_cef_wrapper)

project(${PROJECT_NAME})


set(_CEF_ROOT_EXPLICIT 1)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CEF_ROOT}/cmake)

Expand Down
8 changes: 4 additions & 4 deletions compositor_chromium/chromium_sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,15 @@ impl ParseCallbacks for RemoveCommentsCallback {
fn cef_url() -> &'static str {
if cfg!(target_os = "macos") {
if cfg!(target_arch = "aarch64") {
return "https://cef-builds.spotifycdn.com/cef_binary_117.1.4%2Bga26f38b%2Bchromium-117.0.5938.92_macosarm64_minimal.tar.bz2";
return "https://cef-builds.spotifycdn.com/cef_binary_132.3.1%2Bg144febe%2Bchromium-132.0.6834.83_macosarm64_minimal.tar.bz2";
} else if cfg!(target_arch = "x86_64") {
return "https://cef-builds.spotifycdn.com/cef_binary_115.3.11%2Bga61da9b%2Bchromium-115.0.5790.114_macosx64_minimal.tar.bz2";
return "https://cef-builds.spotifycdn.com/cef_binary_132.3.1%2Bg144febe%2Bchromium-132.0.6834.83_macosx64_minimal.tar.bz2";
}
} else if cfg!(target_os = "linux") {
if cfg!(target_arch = "aarch64") {
return "https://cef-builds.spotifycdn.com/cef_binary_117.1.4%2Bga26f38b%2Bchromium-117.0.5938.92_linuxarm64_minimal.tar.bz2";
return "https://cef-builds.spotifycdn.com/cef_binary_132.3.1%2Bg144febe%2Bchromium-132.0.6834.83_linuxarm64_minimal.tar.bz2";
} else if cfg!(target_arch = "x86_64") {
return "https://cef-builds.spotifycdn.com/cef_binary_117.1.4%2Bga26f38b%2Bchromium-117.0.5938.92_linux64_minimal.tar.bz2";
return "https://cef-builds.spotifycdn.com/cef_binary_132.3.1%2Bg144febe%2Bchromium-132.0.6834.83_linux64_minimal.tar.bz2";
}
};
panic!("Unsupported platform");
Expand Down
2 changes: 1 addition & 1 deletion compositor_chromium/chromium_sys/wrapper.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <include/capi/cef_browser_capi.h>
#include "include/capi/cef_browser_capi.h"
#include "include/capi/cef_app_capi.h"
#include "include/capi/cef_base_capi.h"

Expand Down
2 changes: 1 addition & 1 deletion compositor_chromium/src/browser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl BrowserSettings {
databases: chromium_sys::cef_state_t_STATE_DEFAULT,
webgl: chromium_sys::cef_state_t_STATE_DEFAULT,
background_color: self.background_color,
accept_language_list: CefString::empty_raw(),
chrome_zoom_bubble: chromium_sys::cef_state_t_STATE_DISABLED,
chrome_status_bubble: chromium_sys::cef_state_t_STATE_DEFAULT,
}
}
Expand Down
7 changes: 3 additions & 4 deletions compositor_chromium/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,25 @@ impl Settings {
browser_subprocess_path: helper_path,
framework_dir_path: CefString::empty_raw(),
main_bundle_path: main_path,
chrome_runtime: false as c_int,
chrome_policy_id: CefString::empty_raw(),
chrome_app_icon_id: 0,
disable_signal_handlers: false as c_int,
multi_threaded_message_loop: self.multi_threaded_message_loop as c_int,
external_message_pump: self.external_message_pump as c_int,
windowless_rendering_enabled: self.windowless_rendering_enabled as c_int,
command_line_args_disabled: false as c_int,
cache_path: CefString::empty_raw(),
root_cache_path: CefString::empty_raw(),
persist_session_cookies: false as c_int,
persist_user_preferences: false as c_int,
user_agent: CefString::empty_raw(),
user_agent_product: CefString::empty_raw(),
locale: CefString::empty_raw(),
log_file: CefString::empty_raw(),
log_severity: self.log_severity as u32,
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
log_items: chromium_sys::cef_log_items_t_LOG_ITEMS_DEFAULT,
javascript_flags: CefString::empty_raw(),
resources_dir_path: CefString::empty_raw(),
locales_dir_path: CefString::empty_raw(),
pack_loading_disabled: false as c_int,
remote_debugging_port: self.remote_debugging_port as c_int,
uncaught_exception_stack_size: 0 as c_int,
background_color: self.background_color,
Expand Down
2 changes: 2 additions & 0 deletions compositor_chromium/src/window_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ impl WindowInfo {
shared_texture_enabled: false as c_int,
external_begin_frame_enabled: false as c_int,
view: std::ptr::null_mut(),
runtime_style: chromium_sys::cef_runtime_style_t_CEF_RUNTIME_STYLE_ALLOY,
}
}

Expand All @@ -33,6 +34,7 @@ impl WindowInfo {
shared_texture_enabled: false as c_int,
external_begin_frame_enabled: false as c_int,
window: 0 as c_ulong,
runtime_style: chromium_sys::cef_runtime_style_t_CEF_RUNTIME_STYLE_ALLOY,
}
}
}

0 comments on commit fad0316

Please sign in to comment.