Initial commit: GasFlux project with core processing pipelines
This commit is contained in:
48
build_gasflux_exe.sh
Normal file
48
build_gasflux_exe.sh
Normal file
@ -0,0 +1,48 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "========================================"
|
||||
echo "GasFlux RunExample EXE打包工具 (Linux/Mac)"
|
||||
echo "========================================"
|
||||
echo
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
echo "[1/4] 检查Python环境..."
|
||||
if ! command -v python3 &> /dev/null; then
|
||||
echo "错误:未找到Python3"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
python3 --version
|
||||
|
||||
echo "[2/4] 升级pip..."
|
||||
python3 -m pip install --upgrade pip
|
||||
|
||||
echo "[3/4] 安装PyInstaller..."
|
||||
python3 -m pip install pyinstaller
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "错误:PyInstaller安装失败"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "[4/4] 开始打包..."
|
||||
python3 -m PyInstaller --clean gasflux_run_example.spec
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "错误:打包失败"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "========================================"
|
||||
echo "打包完成!"
|
||||
echo "========================================"
|
||||
echo
|
||||
echo "可执行文件位置:dist/GasFlux_RunExample"
|
||||
echo
|
||||
echo "使用方法:"
|
||||
echo " ./GasFlux_RunExample input.xlsx"
|
||||
echo " ./GasFlux_RunExample input.xlsx --output result.csv"
|
||||
echo " ./GasFlux_RunExample input.xlsx --no-gasflux"
|
||||
echo
|
||||
Reference in New Issue
Block a user