Compare commits
2 Commits
fb65f4f249
...
ecdf389c7c
| Author | SHA1 | Date | |
|---|---|---|---|
| ecdf389c7c | |||
| c055b98d15 |
@@ -57,7 +57,7 @@ if [ "$OS" = "darwin" ]; then
|
||||
--standalone \
|
||||
--macos-create-app-bundle \
|
||||
--macos-app-icon="$ICON_ICNS" \
|
||||
--macos-app-name=jlauncher \
|
||||
--macos-app-name="Jail Launcher" \
|
||||
--macos-app-version="$VERSION" \
|
||||
--macos-signed-app-name=com.jailgames.jlauncher \
|
||||
--company-name=jailgames \
|
||||
|
||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 361 KiB After Width: | Height: | Size: 361 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 302 KiB After Width: | Height: | Size: 89 KiB |
Binary file not shown.
@@ -1,3 +1,3 @@
|
||||
"""jlauncher — lanzador de juegos jailgames."""
|
||||
|
||||
__version__ = "1.0.2"
|
||||
__version__ = "1.0.4"
|
||||
|
||||
@@ -16,6 +16,7 @@ from .ui.theme import apply_theme
|
||||
def main() -> int:
|
||||
app = QApplication(sys.argv)
|
||||
app.setApplicationName("jlauncher")
|
||||
app.setApplicationDisplayName("Jail Launcher")
|
||||
icon_path = app_icon_path()
|
||||
if icon_path is not None:
|
||||
app.setWindowIcon(QIcon(str(icon_path)))
|
||||
|
||||
@@ -26,6 +26,17 @@ _EXTRA_PATH_DIRS = (
|
||||
"/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:
|
||||
pass
|
||||
@@ -41,9 +52,32 @@ def _launch_env() -> dict[str, str]:
|
||||
if d not in parts and os.path.isdir(d):
|
||||
parts.append(d)
|
||||
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
|
||||
|
||||
|
||||
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:
|
||||
"""Ejecuta un comando de shell en cwd, retransmitiendo stdout/err línea a línea."""
|
||||
log(f"$ {cmd} (cwd={cwd})")
|
||||
|
||||
@@ -36,7 +36,7 @@ WINDOW_TITLE = f"© 2026 {APP_NAME} — JailDesigner"
|
||||
|
||||
CONSOLE_HEIGHT = 150 # alçada de la consola desplegada (px)
|
||||
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_AUTO = "auto"
|
||||
@@ -293,13 +293,12 @@ class MainWindow(QMainWindow):
|
||||
name.setFont(nf)
|
||||
name.setStyleSheet("color: #7c4dff;")
|
||||
lay.addWidget(name)
|
||||
lay.addSpacing(4)
|
||||
lay.addSpacing(2)
|
||||
|
||||
# Versió en cursiva i atenuada.
|
||||
ver = QLabel(f"Versió {__version__}", alignment=Qt.AlignCenter)
|
||||
# Versió: petita i atenuada, just davall del nom (estil macOS).
|
||||
ver = QLabel(f"v{__version__}", alignment=Qt.AlignCenter)
|
||||
vf = ver.font()
|
||||
vf.setItalic(True)
|
||||
vf.setPointSize(vf.pointSize() + 1)
|
||||
vf.setPointSize(vf.pointSize() - 1)
|
||||
ver.setFont(vf)
|
||||
ver.setStyleSheet("color: #8a8a8a;")
|
||||
lay.addWidget(ver)
|
||||
@@ -463,7 +462,13 @@ class MainWindow(QMainWindow):
|
||||
# --------------------------------------------------------------- helpers
|
||||
|
||||
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)
|
||||
if at_bottom:
|
||||
bar.setValue(bar.maximum())
|
||||
# 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.
|
||||
if self.settings.console_mode == CONSOLE_AUTO:
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "jlauncher"
|
||||
version = "1.0.1"
|
||||
version = "1.0.4"
|
||||
description = "Lanzador de juegos jailgames: clona, compila y ejecuta repos Gitea"
|
||||
requires-python = ">=3.11"
|
||||
dependencies = [
|
||||
|
||||
Reference in New Issue
Block a user