b2446d9a by 柴进

:wastebasket:️ 删除冗余的 build_mac.sh,保留 build_mac_universal.sh

build_mac_universal.sh 是严格超集:自动检测架构、自动安装依赖、错误处理更完善。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f43f58e4
#!/bin/bash
# macOS Build Script for Gemini Image Generator
echo "================================"
echo "Building Gemini Image Generator"
echo "================================"
# Check if virtual environment exists
if [ ! -d ".venv" ]; then
echo "Creating virtual environment..."
/opt/homebrew/bin/python3.11 -m venv .venv
fi
# Activate virtual environment
echo "Activating virtual environment..."
source .venv/bin/activate
# Install dependencies
echo "Installing dependencies..."
pip install --upgrade pip
pip install -r requirements.txt
# Clean previous builds
echo "Cleaning previous builds..."
rm -rf build dist *.spec
# Build executable
echo "Building executable..."
pyinstaller --name="ZB100ImageGenerator" \
--onedir \
--windowed \
--add-data "config.json:." \
--icon=zb100_mac.icns \
image_generator.py
# Check if build was successful
if [ -f "dist/ZB100ImageGenerator.app/Contents/MacOS/ZB100ImageGenerator" ] || [ -f "dist/ZB100ImageGenerator" ]; then
echo "================================"
echo "Build successful!"
echo "Application: dist/ZB100ImageGenerator.app (or dist/ZB100ImageGenerator)"
echo "================================"
else
echo "================================"
echo "Build failed!"
echo "================================"
fi