mirror of
https://github.com/cnlimiter/codex-register.git
synced 2026-05-06 20:02:51 +08:00
- 修改app.py以支持PyInstaller打包后的资源路径 - 更新session.py以支持APP_DATA_DIR环境变量 - 增强webui.py以设置打包后的数据目录 - 添加pyproject.toml的PyInstaller依赖组 - 新增构建脚本和GitHub Actions工作流
21 lines
589 B
Batchfile
21 lines
589 B
Batchfile
@echo off
|
|
REM Windows 打包脚本
|
|
|
|
echo === 构建平台: Windows ===
|
|
|
|
REM 安装打包依赖
|
|
pip install pyinstaller --quiet
|
|
|
|
REM 执行打包
|
|
pyinstaller codex_register.spec --clean --noconfirm
|
|
|
|
IF EXIST dist\codex-register.exe (
|
|
FOR /F "tokens=*" %%i IN ('powershell -Command "[System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture"') DO SET ARCH=%%i
|
|
SET OUTPUT=dist\codex-register-windows-%ARCH%.exe
|
|
MOVE dist\codex-register.exe "%OUTPUT%"
|
|
echo === 构建完成: %OUTPUT% ===
|
|
) ELSE (
|
|
echo === 构建失败,未找到输出文件 ===
|
|
exit /b 1
|
|
)
|