30 lines
520 B
Bash
30 lines
520 B
Bash
#!/bin/bash
|
|
# Linux/Mac 打包脚本
|
|
|
|
echo "正在打包 PCM Viewer..."
|
|
|
|
# 检查是否在虚拟环境中
|
|
if [ ! -f "venv/bin/activate" ]; then
|
|
echo "错误:未找到虚拟环境"
|
|
echo "请先创建虚拟环境: python3 -m venv venv"
|
|
exit 1
|
|
fi
|
|
|
|
# 激活虚拟环境
|
|
source venv/bin/activate
|
|
|
|
# 检查是否安装了 PyInstaller
|
|
python -c "import PyInstaller" 2>/dev/null
|
|
if [ $? -ne 0 ]; then
|
|
echo "正在安装 PyInstaller..."
|
|
pip install pyinstaller
|
|
fi
|
|
|
|
# 运行打包脚本
|
|
python build.py
|
|
|
|
|
|
|
|
|
|
|