From e0090fc1c398ea28954f04e4726cd6a2ed4c7ed3 Mon Sep 17 00:00:00 2001 From: oxpoe Date: Tue, 13 Oct 2026 07:53:51 +0700 Subject: [PATCH] feat: suite uji mencetak pesan hasil + GAMEMAX_DEBUG menyalin log ke stdout docs: bagian Updates (pemeriksaan & pembaruan satu klik dari GitHub Releases) versi 1.2.2 --- README.md | 15 +++++++++++++++ src/gamemax_gui.py | 8 +++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index defa824..4b1db7b 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,7 @@ temperature source (Tctl vs Tccd). - **Plug and play**: the service waits for the device, streams while present and keeps waiting through unplug/replug; a udev rule grants access to the logged-in user - **Single instance**: launching the app again just raises the running window +- **Self-update from GitHub Releases** (check + one-click update) - **Donate / GitHub buttons** in the app (window and tray menu) - **AppImage build** script (`packaging/build_appimage.sh`, PySide6 bundled) @@ -208,6 +209,20 @@ docs/ reverse-engineering.md — full analysis (Indonesian) assets/ previews and icon ``` +## Updates + +The app keeps itself current from GitHub Releases: + +- On start (when running from an AppImage) and from the **Periksa pembaruan** button or the + tray menu, it asks the GitHub API for the latest release and compares it with its version. +- When a newer release exists, a **Perbarui ke vX.Y.Z** button appears. One click downloads + the release asset, replaces the running AppImage atomically, refreshes the sender from the + new bundle and restarts the service. Restart the app to use the new version. +- Nothing is downloaded without that click, and no other files are touched. + +If the check fails (offline, proxy), the message appears in the app log. `GAMEMAX_DEBUG=1` +also mirrors the log to stdout for headless runs. + ## Support If this project is useful to you: diff --git a/src/gamemax_gui.py b/src/gamemax_gui.py index 49befa4..4f8ea25 100755 --- a/src/gamemax_gui.py +++ b/src/gamemax_gui.py @@ -30,7 +30,7 @@ from PySide6.QtWidgets import ( ) from PySide6.QtNetwork import QLocalServer, QLocalSocket -APP_VERSION = "1.2.1" +APP_VERSION = "1.2.2" REPO = "oxpoe/Gamemax-linux-apps" RELEASES_API = f"https://api.github.com/repos/{REPO}/releases/latest" UPDATE_ASSET = "GAMEMAX-LCD-x86_64.AppImage" @@ -685,6 +685,8 @@ class Window(QWidget): def log(self, text): self.logview.appendPlainText(text) + if os.environ.get("GAMEMAX_DEBUG"): + print(text, flush=True) def warn_once(self, text): if getattr(self, "_warned", None) != text: @@ -896,8 +898,8 @@ def _main(): ("periksa pembaruan", w.do_check_update)) for name, fn in steps: try: - fn() - print(f"[ OK ] {name}") + out = fn() + print(f"[ OK ] {name}" + (f" — {out}" if isinstance(out, str) and out else "")) except Exception as exc: # noqa: BLE001 print(f"[GAGAL] {name}: {exc}") # jalur asinkron yang dipakai tombol: centang layar kosong + simpan