From 2dbeae0987f702cae85274e296b087d609fcd289 Mon Sep 17 00:00:00 2001
From: Ariver <shanghai3168@gmail.com>
Date: Wed, 03 Jun 2026 17:27:41 +0800
Subject: [PATCH] Add Qwen3-ASR Chinese advanced model
---
privatevoice.src/scripts/build-appstore-developerid-macos.sh | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/privatevoice.src/scripts/build-appstore-developerid-macos.sh b/privatevoice.src/scripts/build-appstore-developerid-macos.sh
index 3f92273..244e3ff 100755
--- a/privatevoice.src/scripts/build-appstore-developerid-macos.sh
+++ b/privatevoice.src/scripts/build-appstore-developerid-macos.sh
@@ -31,6 +31,7 @@
INFO_PLIST="$PROJECT_DIR/build/darwin/Info.plist"
ENTITLEMENTS="$PROJECT_DIR/build/darwin/entitlements-appstore.plist"
GOMODCACHE="$(go env GOMODCACHE)"
+SHERPA_MACOS_MODULE_VERSION="$(cd "$PROJECT_DIR" && go list -m -f '{{.Version}}' github.com/k2-fsa/sherpa-onnx-go-macos)"
VERSION="$(defaults read "$INFO_PLIST" CFBundleShortVersionString 2>/dev/null || echo "2.1.12")"
BUILD_ID="$(defaults read "$INFO_PLIST" CFBundleVersion 2>/dev/null || date +%Y%m%d.%H%M)"
@@ -74,7 +75,9 @@
BUILD_DIR="$PROJECT_DIR/build/appstore-developerid/$OUT_ARCH"
APP_BUNDLE="$BUILD_DIR/$APP_NAME.app"
DMG_PATH="$BUILD_DIR/$APP_NAME-$VERSION-build$BUILD_ID-$OUT_ARCH-developerid-sandbox-poc.dmg"
- SHERPA_LIB_DIR="$GOMODCACHE/github.com/k2-fsa/sherpa-onnx-go-macos@v1.12.24/lib/$SHERPA_ARCH"
+ SHERPA_LIB_DIR="$GOMODCACHE/github.com/k2-fsa/sherpa-onnx-go-macos@$SHERPA_MACOS_MODULE_VERSION/lib/$SHERPA_ARCH"
+ ONNXRUNTIME_DYLIB=""
+ ONNXRUNTIME_DYLIB_NAME=""
}
sign_plain() {
@@ -105,6 +108,9 @@
[[ -f "$ENTITLEMENTS" ]] || fail "App Store entitlements not found at $ENTITLEMENTS"
[[ -f "$PROJECT_DIR/build/darwin/icon.icns" ]] || fail "icon.icns not found"
[[ -d "$SHERPA_LIB_DIR" ]] || fail "sherpa-onnx dylibs not found at $SHERPA_LIB_DIR"
+ ONNXRUNTIME_DYLIB="$(find "$SHERPA_LIB_DIR" -maxdepth 1 -type f -name 'libonnxruntime.*.dylib' | sort | tail -n 1)"
+ [[ -f "$ONNXRUNTIME_DYLIB" ]] || fail "onnxruntime dylib not found in $SHERPA_LIB_DIR"
+ ONNXRUNTIME_DYLIB_NAME="$(basename "$ONNXRUNTIME_DYLIB")"
command -v xcrun >/dev/null || fail "xcrun not found"
security_find_identities | grep -Fq "$DEVELOPER_IDENTITY" ||
fail "Developer ID signing identity not found: $DEVELOPER_IDENTITY"
@@ -145,18 +151,18 @@
cp "$BUILD_DIR/$APP_NAME" "$APP_BUNDLE/Contents/MacOS/$APP_NAME"
cp "$PROJECT_DIR/build/darwin/icon.icns" "$APP_BUNDLE/Contents/Resources/icon.icns"
cp "$SHERPA_LIB_DIR/libsherpa-onnx-c-api.dylib" "$APP_BUNDLE/Contents/Frameworks/"
- cp "$SHERPA_LIB_DIR/libonnxruntime.1.23.2.dylib" "$APP_BUNDLE/Contents/Frameworks/"
+ cp "$ONNXRUNTIME_DYLIB" "$APP_BUNDLE/Contents/Frameworks/"
step "Fixing rpaths"
install_name_tool -add_rpath @executable_path/../Frameworks \
"$APP_BUNDLE/Contents/MacOS/$APP_NAME" 2>/dev/null || true
install_name_tool -id @rpath/libsherpa-onnx-c-api.dylib \
"$APP_BUNDLE/Contents/Frameworks/libsherpa-onnx-c-api.dylib"
- install_name_tool -id @rpath/libonnxruntime.1.23.2.dylib \
- "$APP_BUNDLE/Contents/Frameworks/libonnxruntime.1.23.2.dylib"
+ install_name_tool -id "@rpath/$ONNXRUNTIME_DYLIB_NAME" \
+ "$APP_BUNDLE/Contents/Frameworks/$ONNXRUNTIME_DYLIB_NAME"
step "Code signing with Developer ID"
- sign_plain "$APP_BUNDLE/Contents/Frameworks/libonnxruntime.1.23.2.dylib"
+ sign_plain "$APP_BUNDLE/Contents/Frameworks/$ONNXRUNTIME_DYLIB_NAME"
sign_plain "$APP_BUNDLE/Contents/Frameworks/libsherpa-onnx-c-api.dylib"
sign_sandboxed "$APP_BUNDLE/Contents/MacOS/$APP_NAME"
sign_sandboxed "$APP_BUNDLE"
--
Gitblit v1.9.3