mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-09-18 14:20:42 -07:00
Update development scripts and add macOS icon assets
- Renamed backend development script from `dev:backend` to `dev:server` for clarity. - Added new macOS icon assets and configuration files for the application. - Enhanced App component to improve server management during production and development modes. - Updated ConnectionForm to reset state after successful submission and conditionally render the update button. - Implemented database initialization on application startup in the backend.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>voicebox</string>
|
||||
<key>CFBundleIconName</key>
|
||||
<string>voicebox</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,3 +1,56 @@
|
||||
use std::process::Command;
|
||||
|
||||
fn main() {
|
||||
// Compile macOS Liquid Glass icon
|
||||
#[cfg(target_os = "macos")]
|
||||
{
|
||||
let project_root = env!("CARGO_MANIFEST_DIR");
|
||||
// AppIcon.icon is in the root, two levels up from src-tauri
|
||||
let icon_source = format!("{}/../../AppIcon.icon", project_root);
|
||||
let gen_dir = format!("{}/gen", project_root);
|
||||
|
||||
std::fs::create_dir_all(&gen_dir).expect("Failed to create gen directory");
|
||||
|
||||
if std::path::Path::new(&icon_source).exists() {
|
||||
println!("cargo:rerun-if-changed={}", icon_source);
|
||||
println!("cargo:rerun-if-changed={}/icon.json", icon_source);
|
||||
println!("cargo:rerun-if-changed={}/Assets", icon_source);
|
||||
|
||||
let partial_plist = format!("{}/partial.plist", gen_dir);
|
||||
let output = Command::new("xcrun")
|
||||
.args([
|
||||
"actool",
|
||||
"--compile", &gen_dir,
|
||||
"--output-format", "human-readable-text",
|
||||
"--output-partial-info-plist", &partial_plist,
|
||||
"--app-icon", "voicebox",
|
||||
"--include-all-app-icons",
|
||||
"--target-device", "mac",
|
||||
"--minimum-deployment-target", "11.0",
|
||||
"--platform", "macosx",
|
||||
&icon_source,
|
||||
])
|
||||
.output();
|
||||
|
||||
match output {
|
||||
Ok(output) => {
|
||||
if !output.status.success() {
|
||||
eprintln!("actool stderr: {}", String::from_utf8_lossy(&output.stderr));
|
||||
eprintln!("actool stdout: {}", String::from_utf8_lossy(&output.stdout));
|
||||
panic!("actool failed to compile icon");
|
||||
}
|
||||
println!("Successfully compiled icon to {}", gen_dir);
|
||||
}
|
||||
Err(e) => {
|
||||
eprintln!("Failed to execute xcrun actool: {}", e);
|
||||
eprintln!("Make sure you have Xcode Command Line Tools installed");
|
||||
panic!("Icon compilation failed");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
println!("cargo:warning=Icon source not found at {}, skipping icon compilation", icon_source);
|
||||
}
|
||||
}
|
||||
|
||||
tauri_build::build()
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict/>
|
||||
</plist>
|
||||
@@ -24,8 +24,12 @@
|
||||
],
|
||||
"macOS": {
|
||||
"frameworks": [],
|
||||
"minimumSystemVersion": "10.15"
|
||||
}
|
||||
"minimumSystemVersion": "11.0",
|
||||
"infoPlist": "Info.plist"
|
||||
},
|
||||
"resources": [
|
||||
"gen/**/*"
|
||||
]
|
||||
},
|
||||
"app": {
|
||||
"security": {
|
||||
|
||||
Reference in New Issue
Block a user