refactor: renombra el paquet a jail_launcher i l'app a «Jail Launcher»

This commit is contained in:
2026-06-01 17:46:09 +02:00
parent 878c403654
commit fccbdc83d5
23 changed files with 78 additions and 77 deletions
+23 -22
View File
@@ -1,16 +1,16 @@
#!/usr/bin/env bash
# Compila jlauncher con Nuitka y empaqueta un release.
# Compila jail-launcher con Nuitka y empaqueta un release.
# - Linux: binario onefile + tar.gz.
# - macOS: jlauncher.app (con icono) dentro de un .dmg arrastrable a /Applications.
# - macOS: «Jail Launcher.app» (con icono) dentro de un .dmg arrastrable a /Applications.
# Requisitos del sistema (no los instala el script): ver README (compilador C, git…).
set -euo pipefail
HERE="$(cd "$(dirname "$0")" && pwd)"
cd "$HERE"
VERSION="$(sed -n 's/^__version__[[:space:]]*=[[:space:]]*"\([^"]*\)".*/\1/p' jlauncher/__init__.py | head -n1)"
VERSION="$(sed -n 's/^__version__[[:space:]]*=[[:space:]]*"\([^"]*\)".*/\1/p' jail_launcher/__init__.py | head -n1)"
if [ -z "$VERSION" ]; then
echo "[build] no se pudo leer __version__ de jlauncher/__init__.py" >&2
echo "[build] no se pudo leer __version__ de jail_launcher/__init__.py" >&2
exit 1
fi
ARCH="$(uname -m)"
@@ -52,28 +52,29 @@ if [ "$OS" = "darwin" ]; then
exit 1
fi
echo "[build] compilando jlauncher.app (PySide6; puede tardar varios minutos)…"
echo "[build] compilando «Jail Launcher.app» (PySide6; puede tardar varios minutos)…"
.venv/bin/python -m nuitka \
--standalone \
--macos-create-app-bundle \
--macos-app-icon="$ICON_ICNS" \
--macos-app-name="Jail Launcher" \
--macos-app-version="$VERSION" \
--macos-signed-app-name=com.jailgames.jlauncher \
--macos-signed-app-name=com.jailgames.jail-launcher \
--company-name=jailgames \
--product-name=jlauncher \
--product-name=jail-launcher \
--product-version="$VERSION" \
--assume-yes-for-downloads \
--enable-plugin=pyside6 \
--include-package=jlauncher \
--include-package=jail_launcher \
--output-dir=dist \
--output-filename=jlauncher \
--output-filename=jail-launcher \
--remove-output \
app.py
# Según la versión, Nuitka nombra el bundle a partir del script de entrada
# (app.py -> app.app). Lo normalizamos a jlauncher.app.
APP="dist/jlauncher.app"
# (app.py -> app.app). Lo normalizamos a «Jail Launcher.app» (nombre visible en
# Finder/Dock; el ejecutable interno sigue siendo jail-launcher).
APP="dist/Jail Launcher.app"
if [ ! -d "$APP" ]; then
PRODUCED="$(find dist -maxdepth 1 -name '*.app' | head -n1)"
if [ -z "$PRODUCED" ]; then
@@ -91,35 +92,35 @@ if [ "$OS" = "darwin" ]; then
# Bundle ad-hoc (sin Developer ID): quitamos quarantine para abrir sin fricción local.
xattr -dr com.apple.quarantine "$APP" 2>/dev/null || true
DMG="dist/jlauncher-v${VERSION}-macos-${ARCH}.dmg"
DMG="dist/jail-launcher-v${VERSION}-macos-${ARCH}.dmg"
echo "[build] empaquetando ${DMG}"
STAGE="$(mktemp -d)"
cp -R "$APP" "$STAGE/"
ln -s /Applications "$STAGE/Applications"
rm -f "$DMG"
hdiutil create -volname "jlauncher" -srcfolder "$STAGE" \
hdiutil create -volname "Jail Launcher" -srcfolder "$STAGE" \
-ov -format UDZO "$DMG" >/dev/null
rm -rf "$STAGE"
echo "[build] hecho:"
du -sh "$APP" | sed 's/^/[build] /'
ls -lh "$DMG"
echo "[build] la app guarda datos en ~/Library/Application Support/jailgames/jlauncher/."
echo "[build] distribuir: el .dmg (arrastrar jlauncher.app a Aplicaciones)."
echo "[build] la app guarda datos en ~/Library/Application Support/jailgames/jail-launcher/."
echo "[build] distribuir: el .dmg (arrastrar «Jail Launcher.app» a Aplicaciones)."
echo "[build] sin firma Developer ID: primera apertura con clic derecho → Abrir."
else
# -------------------------------------------------------------------------
# Linux (y resto): binario onefile + tar.gz
# -------------------------------------------------------------------------
RELEASE_NAME="jlauncher-v${VERSION}-${OS}-${ARCH}"
RELEASE_NAME="jail-launcher-v${VERSION}-${OS}-${ARCH}"
echo "[build] compilando (PySide6 onefile; puede tardar varios minutos)…"
.venv/bin/python -m nuitka \
--onefile \
--assume-yes-for-downloads \
--enable-plugin=pyside6 \
--include-package=jlauncher \
--include-package=jail_launcher \
--output-dir=dist \
--output-filename=jlauncher \
--output-filename=jail-launcher \
--remove-output \
--lto=yes \
app.py
@@ -128,10 +129,10 @@ else
cp games.toml dist/games.toml
echo "[build] empaquetando release ${RELEASE_NAME}.tar.gz…"
tar -czf "dist/${RELEASE_NAME}.tar.gz" -C dist jlauncher games.toml
tar -czf "dist/${RELEASE_NAME}.tar.gz" -C dist jail-launcher games.toml
echo "[build] hecho:"
ls -lh "dist/jlauncher" "dist/games.toml" "dist/${RELEASE_NAME}.tar.gz"
echo "[build] el binario crea jlauncher_data/ y settings.json junto a sí mismo."
echo "[build] distribuir: descomprimir el tar.gz (jlauncher + games.toml juntos)."
ls -lh "dist/jail-launcher" "dist/games.toml" "dist/${RELEASE_NAME}.tar.gz"
echo "[build] el binario crea jail_launcher_data/ y settings.json junto a sí mismo."
echo "[build] distribuir: descomprimir el tar.gz (jail-launcher + games.toml juntos)."
fi