Soniox Mobile to Mac - Real-time Voice Dictation & Remote Input Control
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

54 lines
1.6 KiB

#!/bin/zsh
set -e
PROJECT_DIR="/Users/alig/Develop/SonioxVoice"
BUILD_DIR="$PROJECT_DIR/build"
APP_NAME="Soniox Voice"
APP_BUNDLE="$BUILD_DIR/$APP_NAME.app"
DMG_NAME="SonioxVoice-v1.0.0.dmg"
echo "🔨 Building $APP_NAME..."
mkdir -p "$BUILD_DIR"
rm -rf "$APP_BUNDLE"
# 1. Compile Swift sources
swiftc -O -target arm64-apple-macosx13.0 \
-framework Cocoa -framework AVFoundation -framework Carbon \
"$PROJECT_DIR"/src/*.swift \
-o "$BUILD_DIR/SonioxVoice"
# 2. Assemble .app bundle
mkdir -p "$APP_BUNDLE/Contents/MacOS"
mkdir -p "$APP_BUNDLE/Contents/Resources"
cp "$BUILD_DIR/SonioxVoice" "$APP_BUNDLE/Contents/MacOS/SonioxVoice"
cp "$PROJECT_DIR/Info.plist" "$APP_BUNDLE/Contents/Info.plist"
cp "$PROJECT_DIR/resources/AppIcon.icns" "$APP_BUNDLE/Contents/Resources/AppIcon.icns"
# 3. Stable Codesign with explicit identifier
codesign --force --deep --sign - --identifier "com.soniox.voice" "$APP_BUNDLE"
echo "✅ App bundle assembled at $APP_BUNDLE"
# 4. Create DMG Installer
echo "📦 Creating DMG Installer..."
DMG_STAGING="$BUILD_DIR/dmg_staging"
rm -rf "$DMG_STAGING" "$BUILD_DIR/$DMG_NAME"
mkdir -p "$DMG_STAGING"
cp -R "$APP_BUNDLE" "$DMG_STAGING/"
ln -s /Applications "$DMG_STAGING/Applications"
hdiutil create -volname "Soniox Voice" -srcfolder "$DMG_STAGING" -ov -format UDZO "$BUILD_DIR/$DMG_NAME"
echo "✅ DMG created at $BUILD_DIR/$DMG_NAME"
# 5. Create ZIP Archive
cd "$BUILD_DIR"
zip -r -y "SonioxVoice-v1.0.0.zip" "$APP_NAME.app"
# 6. Install to /Applications on Mac
echo "🚀 Installing to /Applications/$APP_NAME.app..."
rm -rf "/Applications/$APP_NAME.app"
cp -R "$APP_BUNDLE" "/Applications/$APP_NAME.app"
echo "🎉 All Done Successfully!"