Launcher 0.1.2: Discord link, auto-install on by default, menu style setting, smoke tests
- links.json on main gives the Discord and sponsor links (built-in fallback offline, empty hides the button); 'links' command and MCP tool. - Install new versions automatically is on unless explicitly turned off (new settings key, so 0.1.1's written default does not count as a choice). - Settings: Horizon / Classic menu style, the horizon.txt menuStyle line the game reads; 'menu-style' command and MCP tool. - launcher workflow: install latest into a temp home, check imports (Windows, Linux client) and that the client starts, on all three platforms; also runs on launcher-* branches. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,7 @@ name: launcher
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [launcher]
|
||||
branches: [launcher, 'launcher-*']
|
||||
tags: ['launcher-v*']
|
||||
|
||||
permissions:
|
||||
@@ -56,6 +56,37 @@ jobs:
|
||||
- name: Only system libraries
|
||||
if: runner.os == 'Windows'
|
||||
run: python ../tools/check_imports.py target/release/${{ matrix.binary }}
|
||||
- name: Smoke test
|
||||
env:
|
||||
HORIZON_LAUNCHER_NO_SELF_UPDATE: '1'
|
||||
run: |
|
||||
set -euo pipefail
|
||||
export HORIZON_LAUNCHER_HOME="${RUNNER_TEMP//\\//}/horizon-launcher-smoke"
|
||||
export HORIZON_HOME="$HORIZON_LAUNCHER_HOME/game"
|
||||
launcher="$PWD/target/release/${{ matrix.binary }}"
|
||||
# GitHub's API rate-limits shared runner addresses now and then: try a few times.
|
||||
retry() { for i in 1 2 3 4; do "$@" && return 0; sleep $((i * 15)); done; return 1; }
|
||||
"$launcher" --version
|
||||
retry "$launcher" versions
|
||||
retry "$launcher" install latest
|
||||
"$launcher" versions --installed
|
||||
"$launcher" links --json
|
||||
"$launcher" menu-style classic
|
||||
grep -qx 'menuStyle:classic' "$HORIZON_HOME/horizon.txt"
|
||||
"$launcher" menu-style horizon
|
||||
clients=("$HORIZON_LAUNCHER_HOME"/versions/v*/horizon-client*)
|
||||
client="${clients[0]}"
|
||||
echo "installed client: $client"
|
||||
if [[ "$RUNNER_OS" == "Windows" ]]; then
|
||||
python ../tools/check_imports.py "$client"
|
||||
python ../tools/check_imports.py "$launcher"
|
||||
elif [[ "$RUNNER_OS" == "Linux" ]]; then
|
||||
python3 ../tools/check_imports.py "$client"
|
||||
fi
|
||||
# The client starts: --help prints before any window or GPU is needed.
|
||||
"$client" --help > "$RUNNER_TEMP/help.txt"
|
||||
head -3 "$RUNNER_TEMP/help.txt"
|
||||
grep -q -- '--resources' "$RUNNER_TEMP/help.txt"
|
||||
- name: Package
|
||||
run: |
|
||||
mkdir -p dist
|
||||
|
||||
Reference in New Issue
Block a user