Skip to content

Commit

Permalink
disable macos hardened runtime in bundler
Browse files Browse the repository at this point in the history
  • Loading branch information
sonodima committed Sep 3, 2024
1 parent 54fb97f commit 0cc55da
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 5 additions & 1 deletion xtask/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ cargo_toml = "0.20"
log = { workspace = true }
pico-args = "0.5"
serde = { version = "1.0", features = ["derive"] }
tauri-bundler = "1.6"
# Use the `tauri-bundler` crate from the Tauri repository because it already includes
# the new macOS' hardened runtime configuration flags.
# TODO: switch back to crates.io when the tauri-bundler crate is updated.
tauri-bundler = { git = "https://github.com/tauri-apps/tauri", branch = "1.x" }
# tauri-bundler = "1.6"
8 changes: 8 additions & 0 deletions xtask/src/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ fn bundle_settings(workspace_dir: &Path) -> BundleSettings {
copyright: Some(COPYRIGHT.to_string()),
category: Some(CATEGORY),
dmg: dmg_settings(workspace_dir),
macos: macos_settings(),
windows: windows_settings(workspace_dir),
..Default::default()
};
Expand All @@ -126,6 +127,13 @@ fn dmg_settings(workspace_dir: &Path) -> DmgSettings {
settings
}

fn macos_settings() -> tauri_bundler::MacOsSettings {
tauri_bundler::MacOsSettings {
hardened_runtime: false,
..Default::default()
}
}

fn windows_settings(workspace_dir: &Path) -> WindowsSettings {
let icon_path = workspace_dir.join("assets").join(WINDOWS_ICON);

Expand Down

0 comments on commit 0cc55da

Please sign in to comment.