8774a4843e
PyInstaller onedir/onefile specs, Inno Setup script, and GitHub Actions workflow to produce JUC500-Setup-win64.exe and portable builds. Co-authored-by: Cursor <cursoragent@cursor.com>
81 lines
2.6 KiB
Bash
Executable File
81 lines
2.6 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# JUC500 Windows 설치파일 생성
|
|
# Apple Silicon: --ci 로 GitHub Actions 사용
|
|
# Windows PC: build-installer-windows.bat
|
|
set -euo pipefail
|
|
ROOT="$(cd "$(dirname "$0")" && pwd)"
|
|
cd "$ROOT"
|
|
|
|
echo "============================================"
|
|
echo " JUC500 — Windows Installer 빌드"
|
|
echo "============================================"
|
|
echo ""
|
|
|
|
usage() {
|
|
cat <<'EOF'
|
|
사용법:
|
|
./build-installer-windows.sh --ci # GitHub Actions 빌드 + 산출물 다운로드
|
|
./build-installer-windows.sh --help
|
|
|
|
Windows PC 에서는 build-installer-windows.bat 를 실행하세요.
|
|
EOF
|
|
}
|
|
|
|
download_ci_artifact() {
|
|
if ! command -v gh >/dev/null 2>&1; then
|
|
echo "gh (GitHub CLI) 가 필요합니다: brew install gh && gh auth login" >&2
|
|
exit 1
|
|
fi
|
|
if [[ ! -f vendor/libusb-1.0.dll ]]; then
|
|
echo "vendor/libusb-1.0.dll 이 저장소에 있어야 CI 가 번들합니다." >&2
|
|
exit 1
|
|
fi
|
|
mkdir -p dist-windows
|
|
echo "==> GitHub Actions workflow 실행 (build-windows.yml)"
|
|
gh workflow run build-windows.yml
|
|
echo "==> 실행 대기…"
|
|
sleep 4
|
|
RUN_ID="$(gh run list --workflow=build-windows.yml --limit 1 --json databaseId --jq '.[0].databaseId')"
|
|
if [[ -z "$RUN_ID" || "$RUN_ID" == "null" ]]; then
|
|
echo "workflow run id 를 찾지 못했습니다. 원격 저장소·workflow 푸시를 확인하세요." >&2
|
|
exit 1
|
|
fi
|
|
echo " run id: $RUN_ID"
|
|
gh run watch "$RUN_ID" --exit-status
|
|
rm -rf dist-windows/_ci_dl
|
|
mkdir -p dist-windows/_ci_dl
|
|
gh run download "$RUN_ID" -n juc500-windows-x64 -D dist-windows/_ci_dl
|
|
find dist-windows/_ci_dl -type f \( \
|
|
-name 'JUC500-Setup-win64.exe' \
|
|
-o -name 'JUC500-win64-portable.zip' \
|
|
-o -name 'JUC500-portable.exe' \
|
|
\) -exec cp -f {} dist-windows/ \;
|
|
rm -rf dist-windows/_ci_dl
|
|
echo ""
|
|
echo "============================================"
|
|
echo " Windows 설치파일 완료 (GitHub Actions)"
|
|
echo "============================================"
|
|
ls -lh dist-windows/JUC500-Setup-win64.exe \
|
|
dist-windows/JUC500-win64-portable.zip \
|
|
dist-windows/JUC500-portable.exe 2>/dev/null || {
|
|
echo "산출물이 dist-windows/ 에 없습니다. Actions 로그를 확인하세요." >&2
|
|
exit 1
|
|
}
|
|
}
|
|
|
|
case "${1:-}" in
|
|
-h|--help) usage; exit 0 ;;
|
|
--ci|--github|--actions) download_ci_artifact; exit 0 ;;
|
|
"")
|
|
if [[ "$(uname -s)" == "Darwin" ]]; then
|
|
usage
|
|
echo ""
|
|
echo "이 Mac에서는 ./build-installer-windows.sh --ci 를 사용하세요."
|
|
exit 1
|
|
fi
|
|
;;
|
|
esac
|
|
|
|
echo "Windows 에서는 build-installer-windows.bat 를 실행하세요."
|
|
exit 1
|