mirror of
https://github.com/ProjectLeonida/mandy.git
synced 2026-12-06 23:48:39 +00:00
Linux and macOS had no one-command entry point: Build.bat and Mods.bat are cmd.exe scripts. Build.sh and Mods.sh find Python 3.12 or newer (the versioned python3.N first, since a distribution's python3 can be older) and run make_game.py or the mod manager's window with -I, passing every argument through. They install and download nothing. tests/test_shell_launchers.py runs both against stub interpreters on a private PATH. The mod manager's missing-Tkinter message now names the distribution package off Windows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
17 lines
1.0 KiB
Bash
Executable File
17 lines
1.0 KiB
Bash
Executable File
#!/bin/sh
|
|
# Linux and macOS counterpart of Build.bat: finds Python 3.12 or newer and runs make_game.py, which finds your copy of
|
|
# the game, checks what's installed and builds into ~/Documents/Leonida. Extra options pass through, e.g.
|
|
# ./Build.sh --out /mnt/games/Leonida --work /mnt/scratch/leonida-work
|
|
# Nothing is installed or downloaded here; make_game.py lists anything missing (README.md, "How to build").
|
|
here=$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd) || exit 1
|
|
# python3.N first: a distribution's python3 can be older than 3.12 while a newer one is installed beside it.
|
|
for py in python3.14 python3.13 python3.12 python3 python; do
|
|
command -v "$py" >/dev/null 2>&1 || continue
|
|
if "$py" -c 'import sys; sys.exit(0 if sys.version_info >= (3, 12) else 1)' >/dev/null 2>&1; then
|
|
exec "$py" -I "$here/make_game.py" "$@"
|
|
fi
|
|
done
|
|
echo "Python 3.12 or newer is needed. Install it with your package manager (Debian and Ubuntu:" >&2
|
|
echo "sudo apt install python3; macOS: brew install python), then run ./Build.sh again." >&2
|
|
exit 1
|