mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-09-29 15:15:27 -07:00
create stub resource files when actool output is missing
Older Xcode versions don't produce Assets.car from .icon assets. Fall back to empty stubs for all platforms so the bundler succeeds.
This commit is contained in:
@@ -149,12 +149,12 @@ fn main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// On non-macOS, create empty stub files for the macOS-only resources
|
// Ensure all resource files exist so Tauri's bundler doesn't fail.
|
||||||
// so Tauri's resource bundler doesn't fail on missing paths
|
// On non-macOS these are always stubs. On macOS, actool may not produce
|
||||||
#[cfg(not(target_os = "macos"))]
|
// Assets.car if the Xcode version doesn't support the .icon format.
|
||||||
{
|
{
|
||||||
let stubs = ["Assets.car", "voicebox.icns", "partial.plist"];
|
let required = ["Assets.car", "voicebox.icns", "partial.plist"];
|
||||||
for name in stubs {
|
for name in required {
|
||||||
let path = format!("{}/{}", gen_dir, name);
|
let path = format!("{}/{}", gen_dir, name);
|
||||||
if !std::path::Path::new(&path).exists() {
|
if !std::path::Path::new(&path).exists() {
|
||||||
std::fs::write(&path, b"").ok();
|
std::fs::write(&path, b"").ok();
|
||||||
|
|||||||
Reference in New Issue
Block a user