feat: codex-register with Sub2API增强 + Playwright引擎
Some checks are pending
Docker Image CI / build-and-push-image (push) Waiting to run
Some checks are pending
Docker Image CI / build-and-push-image (push) Waiting to run
This commit is contained in:
49
build.sh
Normal file
49
build.sh
Normal file
@@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
# 跨平台打包脚本(在各平台上分别运行)
|
||||
|
||||
set -e
|
||||
|
||||
OS=$(uname -s)
|
||||
ARCH=$(uname -m)
|
||||
|
||||
case "$OS" in
|
||||
Darwin)
|
||||
PLATFORM="macos"
|
||||
EXT=""
|
||||
;;
|
||||
Linux)
|
||||
PLATFORM="linux"
|
||||
EXT=""
|
||||
;;
|
||||
MINGW*|CYGWIN*|MSYS*)
|
||||
PLATFORM="windows"
|
||||
EXT=".exe"
|
||||
;;
|
||||
*)
|
||||
PLATFORM="$OS"
|
||||
EXT=""
|
||||
;;
|
||||
esac
|
||||
|
||||
OUTPUT_NAME="codex-register-${PLATFORM}-${ARCH}${EXT}"
|
||||
|
||||
echo "=== 构建平台: ${PLATFORM} (${ARCH}) ==="
|
||||
echo "=== 输出文件: dist/${OUTPUT_NAME} ==="
|
||||
|
||||
# 安装打包依赖
|
||||
pip install pyinstaller --quiet 2>/dev/null || \
|
||||
uv run --with pyinstaller pyinstaller --version > /dev/null 2>&1
|
||||
|
||||
# 执行打包(优先用 uv,回退到直接调用)
|
||||
if command -v uv &>/dev/null; then
|
||||
uv run --with pyinstaller pyinstaller codex_register.spec --clean --noconfirm
|
||||
else
|
||||
pyinstaller codex_register.spec --clean --noconfirm
|
||||
fi
|
||||
|
||||
# 重命名输出文件
|
||||
mv dist/codex-register${EXT} dist/${OUTPUT_NAME} 2>/dev/null || \
|
||||
mv "dist/codex-register" "dist/${OUTPUT_NAME}" 2>/dev/null || true
|
||||
|
||||
echo "=== 构建完成: dist/${OUTPUT_NAME} ==="
|
||||
ls -lh dist/${OUTPUT_NAME}
|
||||
Reference in New Issue
Block a user