Initial commit
This commit is contained in:
16
backup 24.2.26 - Kopie (61)/deploy/build_client_exe.ps1
Normal file
16
backup 24.2.26 - Kopie (61)/deploy/build_client_exe.ps1
Normal file
@@ -0,0 +1,16 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Write-Host '[AZA] Build Windows EXE (basis14.py) via PyInstaller'
|
||||
$root = Split-Path -Parent $PSScriptRoot
|
||||
$entry = Join-Path $root 'basis14.py'
|
||||
if (-not (Test-Path $entry)) { throw ('[AZA] FAIL: EntryPoint not found: ' + $entry) }
|
||||
$venv = Join-Path $PSScriptRoot '.venv_build'
|
||||
if (-not (Test-Path $venv)) { Write-Host '[AZA] Creating build venv...'; & python -m venv $venv }
|
||||
$py = Join-Path $venv 'Scripts\python.exe'
|
||||
if (-not (Test-Path $py)) { throw ('[AZA] FAIL: venv python missing: ' + $py) }
|
||||
Write-Host '[AZA] Installing PyInstaller...'
|
||||
& $py -m pip install --upgrade pip | Out-Host
|
||||
& $py -m pip install pyinstaller==6.13.0 | Out-Host
|
||||
Push-Location $root; try { Write-Host '[AZA] Building EXE...'; & $py -m PyInstaller --onefile --clean --name AZA-basis14 $entry | Out-Host } finally { Pop-Location }
|
||||
$exe = Join-Path $root 'dist\AZA-basis14.exe'
|
||||
if (-not (Test-Path $exe)) { throw ('[AZA] FAIL: EXE not found: ' + $exe) }
|
||||
Write-Host ('[AZA] OK: Built ' + $exe)
|
||||
Reference in New Issue
Block a user