From 3fbceec8de833416bf1ae049f959f222c3f1a4a0 Mon Sep 17 00:00:00 2001
From: Ariver <shanghai3168@gmail.com>
Date: Tue, 02 Jun 2026 14:05:59 +0800
Subject: [PATCH] Prepare Round 1 model profile QA baseline
---
privatevoice.src/scripts/build-local-macos.sh | 22 +++++++++++++++++-----
1 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/VoiceSnapGo/scripts/build-local-macos.sh b/privatevoice.src/scripts/build-local-macos.sh
similarity index 89%
rename from VoiceSnapGo/scripts/build-local-macos.sh
rename to privatevoice.src/scripts/build-local-macos.sh
index 6e79d69..39b53c0 100755
--- a/VoiceSnapGo/scripts/build-local-macos.sh
+++ b/privatevoice.src/scripts/build-local-macos.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# build-local-macos.sh - Build a locally signed macOS app and DMG for VoiceSnap.
+# build-local-macos.sh - Build a locally signed macOS app and DMG for PrivateVoice Input.
#
# This script intentionally does not notarize. It creates or reuses a stable
# local Code Signing identity so macOS TCC permissions, such as Accessibility,
@@ -12,9 +12,11 @@
#
set -euo pipefail
-APP_NAME="VoiceSnap"
-LOCAL_IDENTITY="${VOICESNAP_LOCAL_SIGN_IDENTITY:-VoiceSnap Local Code Signing}"
-KEYCHAIN="${VOICESNAP_LOCAL_KEYCHAIN:-$HOME/Library/Keychains/login.keychain-db}"
+APP_NAME="PrivateVoice Input"
+DEFAULT_LOCAL_IDENTITY="PrivateVoice Local Code Signing"
+LEGACY_LOCAL_IDENTITY="VoiceSnap Local Code Signing"
+LOCAL_IDENTITY="${PRIVATEVOICE_LOCAL_SIGN_IDENTITY:-${VOICESNAP_LOCAL_SIGN_IDENTITY:-}}"
+KEYCHAIN="${PRIVATEVOICE_LOCAL_KEYCHAIN:-${VOICESNAP_LOCAL_KEYCHAIN:-$HOME/Library/Keychains/login.keychain-db}}"
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
PROJECT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
@@ -78,6 +80,16 @@
SHERPA_LIB_DIR="$GOMODCACHE/github.com/k2-fsa/sherpa-onnx-go-macos@v1.12.24/lib/$SHERPA_ARCH"
ensure_local_identity() {
+ if [[ -z "$LOCAL_IDENTITY" ]]; then
+ if security find-identity -v -p codesigning "$KEYCHAIN" | grep -Fq "$DEFAULT_LOCAL_IDENTITY"; then
+ LOCAL_IDENTITY="$DEFAULT_LOCAL_IDENTITY"
+ elif security find-identity -v -p codesigning "$KEYCHAIN" | grep -Fq "$LEGACY_LOCAL_IDENTITY"; then
+ LOCAL_IDENTITY="$LEGACY_LOCAL_IDENTITY"
+ else
+ LOCAL_IDENTITY="$DEFAULT_LOCAL_IDENTITY"
+ fi
+ fi
+
if security find-identity -v -p codesigning "$KEYCHAIN" | grep -Fq "$LOCAL_IDENTITY"; then
echo "Using existing local signing identity: $LOCAL_IDENTITY"
return
@@ -103,7 +115,7 @@
[dn]
CN = $LOCAL_IDENTITY
-O = VoiceSnap Local
+O = PrivateVoice Local
[v3_codesign]
basicConstraints = critical, CA:true
--
Gitblit v1.9.3