2025-07-28 20:02:01 +02:00
$pythonExecutables = " python " , " python3 " , " py "
2022-03-09 16:07:46 +01:00
foreach ( $pythonExecutable in $pythonExecutables ) {
if ( ! $pythonPath ) {
$pythonPath = powershell -NoLogo -NonInteractive " (Get-Command -ErrorAction SilentlyContinue $pythonexecutable ).Definition " # Hack to not give command suggestion
2025-07-28 20:02:01 +02:00
if ( $pythonPath ) {
break
}
2022-03-09 16:07:46 +01:00
}
2020-08-27 01:25:17 +02:00
}
# Neither found, error and exit
2022-03-09 16:07:46 +01:00
if ( ! $pythonPath ) {
2025-07-28 20:02:01 +02:00
Throw " ERROR: Python 3.9+ 64-bit must be installed and on PATH: `n https://www.python.org/ "
2020-08-27 01:25:17 +02:00
}
2025-07-29 08:54:52 +02:00
& $pythonPath " $( $PSScriptRoot ) /xenia-build.py " $args