From d7e94eab906da5e6a0c72da0d277af3f2e6ff706 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Wed, 5 Nov 2025 14:27:15 +0900 Subject: [PATCH 1/6] fix: UI not starting if changelog was missing --- CHANGELOG.md | 4 ++++ dzgui.sh | 6 +++--- helpers/funcs | 2 +- helpers/ui.py | 34 +++++++++++++++++++--------------- 4 files changed, 27 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2457574..fcabc10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [6.0.1-beta.1] 2025-11-05 +## Fixed +- UI not being constructed correctly if CHANGELOG.md was missing + ## [6.0.0-beta.8] 2025-11-04 ## Added - Internal flag to allow distribution packaged releases to disable in-app updates diff --git a/dzgui.sh b/dzgui.sh index 9aefe29..f1af5bd 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=6.0.0.beta-8 +version=6.0.1.beta-1 #CONSTANTS aid=221100 @@ -615,10 +615,10 @@ fetch_helpers_by_sum(){ [[ -f "$config_file" ]] && source "$config_file" declare -A sums sums=( - ["funcs"]="6ae3ead7034dc8e7543472bddee75c63" + ["funcs"]="2bac12c1bff5d6ad50161f174d57d029" ["query_v2.py"]="55d339ba02512ac69de288eb3be41067" ["servers.py"]="ed442c3aecf33f777d59dcf53650d263" - ["ui.py"]="8d05bbd7b8e15a97fae568e9a3dbf4d6" + ["ui.py"]="8a35ac263db8b812f30e04902c4e9603" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" ["pefile.py"]="21531f2c0d9dfa5f110cf6779f9d22c0" ) diff --git a/helpers/funcs b/helpers/funcs index 52c5409..2ac286c 100755 --- a/helpers/funcs +++ b/helpers/funcs @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -o pipefail -version="6.0.0-beta.8" +version="6.0.1-beta.1" #CONSTANTS aid=221100 diff --git a/helpers/ui.py b/helpers/ui.py index 9a53f5e..81176ee 100644 --- a/helpers/ui.py +++ b/helpers/ui.py @@ -18,6 +18,7 @@ from enum import Enum from collections.abc import Callable from concurrent.futures import wait from concurrent.futures import ThreadPoolExecutor +from pathlib import Path from typing import Literal, Self, Any import servers as Servers # noqa E402 @@ -1016,7 +1017,7 @@ def process_tree_option(choice: RowType) -> None: return if command == RowType.CHANGELOG: - App.grid.notebook.set_page_by_enum(NotebookPage.CHANGELOG) + App.grid.notebook.open_changelog() return if command == RowType.QUICK_CONNECT: @@ -4325,22 +4326,20 @@ class KeybindingsDialog(Gtk.Box): class Changelog(Gtk.Box): def __init__(self): super().__init__() + + self.changelog_label = Gtk.Label() + self.add(self.changelog_label) + + def open_changelog(self, path: Path) -> None: try: - with open(changelog_path, "r") as f: - changelog = f.read() - changelog_label = Gtk.Label() - changelog = self.format_pango(changelog) - changelog_label.set_markup(changelog) - self.add(changelog_label) - except FileNotFoundError: - msg = f"Failed to find CHANGELOG.md at {changelog_path}" - logger.critical(msg) - spawn_dialog(msg, Popup.WARN) - return + changelog = path.read_text() except OSError as e: - spawn_dialog(f"Something went wrong: {e}", Popup.WARN) + spawn_dialog(f"Something went wrong: {e}", Popup.NOTIFY) logger.critical(e) - return + return Exception + formatted = self.format_pango(changelog) + self.changelog_label.set_markup(formatted) + App.grid.notebook.set_page_by_enum(NotebookPage.CHANGELOG) def format_pango(self, text: str) -> str: medium = '' @@ -4357,7 +4356,8 @@ class Notebook(Gtk.Notebook): def __init__(self): super().__init__(show_tabs=False, show_border=False) - self.clog = ScrollableNote(Changelog()) + self.changelog = Changelog() + self.clog = ScrollableNote(self.changelog) self.clog.type = RowType.CHANGELOG self.clog.show_all() self.append_page(self.clog) @@ -4376,6 +4376,10 @@ class Notebook(Gtk.Notebook): self.connect("switch-page", self._on_page_changed) self.connect("key-press-event", self._on_keypress) + def open_changelog(self) -> None: + path = Path(changelog_path) + self.changelog.open_changelog(path) + def _set_adjustment(self, adjustment: VAdjustment) -> None: INCREMENT = 50 page = self.get_page() From a4ce65fe570320aff81ad9575860d66c700541e8 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 6 Nov 2025 14:30:16 +0900 Subject: [PATCH 2/6] feat: use reference branch for beta releases --- dzgui.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dzgui.sh b/dzgui.sh index f1af5bd..91c6ef6 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -2,6 +2,7 @@ set -o pipefail version=6.0.1.beta-1 +reference_branch="prerelease/6.0.1-beta.1" #CONSTANTS aid=221100 @@ -639,6 +640,10 @@ fetch_helpers_by_sum(){ realbranch="dzgui" fi + if [[ -n $reference_branch ]]; then + realbranch="$reference_branch" + fi + for i in "${!sums[@]}"; do file="$i" sum="${sums[$i]}" From a8ae07931d7204a0f4dc8e14b80ed42e0a45c0a5 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 6 Nov 2025 14:45:04 +0900 Subject: [PATCH 3/6] feat: disable version check on beta branch --- dzgui.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/dzgui.sh b/dzgui.sh index 91c6ef6..3be6282 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -318,6 +318,7 @@ check_unmerged(){ fi } check_version(){ + [[ -n $reference_branch ]] && return local version_url=$(format_version_url) local upstream=$(curl -Ls "$version_url" | awk -F= '/^version=/ {print $2}') local res=$(get_response_code "$version_url") From 90d59cec97872b258bea87ddea1a4aa2e269fbd3 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 6 Nov 2025 14:52:35 +0900 Subject: [PATCH 4/6] chore: drop legacy src_path logic --- dzgui.sh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/dzgui.sh b/dzgui.sh index 3be6282..3013e38 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,6 +1,8 @@ #!/usr/bin/env bash set -o pipefail +src_path=$(realpath "$0") + version=6.0.1.beta-1 reference_branch="prerelease/6.0.1-beta.1" @@ -219,9 +221,6 @@ default_steam_path="$default_steam_path" #Preferred Steam launch command (for Flatpak support) preferred_client="$preferred_client" - -#DZGUI source path -src_path="$src_path" END } depcheck(){ @@ -985,10 +984,6 @@ varcheck(){ create_config return 0 fi - if [[ $src_path != $(realpath "$0") ]]; then - src_path=$(realpath "$0") - update_config - fi } is_dzg_downloading(){ if [[ -d $steam_path ]] && [[ -d $steam_path/downloading/$aid ]]; then From a418bcfb90be2847487e3ebb318e940783e52ec2 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 10 Nov 2025 11:42:26 +0900 Subject: [PATCH 5/6] fix: return from finally block --- CHANGELOG.md | 4 ++++ dzgui.sh | 6 +++--- helpers/funcs | 2 +- helpers/ui.py | 3 +-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fcabc10..abfc742 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [6.0.1-beta.2] 2025-11-10 +## Fixed +- Python 3.14 error in finally block + ## [6.0.1-beta.1] 2025-11-05 ## Fixed - UI not being constructed correctly if CHANGELOG.md was missing diff --git a/dzgui.sh b/dzgui.sh index 3013e38..206d87a 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -3,7 +3,7 @@ set -o pipefail src_path=$(realpath "$0") -version=6.0.1.beta-1 +version=6.0.1.beta-2 reference_branch="prerelease/6.0.1-beta.1" #CONSTANTS @@ -616,10 +616,10 @@ fetch_helpers_by_sum(){ [[ -f "$config_file" ]] && source "$config_file" declare -A sums sums=( - ["funcs"]="2bac12c1bff5d6ad50161f174d57d029" + ["funcs"]="5d7d92b7b8a9c788b133ce5271a76553" ["query_v2.py"]="55d339ba02512ac69de288eb3be41067" ["servers.py"]="ed442c3aecf33f777d59dcf53650d263" - ["ui.py"]="8a35ac263db8b812f30e04902c4e9603" + ["ui.py"]="2476397883a4272eaf940403ba5a6575" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" ["pefile.py"]="21531f2c0d9dfa5f110cf6779f9d22c0" ) diff --git a/helpers/funcs b/helpers/funcs index 2ac286c..631a76f 100755 --- a/helpers/funcs +++ b/helpers/funcs @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -o pipefail -version="6.0.1-beta.1" +version="6.0.1-beta.2" #CONSTANTS aid=221100 diff --git a/helpers/ui.py b/helpers/ui.py index 81176ee..65438fc 100644 --- a/helpers/ui.py +++ b/helpers/ui.py @@ -824,8 +824,7 @@ def query_history() -> list | None: rows = [row.rstrip("\n") for row in f] except OSError: rows = None - finally: - return rows + return rows def query_favorites() -> None | list: From 5bce8709af4adba70dde6a9ad50ed052afa21180 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 10 Nov 2025 12:07:35 +0900 Subject: [PATCH 6/6] chore: enforce stricter python version --- CHANGELOG.md | 1 + dzgui.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index abfc742..87312f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## [6.0.1-beta.2] 2025-11-10 ## Fixed - Python 3.14 error in finally block +- Require Python version between 3.11 and 3.12 ## [6.0.1-beta.1] 2025-11-05 ## Fixed diff --git a/dzgui.sh b/dzgui.sh index 206d87a..e6cd70e 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -239,8 +239,8 @@ depcheck(){ check_pyver(){ local pyver=$(python3 --version | awk '{print $2}') local minor=$(<<< $pyver awk -F. '{print $2}') - if [[ -z $pyver ]] || [[ ${pyver:0:1} -lt 3 ]] || [[ $minor -lt 10 ]]; then - local msg="Requires Python >=3.10" + if [[ -z $pyver ]] || [[ ${pyver:0:1} -lt 3 ]] || [[ $minor -lt 11 ]] || [[ $minor -gt 12 ]]; then + local msg="Requires Python 3.11 or 3.12" raise_error_and_quit "$msg" fi logger INFO "Found Python version: $pyver"