mirror of
https://git.triforceproject.com/triforce/source
synced 2026-11-19 16:20:01 -04:00
Triforce v0.3.4
The slowdown in fights and the controller whose buttons stopped arriving are fixed; the checks' file names; groundwork for Linux. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#!/bin/sh
|
||||
# Start the game Hookshot Builder wrote, from that folder, without the AppImage's libraries.
|
||||
# Start the game Triforce Builder wrote, from that folder, without the AppImage's libraries.
|
||||
# The builder AppImage calls this for --play. The window's Play button does the same thing.
|
||||
#
|
||||
# hookshot-launch the out= folder in ~/.config/hookshot/builder.ini
|
||||
# hookshot-launch the out= folder in ~/.config/triforce/builder.ini
|
||||
# hookshot-launch /path/to/the/game that folder
|
||||
# HOOKSHOT_LAUNCH_CONFIG=<file> read that ini instead (a test)
|
||||
set -eu
|
||||
@@ -11,7 +11,7 @@ ini_path() {
|
||||
if [ -n "${HOOKSHOT_LAUNCH_CONFIG:-}" ]; then
|
||||
printf '%s\n' "$HOOKSHOT_LAUNCH_CONFIG"
|
||||
else
|
||||
printf '%s\n' "${XDG_CONFIG_HOME:-$HOME/.config}/hookshot/builder.ini"
|
||||
printf '%s\n' "${XDG_CONFIG_HOME:-$HOME/.config}/triforce/builder.ini"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -28,7 +28,9 @@ out_of() {
|
||||
}
|
||||
|
||||
ready() {
|
||||
[ -n "${1:-}" ] && [ -f "$1/image.bin" ] && { [ -x "$1/bin/hookshot" ] || [ -f "$1/hookshot" ]; }
|
||||
# (bin/triforce under the launcher, or triforce in a folder built without one; Hookshot's names after them)
|
||||
[ -n "${1:-}" ] && [ -f "$1/image.bin" ] &&
|
||||
{ [ -x "$1/bin/triforce" ] || [ -x "$1/bin/hookshot" ] || [ -f "$1/triforce" ] || [ -f "$1/hookshot" ]; }
|
||||
}
|
||||
|
||||
folder=${1:-}
|
||||
@@ -40,13 +42,13 @@ if [ -z "$folder" ]; then
|
||||
fi
|
||||
|
||||
if ! ready "$folder"; then
|
||||
echo "Hookshot: no built game to start. Build one with Hookshot Builder, or pass its folder." >&2
|
||||
echo "Triforce: no built game to start. Build one with Triforce Builder, or pass its folder." >&2
|
||||
# (HOOKSHOT_LAUNCH_CONFIG is a test: it must not open a dialog)
|
||||
if [ -z "${HOOKSHOT_LAUNCH_CONFIG:-}" ]; then
|
||||
if command -v zenity >/dev/null 2>&1; then
|
||||
zenity --error --title=Hookshot --text="No built game to start. Build one with Hookshot Builder first." || true
|
||||
zenity --error --title=Triforce --text="No built game to start. Build one with Triforce Builder first." || true
|
||||
elif command -v kdialog >/dev/null 2>&1; then
|
||||
kdialog --error "No built game to start. Build one with Hookshot Builder first." || true
|
||||
kdialog --error "No built game to start. Build one with Triforce Builder first." || true
|
||||
fi
|
||||
fi
|
||||
exit 1
|
||||
@@ -60,9 +62,14 @@ for name in $names; do
|
||||
done
|
||||
|
||||
cd "$folder"
|
||||
# (--play already chose Play. The game's own update question stays for a bin/hookshot the player started themselves)
|
||||
# (--play already chose Play. The game's own update question stays for a bin/triforce the player started themselves)
|
||||
export HOOKSHOT_NO_UPDATE_CHECK=1
|
||||
if [ -x ./bin/hookshot ]; then
|
||||
exec ./bin/hookshot
|
||||
for game in ./bin/triforce ./bin/hookshot; do
|
||||
if [ -x "$game" ]; then
|
||||
exec "$game"
|
||||
fi
|
||||
done
|
||||
if [ -f ./triforce ]; then
|
||||
exec ./triforce
|
||||
fi
|
||||
exec ./hookshot
|
||||
|
||||
Reference in New Issue
Block a user