2 Commits

11 changed files with 49 additions and 9 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ if [ "$OS" = "darwin" ]; then
--standalone \ --standalone \
--macos-create-app-bundle \ --macos-create-app-bundle \
--macos-app-icon="$ICON_ICNS" \ --macos-app-icon="$ICON_ICNS" \
--macos-app-name=jlauncher \ --macos-app-name="Jail Launcher" \
--macos-app-version="$VERSION" \ --macos-app-version="$VERSION" \
--macos-signed-app-name=com.jailgames.jlauncher \ --macos-signed-app-name=com.jailgames.jlauncher \
--company-name=jailgames \ --company-name=jailgames \
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 KiB

After

Width:  |  Height:  |  Size: 361 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 KiB

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.
+1 -1
View File
@@ -1,3 +1,3 @@
"""jlauncher — lanzador de juegos jailgames.""" """jlauncher — lanzador de juegos jailgames."""
__version__ = "1.0.2" __version__ = "1.0.4"
+1
View File
@@ -16,6 +16,7 @@ from .ui.theme import apply_theme
def main() -> int: def main() -> int:
app = QApplication(sys.argv) app = QApplication(sys.argv)
app.setApplicationName("jlauncher") app.setApplicationName("jlauncher")
app.setApplicationDisplayName("Jail Launcher")
icon_path = app_icon_path() icon_path = app_icon_path()
if icon_path is not None: if icon_path is not None:
app.setWindowIcon(QIcon(str(icon_path))) app.setWindowIcon(QIcon(str(icon_path)))
+34
View File
@@ -26,6 +26,17 @@ _EXTRA_PATH_DIRS = (
"/opt/local/bin", "/opt/local/bin",
) )
# Prefijos de Homebrew/MacPorts. Una .app lanzada desde Finder/Dock tampoco
# hereda CPATH/LIBRARY_PATH/PKG_CONFIG_PATH del shell, así que el compilador no
# encuentra las cabeceras (p.ej. <SDL3/SDL_filesystem.h>) ni las librerías
# instaladas con `brew`. Añadimos sus include/lib explícitamente. En Linux estos
# paths no existen y se filtran solos.
_EXTRA_PREFIXES = (
"/opt/homebrew",
"/usr/local",
"/opt/local",
)
def _noop(_: str) -> None: def _noop(_: str) -> None:
pass pass
@@ -41,9 +52,32 @@ def _launch_env() -> dict[str, str]:
if d not in parts and os.path.isdir(d): if d not in parts and os.path.isdir(d):
parts.append(d) parts.append(d)
env["PATH"] = os.pathsep.join(parts) env["PATH"] = os.pathsep.join(parts)
# Rutas de cabeceras (CPATH), librerías (LIBRARY_PATH) y pkg-config para que
# el compilador encuentre dependencias instaladas con brew/MacPorts.
includes, libs, pkgconfigs = [], [], []
for prefix in _EXTRA_PREFIXES:
inc, lib = f"{prefix}/include", f"{prefix}/lib"
if os.path.isdir(inc):
includes.append(inc)
if os.path.isdir(lib):
libs.append(lib)
pkgconfigs.append(f"{lib}/pkgconfig")
_prepend(env, "CPATH", includes)
_prepend(env, "LIBRARY_PATH", libs)
_prepend(env, "PKG_CONFIG_PATH", pkgconfigs)
return env return env
def _prepend(env: dict[str, str], var: str, dirs: list[str]) -> None:
"""Antepone dirs al valor de env[var] (lista separada por os.pathsep), sin
duplicar entradas ya presentes."""
existing = [p for p in env.get(var, "").split(os.pathsep) if p]
new = [d for d in dirs if d not in existing]
if new:
env[var] = os.pathsep.join(new + existing)
def _stream(cmd: str, cwd: Path, log: LogFn) -> int: def _stream(cmd: str, cwd: Path, log: LogFn) -> int:
"""Ejecuta un comando de shell en cwd, retransmitiendo stdout/err línea a línea.""" """Ejecuta un comando de shell en cwd, retransmitiendo stdout/err línea a línea."""
log(f"$ {cmd} (cwd={cwd})") log(f"$ {cmd} (cwd={cwd})")
+11 -6
View File
@@ -36,7 +36,7 @@ WINDOW_TITLE = f"© 2026 {APP_NAME} — JailDesigner"
CONSOLE_HEIGHT = 150 # alçada de la consola desplegada (px) CONSOLE_HEIGHT = 150 # alçada de la consola desplegada (px)
CONSOLE_ANIM_MS = 220 # durada de l'animació de desplegar/replegar CONSOLE_ANIM_MS = 220 # durada de l'animació de desplegar/replegar
CONSOLE_IDLE_MS = 4000 # marge sense activitat abans de replegar en mode auto CONSOLE_IDLE_MS = 3000 # marge sense activitat abans de replegar en mode auto
CONSOLE_SHOW = "show" CONSOLE_SHOW = "show"
CONSOLE_AUTO = "auto" CONSOLE_AUTO = "auto"
@@ -293,13 +293,12 @@ class MainWindow(QMainWindow):
name.setFont(nf) name.setFont(nf)
name.setStyleSheet("color: #7c4dff;") name.setStyleSheet("color: #7c4dff;")
lay.addWidget(name) lay.addWidget(name)
lay.addSpacing(4) lay.addSpacing(2)
# Versió en cursiva i atenuada. # Versió: petita i atenuada, just davall del nom (estil macOS).
ver = QLabel(f"Versió {__version__}", alignment=Qt.AlignCenter) ver = QLabel(f"v{__version__}", alignment=Qt.AlignCenter)
vf = ver.font() vf = ver.font()
vf.setItalic(True) vf.setPointSize(vf.pointSize() - 1)
vf.setPointSize(vf.pointSize() + 1)
ver.setFont(vf) ver.setFont(vf)
ver.setStyleSheet("color: #8a8a8a;") ver.setStyleSheet("color: #8a8a8a;")
lay.addWidget(ver) lay.addWidget(ver)
@@ -463,7 +462,13 @@ class MainWindow(QMainWindow):
# --------------------------------------------------------------- helpers # --------------------------------------------------------------- helpers
def _log(self, text: str) -> None: def _log(self, text: str) -> None:
# Autoscroll intel·ligent: només seguim el final si la barra ja hi estava.
# Si l'usuari ha pujat a llegir una línia anterior, no l'arrosseguem avall.
bar = self.log_view.verticalScrollBar()
at_bottom = bar.value() >= bar.maximum() - 4
self.log_view.appendPlainText(text) self.log_view.appendPlainText(text)
if at_bottom:
bar.setValue(bar.maximum())
# En mode auto, qualsevol línia desplega la consola; si no hi ha cap worker # En mode auto, qualsevol línia desplega la consola; si no hi ha cap worker
# actiu (p.ex. un missatge solt), arrenca el compte enrere per replegar-la. # actiu (p.ex. un missatge solt), arrenca el compte enrere per replegar-la.
if self.settings.console_mode == CONSOLE_AUTO: if self.settings.console_mode == CONSOLE_AUTO:
+1 -1
View File
@@ -1,6 +1,6 @@
[project] [project]
name = "jlauncher" name = "jlauncher"
version = "1.0.1" version = "1.0.4"
description = "Lanzador de juegos jailgames: clona, compila y ejecuta repos Gitea" description = "Lanzador de juegos jailgames: clona, compila y ejecuta repos Gitea"
requires-python = ">=3.11" requires-python = ">=3.11"
dependencies = [ dependencies = [