Generalize the project from a single GB4 fix into a collection that can host
ultrawide patches for many games.
- games/<Game>/{SUWSF.ini,game.conf,README.md}; GB4 moved in as the first entry
- game.conf carries all game-specific data (appid, exe, paths, loader, launch
option), so install.sh is fully generic: ./install.sh <Game> [uninstall]
- installer gains GAME_DIR / PREFIX_INI_FILE / LOADER_NAME overrides; verified
install -> idempotent re-run -> uninstall leaves the tree pristine
- tools de-hardcoded: dump_decrypted.py takes an exe name, read_protonlog.sh
takes an appid, aob.py takes a dump + game ini, build_release.sh takes a game
- README rewritten as an umbrella index with an "adding a game" guide
- LICENSE copyright -> programmingPug
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
52 lines
1.9 KiB
Bash
Executable File
52 lines
1.9 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# One-shot publish to GitHub. Run AFTER authenticating gh (see below).
|
|
#
|
|
# Auth options (pick one):
|
|
# export GH_TOKEN=ghp_xxx # a token with 'repo' + 'workflow' scope
|
|
# gh auth login # interactive
|
|
#
|
|
# Usage:
|
|
# ./tools/publish.sh [REPO_NAME] [--private]
|
|
# (defaults: repo name "UltraWidePatches", public)
|
|
# GAME=GundamBreaker4 selects which game's zip to attach (default: GundamBreaker4)
|
|
set -euo pipefail
|
|
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"; cd "$HERE"
|
|
|
|
REPO="${1:-UltraWidePatches}"
|
|
VIS="--public"; [ "${2:-}" = "--private" ] && VIS="--private"
|
|
TAG="v1.0.0"
|
|
|
|
command -v gh >/dev/null || { echo "[!] gh not installed"; exit 1; }
|
|
gh auth status >/dev/null 2>&1 || { echo "[!] Not authenticated. Set GH_TOKEN or run 'gh auth login'."; exit 1; }
|
|
OWNER="$(gh api user -q .login)"
|
|
echo "[+] Publishing as: $OWNER repo: $REPO $VIS"
|
|
|
|
# 1. build the release artifact fresh
|
|
GAME="${GAME:-GundamBreaker4}"
|
|
bash tools/build_release.sh "$GAME" >/dev/null
|
|
echo "[+] Built dist/${GAME}_UltraWide_Fix.zip"
|
|
|
|
# 2. create the repo (skip if it already exists) and set as origin
|
|
if gh repo view "$OWNER/$REPO" >/dev/null 2>&1; then
|
|
echo "[i] Repo exists; reusing."
|
|
git remote get-url origin >/dev/null 2>&1 || git remote add origin "https://github.com/$OWNER/$REPO.git"
|
|
else
|
|
gh repo create "$OWNER/$REPO" $VIS --source=. --remote=origin \
|
|
--description="Ultrawide (32:9/21:9) fixes for PC games — Hor+ FOV via SUWSF. Proton-first."
|
|
fi
|
|
|
|
# 3. push branch + tag
|
|
git push -u origin main
|
|
git push origin "$TAG"
|
|
|
|
# 4. create the release with notes + zip asset (idempotent)
|
|
if gh release view "$TAG" -R "$OWNER/$REPO" >/dev/null 2>&1; then
|
|
gh release upload "$TAG" "dist/${GAME}_UltraWide_Fix.zip" -R "$OWNER/$REPO" --clobber
|
|
else
|
|
gh release create "$TAG" "dist/${GAME}_UltraWide_Fix.zip" \
|
|
-R "$OWNER/$REPO" -t "$TAG" -F RELEASE_NOTES.md
|
|
fi
|
|
|
|
echo
|
|
echo "[+] Done: https://github.com/$OWNER/$REPO/releases/tag/$TAG"
|