mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-09-17 05:40:42 -07:00
Enhance icon generation and update dependencies
- Added support for generating a multi-size Windows icon (icon.ico) in the update-icons.sh script. - Updated Cargo.toml to include the 'windows' crate with specific features for Windows support. - Bumped version of the 'voicebox' package from 0.1.0 to 0.1.1 in Cargo.lock. - Updated .gitignore to exclude the generated Assets.car file.
This commit is contained in:
@@ -30,6 +30,8 @@ target/
|
||||
*.swo
|
||||
*~
|
||||
|
||||
tauri/src-tauri/gen/Assets.car
|
||||
|
||||
# OS
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
@@ -95,6 +95,25 @@ for size in 30 44 71 89 107 142 150 284 310; do
|
||||
done
|
||||
sips -s format png -z 50 50 "$SOURCE_ICON" --out "$ICONS_DIR/StoreLogo.png" 2>/dev/null
|
||||
|
||||
# Windows icon.ico (multi-size ICO file)
|
||||
echo "Generating Windows icon.ico..."
|
||||
if command -v convert &> /dev/null; then
|
||||
# Create temporary PNG files at different sizes for ICO
|
||||
# Windows typically uses: 16x16, 32x32, 48x48, 256x256
|
||||
sips -s format png -z 16 16 "$SOURCE_ICON" --out /tmp/icon-16.png 2>/dev/null
|
||||
sips -s format png -z 32 32 "$SOURCE_ICON" --out /tmp/icon-32.png 2>/dev/null
|
||||
sips -s format png -z 48 48 "$SOURCE_ICON" --out /tmp/icon-48.png 2>/dev/null
|
||||
sips -s format png -z 256 256 "$SOURCE_ICON" --out /tmp/icon-256.png 2>/dev/null
|
||||
# Combine into proper multi-size ICO file
|
||||
convert /tmp/icon-16.png /tmp/icon-32.png /tmp/icon-48.png /tmp/icon-256.png "$ICONS_DIR/icon.ico" 2>/dev/null
|
||||
rm -f /tmp/icon-16.png /tmp/icon-32.png /tmp/icon-48.png /tmp/icon-256.png 2>/dev/null
|
||||
echo " ✓ Generated Windows icon.ico"
|
||||
else
|
||||
# Fallback: use sips to create a basic ICO (single size)
|
||||
echo " ⚠ ImageMagick not found - generating basic icon.ico (single size)"
|
||||
sips -s format ico -z 256 256 "$SOURCE_ICON" --out "$ICONS_DIR/icon.ico" 2>/dev/null || echo " ⚠ Failed to generate icon.ico (sips may not support ICO format)"
|
||||
fi
|
||||
|
||||
# iOS Icons
|
||||
echo "Generating iOS icons..."
|
||||
mkdir -p "$ICONS_DIR/ios"
|
||||
@@ -188,6 +207,7 @@ echo "Updated:"
|
||||
echo " ✓ Liquid Glass icon bundle with all appearance variants"
|
||||
echo " ✓ macOS/Desktop fallback icons"
|
||||
echo " ✓ Windows Square logos"
|
||||
echo " ✓ Windows icon.ico (multi-size)"
|
||||
echo " ✓ iOS AppIcons (18 sizes)"
|
||||
echo " ✓ Android mipmap icons (5 densities)"
|
||||
echo " ✓ Landing page logo"
|
||||
|
||||
Generated
+1
-1
@@ -4483,7 +4483,7 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
|
||||
|
||||
[[package]]
|
||||
name = "voicebox"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"core-foundation-sys",
|
||||
|
||||
@@ -31,6 +31,7 @@ core-foundation-sys = "0.8"
|
||||
|
||||
[target.'cfg(target_os = "windows")'.dependencies]
|
||||
wasapi = "0.22"
|
||||
windows = { version = "0.62", features = ["Win32_Foundation", "Win32_UI_WindowsAndMessaging"] }
|
||||
|
||||
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
|
||||
tauri-plugin-updater = "2.0"
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 95 KiB |
@@ -384,6 +384,24 @@ pub fn run() {
|
||||
#[cfg(desktop)]
|
||||
app.handle().plugin(tauri_plugin_updater::Builder::new().build())?;
|
||||
|
||||
// Hide title bar icon on Windows
|
||||
#[cfg(windows)]
|
||||
{
|
||||
use windows::Win32::Foundation::HWND;
|
||||
use windows::Win32::UI::WindowsAndMessaging::{SetClassLongPtrW, GCLP_HICON, GCLP_HICONSM};
|
||||
|
||||
if let Some((_, window)) = app.webview_windows().iter().next() {
|
||||
if let Ok(hwnd) = window.hwnd() {
|
||||
let hwnd = HWND(hwnd.0);
|
||||
unsafe {
|
||||
// Set both small and regular icons to NULL to hide the title bar icon
|
||||
SetClassLongPtrW(hwnd, GCLP_HICON, 0);
|
||||
SetClassLongPtrW(hwnd, GCLP_HICONSM, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
{
|
||||
// Get all windows and open devtools on the first one
|
||||
|
||||
Reference in New Issue
Block a user