From a05fb0e9d62341caa4a93b56d28114ac72301a32 Mon Sep 17 00:00:00 2001 From: Jessey van Offeren Date: Fri, 29 May 2026 16:32:54 +0200 Subject: [PATCH 1/2] fix(games): let the GUI Add-game dialog link a launcher & log folder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The "Add game…" button only prompted for a name (single-field QInputDialog), so a custom game couldn't be given its launch command or log dir from the GUI — the command/logdir were CLI-only, leaving SPT unlaunchable from the app. Replace it with a proper dialog: name + an optional launch command/script (with a file browser) + an optional log folder (auto-detected from the script's folder when left blank), wired to the existing customgames.add(command=, logdir=). Co-Authored-By: Claude Opus 4.8 (1M context) --- src/rigdoctor/gui/games_page.py | 75 +++++++++++++++++++++++++++++---- 1 file changed, 67 insertions(+), 8 deletions(-) diff --git a/src/rigdoctor/gui/games_page.py b/src/rigdoctor/gui/games_page.py index 1c95ed1..96c81f1 100644 --- a/src/rigdoctor/gui/games_page.py +++ b/src/rigdoctor/gui/games_page.py @@ -430,19 +430,78 @@ class GamesPage(QWidget): self._banner.hide() def _add_custom_game(self) -> None: - """Manually add a game no launcher reports (e.g. SPT), then rescan to show it.""" - from PySide6.QtWidgets import QInputDialog - + """Manually add a game no launcher reports (e.g. SPT): name + an optional launch + command/script (so it can be launched under crash-capture) and log folder.""" from ..core import customgames - name, ok = QInputDialog.getText( - self, "Add game", "Game name (e.g. SPT) — for titles no launcher reports:") - if not ok: + dlg = QDialog(self) + dlg.setWindowTitle("Add game") + dlg.setMinimumWidth(560) + v = QVBoxLayout(dlg) + v.setContentsMargins(20, 18, 20, 16) + v.setSpacing(10) + + intro = QLabel( + "Add a game no launcher reports — a standalone mod launcher like SPT, an itch.io " + "download, or any hand-installed game.") + intro.setWordWrap(True) + v.addWidget(intro) + + name_edit = QLineEdit() + name_edit.setPlaceholderText("SPT") + v.addWidget(QLabel("Game name")) + v.addWidget(name_edit) + + cmd_edit = QLineEdit() + cmd_edit.setPlaceholderText("e.g. /run/media/.../Escape-From-Tarkov/tarkov.sh") + cmd_row = QHBoxLayout() + cmd_row.addWidget(cmd_edit, 1) + cmd_browse = QPushButton("Browse…") + cmd_row.addWidget(cmd_browse, 0) + v.addWidget(QLabel("Launch command / script (optional — enables launch + auto-capture)")) + v.addLayout(cmd_row) + + log_edit = QLineEdit() + log_edit.setPlaceholderText("auto-detected from the script's folder (its logs/ subfolder)") + log_row = QHBoxLayout() + log_row.addWidget(log_edit, 1) + log_browse = QPushButton("Browse…") + log_row.addWidget(log_browse, 0) + v.addWidget(QLabel("Log folder (optional — read into crash diagnostics)")) + v.addLayout(log_row) + + def _pick_command() -> None: + path, _ = QFileDialog.getOpenFileName(dlg, "Select the launch script/executable") + if path: + cmd_edit.setText(path) + + def _pick_logdir() -> None: + path = QFileDialog.getExistingDirectory(dlg, "Select the game's log folder") + if path: + log_edit.setText(path) + + cmd_browse.clicked.connect(_pick_command) + log_browse.clicked.connect(_pick_logdir) + + buttons = QHBoxLayout() + buttons.addStretch(1) + cancel = QPushButton("Cancel") + cancel.clicked.connect(dlg.reject) + buttons.addWidget(cancel) + add = QPushButton("Add") + add.setObjectName("PrimaryButton") + add.setDefault(True) + add.clicked.connect(dlg.accept) + buttons.addWidget(add) + v.addLayout(buttons) + + if dlg.exec() != QDialog.DialogCode.Accepted: return - name = name.strip() + name = name_edit.text().strip() if not name: return - if customgames.add(name): + if customgames.add(name, command=cmd_edit.text().strip() or None, + logdir=log_edit.text().strip() or None): self.refresh() else: QMessageBox.information(self, "Add game", f"'{name}' is already in your games.") -- 2.52.0 From 8094a6f8c1d720108558f6f1352e81c9ad40643a Mon Sep 17 00:00:00 2001 From: Jessey van Offeren Date: Fri, 29 May 2026 16:33:25 +0200 Subject: [PATCH 2/2] chore(release): v0.42.1 Co-Authored-By: Claude Opus 4.8 (1M context) --- CHANGELOG.md | 8 ++++++++ pyproject.toml | 2 +- src/rigdoctor/__init__.py | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6e6c5b..55c371f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to RigDoctor are recorded here. Format follows (`MAJOR.MINOR.PATCH`, pre-1.0). `__version__` and `pyproject.toml` must match the git release tag (so the auto-updater, D18, can compare versions). +## [0.42.1] - 2026-05-29 +### Fixed +- **GUI "Add game…" can now link a launcher.** The dialog only asked for a name, so a custom + game (e.g. SPT) couldn't be given its launch command or log folder from the app — those were + CLI-only, leaving it unlaunchable from the GUI. It's now a proper form: name + an optional + launch command/script (with a **Browse…** file picker) + an optional log folder (auto-detected + from the script's folder when left blank). + ## [0.42.0] - 2026-05-29 ### Added - **Detect hard freezes that log no Xid.** The kernel-log scanner caught Xid codes, OOM, panic, diff --git a/pyproject.toml b/pyproject.toml index 376253b..59898b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "rigdoctor" -version = "0.42.0" +version = "0.42.1" description = "Modular hardware monitoring & crash diagnostics for Linux gamers." readme = "README.md" requires-python = ">=3.11" diff --git a/src/rigdoctor/__init__.py b/src/rigdoctor/__init__.py index 2dcfd8b..a4bca12 100644 --- a/src/rigdoctor/__init__.py +++ b/src/rigdoctor/__init__.py @@ -1,3 +1,3 @@ """RigDoctor — modular hardware monitoring & crash diagnostics for Linux gamers.""" -__version__ = "0.42.0" +__version__ = "0.42.1" -- 2.52.0