mirror of
https://github.com/cnlimiter/codex-register.git
synced 2026-05-20 07:41:04 +08:00
feat(core): 支持PyInstaller打包并优化资源路径
- 修改app.py以支持PyInstaller打包后的资源路径 - 更新session.py以支持APP_DATA_DIR环境变量 - 增强webui.py以设置打包后的数据目录 - 添加pyproject.toml的PyInstaller依赖组 - 新增构建脚本和GitHub Actions工作流
This commit is contained in:
20
build.bat
Normal file
20
build.bat
Normal file
@@ -0,0 +1,20 @@
|
||||
@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
|
||||
)
|
||||
Reference in New Issue
Block a user