refactor: renombra el paquet a jail_launcher i l'app a «Jail Launcher»
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Compila jlauncher con Nuitka y empaqueta un release para Windows.
|
||||
# - jlauncher.exe (onefile, GUI sin consola, con icono) + games.toml + .zip.
|
||||
# Compila jail-launcher con Nuitka y empaqueta un release para Windows.
|
||||
# - jail-launcher.exe (onefile, GUI sin consola, con icono) + games.toml + .zip.
|
||||
# Equivalente nativo de build.sh (que cubre Linux/macOS).
|
||||
# Requisitos del sistema (no los instala el script):
|
||||
# - Python 3.10+ (con el launcher «py» o «python» en el PATH).
|
||||
@@ -16,12 +16,12 @@ Set-StrictMode -Version Latest
|
||||
$Here = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
Set-Location $Here
|
||||
|
||||
# --- Versión (leída de jlauncher/__init__.py) ---------------------------------
|
||||
$initPath = Join-Path $Here 'jlauncher\__init__.py'
|
||||
# --- Versión (leída de jail_launcher/__init__.py) ---------------------------------
|
||||
$initPath = Join-Path $Here 'jail_launcher\__init__.py'
|
||||
$verMatch = Select-String -Path $initPath -Pattern '^__version__\s*=\s*"([^"]*)"' |
|
||||
Select-Object -First 1
|
||||
if (-not $verMatch) {
|
||||
Write-Error '[build] no se pudo leer __version__ de jlauncher/__init__.py'
|
||||
Write-Error '[build] no se pudo leer __version__ de jail_launcher/__init__.py'
|
||||
}
|
||||
$Version = $verMatch.Matches[0].Groups[1].Value
|
||||
|
||||
@@ -90,29 +90,29 @@ if (-not (Test-Path $IconIco)) {
|
||||
}
|
||||
|
||||
# --- Compilación onefile ------------------------------------------------------
|
||||
Write-Host '[build] compilando jlauncher.exe (PySide6 onefile; puede tardar varios minutos)…'
|
||||
Write-Host '[build] compilando jail-launcher.exe (PySide6 onefile; puede tardar varios minutos)…'
|
||||
& $VenvPython -m nuitka `
|
||||
--onefile `
|
||||
--assume-yes-for-downloads `
|
||||
--enable-plugin=pyside6 `
|
||||
--include-package=jlauncher `
|
||||
--include-package=jail_launcher `
|
||||
--windows-icon-from-ico=$IconIco `
|
||||
--windows-console-mode=disable `
|
||||
--company-name=jailgames `
|
||||
--product-name=jlauncher `
|
||||
--product-name=jail-launcher `
|
||||
--product-version=$Version `
|
||||
--file-version=$Version `
|
||||
--output-dir=dist `
|
||||
--output-filename=jlauncher `
|
||||
--output-filename=jail-launcher `
|
||||
--remove-output `
|
||||
app.py
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Error '[build] Nuitka falló.'
|
||||
}
|
||||
|
||||
$Exe = 'dist\jlauncher.exe'
|
||||
$Exe = 'dist\jail-launcher.exe'
|
||||
if (-not (Test-Path $Exe)) {
|
||||
Write-Error '[build] Nuitka no produjo dist\jlauncher.exe'
|
||||
Write-Error '[build] Nuitka no produjo dist\jail-launcher.exe'
|
||||
}
|
||||
|
||||
# games.toml junto al .exe (la app lo lee desde ahí: base_dir junto al binario).
|
||||
@@ -125,14 +125,14 @@ New-Item -ItemType Directory -Force -Path dist\icon | Out-Null
|
||||
Copy-Item $IconPng dist\icon\icon.png -Force
|
||||
|
||||
# --- Empaquetado .zip ---------------------------------------------------------
|
||||
$ReleaseName = "jlauncher-v$Version-windows-$Arch"
|
||||
$ReleaseName = "jail-launcher-v$Version-windows-$Arch"
|
||||
$Zip = "dist\$ReleaseName.zip"
|
||||
Write-Host "[build] empaquetando release $ReleaseName.zip…"
|
||||
Compress-Archive -Path dist\jlauncher.exe, dist\games.toml, dist\icon `
|
||||
Compress-Archive -Path dist\jail-launcher.exe, dist\games.toml, dist\icon `
|
||||
-DestinationPath $Zip -Force
|
||||
|
||||
Write-Host '[build] hecho:'
|
||||
Get-Item dist\jlauncher.exe, dist\games.toml, $Zip |
|
||||
Get-Item dist\jail-launcher.exe, dist\games.toml, $Zip |
|
||||
Format-Table -AutoSize Name, @{Name = 'Size'; Expression = { '{0:N0} B' -f $_.Length } }
|
||||
Write-Host '[build] el binario crea jlauncher_data\ y settings.json junto a sí mismo.'
|
||||
Write-Host '[build] distribuir: descomprimir el .zip (jlauncher.exe + games.toml + icon\ juntos).'
|
||||
Write-Host '[build] el binario crea jail_launcher_data\ y settings.json junto a sí mismo.'
|
||||
Write-Host '[build] distribuir: descomprimir el .zip (jail-launcher.exe + games.toml + icon\ juntos).'
|
||||
|
||||
Reference in New Issue
Block a user