Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

build(mac): compile Liquid Glass icon bundle to Assets.car

Gabriel Steinffccb9fe20b9
diff --git a/.gitignore b/.gitignore
index a8f91c681..667e9e57e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -312,3 +312,6 @@ Thumbs.db
.macos-fast-paste.*.hash
.linux-fast-paste.hash
.qdrant-initialized
+
+# Generated by scripts/compile-macos-icon.js from src/assets/openwhispr.icon
+src/assets/Assets.car
diff --git a/electron-builder.json b/electron-builder.json
index c5443598e..b08f90130 100644
--- a/electron-builder.json
+++ b/electron-builder.json
@@ -133,10 +133,17 @@
"entitlementsInherit": "resources/mac/entitlements.mac.plist",
"identity": "HeroTools Inc. (9R85XFMH59)",
"notarize": true,
+ "extraResources": [
+ {
+ "from": "src/assets/Assets.car",
+ "to": "Assets.car"
+ }
+ ],
"extendInfo": {
"LSUIElement": false,
+ "CFBundleIconName": "openwhispr",
"NSMicrophoneUsageDescription": "OpenWhispr uses the microphone to capture your voice for transcription.",
- "NSAudioCaptureUsageDescription": "OpenWhispr uses system audio to capture other participants' audio from calls and meetings. Your screen is never recorded.",
+ "NSAudioCaptureUsageDescription": "OpenWhispr uses system audio to capture other participants' audio from calls and meetings.",
"NSAccessibilityUsageDescription": "OpenWhispr needs accessibility permissions to paste transcribed text into other applications."
}
},
diff --git a/package.json b/package.json
index 44b898746..137e2978f 100644
--- a/package.json
+++ b/package.json
@@ -31,7 +31,8 @@
"build": "cd src && vite build && cd .. && electron-builder",
"postinstall": "electron-builder install-app-deps",
"build:renderer": "cd src && vite build",
- "prebuild:mac": "npm run compile:native && npm run download:whisper-cpp && npm run download:llama-server && npm run download:sherpa-onnx && npm run download:qdrant && npm run download:meeting-aec-helper && npm run download:diarization-models -- --output-dir resources/bin/diarization-models",
+ "compile:mac-icon": "node scripts/compile-macos-icon.js",
+ "prebuild:mac": "npm run compile:native && npm run compile:mac-icon && npm run download:whisper-cpp && npm run download:llama-server && npm run download:sherpa-onnx && npm run download:qdrant && npm run download:meeting-aec-helper && npm run download:diarization-models -- --output-dir resources/bin/diarization-models",
"build:mac": "npm run build:renderer && electron-builder --mac",
"build:mac:arm64": "npm run build:renderer && electron-builder --mac --arm64",
"build:mac:x64": "npm run build:renderer && electron-builder --mac --x64",
diff --git a/scripts/compile-macos-icon.js b/scripts/compile-macos-icon.js
new file mode 100644
index 000000000..4a8f51bf2
--- /dev/null
+++ b/scripts/compile-macos-icon.js
@@ -0,0 +1,70 @@
+#!/usr/bin/env node
+// Compiles src/assets/openwhispr.icon (Apple Icon Composer bundle) into
+// src/assets/Assets.car so macOS 26+ can render Liquid Glass layers.
+// The legacy src/assets/icon.icns is maintained separately for macOS <26.
+//
+// Skips gracefully when not running on macOS or when Xcode's actool is
+// unavailable — CI runners without full Xcode will simply fall back to the
+// existing .icns.
+
+const fs = require("fs");
+const os = require("os");
+const path = require("path");
+const { execFileSync, spawnSync } = require("child_process");
+
+const ICON_BUNDLE = path.join(__dirname, "..", "src", "assets", "openwhispr.icon");
+const OUTPUT_CAR = path.join(__dirname, "..", "src", "assets", "Assets.car");
+const APP_ICON_NAME = "openwhispr";
+
+if (process.platform !== "darwin") {
+ console.log("compile-macos-icon: not macOS, skipping");
+ process.exit(0);
+}
+
+if (!fs.existsSync(ICON_BUNDLE)) {
+ console.log(`compile-macos-icon: ${ICON_BUNDLE} not found, skipping`);
+ process.exit(0);
+}
+
+const actoolLookup = spawnSync("xcrun", ["--find", "actool"], { encoding: "utf8" });
+if (actoolLookup.status !== 0) {
+ console.warn(
+ "compile-macos-icon: actool unavailable (requires full Xcode, not just CLT). " +
+ "Existing icon.icns will be used as legacy fallback; no Liquid Glass on macOS 26+."
+ );
+ process.exit(0);
+}
+
+const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), "ow-icon-"));
+try {
+ execFileSync(
+ "xcrun",
+ [
+ "actool",
+ ICON_BUNDLE,
+ "--compile",
+ tmpDir,
+ "--platform",
+ "macosx",
+ "--minimum-deployment-target",
+ "12.0",
+ "--app-icon",
+ APP_ICON_NAME,
+ "--output-partial-info-plist",
+ path.join(tmpDir, "plist.plist"),
+ "--include-all-app-icons",
+ ],
+ { stdio: "inherit" }
+ );
+
+ const producedCar = path.join(tmpDir, "Assets.car");
+ if (!fs.existsSync(producedCar)) {
+ throw new Error("actool did not produce Assets.car");
+ }
+
+ fs.copyFileSync(producedCar, OUTPUT_CAR);
+ const bytes = fs.statSync(OUTPUT_CAR).size;
+ console.log(`compile-macos-icon: wrote ${OUTPUT_CAR} (${bytes} bytes)`);
+} finally {
+ fs.rmSync(tmpDir, { recursive: true, force: true });
+}
diff --git a/src/assets/icon.icns b/src/assets/icon.icns
index 8f4a04421..47572fdbd 100644
Binary files a/src/assets/icon.icns and b/src/assets/icon.icns differ
diff --git a/src/assets/openwhispr.icon/Assets/ICON.png b/src/assets/openwhispr.icon/Assets/ICON.png
new file mode 100644
index 000000000..d56a3516a
Binary files /dev/null and b/src/assets/openwhispr.icon/Assets/ICON.png differ
diff --git a/src/assets/openwhispr.icon/icon.json b/src/assets/openwhispr.icon/icon.json
new file mode 100644
index 000000000..4371aacb7
--- /dev/null
+++ b/src/assets/openwhispr.icon/icon.json
@@ -0,0 +1,27 @@
+{
+ "fill": {
+ "automatic-gradient": "extended-srgb:0.00000,0.53333,1.00000,1.00000"
+ },
+ "groups": [
+ {
+ "layers": [
+ {
+ "image-name": "ICON.png",
+ "name": "ICON"
+ }
+ ],
+ "shadow": {
+ "kind": "neutral",
+ "opacity": 0.5
+ },
+ "translucency": {
+ "enabled": true,
+ "value": 0.5
+ }
+ }
+ ],
+ "supported-platforms": {
+ "circles": ["watchOS"],
+ "squares": "shared"
+ }
+}