mirror of
https://github.com/ProjectLeonida/mandy.git
synced 2026-12-06 08:58:36 +00:00
Launcher: the button prompts' tool run by python before py, and two minutes at most
The launcher took the first of py and python, and on a PC whose py is the Python install manager's alias (WindowsApps\py.exe) that first run waited for an answer: a start from a window nobody types in (a script's) stood still before the title for 10 minutes, with 0 s of the processor's time, until py was ended. Now python is tried first (the same manager's alias ran the tool in about a second there), the tool runs as a process of its own that is ended with its children after two minutes, and the title then keeps its Xbox glyphs, as when there is no Python. AI-assisted (Claude). Tested on Windows 11 with the Python install manager: the launcher parses, and python runs the tool's --help in 1 s; a start from a script went on once the waiting py was ended. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@ -621,14 +621,22 @@ foreach ($k in $settings.Keys) { Set-Item "Env:$k" $settings[$k] }
|
||||
# data.rpf. Seconds, and only when one is missing or its tool changed; a movie of yours (anywhere the layer looks,
|
||||
# or LEONIDA_PC_GLYPHS / LEONIDA_PS_GLYPHS in -More) is left alone. Needs Python; without it the Xbox glyphs stay.
|
||||
$glyphTool = Join-Path (Split-Path $root) 'tools\prompt_glyph_movies.py'
|
||||
$python = Get-Command py, python -CommandType Application -ErrorAction SilentlyContinue | Select-Object -First 1
|
||||
# python before py, and two minutes at most: where py is the Python install manager's alias, its first run waits for
|
||||
# an answer, and a start from a window nobody types in stood still there (10 minutes and 0 s of the processor's
|
||||
# time, 2026-11-30); python, the same manager's, ran the tool.
|
||||
$python = Get-Command python, py -CommandType Application -ErrorAction SilentlyContinue | Select-Object -First 1
|
||||
if ((Test-Path $glyphTool) -and $python) {
|
||||
$glyphArgs = @('-I', $glyphTool, '--game', (Split-Path $Exe))
|
||||
if ($python.Name -eq 'py.exe') { $glyphArgs = @('-3') + $glyphArgs }
|
||||
if ($PcGlyphs) { $glyphArgs += @('--pc-glyphs', $PcGlyphs) }
|
||||
$stopWas = $ErrorActionPreference; $ErrorActionPreference = 'Continue'
|
||||
try { & $python.Source @glyphArgs } catch { Write-Host "Button prompts: not built ($_); the title shows its Xbox glyphs." }
|
||||
finally { $ErrorActionPreference = $stopWas }
|
||||
$quoted = $glyphArgs | ForEach-Object { if ($_ -match '[\s"]') { '"' + ($_ -replace '"', '\"') + '"' } else { $_ } }
|
||||
try {
|
||||
$glyphRun = Start-Process -FilePath $python.Source -ArgumentList $quoted -NoNewWindow -PassThru -ErrorAction Stop
|
||||
if (-not $glyphRun.WaitForExit(120000)) {
|
||||
& taskkill.exe /T /F /PID $glyphRun.Id 2>&1 | Out-Null
|
||||
Write-Host 'Button prompts: not built (the tool had not finished after two minutes); the title shows its Xbox glyphs.'
|
||||
}
|
||||
} catch { Write-Host "Button prompts: not built ($_); the title shows its Xbox glyphs." }
|
||||
}
|
||||
# The title's own graphics settings (storage\settings\settings.xml in the data folder). It writes the file with its
|
||||
# console defaults whenever it exits by itself: ray-traced dynamic shadows on, two samples of screen-space
|
||||
|
||||
Reference in New Issue
Block a user