#!/bin/bash
# 快速打包脚本 - Linux环境

echo "=== 云盘后端快速打包脚本 ==="

# 检查Python环境
if ! command -v python3 &> /dev/null; then
    echo "错误: 未找到Python3"
    exit 1
fi

echo "Python版本: $(python3 --version)"

# 安装PyInstaller
echo "安装PyInstaller..."
pip3 install pyinstaller

# 安装项目依赖
echo "安装项目依赖..."
pip3 install -r requirements.txt

# 运行打包
echo "开始打包..."
python3 build_linux.py

echo "=== 打包完成 ==="
echo "部署包位置: ./deploy/"
echo "请查看 ./deploy/README.md 了解部署说明"