Files
mandy/Launcher.bat
NotRexed 10d0a2d94f tools: Leonida Launcher, a Tkinter window to play, set options, manage mods and run tools
Launcher.bat (Windows) or python3 tools/leonida_launcher.py opens a dark launcher with a navigation column, a hero area
with a PLAY button, a status line and pages: Play (runs scripts/play-d3d12.ps1 or scripts/play-linux.sh, output in a
log box, state line, Stop with confirmation ending the process tree, never two runs at once), Settings (game folder
with a check for game_scarlett_master.exe, data folder, the switches read from play-d3d12.ps1), Mods (mods/*/mod.json
enabled flags written via leonida_mods), Tools (DLSS fetch after a confirmation, runtime rebuild, logs and screenshots
folders) and About. Settings live in %APPDATA%\Leonida\launcher.json (~/.config/leonida on Linux). Its own design and
wording, no game assets; the hero picture is the newest screenshot found at run time, else a gradient. The pure parts
have no Tkinter and are tested in tests/test_leonida_launcher.py.

Checked: python -I tests/test_leonida_launcher.py (13 tests), python -m compileall -q tools,
scripts/check_no_game_data.py. The window itself was not opened or clicked through. AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 23:59:48 -05:00

27 lines
786 B
Batchfile

@echo off
title Leonida - Launcher
rem Double-click to open the launcher window: play, settings, mods, tools. It never touches the game package.
setlocal
cd /d "%~dp0"
set "PY="
for %%V in (3.14 3.13 3.12 3) do (
if not defined PY (
py -%%V -c "import sys; sys.exit(0 if sys.version_info >= (3, 12) else 1)" >nul 2>nul && set "PY=py -%%V"
)
)
if not defined PY (
where python >nul 2>nul && (
python -c "import sys; sys.exit(0 if sys.version_info >= (3, 12) else 1)" >nul 2>nul && set "PY=python"
)
)
if not defined PY (
echo Python 3.12 or newer is needed: https://www.python.org/downloads/
echo Tick "Add python.exe to PATH" during setup.
pause
exit /b 1
)
%PY% -I "%~dp0tools\leonida_launcher.py" %*
set "RC=%ERRORLEVEL%"
if not "%RC%"=="0" pause
exit /b %RC%