From 676a7ea9ebf5a7b483ece3409d755a376d5e45b0 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 19 May 2026 06:04:45 +0900 Subject: [PATCH 01/11] fix: notes file may not be present --- dzgui/managers/notes.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dzgui/managers/notes.py b/dzgui/managers/notes.py index 73beaa6..8782fb4 100644 --- a/dzgui/managers/notes.py +++ b/dzgui/managers/notes.py @@ -20,7 +20,10 @@ logger = logging.getLogger(APP_NAME) class NoteManager: def __init__(self, controller: "Controller", path: "Path") -> None: self.notes_path = path - self.cache: dict[str, str] = read_json(self.notes_path) + try: + self.cache: dict[str, str] = read_json(self.notes_path) + except Exception: + self.cache = {} def add_note(self, server: str, note: str) -> None: self.cache[server] = note From 17f732fafe6fdbf172ca2b81cb46bdd9aea55eee Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 19 May 2026 06:05:22 +0900 Subject: [PATCH 02/11] feat: continue to main app after config wizard closes --- dzgui/main.py | 5 ++++- dzgui/strings/wizard.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dzgui/main.py b/dzgui/main.py index cec454f..9ca1018 100644 --- a/dzgui/main.py +++ b/dzgui/main.py @@ -112,6 +112,9 @@ def main() -> None: copy_state_files(xdg_paths["XDG_STATE_HOME"]) # TODO: add logging inside wizard SetupWizard(_is_steam_deck, XDG.config) + + # NOTE: implies that setup wizard failed or was closed + if has_new_config(XDG.config) is False: return setup_logger(XDG.debug) @@ -127,7 +130,7 @@ def main() -> None: if has_steam_client() is False: EarlyAlertDialog(init.requires_steam) - # NOTE: clear versions file of unlinked mods + # NOTE: clears versions file of unlinked mods rebuild_symlinks(XDG.config) remove_stale_signatures(XDG.config, XDG.version) diff --git a/dzgui/strings/wizard.py b/dzgui/strings/wizard.py index 56c9053..2298155 100644 --- a/dzgui/strings/wizard.py +++ b/dzgui/strings/wizard.py @@ -67,4 +67,4 @@ label_client = "Steam client" ### Completion page heading_completion = "Setup complete" -blurb_completion = "Configuration completed successfully. Please exit and restart DZGUI to apply changes." +blurb_completion = "Configuration completed successfully. Click 'Close' to close this dialog and launch DZGUI." From c5d8afbc4ddf74dc0479ab9d4b96d2cd2b237f09 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 19 May 2026 06:08:55 +0900 Subject: [PATCH 03/11] chore: build dependencies into distribution tarball --- .gitignore | 1 + DEVELOPERS.md | 9 +++++++-- scripts/release.py | 10 ++++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 73744d0..78fde29 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ uv.lock .coverage pyapp-latest/ dist/ +cpython diff --git a/DEVELOPERS.md b/DEVELOPERS.md index 1b79308..49f9e49 100644 --- a/DEVELOPERS.md +++ b/DEVELOPERS.md @@ -14,5 +14,10 @@ sphinx-build -M html source build -a # Building standalone DZGUI release binaries 1. Run `./scripts/dl_pyapp.sh` -2. Run `python3 scripts/release.py` -3. Generate a release and tag against the bundled `dzgui` executable +# TODO: secondary script that packs this archive +2. Download cpython 3.13, linux, gnu, v3 +https://github.com/astral-sh/python-build-standalone/releases/download/20251014/cpython-3.13.9%2B20251014-x86_64_v3-unknown-linux-gnu-install_only_stripped.tar.gz +3. Explicitly install dependencies into site-packages +4. Pack back into a tarball +5. Run `python3 scripts/release.py` +6. Generate a release and tag against the bundled `dzgui` executable diff --git a/scripts/release.py b/scripts/release.py index e4768b2..a672f6d 100644 --- a/scripts/release.py +++ b/scripts/release.py @@ -26,9 +26,15 @@ env["PYAPP_PROJECT_VERSION"] = version env["PYAPP_PROJECT_NAME"] = appname env["PYAPP_EXEC_SPEC"] = entrypoint env["PYAPP_PROJECT_PATH"] = wheel -env["PYAPP_DISTRIBUTION_EMBED"] = "true" -env["PYAPP_PYTHON_VERSION"] = "3.13" env["PYAPP_PASS_LOCATION"] = "true" +# env["PYAPP_PYTHON_VERSION"] = "3.13" + +# NOTE: explicitly install all dependencies into distribution +env["PYAPP_SKIP_INSTALL"] = "true" +env["PYAPP_DISTRIBUTION_EMBED"] = "true" +env["PYAPP_FULL_ISOLATION"] = "true" +env["PYAPP_DISTRIBUTION_PATH"] = "cpython/airgapped.tar.gz" +env["PYAPP_DISTRIBUTION_PYTHON_PATH"] = "python/bin/python3" proc = subprocess.run(["cargo", "build", "--release"], env=env, cwd=pyapp_dir) if proc.returncode == 0: From fb3642508345c2b943ed2a793641ce1f87543681 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 19 May 2026 06:23:53 +0900 Subject: [PATCH 04/11] chore: bump version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c055619..d2bbd2b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ description = "DayZ server browser and mod manager for Linux" authors = [ {name = "aclist"} ] -version = "7.0.0b2" +version = "7.0.0b3" license = "GPL-3.0-or-later" license-files = ["LICENSE"] readme = "README.md" From fc7f1d781582de8e72a3a8e38d926e3450a10bff Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 19 May 2026 18:25:29 +0900 Subject: [PATCH 05/11] chore: update build script paths --- .gitignore | 1 - scripts/release.py | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 78fde29..73744d0 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,3 @@ uv.lock .coverage pyapp-latest/ dist/ -cpython diff --git a/scripts/release.py b/scripts/release.py index a672f6d..024a7f3 100644 --- a/scripts/release.py +++ b/scripts/release.py @@ -9,6 +9,7 @@ root = Path(__file__).resolve().parents[1] output = root.joinpath("dist") pyapp_dir = root.joinpath("pyapp-latest") +cpython = root.joinpath("build/cpython/airgapped.tar.gz") builder = build.ProjectBuilder(root) wheel = builder.build("wheel", output_directory=output) @@ -33,7 +34,7 @@ env["PYAPP_PASS_LOCATION"] = "true" env["PYAPP_SKIP_INSTALL"] = "true" env["PYAPP_DISTRIBUTION_EMBED"] = "true" env["PYAPP_FULL_ISOLATION"] = "true" -env["PYAPP_DISTRIBUTION_PATH"] = "cpython/airgapped.tar.gz" +env["PYAPP_DISTRIBUTION_PATH"] = cpython env["PYAPP_DISTRIBUTION_PYTHON_PATH"] = "python/bin/python3" proc = subprocess.run(["cargo", "build", "--release"], env=env, cwd=pyapp_dir) From 89fcfcb5d6b621dd18ef12983530d505e279551e Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 19 May 2026 18:26:09 +0900 Subject: [PATCH 06/11] fix: use hostname.local --- dzgui/api/servers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dzgui/api/servers.py b/dzgui/api/servers.py index 75df672..490fbda 100644 --- a/dzgui/api/servers.py +++ b/dzgui/api/servers.py @@ -106,7 +106,7 @@ class A2SInfo: def get_netmask() -> str: hostname = os.uname()[1] - i = socket.gethostbyname(hostname) + i = socket.gethostbyname(f"{hostname}.local") netmask = i.rsplit(".", 1)[0] return netmask From f9083b33efcc09673f4a3c2e95cece4c8b4f0334 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 19 May 2026 18:28:45 +0900 Subject: [PATCH 07/11] fix: change lan panel tate on map/unmap --- dzgui/managers/config.py | 1 - dzgui/views/base.py | 2 +- dzgui/views/components/connect_panel.py | 6 ++---- dzgui/views/pages/preconnect.py | 2 +- dzgui/views/trees/tree_servers.py | 6 ++---- 5 files changed, 6 insertions(+), 11 deletions(-) diff --git a/dzgui/managers/config.py b/dzgui/managers/config.py index e309bc3..12cb23e 100644 --- a/dzgui/managers/config.py +++ b/dzgui/managers/config.py @@ -22,7 +22,6 @@ import gi gi.require_version("Gtk", "3.0") from gi.repository.Gtk import main_quit # noqa E402 -# import dzgui.api.servers as Servers if TYPE_CHECKING: from dzgui.config.userprefs import UserPrefs from dzgui.controllers.mc import Controller diff --git a/dzgui/views/base.py b/dzgui/views/base.py index 2778439..e046b65 100644 --- a/dzgui/views/base.py +++ b/dzgui/views/base.py @@ -262,8 +262,8 @@ class Grid(Gtk.Grid): self.emitter.connect("server_page_toggled", self.toggle_filter_panels) + # TODO: drop, use map/signal def hide_widgets_on_init(self) -> None: - self.conpan.set_lan_visible(False) self.right_panel.sel_panel.hide() def toggle_filter_panels(self, emitter: "Emitter", state: bool) -> None: diff --git a/dzgui/views/components/connect_panel.py b/dzgui/views/components/connect_panel.py index fbf8f6a..552a9bc 100644 --- a/dzgui/views/components/connect_panel.py +++ b/dzgui/views/components/connect_panel.py @@ -278,9 +278,7 @@ class ConnectPanel(Gtk.Box): for el in self.lan, self.fav, self.add_panel: self.add(el) - - def set_lan_visible(self, state: bool) -> None: - self.lan.set_visible(state) + self.lan.set_visible(False) def _on_lan_tab_toggled(self, emitter: "Emitter", state: bool) -> None: - self.set_lan_visible(state) + self.lan.set_visible(state) diff --git a/dzgui/views/pages/preconnect.py b/dzgui/views/pages/preconnect.py index bad0cd4..3f5d0ca 100644 --- a/dzgui/views/pages/preconnect.py +++ b/dzgui/views/pages/preconnect.py @@ -17,7 +17,7 @@ from dzgui.views.trees.tree_server_mods import ServerModTreeView import gi gi.require_version("Gtk", "3.0") -from gi.repository import Gdk, Gtk # type: ignore # noqa E402 +from gi.repository import Gdk, Gtk # noqa E402 if TYPE_CHECKING: diff --git a/dzgui/views/trees/tree_servers.py b/dzgui/views/trees/tree_servers.py index 7013d0c..c1174fe 100644 --- a/dzgui/views/trees/tree_servers.py +++ b/dzgui/views/trees/tree_servers.py @@ -162,8 +162,8 @@ class ServerTreeView(ContextMixin, TreeView): # type: ignore def _on_map(self, widget: Self) -> None: # TODO: disable filter panel if current model is None - if self.get_enum() is ServerTab.LAN: - self.emitter.emit("lan_tab_toggled", True) + state = self.get_enum() is ServerTab.LAN + self.emitter.emit("lan_tab_toggled", state) store = self.filter_man.get_map_store() @@ -178,8 +178,6 @@ class ServerTreeView(ContextMixin, TreeView): # type: ignore # NOTE: removes queue checker for this tab GLib.Source.remove(self.queue_id) self.emitter.disconnect(self.handler_id) - if self.get_enum() is ServerTab.LAN: - self.emitter.emit("lan_tab_toggled", False) def _on_col_width_changed( self, col: Gtk.TreeViewColumn, width: GObject.ParamSpecInt From 0f591e658c05bb0eacd8562c50bd405b46e8a67a Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 19 May 2026 18:31:59 +0900 Subject: [PATCH 08/11] fix: call proper workshop method --- dzgui/views/mixins/mods_mixin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dzgui/views/mixins/mods_mixin.py b/dzgui/views/mixins/mods_mixin.py index 8cce682..d3fce76 100644 --- a/dzgui/views/mixins/mods_mixin.py +++ b/dzgui/views/mixins/mods_mixin.py @@ -11,5 +11,5 @@ class ModsMixin: self, tree: TreeView, path: Gtk.TreePath, column: Gtk.TreeViewColumn ) -> None: - path = self.get_focused_row_path() # type: ignore - self.controller.open_mod_page(path) # type: ignore + mod = self.get_value_at_index(2) + self.controller.open_workshop_page(mod) # type: ignore From 896799f904881589f29d1c1f17681f4402a59725 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 19 May 2026 18:34:35 +0900 Subject: [PATCH 09/11] chore: update string --- dzgui/util/strings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dzgui/util/strings.py b/dzgui/util/strings.py index 45ab37d..d006184 100644 --- a/dzgui/util/strings.py +++ b/dzgui/util/strings.py @@ -101,7 +101,7 @@ build_corrupted = ( "Steam settings or DayZ installation may be corrupted. Try restarting Steam." ) api_warn_msg = """No servers returned. Please wait and try again. -If this issue persists, your API key may be defunct or your network is blocking requests. +This usually indicates a transitory network timeout. If this issue persists, your API key or network may be malfunctioning. """ server_timeout = "Timed out when querying server, check IP or try again later." server_error = ( From 74bf4b5cfcaae08dc3a5698d0e147afc261f39dc Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 19 May 2026 18:35:47 +0900 Subject: [PATCH 10/11] se str, not Path --- scripts/release.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/release.py b/scripts/release.py index 024a7f3..da90073 100644 --- a/scripts/release.py +++ b/scripts/release.py @@ -34,7 +34,7 @@ env["PYAPP_PASS_LOCATION"] = "true" env["PYAPP_SKIP_INSTALL"] = "true" env["PYAPP_DISTRIBUTION_EMBED"] = "true" env["PYAPP_FULL_ISOLATION"] = "true" -env["PYAPP_DISTRIBUTION_PATH"] = cpython +env["PYAPP_DISTRIBUTION_PATH"] = str(cpython) env["PYAPP_DISTRIBUTION_PYTHON_PATH"] = "python/bin/python3" proc = subprocess.run(["cargo", "build", "--release"], env=env, cwd=pyapp_dir) From 87f347870f0fbcc3bf75f7e385ec90b4060763e1 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 19 May 2026 23:41:51 +0900 Subject: [PATCH 11/11] chore: clean up try/except block --- dzgui/util/_json.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/dzgui/util/_json.py b/dzgui/util/_json.py index bc8f70e..58faa93 100644 --- a/dzgui/util/_json.py +++ b/dzgui/util/_json.py @@ -2,15 +2,13 @@ import json from pathlib import Path from typing import Any + def read_json(path: Path) -> Any: try: with open(path, "r") as infile: - try: - data = json.load(infile) - return data - except json.decoder.JSONDecodeError as e: - raise e - except OSError as e: + data = json.load(infile) + return data + except Exception as e: raise e