From 81f269b71bc05c3b1143478f3ac3e500d2827066 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Wed, 28 Aug 2024 07:29:02 +0900 Subject: [PATCH 001/115] chore: normalize changelog --- CHANGELOG.md | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7831b8..24f79cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,29 +1,15 @@ # Changelog -## [5.3.3-beta.5] 2024-08-27 +## [5.3.3] 2024-08-27 ### Added +- Scan local area network for DayZ servers - Freedesktop application icons for system taskbar, tray, and other dialogs -### Fixed -- Errors being printed to the console when Exit button was explicitly clicked - -## [5.3.3-beta.4] 2024-08-21 -### Added - Emit CPU model name when exporting system debug log ### Fixed - Detect Steam Deck OLED APU variant during initial setup - -## [5.3.3-beta.3] 2024-08-04 -### Added -- Scan local area network for DayZ servers - -## [5.3.3-beta.2] 2024-08-03 -### Fixed -- Clerical hotfix for previous player names fix -- Test if DayZ directory is empty at startup, implying that the game was moved to a new library collection - -## [5.3.3-beta.1] 2024-07-16 -### Fixed -- Encapsulate player names correctly so that names with whitespace in them are supported +- Errors being printed to the console when Exit button was explicitly clicked +- Test if DayZ library location was moved internally on Steam by user +- Encapsulate player names correctly to support whitespace ## [5.3.2] 2024-07-02 ### Fixed From 049fb47019a634c24930fd3257f1d845e8fb0553 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Wed, 28 Aug 2024 07:30:38 +0900 Subject: [PATCH 002/115] chore: normalize version --- dzgui.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dzgui.sh b/dzgui.sh index 3e764be..fc63a82 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.3.3-beta.5 +version=5.3.3 #CONSTANTS aid=221100 From 5fda598173ba3f8b7c025308686eedce9e23d93f Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Wed, 28 Aug 2024 07:31:14 +0900 Subject: [PATCH 003/115] chore: update url --- dzgui.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dzgui.sh b/dzgui.sh index fc63a82..f5a23a6 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -545,7 +545,7 @@ fetch_icons(){ "128" "256" ) - url="$testing_url/images/icons" + url="$stable_url/images/icons" for i in "${res[@]}"; do size="${i}x${i}" dir="$HOME/.local/share/icons/hicolor/$size/apps" From 5686ea76c2d208bf37c18e47d9313604bbdd17f0 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Wed, 28 Aug 2024 08:09:32 +0900 Subject: [PATCH 004/115] fix: boolean operator --- dzgui.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dzgui.sh b/dzgui.sh index f5a23a6..1894708 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -380,7 +380,7 @@ test_display_mode(){ check_architecture(){ local cpu=$(< /proc/cpuinfo awk -F": " '/AMD Custom APU [0-9]{4}$/ {print $2; exit}') read -a APU_MODEL <<< "$cpu" - if [[ ${APU_MODEL[3]} != "0932" ]] || [[ ${APU_MODEL[3]} != "0405" ]]; then + if [[ ${APU_MODEL[3]} != "0932" ]] && [[ ${APU_MODEL[3]} != "0405" ]]; then is_steam_deck=0 logger INFO "Setting architecture to 'desktop'" return From 0de89a3ef1139ff93a46778925a2fcbf69debb16 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Wed, 28 Aug 2024 08:44:13 +0900 Subject: [PATCH 005/115] add: set WM_CLASS name --- dzgui.sh | 2 +- helpers/ui.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dzgui.sh b/dzgui.sh index 1894708..5625570 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -562,7 +562,7 @@ fetch_helpers_by_sum(){ [[ -f "$config_file" ]] && source "$config_file" declare -A sums sums=( - ["ui.py"]="f89047e3fde843dbb52d343daf8d2675" + ["ui.py"]="13bb5456aa9d95efdf2335e437f4c6fb" ["query_v2.py"]="55d339ba02512ac69de288eb3be41067" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" ["funcs"]="44eca80b207057423c2d298cc7cf1e29" diff --git a/helpers/ui.py b/helpers/ui.py index a15fc50..f4ca328 100644 --- a/helpers/ui.py +++ b/helpers/ui.py @@ -1812,6 +1812,7 @@ class App(Gtk.Application): is_steam_deck = False is_game_mode = False + GLib.set_prgname(app_name) self.win = OuterWindow(is_steam_deck, is_game_mode) self.win.set_icon_name("dzgui") From d01add35731104ef66d9b47f092339d86a349210 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 29 Aug 2024 22:11:49 +0900 Subject: [PATCH 006/115] docs: update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24f79cf..8f3a913 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - Errors being printed to the console when Exit button was explicitly clicked - Test if DayZ library location was moved internally on Steam by user - Encapsulate player names correctly to support whitespace +- Report WM_CLASS name to the window manager ## [5.3.2] 2024-07-02 ### Fixed From 659cbb83a3903b3c8101acb1b47518c302513e14 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Sun, 1 Sep 2024 13:19:16 +0900 Subject: [PATCH 007/115] chore: normalize version --- dzgui.sh | 6 +++--- helpers/funcs | 2 +- helpers/ui.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dzgui.sh b/dzgui.sh index 5625570..6cc655a 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.3.3 +version=5.3.0 #CONSTANTS aid=221100 @@ -562,10 +562,10 @@ fetch_helpers_by_sum(){ [[ -f "$config_file" ]] && source "$config_file" declare -A sums sums=( - ["ui.py"]="13bb5456aa9d95efdf2335e437f4c6fb" + ["ui.py"]="819a30c43644817a4f4a009f3df52b77" ["query_v2.py"]="55d339ba02512ac69de288eb3be41067" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" - ["funcs"]="44eca80b207057423c2d298cc7cf1e29" + ["funcs"]="e1998f02f17776ccf2108fe5e9396d75" ["lan"]="c62e84ddd1457b71a85ad21da662b9af" ) local author="aclist" diff --git a/helpers/funcs b/helpers/funcs index 7d19b29..13c693a 100755 --- a/helpers/funcs +++ b/helpers/funcs @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -o pipefail -version=5.3.3 +version=5.3.0 #CONSTANTS aid=221100 diff --git a/helpers/ui.py b/helpers/ui.py index f4ca328..298f3b2 100644 --- a/helpers/ui.py +++ b/helpers/ui.py @@ -19,7 +19,7 @@ gi.require_version("Gtk", "3.0") from gi.repository import Gtk, GLib, Gdk, GObject, Pango from enum import Enum -# 5.3.3 +# 5.3.0 app_name = "DZGUI" start_time = 0 From ed07fd03435adcf6ef985367b22dca1774663224 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Wed, 25 Sep 2024 23:08:29 +0900 Subject: [PATCH 008/115] chore: normalize changelog --- CHANGELOG.md | 38 +++++++++----------------------------- 1 file changed, 9 insertions(+), 29 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c62e093..7c4bd94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,46 +1,26 @@ # Changelog -## [5.4.1-beta.2] 2024-09-12 -### Fixed -- Use fallback logic for modlist queries when user traverses networks - -## [5.4.1-beta.2] 2024-09-10 -### Fixed -- Fix signal handling control flow for checkbox toggles - -## [5.4.1-beta.1] 2024-09-10 +## [5.4.1] 2024-09-25 ### Added - Pre-boot validation check for users with self-compiled version of jq ### Fixed +- Use fallback logic for modlist queries when user traverses networks +- Fix signal handling control flow for checkbox toggles - When reloading the server browser, the map combobox selection would revert to the last selected map instead of All Maps - Server filter toggle signals were accessible from the main menu when switching between menu contexts - Global cooldown dialog could sometimes block filter toggles after cooldown reset - Normalized minor version number due to a previous clerical error -## [5.4.0-beta.5] 2024-08-27 -### Added -- Freedesktop application icons for system taskbar, tray, and other dialogs -### Fixed -- Errors being printed to the console when Exit button was explicitly clicked - -## [5.4.0-beta.4] 2024-08-21 -### Added -- Emit CPU model name when exporting system debug log -### Fixed -- Detect Steam Deck OLED APU variant during initial setup - -## [5.4.0-beta.3] 2024-08-04 +## [5.4.0] 2024-08-27 ### Added - Scan local area network for DayZ servers - -## [5.4.0-beta.2] 2024-08-03 -### Fixed -- Clerical hotfix for previous player names fix -- Test if DayZ directory is empty at startup, implying that the game was moved to a new library collection - -## [5.4.0-beta.1] 2024-07-16 +- Freedesktop application icons for system taskbar, tray, and other dialogs +- Emit CPU model name when exporting system debug log ### Fixed +- Errors being printed to the console when Exit button was explicitly clicked +- Detect Steam Deck OLED APU variant during initial setup - Encapsulate player names correctly so that names with whitespace in them are supported +- Test if DayZ directory is empty at startup, implying that the game was moved to a new library collection ## [5.3.2] 2024-07-02 ### Fixed From 278aa8c28ab3b832ff53ac783c3a35dba55ecfe3 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Sun, 6 Oct 2024 03:26:24 +0900 Subject: [PATCH 009/115] chore: update checksum --- CHANGELOG.md | 42 +++++++++++------------------------------- dzgui.sh | 4 ++-- helpers/funcs | 2 +- 3 files changed, 14 insertions(+), 34 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe6a399..edf2aeb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,50 +1,30 @@ # Changelog -## [5.4.2-beta.1] 2024-10-05 -### Fixed +## [5.4.2] 2024-10-05 - Sanitize third-party API IDs to remove UGC collisions -## [5.4.1-beta.2] 2024-09-12 -### Fixed -- Use fallback logic for modlist queries when user traverses networks - -## [5.4.1-beta.2] 2024-09-10 -### Fixed -- Fix signal handling control flow for checkbox toggles - -## [5.4.1-beta.1] 2024-09-10 +## [5.4.1] 2024-09-25 ### Added - Pre-boot validation check for users with self-compiled version of jq ### Fixed +- Use fallback logic for modlist queries when user traverses networks +- Fix signal handling control flow for checkbox toggles - When reloading the server browser, the map combobox selection would revert to the last selected map instead of All Maps - Server filter toggle signals were accessible from the main menu when switching between menu contexts - Global cooldown dialog could sometimes block filter toggles after cooldown reset - Normalized minor version number due to a previous clerical error -## [5.4.0-beta.5] 2024-08-27 -### Added -- Freedesktop application icons for system taskbar, tray, and other dialogs -### Fixed -- Errors being printed to the console when Exit button was explicitly clicked - -## [5.4.0-beta.4] 2024-08-21 -### Added -- Emit CPU model name when exporting system debug log -### Fixed -- Detect Steam Deck OLED APU variant during initial setup - -## [5.4.0-beta.3] 2024-08-04 +## [5.4.0] 2024-08-27 ### Added - Scan local area network for DayZ servers - -## [5.4.0-beta.2] 2024-08-03 -### Fixed -- Clerical hotfix for previous player names fix -- Test if DayZ directory is empty at startup, implying that the game was moved to a new library collection - -## [5.4.0-beta.1] 2024-07-16 +- Freedesktop application icons for system taskbar, tray, and other dialogs +- Emit CPU model name when exporting system debug log ### Fixed +- Errors being printed to the console when Exit button was explicitly clicked +- Detect Steam Deck OLED APU variant during initial setup - Encapsulate player names correctly so that names with whitespace in them are supported +- Test if DayZ directory is empty at startup, implying that the game was moved to a new library collection +- Report WM_CLASS name to the window manager ## [5.3.2] 2024-07-02 ### Fixed diff --git a/dzgui.sh b/dzgui.sh index fe7b953..7b9437e 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.4.2-beta.1 +version=5.4.2 #CONSTANTS aid=221100 @@ -569,7 +569,7 @@ fetch_helpers_by_sum(){ ["ui.py"]="9cac4d3b87ef292e7d30b25ca86cc438" ["query_v2.py"]="55d339ba02512ac69de288eb3be41067" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" - ["funcs"]="7221bda853145942c4c728cbc76ac633" + ["funcs"]="71d3a941209792a41f381f011e78def8" ["lan"]="c62e84ddd1457b71a85ad21da662b9af" ) local author="aclist" diff --git a/helpers/funcs b/helpers/funcs index 071c8d3..8bf10c5 100755 --- a/helpers/funcs +++ b/helpers/funcs @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -o pipefail -version=5.4.1 +version=5.4.2 #CONSTANTS aid=221100 From 10c6a79b17bbe752cd550e12ab22833f183d4545 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 11 Nov 2024 06:05:49 +0900 Subject: [PATCH 010/115] chore: normalize changelog --- CHANGELOG.md | 73 ++++++++++++++-------------------------------------- 1 file changed, 20 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0982e75..7ba51df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,78 +1,45 @@ # Changelog -## [5.5.0-beta.5] 2024-11-03 -### Changed -- Use updated A2S_RULES logic -### Fixed -- Servers in saved servers list would populate context menu with same option when right-clicking in server browser - -## [5.5.0-beta.4] 2024-10-31 -### Added -- Expose a toggle setting for whether to launch the application in fullscreen -### Fixed -- Enable adding/removing servers to/from My Saved Servers when in Recent Servers context - -## [5.5.0-beta.3] 2024-10-31 -### Fixed -- Prevent maps combobox from duplicating contents - -## [5.5.0-beta.2] 2024-10-31 -### Fixed -- Restore keyboard input to keyword entry field - -## [5.5.0-beta.1] 2024-10-30 +## [5.5.0] 2024-11-10 ### Added - Support servers running DLC content (fixes Frostline servers) -- Text autocompletion in maps search field -- Add disk space warning to popup dialog +- Expose a toggle setting for whether to launch the application in fullscreen +- Text autocompletion in maps search field (partial search) +- Add disk space warning to popup dialog when downloading mods ### Fixed +- Servers in saved servers list would populate context menu with same option when right-clicking in server browser +- Enable adding/removing servers to/from My Saved Servers when in Recent Servers context +- Prevent maps combobox from duplicating contents +- Restore keyboard input to keyword entry field +### Changed - Abort fallback query method if DLC is required -## [5.4.2-beta.1] 2024-10-05 +## [5.4.2] 2024-10-05 ### Fixed - Sanitize third-party API IDs to remove UGC collisions -## [5.4.1-beta.2] 2024-09-12 -### Fixed -- Use fallback logic for modlist queries when user traverses networks - -## [5.4.1-beta.2] 2024-09-10 -### Fixed -- Fix signal handling control flow for checkbox toggles - -## [5.4.1-beta.1] 2024-09-10 +## [5.4.1] 2024-09-25 ### Added - Pre-boot validation check for users with self-compiled version of jq ### Fixed +- Use fallback logic for modlist queries when user traverses networks +- Fix signal handling control flow for checkbox toggles - When reloading the server browser, the map combobox selection would revert to the last selected map instead of All Maps - Server filter toggle signals were accessible from the main menu when switching between menu contexts - Global cooldown dialog could sometimes block filter toggles after cooldown reset - Normalized minor version number due to a previous clerical error -## [5.4.0-beta.5] 2024-08-27 -### Added -- Freedesktop application icons for system taskbar, tray, and other dialogs -### Fixed -- Errors being printed to the console when Exit button was explicitly clicked - -## [5.4.0-beta.4] 2024-08-21 -### Added -- Emit CPU model name when exporting system debug log -### Fixed -- Detect Steam Deck OLED APU variant during initial setup - -## [5.4.0-beta.3] 2024-08-04 +## [5.4.0] 2024-08-27 ### Added - Scan local area network for DayZ servers - -## [5.4.0-beta.2] 2024-08-03 -### Fixed -- Clerical hotfix for previous player names fix -- Test if DayZ directory is empty at startup, implying that the game was moved to a new library collection - -## [5.4.0-beta.1] 2024-07-16 +- Freedesktop application icons for system taskbar, tray, and other dialogs +- Emit CPU model name when exporting system debug log ### Fixed +- Errors being printed to the console when Exit button was explicitly clicked +- Detect Steam Deck OLED APU variant during initial setup - Encapsulate player names correctly so that names with whitespace in them are supported +- Test if DayZ directory is empty at startup, implying that the game was moved to a new library collection +- Report WM_CLASS name to the window manager ## [5.3.2] 2024-07-02 ### Fixed From c0ab8111fd21ecf7b84e79f163881b00878bedd7 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 11 Nov 2024 06:05:56 +0900 Subject: [PATCH 011/115] chore: bump version --- dzgui.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dzgui.sh b/dzgui.sh index 5a0bac8..b9409e0 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.5.0-beta.5 +version=5.5.0 #CONSTANTS aid=221100 From 5496f914f26677decaa9089fce2ef9f3ce8783e9 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 11 Nov 2024 09:17:47 +0900 Subject: [PATCH 012/115] fix: correct typo --- CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd7a58a..7ba51df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,7 @@ ## [5.5.0] 2024-11-10 ### Added -- Support servers running DLC content (fixes F git push --set-upstream origin release/5.5.0-stable -rostline servers) +- Support servers running DLC content (fixes Frostline servers) - Expose a toggle setting for whether to launch the application in fullscreen - Text autocompletion in maps search field (partial search) - Add disk space warning to popup dialog when downloading mods From c3c8872faddd70a8406ca546b5c8e5eff693b5ec Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 3 Dec 2024 20:09:19 +0900 Subject: [PATCH 013/115] fix: backport hotfix (#168) --- CHANGELOG.md | 4 ++++ dzgui.sh | 4 ++-- helpers/funcs | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ba51df..b7156b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [5.5.1] 2024-12-03 +### Fixed +- Support localized decimal separators when parsing installed mod sizes + ## [5.5.0] 2024-11-10 ### Added - Support servers running DLC content (fixes Frostline servers) diff --git a/dzgui.sh b/dzgui.sh index b9409e0..15dd451 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.5.0 +version=5.5.1 #CONSTANTS aid=221100 @@ -572,7 +572,7 @@ fetch_helpers_by_sum(){ ["ui.py"]="dd7aa34df1d374739127cca3033a3f67" ["query_v2.py"]="55d339ba02512ac69de288eb3be41067" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" - ["funcs"]="d8ae2662fbc3c62bdb5a51dec1935705" + ["funcs"]="ad4d7b4bf2e8ef0ac7637183876dbec6" ["lan"]="c62e84ddd1457b71a85ad21da662b9af" ) local author="aclist" diff --git a/helpers/funcs b/helpers/funcs index b69640f..69b66c8 100755 --- a/helpers/funcs +++ b/helpers/funcs @@ -332,7 +332,7 @@ list_mods(){ base_dir=$(basename $(readlink -f $game_dir/$symlink)) size=$(du -s "$(readlink -f "$game_dir/$symlink")" | awk '{print $1}') size=$(python3 -c "n=($size/1024) +.005; print(round(n,4))") - printf "%s$sep%s$sep%s$sep%3.3f\n" "$name" "$symlink" "$base_dir" "$size" + LC_NUMERIC=C printf "%s$sep%s$sep%s$sep%3.3f\n" "$name" "$symlink" "$base_dir" "$size" done | sort -k1 fi } From bc9178d2de8747278abb435e12c0335172c887cb Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 12 Dec 2024 11:56:10 +0900 Subject: [PATCH 014/115] fix: triage hotfix from testing --- dzgui.sh | 72 ++++++++++++++++++++++++++++++++++++++++----------- helpers/funcs | 8 +++--- 2 files changed, 62 insertions(+), 18 deletions(-) diff --git a/dzgui.sh b/dzgui.sh index 15dd451..3580adc 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.5.1 +version=5.5.2 #CONSTANTS aid=221100 @@ -54,7 +54,8 @@ km_helper="$helpers_path/latlon" sums_path="$helpers_path/sums.md5" func_helper="$helpers_path/funcs" -#URLS +#REMOTE +remote_host=gh author="aclist" repo="dztui" url_prefix="https://raw.githubusercontent.com/$author/$repo" @@ -64,6 +65,7 @@ releases_url="https://github.com/$author/$repo/releases/download/browser" km_helper_url="$releases_url/latlon" geo_file_url="$releases_url/ips.csv.gz" + set_im_module(){ #TODO: drop pending SteamOS changes pgrep -a gamescope | grep -q "generate-drm-mode" @@ -312,13 +314,14 @@ check_unmerged(){ check_version(){ local version_url=$(format_version_url) local upstream=$(curl -Ls "$version_url" | awk -F= '/^version=/ {print $2}') + #2024-12-12: do not clobber local version if unreachable + [[ -z $upstream ]] && return logger INFO "Local branch: '$branch', local version: $version" if [[ $branch == "stable" ]]; then version_url="$stable_url/dzgui.sh" elif [[ $branch == "testing" ]]; then version_url="$testing_url/dzgui.sh" fi - local upstream=$(curl -Ls "$version_url" | awk -F= '/^version=/ {print $2}') [[ ! -f "$freedesktop_path/$app_name.desktop" ]] && freedesktop_dirs if [[ $version == $upstream ]]; then logger INFO "Local version is same as upstream" @@ -371,9 +374,14 @@ prompt_dl(){ } dl_changelog(){ local mdbranch + local md [[ $branch == "stable" ]] && mdbranch="dzgui" [[ $branch == "testing" ]] && mdbranch="testing" - local md="https://raw.githubusercontent.com/$author/dztui/${mdbranch}/CHANGELOG.md" + if [[ $remote_host == "gh" ]]; then + md="https://raw.githubusercontent.com/$author/$repo/${mdbranch}/CHANGELOG.md" + else + md="https://codeberg.org/$author/$repo/raw/branch/${mdbranch}/CHANGELOG.md" + fi curl -Ls "$md" > "$state_path/CHANGELOG.md" } test_display_mode(){ @@ -535,7 +543,7 @@ fetch_dzq(){ return 0 fi local sha=3088bbfb147b77bc7b6a9425581b439889ff3f7f - local author="aclist" + local author="yepoleb" local repo="dayzquery" local url="https://raw.githubusercontent.com/$author/$repo/$sha/dayzquery.py" curl -Ls "$url" > "$file" @@ -569,14 +577,14 @@ fetch_helpers_by_sum(){ [[ -f "$config_file" ]] && source "$config_file" declare -A sums sums=( - ["ui.py"]="dd7aa34df1d374739127cca3033a3f67" + ["ui.py"]="be3da1e542d14105f4358dd38901e25a" ["query_v2.py"]="55d339ba02512ac69de288eb3be41067" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" - ["funcs"]="ad4d7b4bf2e8ef0ac7637183876dbec6" + ["funcs"]="9c844298c5f112c0a2482dce3110ab70" ["lan"]="c62e84ddd1457b71a85ad21da662b9af" ) local author="aclist" - local repo="dztui" + local repo="dzgui" local realbranch local file local sum @@ -596,7 +604,13 @@ fetch_helpers_by_sum(){ file="$i" sum="${sums[$i]}" full_path="$helpers_path/$file" - url="https://raw.githubusercontent.com/$author/$repo/$realbranch/helpers/$file" + + if [[ $remote_host == "gh" ]]; then + url="https://raw.githubusercontent.com/$author/$repo/$realbranch/helpers/$file" + else + url="https://codeberg.org/$author/$repo/raw/branch/$realbranch/helpers/$file" + fi + if [[ -f "$full_path" ]] && [[ $(get_hash "$full_path") == $sum ]]; then logger INFO "$file is current" else @@ -845,14 +859,42 @@ is_steam_running(){ return 0 fi } +get_response_code(){ + local url="$1" + curl -Ls -I -o /dev/null -w "%{http_code}" "$url" +} test_connection(){ - ping -c1 -4 github.com 1>/dev/null 2>&1 - if [[ ! $? -eq 0 ]]; then - raise_error_and_quit "No connection could be established to the remote server (github.com)." + source "$config_file" + declare -A hr + local res1 + local res2 + local str="No connection could be established to the remote server" + hr=( + ["steampowered.com"]="https://api.steampowered.com/IGameServersService/GetServerList/v1/?key=$steam_api" + ["github.com"]="https://github.com/$author" + ["codeberg.org"]="https://codeberg.org/$author" + ) + # steam API is mandatory, except on initial setup + if [[ -n $steam_api ]]; then + res=$(get_response_code "${hr["steampowered.com"]}") + [[ $res -ne 200 ]] && raise_error_and_quit "$str ("steampowered.com")" fi - ping -c1 -4 api.steampowered.com 1>/dev/null 2>&1 - if [[ ! $? -eq 0 ]]; then - raise_error_and_quit "No connection could be established to the remote server (steampowered.com)." + + res=$(get_response_code "${hr["github.com"]}") + if [[ $res -ne 200 ]]; then + logger WARN "Remote host '${hr["github.com"]}' unreachable', trying fallback" + remote_host=cb + res=$(get_response_code "${hr["codeberg.org"]}") + [[ $res -ne 200 ]] && raise_error_and_quit "$str (${hr["codeberg.org"]})" + fi + if [[ $remote_host == "cb" ]]; then + url_prefix="https://codeberg.org/$author/$repo/raw/branch" + releases_url="https://codeberg.org/$author/$repo/releases/download/browser" + # 2024-12-12: interpolate variables again + stable_url="$url_prefix/dzgui" + testing_url="$url_prefix/testing" + km_helper_url="$releases_url/latlon" + geo_file_url="$releases_url/ips.csv.gz" fi } legacy_cols(){ diff --git a/helpers/funcs b/helpers/funcs index 69b66c8..539a6d5 100755 --- a/helpers/funcs +++ b/helpers/funcs @@ -67,12 +67,14 @@ game_dir="$steam_path/steamapps/common/DayZ" #URLS author="aclist" repo="dztui" +#TODO: this is hardcoded +#2024-12-12 gh_prefix="https://github.com" issues_url="$gh_prefix/$author/$repo/issues" -url_prefix="https://raw.githubusercontent.com/$author/$repo" +url_prefix="https://codeberg.org/$author/$repo/branch" stable_url="$url_prefix/dzgui" testing_url="$url_prefix/testing" -releases_url="$gh_prefix/$author/$repo/releases/download/browser" +releases_url="https://codeberg.org/$author/$repo/releases/download/browser" km_helper_url="$releases_url/latlon" db_file="$releases_url/ips.csv.gz" sums_url="$stable_url/helpers/sums.md5" @@ -773,7 +775,7 @@ dl_changelog(){ local file="CHANGELOG.md" [[ $branch == "stable" ]] && mdbranch="dzgui" [[ $branch == "testing" ]] && mdbranch="testing" - local md="https://raw.githubusercontent.com/$author/$repo/${mdbranch}/$file" + local md="https://codeberg.org/$author/$repo/raw/branch/${mdbranch}/$file" curl -Ls "$md" > "$state_path/$file" } toggle(){ From d71110d0a113d133d2ccdd42f3683c330ce59ee2 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 12 Dec 2024 12:10:04 +0900 Subject: [PATCH 015/115] fix: url syntax --- dzgui.sh | 2 +- helpers/funcs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dzgui.sh b/dzgui.sh index 3580adc..144f874 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -580,7 +580,7 @@ fetch_helpers_by_sum(){ ["ui.py"]="be3da1e542d14105f4358dd38901e25a" ["query_v2.py"]="55d339ba02512ac69de288eb3be41067" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" - ["funcs"]="9c844298c5f112c0a2482dce3110ab70" + ["funcs"]="8aa9eac96c21a3aabbf73c44b643523b" ["lan"]="c62e84ddd1457b71a85ad21da662b9af" ) local author="aclist" diff --git a/helpers/funcs b/helpers/funcs index 539a6d5..2f5875d 100755 --- a/helpers/funcs +++ b/helpers/funcs @@ -71,7 +71,7 @@ repo="dztui" #2024-12-12 gh_prefix="https://github.com" issues_url="$gh_prefix/$author/$repo/issues" -url_prefix="https://codeberg.org/$author/$repo/branch" +url_prefix="https://codeberg.org/$author/$repo/raw/branch" stable_url="$url_prefix/dzgui" testing_url="$url_prefix/testing" releases_url="https://codeberg.org/$author/$repo/releases/download/browser" From 32b424da5cfa9955e98d840a5813e0d61cbe0a8a Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 12 Dec 2024 12:25:26 +0900 Subject: [PATCH 016/115] fix: update installscript --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index a56422e..22ec6ab 100644 --- a/install.sh +++ b/install.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -curl "https://raw.githubusercontent.com/aclist/dztui/dzgui/dzgui.sh" > dzgui.sh +curl -L "https://codeberg.org/aclist/dzgui/raw/branch/dzgui/dzgui.sh" > dzgui.sh chmod +x dzgui.sh xdg_file="$HOME/.local/share/applications/dzgui.desktop" share="$HOME/.local/share/dzgui" From baeaeb1b6401123f118dc40355f91fc15b2d5501 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 12 Dec 2024 17:57:27 +0900 Subject: [PATCH 017/115] docs: update README --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index 5732eb9..8290e55 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,4 @@ ## What this is -DZGUI is a GUI version of [DZTUI](https://github.com/aclist/dztui/tree/dztui) for Linux. - -Note: development of DZTUI has stopped and has been replaced with DZGUI. - DZGUI allows you to connect to both official and modded/community DayZ servers on Linux and provides a graphical interface for doing so. This overcomes certain limitations in the Linux client and helps prepare the game to launch by doing the following: 1. Search for and display server metadata in a table (server name, player count, ping, current gametime, distance, IP) From 8ea62434ee0e0fdbcd68a65124ddf75f415ee306 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 12 Dec 2024 18:32:44 +0900 Subject: [PATCH 018/115] docs: update docs link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8290e55..d6cf770 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Other options include the ability to connect by IP or ID or set a favorite serv ## Setup and usage -Refer to the [manual](https://aclist.github.io/dzgui/dzgui.html) for installation and setup instructions, a feature-by-feature breakdown, and Steam integration tutorials. +Refer to the [manual](https://aclist.codeberg.page) for installation and setup instructions, a feature-by-feature breakdown, and Steam integration tutorials. ![Alt text](/images/example.png) From 6b48ee127ddee2ad4844345122b749172de696a4 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Fri, 13 Dec 2024 10:45:39 +0900 Subject: [PATCH 019/115] chore: backports into stable --- CHANGELOG.md | 6 ++++++ dzgui.sh | 37 ++++++++++++++++++----------------- helpers/funcs | 53 +++++++++++++++++++++++++++++++++++++++++---------- install.sh | 47 ++++++++++++++++++++++++++++++++++++++------- 4 files changed, 109 insertions(+), 34 deletions(-) mode change 100644 => 100755 install.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index b7156b8..67c7234 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [5.5.3] 2024-12-13 +### Fixed +- Add remote resource health checks before downloading updates +### Added +- Add fallback repository + ## [5.5.1] 2024-12-03 ### Fixed - Support localized decimal separators when parsing installed mod sizes diff --git a/dzgui.sh b/dzgui.sh index 144f874..a9afd95 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.5.2 +version=5.5.3 #CONSTANTS aid=221100 @@ -314,8 +314,8 @@ check_unmerged(){ check_version(){ local version_url=$(format_version_url) local upstream=$(curl -Ls "$version_url" | awk -F= '/^version=/ {print $2}') - #2024-12-12: do not clobber local version if unreachable - [[ -z $upstream ]] && return + local res=$(get_response_code "$version_url") + [[ $res -ne 200 ]] && raise_error_and_quit "Remote resource unavailable: '$version_url'" logger INFO "Local branch: '$branch', local version: $version" if [[ $branch == "stable" ]]; then version_url="$stable_url/dzgui.sh" @@ -377,11 +377,7 @@ dl_changelog(){ local md [[ $branch == "stable" ]] && mdbranch="dzgui" [[ $branch == "testing" ]] && mdbranch="testing" - if [[ $remote_host == "gh" ]]; then - md="https://raw.githubusercontent.com/$author/$repo/${mdbranch}/CHANGELOG.md" - else - md="https://codeberg.org/$author/$repo/raw/branch/${mdbranch}/CHANGELOG.md" - fi + local md="$url_prefix/${mdbranch}/$file" curl -Ls "$md" > "$state_path/CHANGELOG.md" } test_display_mode(){ @@ -523,6 +519,7 @@ get_hash(){ md5sum "$1" | awk '{print $1}' } fetch_a2s(){ + # this file is currently monolithic [[ -d $helpers_path/a2s ]] && { logger INFO "A2S helper is current"; return 0; } local sha=c7590ffa9a6d0c6912e17ceeab15b832a1090640 local author="yepoleb" @@ -530,6 +527,8 @@ fetch_a2s(){ local url="https://github.com/$author/$repo/tarball/$sha" local prefix="${author^}-$repo-${sha:0:7}" local file="$prefix.tar.gz" + local res=$(get_response_code "$url") + [[ $res -ne 200 ]] && raise_error_and_quit "Remote resource unavailable: '$file'" curl -Ls "$url" > "$helpers_path/$file" tar xf "$helpers_path/$file" -C "$helpers_path" "$prefix/a2s" --strip=1 rm "$helpers_path/$file" @@ -546,6 +545,8 @@ fetch_dzq(){ local author="yepoleb" local repo="dayzquery" local url="https://raw.githubusercontent.com/$author/$repo/$sha/dayzquery.py" + local res=$(get_response_code "$url") + [[ $res -ne 200 ]] && raise_error_and_quit "Remote resource unavailable: 'dayzquery.py'" curl -Ls "$url" > "$file" logger INFO "Updated DZQ to sha '$sha'" } @@ -577,14 +578,14 @@ fetch_helpers_by_sum(){ [[ -f "$config_file" ]] && source "$config_file" declare -A sums sums=( - ["ui.py"]="be3da1e542d14105f4358dd38901e25a" + ["ui.py"]="dd7aa34df1d374739127cca3033a3f67" ["query_v2.py"]="55d339ba02512ac69de288eb3be41067" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" - ["funcs"]="8aa9eac96c21a3aabbf73c44b643523b" + ["funcs"]="6d985948a3b9b71017c4e0c5f7f55fe0" ["lan"]="c62e84ddd1457b71a85ad21da662b9af" ) local author="aclist" - local repo="dzgui" + local repo="dztui" local realbranch local file local sum @@ -605,16 +606,14 @@ fetch_helpers_by_sum(){ sum="${sums[$i]}" full_path="$helpers_path/$file" - if [[ $remote_host == "gh" ]]; then - url="https://raw.githubusercontent.com/$author/$repo/$realbranch/helpers/$file" - else - url="https://codeberg.org/$author/$repo/raw/branch/$realbranch/helpers/$file" - fi + url="${url_prefix}/$realbranch/helpers/$file" if [[ -f "$full_path" ]] && [[ $(get_hash "$full_path") == $sum ]]; then logger INFO "$file is current" else logger WARN "File '$full_path' checksum != '$sum'" + local res=$(get_response_code "$url") + [[ $res -ne 200 ]] && raise_error_and_quit "Remote resource unavailable: '$url'" curl -Ls "$url" > "$full_path" if [[ ! $? -eq 0 ]]; then raise_error_and_quit "Failed to fetch the file '$file'. Possible timeout?" @@ -635,11 +634,15 @@ fetch_geo_file(){ local km_sum="b038fdb8f655798207bd28de3a004706" local gzip="$helpers_path/ips.csv.gz" if [[ ! -f $geo_file ]] || [[ $(get_hash $geo_file) != $geo_sum ]]; then + local res=$(get_response_code "$geo_file_url") + [[ $res -ne 200 ]] && raise_error_and_quit "Remote resource unavailable: '$geo_file_url'" curl -Ls "$geo_file_url" > "$gzip" #force overwrite gunzip -f "$gzip" fi if [[ ! -f $km_helper ]] || [[ $(get_hash $km_helper) != $km_sum ]]; then + local res=$(get_response_code "$km_helper_url") + [[ $res -ne 200 ]] && raise_error_and_quit "Remote resource unavailable: '$km_helper_url'" curl -Ls "$km_helper_url" > "$km_helper" chmod +x "$km_helper" fi @@ -887,10 +890,10 @@ test_connection(){ res=$(get_response_code "${hr["codeberg.org"]}") [[ $res -ne 200 ]] && raise_error_and_quit "$str (${hr["codeberg.org"]})" fi + logger INFO "Set remote host to '${hr["codeberg.org"]}'" if [[ $remote_host == "cb" ]]; then url_prefix="https://codeberg.org/$author/$repo/raw/branch" releases_url="https://codeberg.org/$author/$repo/releases/download/browser" - # 2024-12-12: interpolate variables again stable_url="$url_prefix/dzgui" testing_url="$url_prefix/testing" km_helper_url="$releases_url/latlon" diff --git a/helpers/funcs b/helpers/funcs index 2f5875d..e8b9322 100755 --- a/helpers/funcs +++ b/helpers/funcs @@ -67,18 +67,12 @@ game_dir="$steam_path/steamapps/common/DayZ" #URLS author="aclist" repo="dztui" -#TODO: this is hardcoded -#2024-12-12 gh_prefix="https://github.com" issues_url="$gh_prefix/$author/$repo/issues" -url_prefix="https://codeberg.org/$author/$repo/raw/branch" +url_prefix="https://raw.githubusercontent.com/$author/$repo" stable_url="$url_prefix/dzgui" testing_url="$url_prefix/testing" -releases_url="https://codeberg.org/$author/$repo/releases/download/browser" -km_helper_url="$releases_url/latlon" -db_file="$releases_url/ips.csv.gz" -sums_url="$stable_url/helpers/sums.md5" -#TODO: move adoc to index +releases_url="$gh_prefix/$author/$repo/releases/download/browser" help_url="https://$author.github.io/dzgui/dzgui" forum_url="$gh_prefix/$author/$repo/discussions" sponsor_url="$gh_prefix/sponsors/$author" @@ -750,7 +744,45 @@ format_version_url(){ esac echo "$version_url" } +get_response_code(){ + local url="$1" + curl -Ls -I -o /dev/null -w "%{http_code}" "$url" +} +test_connection(){ + source "$config_file" + declare -A hr + local res1 + local res2 + local str="No connection could be established to the remote server" + hr=( + ["github.com"]="https://github.com/$author" + ["codeberg.org"]="https://codeberg.org/$author" + ) + res=$(get_response_code "${hr["github.com"]}") + if [[ $res -ne 200 ]]; then + logger WARN "Remote host '${hr["github.com"]}' unreachable', trying fallback" + remote_host=cb + res=$(get_response_code "${hr["codeberg.org"]}") + if [[ $res -ne 200 ]]; then + return 1 + fi + fi + logger INFO "Set remote host to '${hr["codeberg.org"]}'" + if [[ $remote_host == "cb" ]]; then + url_prefix="https://codeberg.org/$author/$repo/raw/branch" + releases_url="https://codeberg.org/$author/$repo/releases/download/browser" + stable_url="$url_prefix/dzgui" + testing_url="$url_prefix/testing" + fi +} download_new_version(){ + test_connection + rc=$? + if [[ $rc -eq 1 ]]; then + printf "Remote resource unavailable. Aborting" + logger WARN "Remote resource unavailable" + return 1 + fi local version_url="$(format_version_url)" mv "$src_path" "$src_path.old" curl -Ls "$version_url" > "$src_path" @@ -775,7 +807,7 @@ dl_changelog(){ local file="CHANGELOG.md" [[ $branch == "stable" ]] && mdbranch="dzgui" [[ $branch == "testing" ]] && mdbranch="testing" - local md="https://codeberg.org/$author/$repo/raw/branch/${mdbranch}/$file" + local md="$url_prefix/${mdbranch}/$file" curl -Ls "$md" > "$state_path/$file" } toggle(){ @@ -790,6 +822,7 @@ toggle(){ fi update_config download_new_version + [[ $? -eq 1 ]] && return 1 return 255 ;; Toggle[[:space:]]mod[[:space:]]install[[:space:]]mode) @@ -853,7 +886,7 @@ remove_from_favs(){ break fi done - if [[ ${#ip_list} -gt 0 ]]; then + if [[ ${#ip_list[@]} -gt 0 ]]; then readarray -t ip_list < <(printf "%s\n" "${ip_list[@]}") fi update_config diff --git a/install.sh b/install.sh old mode 100644 new mode 100755 index 22ec6ab..13f96cc --- a/install.sh +++ b/install.sh @@ -1,8 +1,41 @@ #!/usr/bin/env bash -curl -L "https://codeberg.org/aclist/dzgui/raw/branch/dzgui/dzgui.sh" > dzgui.sh -chmod +x dzgui.sh -xdg_file="$HOME/.local/share/applications/dzgui.desktop" -share="$HOME/.local/share/dzgui" -[[ -f $xdg_file ]] && rm $xdg_file -[[ -d $share ]] && rm -rf "$share" -./dzgui.sh +get_response_code(){ + local url="$1" + curl -Ls -I -o /dev/null -w "%{http_code}" "$url" +} +abort(){ + printf "Remote resource not available. Try again later.\n" + exit 1 +} +fetch(){ + local file="dzgui.sh" + local author="aclist" + local repo="dztui" + local branch="dzgui" + local url + local res + gh_url="https://raw.githubusercontent.com/$author/$repo/$branch/$file" + cb_url="https://codeberg.org/$author/$repo/raw/branch/$branch/$file" + + url="$gh_url" + printf "Checking the remote resource at '%s'\n" "$url" + res=$(get_response_code "$url") + if [[ $res -ne 200 ]]; then + url="$cb_url" + printf "Checking the remote resource at '%s'\n" "$url" + res=$(get_response_code "$url") + if [[ $res -ne 200 ]]; then + abort + fi + fi + + curl -L "$url" > dzgui.sh + chmod +x dzgui.sh + xdg_file="$HOME/.local/share/applications/dzgui.desktop" + share="$HOME/.local/share/dzgui" + [[ -f $xdg_file ]] && rm $xdg_file + [[ -d $share ]] && rm -rf "$share" + ./dzgui.sh +} + +fetch From 2370e81403ef4960b9091ec0aa9d285699e0402f Mon Sep 17 00:00:00 2001 From: jiriks74 Date: Tue, 17 Dec 2024 16:03:26 +0100 Subject: [PATCH 020/115] feat(ci): Add workflow for pushing to Codeberg --- .github/workflows/mirror.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/mirror.yml diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml new file mode 100644 index 0000000..b4cf79b --- /dev/null +++ b/.github/workflows/mirror.yml @@ -0,0 +1,18 @@ +name: Mirror to Codeberg + +on: + push: + workflow_dispatch: + +jobs: + mirror-to-codeberg: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: pixta-dev/repository-mirroring-action@v1 + if: ${{ vars.GIT_REMOTE != '' }} + with: + target_repo_url: ${{ vars.GIT_REMOTE }} + ssh_private_key: ${{ secrets.GIT_SSH_PRIVATE_KEY }} From 85451f765b5991b9091ce1fdb65e482534211eab Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Wed, 25 Dec 2024 14:09:54 +0900 Subject: [PATCH 021/115] Update mirror.yml --- .github/workflows/mirror.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml index b4cf79b..3744ce3 100644 --- a/.github/workflows/mirror.yml +++ b/.github/workflows/mirror.yml @@ -2,6 +2,10 @@ name: Mirror to Codeberg on: push: + branches: + - main + - dzgui + - testing workflow_dispatch: jobs: From c19346529bfc30038238b9f03d491b14ada13257 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Wed, 25 Dec 2024 14:12:08 +0900 Subject: [PATCH 022/115] Update mirror.yml --- .github/workflows/mirror.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml index 3744ce3..6826de7 100644 --- a/.github/workflows/mirror.yml +++ b/.github/workflows/mirror.yml @@ -6,6 +6,7 @@ on: - main - dzgui - testing + - release/5.6.0-beta.20 workflow_dispatch: jobs: From a8f51280e8870ae8bf0e2ef27967c953c46b6e3f Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Wed, 25 Dec 2024 14:19:04 +0900 Subject: [PATCH 023/115] Update mirror.yml --- .github/workflows/mirror.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml index 6826de7..b4cf79b 100644 --- a/.github/workflows/mirror.yml +++ b/.github/workflows/mirror.yml @@ -2,11 +2,6 @@ name: Mirror to Codeberg on: push: - branches: - - main - - dzgui - - testing - - release/5.6.0-beta.20 workflow_dispatch: jobs: From e5f7391b8965011dd90bbb0f843c727790b5a04b Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Wed, 25 Dec 2024 14:20:36 +0900 Subject: [PATCH 024/115] chore: add YAML file --- .github/workflows/mirror.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/mirror.yml diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml new file mode 100644 index 0000000..6826de7 --- /dev/null +++ b/.github/workflows/mirror.yml @@ -0,0 +1,23 @@ +name: Mirror to Codeberg + +on: + push: + branches: + - main + - dzgui + - testing + - release/5.6.0-beta.20 + workflow_dispatch: + +jobs: + mirror-to-codeberg: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: pixta-dev/repository-mirroring-action@v1 + if: ${{ vars.GIT_REMOTE != '' }} + with: + target_repo_url: ${{ vars.GIT_REMOTE }} + ssh_private_key: ${{ secrets.GIT_SSH_PRIVATE_KEY }} From 8c33a1b371699a1898bd72e1e20097d6c7cea66b Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Wed, 25 Dec 2024 14:21:24 +0900 Subject: [PATCH 025/115] chore: drop branch logic --- .github/workflows/mirror.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml index 6826de7..b4cf79b 100644 --- a/.github/workflows/mirror.yml +++ b/.github/workflows/mirror.yml @@ -2,11 +2,6 @@ name: Mirror to Codeberg on: push: - branches: - - main - - dzgui - - testing - - release/5.6.0-beta.20 workflow_dispatch: jobs: From 7a68d7e0973e1d855c373d0cff584c4ccb46e3e0 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 19:27:44 +0900 Subject: [PATCH 026/115] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 38 ++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..dd84ea7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. From c6c377e8b98576bb8ac848bff379331f3f4936fa Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 19:30:16 +0900 Subject: [PATCH 027/115] Update bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index dd84ea7..6577135 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,9 +1,9 @@ --- name: Bug report -about: Create a report to help us improve +about: Submit bugs that affect functionality here title: '' -labels: '' -assignees: '' +labels: 'BUG' +assignees: 'aclist' --- @@ -24,15 +24,9 @@ A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] - -**Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] + - Distribution: [e.g. Arch Linux] +- Version [e.g. 5.5.0] +- Branch [e.g. stable] **Additional context** Add any other context about the problem here. From 800f68a1b711de1059ee6bac789da6b23adc2a0b Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 19:32:55 +0900 Subject: [PATCH 028/115] Update bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 6577135..88bd341 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,8 +1,8 @@ --- name: Bug report about: Submit bugs that affect functionality here -title: '' -labels: 'BUG' +title: "[BUG] " +labels: ["BUG"] assignees: 'aclist' --- From 53f2fe922a20d26e39a15e66a4da39f6e6fb67ab Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 19:37:00 +0900 Subject: [PATCH 029/115] Create feature.md --- .github/feature.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/feature.md diff --git a/.github/feature.md b/.github/feature.md new file mode 100644 index 0000000..59eadc1 --- /dev/null +++ b/.github/feature.md @@ -0,0 +1,14 @@ +--- +name: Feature suggestion +about: Submit requests for new features here +title: "[FEAT] " +labels: ["FEAT"] +assignees: 'aclist' + +--- + +**Describe the desired feature** +A clear and detailed description of the desired feature. Insufficient detail may cause the ticket to be closed as non-actionable. + +**Explain why this feature would be beneficial to users** +Explain the proposed benefits of this feature to large numbers of users, not just for your specific use case. From e4fff5f242ab0566f673d107b7efc0e5827c858f Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 19:37:38 +0900 Subject: [PATCH 030/115] Create feature.md --- .github/ISSUE_TEMPLATE/feature.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/feature.md diff --git a/.github/ISSUE_TEMPLATE/feature.md b/.github/ISSUE_TEMPLATE/feature.md new file mode 100644 index 0000000..59eadc1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature.md @@ -0,0 +1,14 @@ +--- +name: Feature suggestion +about: Submit requests for new features here +title: "[FEAT] " +labels: ["FEAT"] +assignees: 'aclist' + +--- + +**Describe the desired feature** +A clear and detailed description of the desired feature. Insufficient detail may cause the ticket to be closed as non-actionable. + +**Explain why this feature would be beneficial to users** +Explain the proposed benefits of this feature to large numbers of users, not just for your specific use case. From bc94d989d477895b8f4885b63536dfc1e7f0b9bf Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 19:37:57 +0900 Subject: [PATCH 031/115] Delete .github/feature.md --- .github/feature.md | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 .github/feature.md diff --git a/.github/feature.md b/.github/feature.md deleted file mode 100644 index 59eadc1..0000000 --- a/.github/feature.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -name: Feature suggestion -about: Submit requests for new features here -title: "[FEAT] " -labels: ["FEAT"] -assignees: 'aclist' - ---- - -**Describe the desired feature** -A clear and detailed description of the desired feature. Insufficient detail may cause the ticket to be closed as non-actionable. - -**Explain why this feature would be beneficial to users** -Explain the proposed benefits of this feature to large numbers of users, not just for your specific use case. From 6cab96d1f8027ba64ec300faaab98c65c2920c5c Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 19:39:18 +0900 Subject: [PATCH 032/115] Create config.yml --- .github/ISSUE_TEMPLATE/config.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..3ba13e0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false From 5334d07f7f1a6b06e9b79b6440a84b065f9b48bf Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 19:41:34 +0900 Subject: [PATCH 033/115] Create test.yml --- .github/ISSUE_TEMPLATE/test.yml | 63 +++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/test.yml diff --git a/.github/ISSUE_TEMPLATE/test.yml b/.github/ISSUE_TEMPLATE/test.yml new file mode 100644 index 0000000..d30c08e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/test.yml @@ -0,0 +1,63 @@ +name: Test issue +description: File a bug report. +title: "[Bug]: " +labels: ["bug", "triage"] +assignees: + - aclist +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + - type: input + id: contact + attributes: + label: Contact Details + description: How can we get in touch with you if we need more info? + placeholder: ex. email@example.com + validations: + required: false + - type: textarea + id: what-happened + attributes: + label: What happened? + description: Also tell us, what did you expect to happen? + placeholder: Tell us what you see! + value: "A bug happened!" + validations: + required: true + - type: dropdown + id: version + attributes: + label: Version + description: What version of our software are you running? + options: + - 1.0.2 (Default) + - 1.0.3 (Edge) + default: 0 + validations: + required: true + - type: dropdown + id: browsers + attributes: + label: What browsers are you seeing the problem on? + multiple: true + options: + - Firefox + - Chrome + - Safari + - Microsoft Edge + - type: textarea + id: logs + attributes: + label: Relevant log output + description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. + render: shell + - type: checkboxes + id: terms + attributes: + label: Code of Conduct + description: By submitting this issue, you agree to follow our [Code of Conduct](NULL). + options: + - label: I agree to follow this project's Code of Conduct + required: true From 406554e01154cf7fc289b4d6a6a22eae2874e779 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 19:50:39 +0900 Subject: [PATCH 034/115] Create bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 55 +++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..cc3cb08 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,55 @@ +name: Bug report (TEST) +description: Submit bugs that affect functionality here +title: "[BUG]: " +labels: ["bug"] +assignees: + - aclist +body: + - type: textarea + id: what-happened + attributes: + label: Description of the bug? + description: What did you expect to happen? + placeholder: Add detailed bug description here + value: "When doing X, Y occurred. Include as much detail as possible." + validations: + required: true + - type: dropdown + id: version + attributes: + label: Version + description: DZGUI version + options: + - 5.5.0 (stable) + - 5.6.0 (testing) + - Version prior to 5.5.0 + default: 0 + validations: + required: true + - type: dropdown + id: browsers + attributes: + label: Device type + multiple: true + options: + - Desktop PC + - Steam Deck + validations: + required: true + - type: input + id: distro + attributes: + label: Linux distribution + options: + - Desktop PC + - Steam Deck + validations: + required: true + placeholder: "Arch Linux" + - type: textarea + id: logs + attributes: + label: Additional log output + Tip: You can attach log files by clicking this area to highlight it and then dragging files in. + validations: + required: false From 8666b0055ae93c16fb5d27df6d8b7db8e5a4f9ff Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 19:53:52 +0900 Subject: [PATCH 035/115] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index cc3cb08..6bf5f00 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,4 +1,4 @@ -name: Bug report (TEST) +name: Bug report description: Submit bugs that affect functionality here title: "[BUG]: " labels: ["bug"] @@ -34,22 +34,19 @@ body: options: - Desktop PC - Steam Deck - validations: - required: true + validations: + required: true - type: input id: distro attributes: label: Linux distribution - options: - - Desktop PC - - Steam Deck - validations: - required: true + validations: + required: true placeholder: "Arch Linux" - type: textarea id: logs attributes: label: Additional log output - Tip: You can attach log files by clicking this area to highlight it and then dragging files in. + description: You can attach log files by clicking this area to highlight it and then dragging files in. validations: required: false From 1ab963406923f01ef32799f0507a876ddea80724 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 19:54:29 +0900 Subject: [PATCH 036/115] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 6bf5f00..df858aa 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,4 +1,4 @@ -name: Bug report +name: Bug report (TEST) description: Submit bugs that affect functionality here title: "[BUG]: " labels: ["bug"] From 271c3e6197c34b29836055a063b2dd2b08a4f018 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 19:56:39 +0900 Subject: [PATCH 037/115] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index df858aa..cf27bbc 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -8,10 +8,10 @@ body: - type: textarea id: what-happened attributes: - label: Description of the bug? + label: Describe the bug description: What did you expect to happen? - placeholder: Add detailed bug description here - value: "When doing X, Y occurred. Include as much detail as possible." + placeholder: E.g., When doing X, Y occurred. + value: "" validations: required: true - type: dropdown @@ -30,10 +30,10 @@ body: id: browsers attributes: label: Device type - multiple: true options: - Desktop PC - Steam Deck + default: 0 validations: required: true - type: input From 830318d98e5132ca8bcae0f742895d1aa91640bd Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 19:57:00 +0900 Subject: [PATCH 038/115] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index cf27bbc..bab7f5c 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -11,7 +11,6 @@ body: label: Describe the bug description: What did you expect to happen? placeholder: E.g., When doing X, Y occurred. - value: "" validations: required: true - type: dropdown From 59c58a1df521c98d987cfbf3f2dda2a14dad01a4 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 19:57:56 +0900 Subject: [PATCH 039/115] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index bab7f5c..67939f4 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -5,15 +5,7 @@ labels: ["bug"] assignees: - aclist body: - - type: textarea - id: what-happened - attributes: - label: Describe the bug - description: What did you expect to happen? - placeholder: E.g., When doing X, Y occurred. - validations: - required: true - - type: dropdown +- type: dropdown id: version attributes: label: Version @@ -42,6 +34,14 @@ body: validations: required: true placeholder: "Arch Linux" + - type: textarea + id: what-happened + attributes: + label: Describe the bug + description: What did you expect to happen? + placeholder: E.g., When doing X, Y occurred. Include as much detail as possible. + validations: + required: true - type: textarea id: logs attributes: From 602a7b8edc184fac2b52659b130a0b996bf16f43 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 19:59:20 +0900 Subject: [PATCH 040/115] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 67939f4..2f05aed 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -5,7 +5,7 @@ labels: ["bug"] assignees: - aclist body: -- type: dropdown + - type: dropdown id: version attributes: label: Version @@ -24,7 +24,6 @@ body: options: - Desktop PC - Steam Deck - default: 0 validations: required: true - type: input @@ -37,9 +36,9 @@ body: - type: textarea id: what-happened attributes: - label: Describe the bug + label: Description of the bug? description: What did you expect to happen? - placeholder: E.g., When doing X, Y occurred. Include as much detail as possible. + placeholder: "When doing X, Y occurred. Include as much detail as possible." validations: required: true - type: textarea From 23464d3b51747e783b2110958ed4a649b61724ea Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 20:01:30 +0900 Subject: [PATCH 041/115] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 2f05aed..d6659e0 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -36,15 +36,15 @@ body: - type: textarea id: what-happened attributes: - label: Description of the bug? + label: Describe the bug description: What did you expect to happen? - placeholder: "When doing X, Y occurred. Include as much detail as possible." + placeholder: "E.g., When doing X, Y occurred. Include as much detail as possible." validations: required: true - type: textarea id: logs attributes: label: Additional log output - description: You can attach log files by clicking this area to highlight it and then dragging files in. + description: Attach the file `$HOME/.local/state/dzgui/DZGUI_DEBUG.log` by clicking this area to highlight it and then dragging the file in. validations: required: false From ebce329c3d5b3d8e7692c7d10de8e660813bcfb3 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 20:02:38 +0900 Subject: [PATCH 042/115] Delete .github/ISSUE_TEMPLATE/bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 32 ---------------------------- 1 file changed, 32 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 88bd341..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -name: Bug report -about: Submit bugs that affect functionality here -title: "[BUG] " -labels: ["BUG"] -assignees: 'aclist' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Desktop (please complete the following information):** - - Distribution: [e.g. Arch Linux] -- Version [e.g. 5.5.0] -- Branch [e.g. stable] - -**Additional context** -Add any other context about the problem here. From 7eb5a4fac5e0574c0731717c85f743ef204cddfc Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 20:02:52 +0900 Subject: [PATCH 043/115] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index d6659e0..5fb1c35 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,4 +1,4 @@ -name: Bug report (TEST) +name: Bug report description: Submit bugs that affect functionality here title: "[BUG]: " labels: ["bug"] From bb0eefadd27c06510b63ab345a73e73dda5ef72d Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 20:03:41 +0900 Subject: [PATCH 044/115] Delete .github/ISSUE_TEMPLATE/test.yml --- .github/ISSUE_TEMPLATE/test.yml | 63 --------------------------------- 1 file changed, 63 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/test.yml diff --git a/.github/ISSUE_TEMPLATE/test.yml b/.github/ISSUE_TEMPLATE/test.yml deleted file mode 100644 index d30c08e..0000000 --- a/.github/ISSUE_TEMPLATE/test.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: Test issue -description: File a bug report. -title: "[Bug]: " -labels: ["bug", "triage"] -assignees: - - aclist -body: - - type: markdown - attributes: - value: | - Thanks for taking the time to fill out this bug report! - - type: input - id: contact - attributes: - label: Contact Details - description: How can we get in touch with you if we need more info? - placeholder: ex. email@example.com - validations: - required: false - - type: textarea - id: what-happened - attributes: - label: What happened? - description: Also tell us, what did you expect to happen? - placeholder: Tell us what you see! - value: "A bug happened!" - validations: - required: true - - type: dropdown - id: version - attributes: - label: Version - description: What version of our software are you running? - options: - - 1.0.2 (Default) - - 1.0.3 (Edge) - default: 0 - validations: - required: true - - type: dropdown - id: browsers - attributes: - label: What browsers are you seeing the problem on? - multiple: true - options: - - Firefox - - Chrome - - Safari - - Microsoft Edge - - type: textarea - id: logs - attributes: - label: Relevant log output - description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. - render: shell - - type: checkboxes - id: terms - attributes: - label: Code of Conduct - description: By submitting this issue, you agree to follow our [Code of Conduct](NULL). - options: - - label: I agree to follow this project's Code of Conduct - required: true From 7c3521cf97808baae3de3d8e218a2f87df00ed89 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 20:08:16 +0900 Subject: [PATCH 045/115] Delete .github/ISSUE_TEMPLATE/feature.md --- .github/ISSUE_TEMPLATE/feature.md | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/feature.md diff --git a/.github/ISSUE_TEMPLATE/feature.md b/.github/ISSUE_TEMPLATE/feature.md deleted file mode 100644 index 59eadc1..0000000 --- a/.github/ISSUE_TEMPLATE/feature.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -name: Feature suggestion -about: Submit requests for new features here -title: "[FEAT] " -labels: ["FEAT"] -assignees: 'aclist' - ---- - -**Describe the desired feature** -A clear and detailed description of the desired feature. Insufficient detail may cause the ticket to be closed as non-actionable. - -**Explain why this feature would be beneficial to users** -Explain the proposed benefits of this feature to large numbers of users, not just for your specific use case. From 0311cc8a9516fd282b7a3d88c3aa9f927ff569b2 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 20:08:29 +0900 Subject: [PATCH 046/115] Create feature.yml --- .github/ISSUE_TEMPLATE/feature.yml | 51 ++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/feature.yml diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml new file mode 100644 index 0000000..28e5c36 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -0,0 +1,51 @@ +name: Feature suggestion +description: Submit requests for new features here +title: "[FEAT]: " +labels: ["feat"] +assignees: + - aclist +body: + - type: dropdown + id: version + attributes: + label: Version + description: DZGUI version + options: + - 5.5.0 (stable) + - 5.6.0 (testing) + - Version prior to 5.5.0 + default: 0 + validations: + required: true + - type: dropdown + id: browsers + attributes: + label: Device type + options: + - Desktop PC + - Steam Deck + validations: + required: true + - type: input + id: distro + attributes: + label: Linux distribution + validations: + required: true + placeholder: "Arch Linux" + - type: textarea + id: what-happened + attributes: + label: Describe the feature + description: A clear and detailed description + placeholder: "Add a dialog to the Options menu that automatically lets the user do Y" + validations: + required: true + - type: textarea + id: why + attributes: + label: Describe the benefit + description: How will this feature benefit large numbers of users? + placeholder: "Currently, users have to manually do X to achieve Y. Implementing this feature would achieve A, B, and C." + validations: + required: true From 745cc0609163f8b0210f1b284f30c45f820b7672 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 20:09:08 +0900 Subject: [PATCH 047/115] Update feature.yml --- .github/ISSUE_TEMPLATE/feature.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml index 28e5c36..c17f462 100644 --- a/.github/ISSUE_TEMPLATE/feature.yml +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -38,7 +38,7 @@ body: attributes: label: Describe the feature description: A clear and detailed description - placeholder: "Add a dialog to the Options menu that automatically lets the user do Y" + placeholder: "E.g., Add a dialog to the Options menu that automatically lets the user do Y" validations: required: true - type: textarea @@ -46,6 +46,6 @@ body: attributes: label: Describe the benefit description: How will this feature benefit large numbers of users? - placeholder: "Currently, users have to manually do X to achieve Y. Implementing this feature would achieve A, B, and C." + placeholder: "E.g., Currently, users have to manually do X to achieve Y. Implementing this feature would achieve A, B, and C." validations: required: true From 1e29288e2a8e17f57dbde869c1009f609ca6ee69 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 20:10:08 +0900 Subject: [PATCH 048/115] Update feature.yml --- .github/ISSUE_TEMPLATE/feature.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml index c17f462..ca43cce 100644 --- a/.github/ISSUE_TEMPLATE/feature.yml +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -1,7 +1,7 @@ name: Feature suggestion description: Submit requests for new features here title: "[FEAT]: " -labels: ["feat"] +labels: ["enhancement"] assignees: - aclist body: From 5b2738420e3ed9e60c6c5a52fd7d6045c44e4d10 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 20:19:41 +0900 Subject: [PATCH 049/115] Create trouble.yml --- .github/ISSUE_TEMPLATE/trouble.yml | 47 ++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/trouble.yml diff --git a/.github/ISSUE_TEMPLATE/trouble.yml b/.github/ISSUE_TEMPLATE/trouble.yml new file mode 100644 index 0000000..a76e801 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/trouble.yml @@ -0,0 +1,47 @@ +name: Troubleshooting +description: Submit user error/troubleshooting questions here +title: "[HELP]: " +labels: ["troubleshooting"] +assignees: + - aclist +body: + - type: markdown + attributes: + value: | + Important: Is your issue already covered in the [Knowledge Base](https://aclist.codeberg.page/kb.html)? + - type: dropdown + id: version + attributes: + label: Version + description: DZGUI version + options: + - 5.5.0 (stable) + - 5.6.0 (testing) + - Version prior to 5.5.0 + default: 0 + validations: + required: true + - type: dropdown + id: browsers + attributes: + label: Device type + options: + - Desktop PC + - Steam Deck + validations: + required: true + - type: input + id: distro + attributes: + label: Linux distribution + validations: + required: true + placeholder: "Arch Linux" + - type: textarea + id: what-happened + attributes: + label: Describe the issue + description: A detailed description. What did you expect to happen? + placeholder: "Include as much detail as possible and state the steps leading up to the problem. E.g., First I do this, then I do this, then this happens." + validations: + required: true From ce44cdbc5499bb0af4878a54a1785579cd02bb47 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 20:20:36 +0900 Subject: [PATCH 050/115] Update trouble.yml --- .github/ISSUE_TEMPLATE/trouble.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/trouble.yml b/.github/ISSUE_TEMPLATE/trouble.yml index a76e801..ada6ac3 100644 --- a/.github/ISSUE_TEMPLATE/trouble.yml +++ b/.github/ISSUE_TEMPLATE/trouble.yml @@ -8,7 +8,7 @@ body: - type: markdown attributes: value: | - Important: Is your issue already covered in the [Knowledge Base](https://aclist.codeberg.page/kb.html)? + **Important: Is your issue already covered in the [Knowledge Base](https://aclist.codeberg.page/kb.html)?** - type: dropdown id: version attributes: From 5d37039064be3b2cc8c4fdc048e71eb51b1905ac Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 20:20:57 +0900 Subject: [PATCH 051/115] Update trouble.yml --- .github/ISSUE_TEMPLATE/trouble.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/trouble.yml b/.github/ISSUE_TEMPLATE/trouble.yml index ada6ac3..d191494 100644 --- a/.github/ISSUE_TEMPLATE/trouble.yml +++ b/.github/ISSUE_TEMPLATE/trouble.yml @@ -8,7 +8,7 @@ body: - type: markdown attributes: value: | - **Important: Is your issue already covered in the [Knowledge Base](https://aclist.codeberg.page/kb.html)?** + **READ THIS FIRST: Is your issue already covered in the [Knowledge Base](https://aclist.codeberg.page/kb.html)?** - type: dropdown id: version attributes: From d2e8333ba9868f5be108e26783f9f04698993948 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 20:21:10 +0900 Subject: [PATCH 052/115] Update trouble.yml --- .github/ISSUE_TEMPLATE/trouble.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/trouble.yml b/.github/ISSUE_TEMPLATE/trouble.yml index d191494..0622f25 100644 --- a/.github/ISSUE_TEMPLATE/trouble.yml +++ b/.github/ISSUE_TEMPLATE/trouble.yml @@ -8,7 +8,7 @@ body: - type: markdown attributes: value: | - **READ THIS FIRST: Is your issue already covered in the [Knowledge Base](https://aclist.codeberg.page/kb.html)?** + **READ THIS FIRST**: Is your issue already covered in the [Knowledge Base](https://aclist.codeberg.page/kb.html)? - type: dropdown id: version attributes: From 20511f56613b925ffd8f10d88bd31f35d088bb59 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 20:24:14 +0900 Subject: [PATCH 053/115] Update trouble.yml --- .github/ISSUE_TEMPLATE/trouble.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/trouble.yml b/.github/ISSUE_TEMPLATE/trouble.yml index 0622f25..ebefe71 100644 --- a/.github/ISSUE_TEMPLATE/trouble.yml +++ b/.github/ISSUE_TEMPLATE/trouble.yml @@ -5,10 +5,12 @@ labels: ["troubleshooting"] assignees: - aclist body: - - type: markdown + - type: checkboxes + id: kb attributes: - value: | - **READ THIS FIRST**: Is your issue already covered in the [Knowledge Base](https://aclist.codeberg.page/kb.html)? + options: + - label: I have checked the [Knowledge Base](https://aclist.codeberg.page/kb.html) and searched through [past issues](https://github.com/aclist/dztui/issues?q=is%3Aissue+is%3Aclosed) and did not find my issue there. + required: true - type: dropdown id: version attributes: From 48fee301bbd0106a5c52c7cd019df2e720fb620d Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 20:24:47 +0900 Subject: [PATCH 054/115] Update trouble.yml --- .github/ISSUE_TEMPLATE/trouble.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/trouble.yml b/.github/ISSUE_TEMPLATE/trouble.yml index ebefe71..2c22f92 100644 --- a/.github/ISSUE_TEMPLATE/trouble.yml +++ b/.github/ISSUE_TEMPLATE/trouble.yml @@ -8,6 +8,7 @@ body: - type: checkboxes id: kb attributes: + label: Prior reading options: - label: I have checked the [Knowledge Base](https://aclist.codeberg.page/kb.html) and searched through [past issues](https://github.com/aclist/dztui/issues?q=is%3Aissue+is%3Aclosed) and did not find my issue there. required: true From e08f66cdcb0dbdd702f33497a06716a6bdab3919 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 20:25:22 +0900 Subject: [PATCH 055/115] Update trouble.yml --- .github/ISSUE_TEMPLATE/trouble.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/trouble.yml b/.github/ISSUE_TEMPLATE/trouble.yml index 2c22f92..14791d3 100644 --- a/.github/ISSUE_TEMPLATE/trouble.yml +++ b/.github/ISSUE_TEMPLATE/trouble.yml @@ -11,7 +11,7 @@ body: label: Prior reading options: - label: I have checked the [Knowledge Base](https://aclist.codeberg.page/kb.html) and searched through [past issues](https://github.com/aclist/dztui/issues?q=is%3Aissue+is%3Aclosed) and did not find my issue there. - required: true + required: true - type: dropdown id: version attributes: From 56c80d187bbadd82cfc9800396383f278437658d Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 20:26:20 +0900 Subject: [PATCH 056/115] Update trouble.yml --- .github/ISSUE_TEMPLATE/trouble.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/trouble.yml b/.github/ISSUE_TEMPLATE/trouble.yml index 14791d3..212901f 100644 --- a/.github/ISSUE_TEMPLATE/trouble.yml +++ b/.github/ISSUE_TEMPLATE/trouble.yml @@ -9,9 +9,10 @@ body: id: kb attributes: label: Prior reading + descrition: I have checked the [Knowledge Base](https://aclist.codeberg.page/kb.html) and searched through [past issues](https://github.com/aclist/dztui/issues?q=is%3Aissue+is%3Aclosed) and did not find my issue there. options: - - label: I have checked the [Knowledge Base](https://aclist.codeberg.page/kb.html) and searched through [past issues](https://github.com/aclist/dztui/issues?q=is%3Aissue+is%3Aclosed) and did not find my issue there. - required: true + - label: "Yes" + required: true - type: dropdown id: version attributes: From 5d61a1f5136c587e5c7fee19e7c16704bc475b50 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 20:26:29 +0900 Subject: [PATCH 057/115] Update trouble.yml --- .github/ISSUE_TEMPLATE/trouble.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/trouble.yml b/.github/ISSUE_TEMPLATE/trouble.yml index 212901f..1fbcc0a 100644 --- a/.github/ISSUE_TEMPLATE/trouble.yml +++ b/.github/ISSUE_TEMPLATE/trouble.yml @@ -9,7 +9,7 @@ body: id: kb attributes: label: Prior reading - descrition: I have checked the [Knowledge Base](https://aclist.codeberg.page/kb.html) and searched through [past issues](https://github.com/aclist/dztui/issues?q=is%3Aissue+is%3Aclosed) and did not find my issue there. + description: I have checked the [Knowledge Base](https://aclist.codeberg.page/kb.html) and searched through [past issues](https://github.com/aclist/dztui/issues?q=is%3Aissue+is%3Aclosed) and did not find my issue there. options: - label: "Yes" required: true From 2da4d001d6b9f264b0315ebebeaa0fb7cd7a3081 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 20:27:30 +0900 Subject: [PATCH 058/115] Update trouble.yml --- .github/ISSUE_TEMPLATE/trouble.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/trouble.yml b/.github/ISSUE_TEMPLATE/trouble.yml index 1fbcc0a..2f653c5 100644 --- a/.github/ISSUE_TEMPLATE/trouble.yml +++ b/.github/ISSUE_TEMPLATE/trouble.yml @@ -8,10 +8,9 @@ body: - type: checkboxes id: kb attributes: - label: Prior reading - description: I have checked the [Knowledge Base](https://aclist.codeberg.page/kb.html) and searched through [past issues](https://github.com/aclist/dztui/issues?q=is%3Aissue+is%3Aclosed) and did not find my issue there. + label: Did you check if this issue already exists? options: - - label: "Yes" + - label: I have checked the [Knowledge Base](https://aclist.codeberg.page/kb.html) and searched through [past issues](https://github.com/aclist/dztui/issues?q=is%3Aissue+is%3Aclosed) and did not find my issue there. required: true - type: dropdown id: version From 3739f19ab2cbd5e93c95858fc62443afc3f5a4c4 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 20:28:12 +0900 Subject: [PATCH 059/115] Update trouble.yml --- .github/ISSUE_TEMPLATE/trouble.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/trouble.yml b/.github/ISSUE_TEMPLATE/trouble.yml index 2f653c5..f0d66d4 100644 --- a/.github/ISSUE_TEMPLATE/trouble.yml +++ b/.github/ISSUE_TEMPLATE/trouble.yml @@ -1,6 +1,6 @@ name: Troubleshooting description: Submit user error/troubleshooting questions here -title: "[HELP]: " +title: "[HELP] " labels: ["troubleshooting"] assignees: - aclist From 3cb617543642e7e14b80fd2118d4d69a87c4251d Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 20:28:23 +0900 Subject: [PATCH 060/115] Update feature.yml --- .github/ISSUE_TEMPLATE/feature.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml index ca43cce..1ab0ee4 100644 --- a/.github/ISSUE_TEMPLATE/feature.yml +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -1,6 +1,6 @@ name: Feature suggestion description: Submit requests for new features here -title: "[FEAT]: " +title: "[FEAT] " labels: ["enhancement"] assignees: - aclist From 2c5da88e06ad9e684f167eff93a4bb6b63ab1744 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 6 Jan 2025 20:28:34 +0900 Subject: [PATCH 061/115] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 5fb1c35..21a3ce7 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,6 +1,6 @@ name: Bug report description: Submit bugs that affect functionality here -title: "[BUG]: " +title: "[BUG] " labels: ["bug"] assignees: - aclist From 4df12605fcfd9add485ce7d90dc3ae0b5ac03a7d Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 7 Jan 2025 00:55:58 +0900 Subject: [PATCH 062/115] chore: update changelog --- CHANGELOG.md | 210 ++++++++++++++------------------------------------- dzgui.sh | 2 +- 2 files changed, 58 insertions(+), 154 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index df3358e..30bbeea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,197 +1,101 @@ # Changelog -## [5.6.0-beta.21] 2024-01-06 +## [5.6.0] 2024-01-06 ### Added -- Add in-app documentation link to Codeberg mirror +- Application header bar and controls +- Menu context subtitle in header bar +- Bulk delete mods (via 'List installed mods' list). Not compatible with Manual Mod install mode +- Highlight stale mods in mods list +- Added --steam launch parameter +- Open Steam workshop subscriptions dialog when switching from Manual to Auto mode - Hover tooltips to most buttons +- Add in-app documentation link to Codeberg mirror +- Additional logging ### Fixed -- Prevent ArrowUp/ArrowDown input when inside keyword field +- Avoid sudo escalation if system map count is sufficient (jiriks74) +- Duplicate dialog title on Steam Deck +- Resolve remote IP when saving records for game servers with multiple hosts +- More performant symlink traversal when checking for legacy links +- Only iterate on missing symlinks at boot (400% performance uplift) +- Fix for server list truncation causing some servers to not appear in results +- Empty dialog popups if user manually deletes local mods while application is running +- Update statusbar when removing servers from list/repopulating +- Abort DayZ path discovery if Steam files are not synched +- Race condition when checking for installed mods +- Favorite server message not updating correctly +- Improved handling for cases where there are no locally installed mods +- Set up mod symlinks at boot, rather than only on server connect +- Prevent context menus from opening when table is empty +- When reloading table in-place, prevent duplicate panel elements from being added if already present +- Clean up local mod signatures from versions file when deleting mods +- Focus first row when opening mods list ### Changed +- Redact usernames in log files +- Prevent ArrowUp/ArrowDown input when inside keyword field +- Admonish user to restart Steam in error dialog if DayZ path could not be found +- Refactor control flow for more robust contextual parsing +- Stop sending modal dialog hints to outer window +- Clean up signal emission +- Clarify some error messages and normalize text formatting - Update forum URL -- Reword Help section links to include destination - Update README.md - Update IP database to 2025-01 - Reduce IP database size by 50% - Update documentation to 5.6.x standard ### Dropped -- Removed temporary mod ID output in debug logs -- Removed Hall of Fame section from button links, moved inside documentation +- Removed Hall of Fame section from button links, to be moved inside documentation - Remove unused imports -## [5.6.0-beta.20] 2024-12-23 -### Added -- Output real and resolved mod ids to logs (temporary) -- Added -steam launch parameter -### Fixed -- Only iterate on missing symlinks -- Move logging up - -## [5.6.0-beta.19] 2024-12-18 -### Added -- Redact usernames in log files -### Fixed -- More performant symlink traversal when checking for legacy links - -## [5.6.0-beta.18] 2024-12-14 -### Added -- Open Steam workshop subscriptions dialog -- Additional logging -### Fixed -- Empty dialog popups if user manually deletes local mods while application is running -- Abort DayZ path discovery if VDF if Steam files are not synched -- Avoid sudo escalation if system map count is sufficient (jiriks74) -### Changed -- Admonish user to restart Steam in error dialog if DayZ path could not be found - -## [5.6.0-beta.17] 2024-12-14 -### Added -- Additional logging - -## [5.6.0-beta.16] 2024-12-13 +## [5.5.3] 2024-12-13 ### Fixed - Add remote resource health checks before downloading updates ### Added - Add fallback repository -## [5.6.0-beta.11] 2024-12-07 +## [5.5.1] 2024-12-03 ### Fixed -- Add missing function definition +- Support localized decimal separators when parsing installed mod sizes -## [5.6.0-beta.10] 2024-12-04 -### Fixed -- Untoggle highlight button when repopulating mod list -- Resolve remote IP when saving records for game servers with multiple hosts -- Update statusbar when removing servers from list/repopulating -### Added: -- "Select stale" button to bulk select mods marked as obsolete - -## [5.6.0-beta.9] 2024-12-03 -### Fixed -- Normalize user locale when parsing floats - -## [5.6.0-beta.8] 2024-11-28 -### Fixed -- Normalize user locale when parsing floats - -## [5.6.0-beta.7] 2024-11-28 -### Changed -- Add additional logging when fetching installed mods - -## [5.6.0-beta.6] 2024-11-28 -### Fixed -- Race condition when checking for installed mods - -## [5.6.0-beta.5] 2024-11-21 -### Added -- Highlight stale mods in mods list -### Fixed -- Duplicate dialog title on Steam Deck - -## [5.6.0-beta.4] 2024-11-20 -### Added -- Application header bar and controls -- Menu context subtitle in header bar -### Changed -- Refactor control flow for more robust contextual parsing -- Stop sending modal dialog hints to outer window -### Fixed -- Favorite server message not updating correctly - -## [5.6.0-beta.3] 2024-11-18 -### Fixed -- Improved handling for cases where there are no locally installed mods -- Set up mod symlinks at boot, rather than only on server connect -- Prevent context menus from opening when table is empty -- When reloading table in-place, prevent duplicate panel elements from being added if already present -- Clean up signal emission - -## [5.6.0-beta.2] 2024-11-15 -### Fixed -- Clean up local mod signatures from versions file when deleting mods - -## [5.6.0-beta.1] 2024-11-12 -### Added -- Bulk delete mods (via 'List installed mods' list). Not compatible with Manual Mod install mode -### Fixed -- Fix for server list truncation causing some servers to not appear in results -- Suppress signal emission when switching menu contexts -- Focus first row when opening mods list -### Changed -- Clarify some error messages and normalize text formatting - -## [5.5.0-beta.5] 2024-11-03 -### Changed -- Use updated A2S_RULES logic -### Fixed -- Servers in saved servers list would populate context menu with same option when right-clicking in server browser - -## [5.5.0-beta.4] 2024-10-31 -### Added -- Expose a toggle setting for whether to launch the application in fullscreen -### Fixed -- Enable adding/removing servers to/from My Saved Servers when in Recent Servers context - -## [5.5.0-beta.3] 2024-10-31 -### Fixed -- Prevent maps combobox from duplicating contents - -## [5.5.0-beta.2] 2024-10-31 -### Fixed -- Restore keyboard input to keyword entry field - -## [5.5.0-beta.1] 2024-10-30 +## [5.5.0] 2024-11-10 ### Added - Support servers running DLC content (fixes Frostline servers) -- Text autocompletion in maps search field -- Add disk space warning to popup dialog +- Expose a toggle setting for whether to launch the application in fullscreen +- Text autocompletion in maps search field (partial search) +- Add disk space warning to popup dialog when downloading mods ### Fixed +- Servers in saved servers list would populate context menu with same option when right-clicking in server browser +- Enable adding/removing servers to/from My Saved Servers when in Recent Servers context +- Prevent maps combobox from duplicating contents +- Restore keyboard input to keyword entry field +### Changed - Abort fallback query method if DLC is required -## [5.4.2-beta.1] 2024-10-05 +## [5.4.2] 2024-10-05 ### Fixed - Sanitize third-party API IDs to remove UGC collisions -## [5.4.1-beta.2] 2024-09-12 -### Fixed -- Use fallback logic for modlist queries when user traverses networks - -## [5.4.1-beta.2] 2024-09-10 -### Fixed -- Fix signal handling control flow for checkbox toggles - -## [5.4.1-beta.1] 2024-09-10 +## [5.4.1] 2024-09-25 ### Added - Pre-boot validation check for users with self-compiled version of jq ### Fixed +- Use fallback logic for modlist queries when user traverses networks +- Fix signal handling control flow for checkbox toggles - When reloading the server browser, the map combobox selection would revert to the last selected map instead of All Maps - Server filter toggle signals were accessible from the main menu when switching between menu contexts - Global cooldown dialog could sometimes block filter toggles after cooldown reset - Normalized minor version number due to a previous clerical error -## [5.4.0-beta.5] 2024-08-27 -### Added -- Freedesktop application icons for system taskbar, tray, and other dialogs -### Fixed -- Errors being printed to the console when Exit button was explicitly clicked - -## [5.4.0-beta.4] 2024-08-21 -### Added -- Emit CPU model name when exporting system debug log -### Fixed -- Detect Steam Deck OLED APU variant during initial setup - -## [5.4.0-beta.3] 2024-08-04 +## [5.4.0] 2024-08-27 ### Added - Scan local area network for DayZ servers - -## [5.4.0-beta.2] 2024-08-03 -### Fixed -- Clerical hotfix for previous player names fix -- Test if DayZ directory is empty at startup, implying that the game was moved to a new library collection - -## [5.4.0-beta.1] 2024-07-16 +- Freedesktop application icons for system taskbar, tray, and other dialogs +- Emit CPU model name when exporting system debug log ### Fixed +- Errors being printed to the console when Exit button was explicitly clicked +- Detect Steam Deck OLED APU variant during initial setup - Encapsulate player names correctly so that names with whitespace in them are supported +- Test if DayZ directory is empty at startup, implying that the game was moved to a new library collection +- Report WM_CLASS name to the window manager ## [5.3.2] 2024-07-02 ### Fixed diff --git a/dzgui.sh b/dzgui.sh index 4baa2ae..d6b5000 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.6.0-beta.21 +version=5.6.0 #CONSTANTS aid=221100 From 7413f7c02915382248eef686634acfa845576775 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 7 Jan 2025 19:51:46 +0900 Subject: [PATCH 063/115] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 21a3ce7..3aba3a1 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -11,8 +11,8 @@ body: label: Version description: DZGUI version options: - - 5.5.0 (stable) - - 5.6.0 (testing) + - 5.5.x (stable) + - 5.6.x (testing) - Version prior to 5.5.0 default: 0 validations: From 6369d895fd269b23bca1ec427ecf5ce84ea12c86 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 7 Jan 2025 19:51:58 +0900 Subject: [PATCH 064/115] Update feature.yml --- .github/ISSUE_TEMPLATE/feature.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml index 1ab0ee4..6ea29b6 100644 --- a/.github/ISSUE_TEMPLATE/feature.yml +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -11,8 +11,8 @@ body: label: Version description: DZGUI version options: - - 5.5.0 (stable) - - 5.6.0 (testing) + - 5.5.x (stable) + - 5.6.x (testing) - Version prior to 5.5.0 default: 0 validations: From ac8ff2febff4244fbd8fdb946934cade40ae6648 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 7 Jan 2025 19:52:29 +0900 Subject: [PATCH 065/115] Update trouble.yml --- .github/ISSUE_TEMPLATE/trouble.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/trouble.yml b/.github/ISSUE_TEMPLATE/trouble.yml index f0d66d4..a45e5d0 100644 --- a/.github/ISSUE_TEMPLATE/trouble.yml +++ b/.github/ISSUE_TEMPLATE/trouble.yml @@ -18,8 +18,8 @@ body: label: Version description: DZGUI version options: - - 5.5.0 (stable) - - 5.6.0 (testing) + - 5.5.x (stable) + - 5.6.x (testing) - Version prior to 5.5.0 default: 0 validations: From aac8558079706c1a23e2960edde4e68d4f8804a1 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 7 Jan 2025 19:53:15 +0900 Subject: [PATCH 066/115] Update trouble.yml --- .github/ISSUE_TEMPLATE/trouble.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/trouble.yml b/.github/ISSUE_TEMPLATE/trouble.yml index a45e5d0..d3f1e76 100644 --- a/.github/ISSUE_TEMPLATE/trouble.yml +++ b/.github/ISSUE_TEMPLATE/trouble.yml @@ -10,7 +10,7 @@ body: attributes: label: Did you check if this issue already exists? options: - - label: I have checked the [Knowledge Base](https://aclist.codeberg.page/kb.html) and searched through [past issues](https://github.com/aclist/dztui/issues?q=is%3Aissue+is%3Aclosed) and did not find my issue there. + - label: I have checked the [Knowledge Base](https://aclist.github.io/dzgui/kb.html) and searched through [past issues](https://github.com/aclist/dztui/issues?q=is%3Aissue+is%3Aclosed) and did not find my issue there. required: true - type: dropdown id: version From 70db7b45b3d66439e54717ec9345d0cb8582f5cd Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 7 Jan 2025 19:54:19 +0900 Subject: [PATCH 067/115] Update trouble.yml --- .github/ISSUE_TEMPLATE/trouble.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/trouble.yml b/.github/ISSUE_TEMPLATE/trouble.yml index d3f1e76..9b53a5f 100644 --- a/.github/ISSUE_TEMPLATE/trouble.yml +++ b/.github/ISSUE_TEMPLATE/trouble.yml @@ -48,3 +48,10 @@ body: placeholder: "Include as much detail as possible and state the steps leading up to the problem. E.g., First I do this, then I do this, then this happens." validations: required: true +- type: textarea + id: logs + attributes: + label: Additional log output + description: Attach the file `$HOME/.local/state/dzgui/DZGUI_DEBUG.log` by clicking this area to highlight it and then dragging the file in. + validations: + required: false From afffc90abc4cbd9a9b9fcc072eb7def6e12267c2 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 7 Jan 2025 19:55:31 +0900 Subject: [PATCH 068/115] Update trouble.yml --- .github/ISSUE_TEMPLATE/trouble.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/trouble.yml b/.github/ISSUE_TEMPLATE/trouble.yml index 9b53a5f..44222e4 100644 --- a/.github/ISSUE_TEMPLATE/trouble.yml +++ b/.github/ISSUE_TEMPLATE/trouble.yml @@ -48,7 +48,7 @@ body: placeholder: "Include as much detail as possible and state the steps leading up to the problem. E.g., First I do this, then I do this, then this happens." validations: required: true -- type: textarea + - type: textarea id: logs attributes: label: Additional log output From 07606d88523c520370508c8164b0a9d6e3530b19 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 7 Jan 2025 20:51:57 +0900 Subject: [PATCH 069/115] docs: update changelog --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 30bbeea..3956403 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,8 +43,8 @@ - Reduce IP database size by 50% - Update documentation to 5.6.x standard ### Dropped -- Removed Hall of Fame section from button links, to be moved inside documentation -- Remove unused imports +- Hall of Fame section from button links, to be moved inside documentation +- Unused imports ## [5.5.3] 2024-12-13 ### Fixed From a070e9fc655119b563ef859df5000072bb16120b Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 7 Jan 2025 20:54:03 +0900 Subject: [PATCH 070/115] chore: drop unused log file --- dzgui.sh | 2 +- helpers/funcs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/dzgui.sh b/dzgui.sh index d6b5000..d7def32 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -587,7 +587,7 @@ fetch_helpers_by_sum(){ ["ui.py"]="d3ad9153d8599bea0eede9fd3121ee8e" ["query_v2.py"]="55d339ba02512ac69de288eb3be41067" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" - ["funcs"]="5624b1e44a43c318775caa5d0ceef1f0" + ["funcs"]="baa2c9c93edacb98384ae9f319e3b27f" ["lan"]="c62e84ddd1457b71a85ad21da662b9af" ) local author="aclist" diff --git a/helpers/funcs b/helpers/funcs index 9260e78..b23c1f2 100755 --- a/helpers/funcs +++ b/helpers/funcs @@ -30,7 +30,6 @@ log_path="$state_path/logs" debug_log="$log_path/DZGUI_DEBUG.log" system_log="$log_path/DZGUI_SYSTEM.log" mod_log="$log_path/DZGUI_MODIDS.log" -meta_log="$log_path/DZGUI_META.log" #STATE FILES history_file="$state_path/$prefix.history" From c8f7a32284a87226c7da8ae506c7ec7cd4d98653 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 7 Jan 2025 21:39:16 +0900 Subject: [PATCH 071/115] chore: update db checksum --- dzgui.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dzgui.sh b/dzgui.sh index d7def32..e0298ad 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -636,7 +636,7 @@ fetch_helpers_by_sum(){ } fetch_geo_file(){ # for binary releases - local geo_sum="7b6668eb4535bb432acb42016ba9cc47" + local geo_sum="28ccd75b3e03cf07a7011f22ef0cd69b" local km_sum="b038fdb8f655798207bd28de3a004706" local gzip="$helpers_path/ips.csv.gz" if [[ ! -f $geo_file ]] || [[ $(get_hash $geo_file) != $geo_sum ]]; then From 3b384c5a4dc1cbeb99c1c8a4c65079fc2ad6afb5 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 9 Jan 2025 20:39:17 +0900 Subject: [PATCH 072/115] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 3aba3a1..b1209a1 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -11,9 +11,9 @@ body: label: Version description: DZGUI version options: - - 5.5.x (stable) - - 5.6.x (testing) - - Version prior to 5.5.0 + - 5.6.x (stable) + - 5.7.x (testing) + - Version prior to 5.6.0 default: 0 validations: required: true From 0763416903fe8018ae169e5c54a67113c9b848c5 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 9 Jan 2025 20:39:25 +0900 Subject: [PATCH 073/115] Update feature.yml --- .github/ISSUE_TEMPLATE/feature.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml index 6ea29b6..cb687ce 100644 --- a/.github/ISSUE_TEMPLATE/feature.yml +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -11,9 +11,9 @@ body: label: Version description: DZGUI version options: - - 5.5.x (stable) - - 5.6.x (testing) - - Version prior to 5.5.0 + - 5.6.x (stable) + - 5.7.x (testing) + - Version prior to 5.6.0 default: 0 validations: required: true From 1f31c43fe4a52a842f353e70d903a00808d1a0d8 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 9 Jan 2025 20:39:35 +0900 Subject: [PATCH 074/115] Update trouble.yml --- .github/ISSUE_TEMPLATE/trouble.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/trouble.yml b/.github/ISSUE_TEMPLATE/trouble.yml index 44222e4..90a583a 100644 --- a/.github/ISSUE_TEMPLATE/trouble.yml +++ b/.github/ISSUE_TEMPLATE/trouble.yml @@ -18,9 +18,9 @@ body: label: Version description: DZGUI version options: - - 5.5.x (stable) - - 5.6.x (testing) - - Version prior to 5.5.0 + - 5.6.x (stable) + - 5.7.x (testing) + - Version prior to 5.6.0 default: 0 validations: required: true From 05f88b60191b17b5c3700f41230894665e87abdf Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 9 Jan 2025 23:27:08 +0900 Subject: [PATCH 075/115] Update trouble.yml --- .github/ISSUE_TEMPLATE/trouble.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/trouble.yml b/.github/ISSUE_TEMPLATE/trouble.yml index 90a583a..3151675 100644 --- a/.github/ISSUE_TEMPLATE/trouble.yml +++ b/.github/ISSUE_TEMPLATE/trouble.yml @@ -12,18 +12,6 @@ body: options: - label: I have checked the [Knowledge Base](https://aclist.github.io/dzgui/kb.html) and searched through [past issues](https://github.com/aclist/dztui/issues?q=is%3Aissue+is%3Aclosed) and did not find my issue there. required: true - - type: dropdown - id: version - attributes: - label: Version - description: DZGUI version - options: - - 5.6.x (stable) - - 5.7.x (testing) - - Version prior to 5.6.0 - default: 0 - validations: - required: true - type: dropdown id: browsers attributes: @@ -31,8 +19,16 @@ body: options: - Desktop PC - Steam Deck + default: 0 validations: required: true + - type: input + id: version + attributes: + label: DZGUI version + validations: + required: true + placeholder: "5.6.0" - type: input id: distro attributes: From a333571f94f679e4d55c7a9a9fdcc3d3261fc0ee Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 9 Jan 2025 23:28:46 +0900 Subject: [PATCH 076/115] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index b1209a1..ee292cb 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -6,26 +6,22 @@ assignees: - aclist body: - type: dropdown - id: version - attributes: - label: Version - description: DZGUI version - options: - - 5.6.x (stable) - - 5.7.x (testing) - - Version prior to 5.6.0 - default: 0 - validations: - required: true - - type: dropdown - id: browsers + id: device attributes: label: Device type options: - Desktop PC - Steam Deck + default: 0 validations: required: true + - type: input + id: version + attributes: + label: DZGUI version + validations: + required: true + placeholder: "5.6.0" - type: input id: distro attributes: From df92acb7dc27b53e8c2ba1fcad0caf6b7609c719 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 9 Jan 2025 23:30:24 +0900 Subject: [PATCH 077/115] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index ee292cb..c0bd03a 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -5,6 +5,13 @@ labels: ["bug"] assignees: - aclist body: + - type: checkboxes + id: kb + attributes: + label: Did you check if this issue already exists? + options: + - label: I have checked the [Knowledge Base](https://aclist.github.io/dzgui/kb.html) and searched through [past issues](https://github.com/aclist/dztui/issues?q=is%3Aissue+is%3Aclosed) and did not find my issue there. + required: true - type: dropdown id: device attributes: From c6a88416149c4ec502162778c58a9f06e0e31b35 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 9 Jan 2025 23:30:37 +0900 Subject: [PATCH 078/115] Update trouble.yml --- .github/ISSUE_TEMPLATE/trouble.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/trouble.yml b/.github/ISSUE_TEMPLATE/trouble.yml index 3151675..ef270ef 100644 --- a/.github/ISSUE_TEMPLATE/trouble.yml +++ b/.github/ISSUE_TEMPLATE/trouble.yml @@ -13,7 +13,7 @@ body: - label: I have checked the [Knowledge Base](https://aclist.github.io/dzgui/kb.html) and searched through [past issues](https://github.com/aclist/dztui/issues?q=is%3Aissue+is%3Aclosed) and did not find my issue there. required: true - type: dropdown - id: browsers + id: device attributes: label: Device type options: From 0834a86d33bec4c3629892f9851a7dab1fc785fd Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 9 Jan 2025 23:30:54 +0900 Subject: [PATCH 079/115] Update trouble.yml --- .github/ISSUE_TEMPLATE/trouble.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/trouble.yml b/.github/ISSUE_TEMPLATE/trouble.yml index ef270ef..5068da5 100644 --- a/.github/ISSUE_TEMPLATE/trouble.yml +++ b/.github/ISSUE_TEMPLATE/trouble.yml @@ -5,13 +5,6 @@ labels: ["troubleshooting"] assignees: - aclist body: - - type: checkboxes - id: kb - attributes: - label: Did you check if this issue already exists? - options: - - label: I have checked the [Knowledge Base](https://aclist.github.io/dzgui/kb.html) and searched through [past issues](https://github.com/aclist/dztui/issues?q=is%3Aissue+is%3Aclosed) and did not find my issue there. - required: true - type: dropdown id: device attributes: From 54e07628822e17833999c0614f4a6efa3d77aca8 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 9 Jan 2025 23:31:21 +0900 Subject: [PATCH 080/115] Update feature.yml --- .github/ISSUE_TEMPLATE/feature.yml | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml index cb687ce..bc466fb 100644 --- a/.github/ISSUE_TEMPLATE/feature.yml +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -6,26 +6,22 @@ assignees: - aclist body: - type: dropdown - id: version - attributes: - label: Version - description: DZGUI version - options: - - 5.6.x (stable) - - 5.7.x (testing) - - Version prior to 5.6.0 - default: 0 - validations: - required: true - - type: dropdown - id: browsers + id: device attributes: label: Device type options: - Desktop PC - Steam Deck + default: 0 validations: required: true + - type: input + id: version + attributes: + label: DZGUI version + validations: + required: true + placeholder: "5.6.0" - type: input id: distro attributes: From d03346b56af23fda241bd196fba5b7001ed5c617 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 9 Jan 2025 23:32:26 +0900 Subject: [PATCH 081/115] Update trouble.yml --- .github/ISSUE_TEMPLATE/trouble.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/trouble.yml b/.github/ISSUE_TEMPLATE/trouble.yml index 5068da5..1c25e69 100644 --- a/.github/ISSUE_TEMPLATE/trouble.yml +++ b/.github/ISSUE_TEMPLATE/trouble.yml @@ -1,6 +1,6 @@ name: Troubleshooting description: Submit user error/troubleshooting questions here -title: "[HELP] " +title: "[HELP] Your title here" labels: ["troubleshooting"] assignees: - aclist From 47bea4511157ed3e66b87363566af591b917ab32 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 9 Jan 2025 23:32:27 +0900 Subject: [PATCH 082/115] Update feature.yml --- .github/ISSUE_TEMPLATE/feature.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml index bc466fb..3b350f2 100644 --- a/.github/ISSUE_TEMPLATE/feature.yml +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -1,6 +1,6 @@ name: Feature suggestion description: Submit requests for new features here -title: "[FEAT] " +title: "[FEAT] Your title here" labels: ["enhancement"] assignees: - aclist From 540d0ad7e465796eda0cc9d58b5a463dff8336da Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 9 Jan 2025 23:32:28 +0900 Subject: [PATCH 083/115] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index c0bd03a..0ad8d65 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,6 +1,6 @@ name: Bug report description: Submit bugs that affect functionality here -title: "[BUG] " +title: "[BUG] Your title here" labels: ["bug"] assignees: - aclist From 34e7b2e4809692417d16d8632bd6ddd2e861428a Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Fri, 10 Jan 2025 22:45:25 +0900 Subject: [PATCH 084/115] fix: jq 1.6 support --- dzgui.sh | 11 +++++++---- helpers/funcs | 15 ++++++++++----- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/dzgui.sh b/dzgui.sh index e0298ad..43af009 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.6.0 +version=5.6.1 #CONSTANTS aid=221100 @@ -76,6 +76,9 @@ set_im_module(){ return fi } +redact(){ + sed 's@\(/home/\)[^/]*@\1REDACTED@g' +} logger(){ local date="$(date "+%F %T,%3N")" local tag="$1" @@ -83,8 +86,8 @@ logger(){ local self="${BASH_SOURCE[0]}" local caller="${FUNCNAME[1]}" local line="${BASH_LINENO[0]}" - self="$(<<< "$self" sed 's@\(/[^/]*/\)\([^/]*\)\(.*\)@\1REDACTED\3@g')" - printf "%s␞%s␞%s::%s()::%s␞%s\n" "$date" "$tag" "$self" "$caller" "$line" "$string" >> "$debug_log" + printf "%s␞%s␞%s::%s()::%s␞%s\n" "$date" "$tag" "$self" "$caller" "$line" "$string" \ + | redact >> "$debug_log" } setup_dirs(){ for dir in "$state_path" "$cache_path" "$share_path" "$helpers_path" "$freedesktop_path" "$config_path" "$log_path"; do @@ -587,7 +590,7 @@ fetch_helpers_by_sum(){ ["ui.py"]="d3ad9153d8599bea0eede9fd3121ee8e" ["query_v2.py"]="55d339ba02512ac69de288eb3be41067" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" - ["funcs"]="baa2c9c93edacb98384ae9f319e3b27f" + ["funcs"]="6a1c7ce585d9b76e2e75dba9d4295f8d" ["lan"]="c62e84ddd1457b71a85ad21da662b9af" ) local author="aclist" diff --git a/helpers/funcs b/helpers/funcs index b23c1f2..0c227c3 100755 --- a/helpers/funcs +++ b/helpers/funcs @@ -447,7 +447,9 @@ get_remote_servers(){ _fetch "${params[$i]}" > $_cache_temp.${i} done - jq -n '[ [inputs]|add ].[]' $_cache_temp.* && rm $_cache_temp.* + # ubuntu variants do not support jq 1.7 chained operators + # https://github.com/jqlang/jq/releases/tag/jq-1.7 + jq -n '[ [inputs]|add ][]' $_cache_temp.* && rm $_cache_temp.* } get_unique_maps(){ shift @@ -735,6 +737,9 @@ dump_servers(){ logger INFO "Server context is '$subcontext', reading from file '$file'" filter_servers "$file" "$@" } +redact(){ + sed 's@\(/home/\)[^/]*@\1REDACTED@g' +} logger(){ local date="$(date "+%F %T,%3N")" local tag="$1" @@ -742,8 +747,8 @@ logger(){ local self="${BASH_SOURCE[0]}" local caller="${FUNCNAME[1]}" local line="${BASH_LINENO[0]}" - self="$(<<< "$self" sed 's@\(/[^/]*/\)\([^/]*\)\(.*\)@\1REDACTED\3@g')" - printf "%s␞%s␞%s::%s()::%s␞%s\n" "$date" "$tag" "$self" "$caller" "$line" "$string" >> "$debug_log" + printf "%s␞%s␞%s::%s()::%s␞%s\n" "$date" "$tag" "$self" "$caller" "$line" "$string" \ + | redact >> "$debug_log" } test_ping(){ shift @@ -1243,8 +1248,8 @@ symlinks(){ done } - readarray -t mods < <(find $workshop_dir -mindepth 1 -name meta.cpp | awk -F/ 'NF=NF-1{print $NF}') - readarray -t links < <(find $game_dir -type l) + readarray -t mods < <(find "$workshop_dir" -mindepth 1 -name meta.cpp | awk -F/ 'NF=NF-1{print $NF}') + readarray -t links < <(find "$game_dir" -maxdepth 1 -type l) if [[ ${#mods[@]} -eq 0 ]]; then logger INFO "No mods present, aborting" From 2ab2e237362ad4b214dd8a86bc6a7a193c6aaf8a Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Fri, 10 Jan 2025 22:45:56 +0900 Subject: [PATCH 085/115] docs: update readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6189481..553e72e 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ Refer to the documentation for installation and setup instructions: - [GitHub](https://aclist.github.io/dzgui/dzgui.html) - [Mirror (Codeberg)](https://aclist.codeberg.page) + ![A screenshot of DZGUI](/images/example.png) ## Attribution From 759327e932a331d50d89391bdbf42856ae71b815 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 23 Jan 2025 12:02:27 +0900 Subject: [PATCH 086/115] chore: prepare release --- CHANGELOG.md | 8 ++++++++ dzgui.sh | 6 +++--- helpers/funcs | 28 ++++++++++++++++++++++++++++ helpers/ui.py | 10 ++++++++++ 4 files changed, 49 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3956403..b3da467 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [5.6.2] 2024-01-22 +### Fixed +- Resolve regression introduced with IP resolution feature in 5.6.0 (restores functionality of right-click action: Add to My Servers) + +## [5.6.1] 2024-01-10 +### Fixed +- Add fallback support for jq 1.6 + ## [5.6.0] 2024-01-06 ### Added - Application header bar and controls diff --git a/dzgui.sh b/dzgui.sh index 43af009..dcd64af 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.6.1 +version=5.6.2 #CONSTANTS aid=221100 @@ -587,10 +587,10 @@ fetch_helpers_by_sum(){ [[ -f "$config_file" ]] && source "$config_file" declare -A sums sums=( - ["ui.py"]="d3ad9153d8599bea0eede9fd3121ee8e" + ["ui.py"]="5a876efacf208d12b5fe761996425412" ["query_v2.py"]="55d339ba02512ac69de288eb3be41067" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" - ["funcs"]="6a1c7ce585d9b76e2e75dba9d4295f8d" + ["funcs"]="417bd5eaffbefc905a843985c691dc64" ["lan"]="c62e84ddd1457b71a85ad21da662b9af" ) local author="aclist" diff --git a/helpers/funcs b/helpers/funcs index 0c227c3..c747c82 100755 --- a/helpers/funcs +++ b/helpers/funcs @@ -130,6 +130,7 @@ declare -A funcs=( ["Remove from my servers"]="update_favs_from_table" ["Remove from history"]="remove_from_history" ["Force update local mods"]="force_update" +["Resolve IP"]="resolve_ip" ["Handshake"]="final_handshake" ["get_player_count"]="get_player_count" ["lan_scan"]="lan_scan" @@ -161,6 +162,33 @@ find_stale_mods(){ printf "" return 99 } +resolve_ip(){ + shift + local res + local record="$1" + local ip=$(<<< "$record" awk -F: '{print $1}') + local qport=$(<<< "$record" awk -F: '{print $3}') + res=$(a2s $ip $qport info) + if [[ ! $? -eq 0 ]]; then + printf "Server timed out \n" + return 1 + fi + local gport=$(<<< "$res" jq -r '.[].gameport') + if [[ -z $gport ]]; then + printf "Failed to resolve server metadata\n" + return 1 + fi + + # incoming input can only be 'remove' or 'add' + # record is in favs => implies deletion + # record not in favs => implies addition + resolved_record="$ip:$gport:$qport" + if [[ ${ip_list[*]} =~ $resolved_record ]]; then + remove_from_favs "$resolved_record" + else + add_to_favs "$resolved_record" + fi +} get_player_count(){ shift local res diff --git a/helpers/ui.py b/helpers/ui.py index c9aea79..ae28ede 100644 --- a/helpers/ui.py +++ b/helpers/ui.py @@ -1814,10 +1814,16 @@ class TreeView(Gtk.TreeView): def format_metadata(row_sel): + # this function is recycled for the add by ip/id methods + + # the right-click context menu (add/remove servers) + # in the latter case, there is no metadata to update + # see grid.update_statusbar(), so the returned row is None + row = None for i in RowType: if i.dict["label"] == row_sel: row = i prefix = i.dict["tooltip"] + break vals = { "branch": config_vals[0], "debug": config_vals[1], @@ -1827,6 +1833,8 @@ def format_metadata(row_sel): "preferred_client": config_vals[5], "fullscreen": config_vals[6] } + if row is None: + return None try: alt = row.dict["alt"] default = row.dict["default"] @@ -2396,6 +2404,8 @@ class Grid(Gtk.Grid): return True def update_statusbar(self, string): + if string is None: + return meta = self.bar.get_context_id("Statusbar") self.bar.push(meta, string) From 8aea4af68717d6e81f15cd73812bc8f376e195ba Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Sun, 9 Feb 2025 18:55:33 +0900 Subject: [PATCH 087/115] chore: update IP db --- CHANGELOG.md | 4 + dzgui.sh | 4 +- dzgui.sh.old | 1024 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1030 insertions(+), 2 deletions(-) create mode 100755 dzgui.sh.old diff --git a/CHANGELOG.md b/CHANGELOG.md index b3da467..676d7f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [5.6.6] 2024-02-09 +### Changed +- Update IP database records for 2025-02 + ## [5.6.2] 2024-01-22 ### Fixed - Resolve regression introduced with IP resolution feature in 5.6.0 (restores functionality of right-click action: Add to My Servers) diff --git a/dzgui.sh b/dzgui.sh index dcd64af..ae93854 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.6.2 +version=5.6.3 #CONSTANTS aid=221100 @@ -639,7 +639,7 @@ fetch_helpers_by_sum(){ } fetch_geo_file(){ # for binary releases - local geo_sum="28ccd75b3e03cf07a7011f22ef0cd69b" + local geo_sum="9824e9b9a75a4830a2423932cc188b06" local km_sum="b038fdb8f655798207bd28de3a004706" local gzip="$helpers_path/ips.csv.gz" if [[ ! -f $geo_file ]] || [[ $(get_hash $geo_file) != $geo_sum ]]; then diff --git a/dzgui.sh.old b/dzgui.sh.old new file mode 100755 index 0000000..65b151b --- /dev/null +++ b/dzgui.sh.old @@ -0,0 +1,1024 @@ +#!/usr/bin/env bash +set -o pipefail + +version=5.7.0-beta.5 + +#CONSTANTS +aid=221100 +game="dayz" +app_name="dzgui" +app_name_upper="DZGUI" +workshop="steam://url/CommunityFilePage/" +sd_res="--width=1280 --height=800" +steamsafe_zenity="/usr/bin/zenity" +zenity_flags=("--width=500" "--title=DZGUI") +declare -A deps +deps=([awk]="5.1.1" [curl]="7.80.0" [jq]="1.6" [tr]="9.0" [$steamsafe_zenity]="3.44.1") + +#CONFIG +config_path="$HOME/.config/dztui" +config_file="$config_path/dztuirc" + +#PATHS +state_path="$HOME/.local/state/$app_name" +cache_path="$HOME/.cache/$app_name" +share_path="$HOME/.local/share/$app_name" +script_path="$share_path/dzgui.sh" +helpers_path="$share_path/helpers" + +#LOGS +log_path="$state_path/logs" +debug_log="$log_path/DZGUI_DEBUG.log" + +#STATE FILES +prefix="dzg" +history_file="$state_path/$prefix.history" +versions_file="$state_path/$prefix.versions" +lock_file="$state_path/$prefix.lock" +cols_file="$state_path/$prefix.cols.json" + +#CACHE FILES +coords_file="$cache_path/$prefix.coords" + +#legacy paths +hist_file="$config_path/history" +version_file="$config_path/versions" + +#XDG +freedesktop_path="$HOME/.local/share/applications" + +#HELPERS +ui_helper="$helpers_path/ui.py" +geo_file="$helpers_path/ips.csv" +km_helper="$helpers_path/latlon" +sums_path="$helpers_path/sums.md5" +func_helper="$helpers_path/funcs" + +#REMOTE +remote_host=gh +author="aclist" +repo="dztui" +url_prefix="https://raw.githubusercontent.com/$author/$repo" +stable_url="$url_prefix/dzgui" +testing_url="$url_prefix/testing" +releases_url="https://github.com/$author/$repo/releases/download/browser" +km_helper_url="$releases_url/latlon" +geo_file_url="$releases_url/ips.csv.gz" + + +set_im_module(){ + #TODO: drop pending SteamOS changes + pgrep -a gamescope | grep -q "generate-drm-mode" + if [[ $? -eq 0 ]]; then + GTK_IM_MODULE="" + logger INFO "Detected Steam Deck (Game Mode), unsetting GTK_IM_MODULE" + else + return + fi +} +redact(){ + sed 's@\(/home/\)[^/]*@\1REDACTED@g' +} +logger(){ + local date="$(date "+%F %T,%3N")" + local tag="$1" + local string="$2" + local self="${BASH_SOURCE[0]}" + local caller="${FUNCNAME[1]}" + local line="${BASH_LINENO[0]}" + printf "%s␞%s␞%s::%s()::%s␞%s\n" "$date" "$tag" "$self" "$caller" "$line" "$string" \ + | redact >> "$debug_log" +} +setup_dirs(){ + for dir in "$state_path" "$cache_path" "$share_path" "$helpers_path" "$freedesktop_path" "$config_path" "$log_path"; do + if [[ ! -d $dir ]]; then + mkdir -p "$dir" + fi + done +} +setup_state_files(){ + if [[ -f "$debug_log" ]]; then + rm "$debug_log" && touch $debug_log + logger INFO "Initializing DZGUI version $version" + fi + if [[ -f "$version_file" ]]; then + mv "$version_file" "$versions_file" && + logger INFO "Migrating legacy version file" + fi + # wipe cache files + local path="$cache_path" + if find "$path" -mindepth 1 -maxdepth 1 | read; then + for file in $path/*; do + rm "$file" + done + logger INFO "Wiped cache files" + fi +} +print_config_vals(){ + local keys=( + "branch" + "name" + "fav_server" + "fav_label" + "auto_install" + "steam_path" + "default_steam_path" + "preferred_client" + ) + for i in "${keys[@]}"; do + logger INFO "Read key '$i': '${!i}'" + done + if [[ ${#ip_list[@]} -lt 1 ]]; then + logger WARN "No IPs in saved server list" + fi + +} +test_gobject(){ + python3 -c "import gi" + if [[ ! $? -eq 0 ]]; then + logger CRITICAL "Missing PyGObject" + fdialog "Requires PyGObject (python-gobject)" + exit 1 + fi + logger INFO "Found PyGObject in Python env" +} +update_config(){ + # handling for legacy files + [[ -z $branch ]] && branch="stable" + [[ -f $config_file ]] && mv $config_file ${config_file}.old + write_config > $config_file && return 90 || return 1 + logger INFO "Updated config file at '$config_file'" +} +setup_steam_client(){ + local flatpak + local steam + local steam_cmd + [[ -n $preferred_client ]] && return 0 + [[ $(command -v flatpak) ]] && flatpak=$(flatpak list | grep valvesoftware.Steam) + steam=$(command -v steam) + if [[ -z "$steam" ]] && [[ -z "$flatpak" ]]; then + raise_error_and_quit "Requires Steam or Flatpak Steam" + elif [[ -n "$steam" ]] && [[ -n "$flatpak" ]]; then + preferred_client="steam" + elif [[ -n "$steam" ]]; then + preferred_client="steam" + else + steam_cmd="flatpak run com.valvesoftware.Steam" + fi + update_config && logger INFO "Preferred client set to '$steam_cmd'" || return 1 +} +print_ip_list(){ + [[ ${#ip_list[@]} -eq 0 ]] && return 1 + printf "\t\"%s\"\n" "${ip_list[@]}" +} +write_config(){ +cat <<-END +#Path to DayZ installation +steam_path="$steam_path" + +#Battlemetrics API key +api_key="$api_key" + +#Favorited server IP:PORT array +ip_list=( +$(print_ip_list) +) + +#Favorite server to fast-connect to (limit one) +fav_server="$fav_server" + +#Favorite server label (human readable) +fav_label="$fav_label" + +#Custom player name (optional, required by some servers) +name="$name" + +#Set to 1 to perform dry-run and print launch options +debug="$debug" + +#Toggle stable/testing branch +branch="$branch" + +#Start in fullscreen +fullscreen="$fullscreen" + +#Steam API key +steam_api="$steam_api" + +#Auto-install mods +auto_install="$auto_install" + +#Automod staging directory +staging_dir="$staging_dir" + +#Path to default Steam client +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(){ + for dep in "${!deps[@]}"; do + command -v "$dep" 2>&1>/dev/null + if [[ $? -eq 1 ]]; then + local msg="Requires $dep >= ${deps[$dep]}" + raise_error_and_quit "$msg" + fi + done + local jqmsg="jq must be compiled with support for oniguruma" + local jqtest + jqtest=$(echo '{"test": "foo"}' | jq '.test | test("^foo$")') + [[ $? -ne 0 ]] && raise_error_and_quit "$jqmsg" + logger INFO "Initial dependencies satisfied" +} +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" + raise_error_and_quit "$msg" + fi + logger INFO "Found Python version: $pyver" +} +watcher_deps(){ + if [[ ! $(command -v wmctrl) ]] && [[ ! $(command -v xdotool) ]]; then + raise_error_and_quit "Missing dependency: requires 'wmctrl' or 'xdotool'" + exit 1 + fi + logger INFO "Found DZG Watcher dependencies" +} +format_version_url(){ + [[ -z "$branch" ]] && branch="stable" + case "$branch" in + "stable") + version_url="$stable_url/dzgui.sh" + ;; + "testing") + version_url="$testing_url/dzgui.sh" + ;; + esac + echo "$version_url" +} +write_desktop_file(){ +cat <<-END +[Desktop Entry] +Version=1.0 +Type=Application +Terminal=false +Exec=$share_path/dzgui.sh +Name=$app_name_upper +Comment=$app_name +Icon=$share_path/$app_name +Categories=Game +END +} +freedesktop_dirs(){ + local version_url=$(format_version_url) + local img_url="$stable_url/images" + curl -s "$version_url" > "$script_path" + chmod +x "$script_path" + for i in dzgui grid.png hero.png logo.png icon.png; do + curl -s "$img_url/$i" > "$share_path/$i" + done + write_desktop_file > "$freedesktop_path/$app_name.desktop" + [[ $is_steam_deck -eq 0 ]] && return + write_desktop_file > "$HOME/Desktop/$app_name.desktop" +} +legacy_vars(){ + local suffix="fav" + local hr_msg="Config file contains values based on old API. Please update and re-run setup." + local msg="Config file contains legacy API value: '$suffix'" + if [[ -n $fav ]]; then + logger WARN "$msg" + fdialog "$hr_msg" + exit 1 + fi + if [[ -n $whitelist ]]; then + suffix="whitelist" + logger WARN "$msg" + fdialog "$hr_msg" + exit 1 + fi +} +merge_config(){ + [[ -z $staging_dir ]] && staging_dir="/tmp" + update_config + tdialog "Wrote new config format to \n${config_file}\nIf errors occur, you can restore the file:\n${config_file}.old" +} +check_unmerged(){ + if [[ -f ${config_path}.unmerged ]]; then + merge_config + rm ${config_path}.unmerged + fi +} +check_version(){ + local version_url=$(format_version_url) + local upstream=$(curl -Ls "$version_url" | awk -F= '/^version=/ {print $2}') + local res=$(get_response_code "$version_url") + [[ $res -ne 200 ]] && raise_error_and_quit "Remote resource unavailable: '$version_url'" + logger INFO "Local branch: '$branch', local version: $version" + if [[ $branch == "stable" ]]; then + version_url="$stable_url/dzgui.sh" + elif [[ $branch == "testing" ]]; then + version_url="$testing_url/dzgui.sh" + fi + [[ ! -f "$freedesktop_path/$app_name.desktop" ]] && freedesktop_dirs + if [[ $version == $upstream ]]; then + logger INFO "Local version is same as upstream" + check_unmerged + else + logger WARN "Local and remote version mismatch: $version != $upstream" + prompt_dl + fi +} +download_new_version(){ + local version_url="$(format_version_url)" + logger INFO "Version URL is '$version_url'" + logger INFO "$src_path" + mv "$src_path" "$src_path.old" + curl -L "$version_url" > "$src_path" 2>$debug_log + rc=$? + if [[ $rc -eq 0 ]]; then + dl_changelog + logger INFO "Wrote new version to $src_path" + chmod +x "$src_path" + touch "${config_path}.unmerged" + fdialog "DZGUI $upstream successfully downloaded. To use the new version, select Exit and restart." + logger INFO "User exited after version upgrade" + exit 0 + else + mv "$src_path.old" "$src_path" + logger WARN "curl failed to fetch new version. Rolling back" + fdialog "Failed to download the new version. Restoring old version" + return 1 + fi +} +prompt_dl(){ + _text(){ + cat <<-EOF + Version conflict. + + Your branch: $branch + Your version: $version + Upstream version: $upstream + + Version updates introduce important bug fixes and are encouraged. Attempt to download the latest version? + EOF + } + qdialog "$(_text)" "Yes" "No" + if [[ $? -eq 1 ]]; then + return 0 + else + download_new_version + fi +} +dl_changelog(){ + local mdbranch + local md + [[ $branch == "stable" ]] && mdbranch="dzgui" + [[ $branch == "testing" ]] && mdbranch="testing" + local md="$url_prefix/${mdbranch}/$file" + curl -Ls "$md" > "$state_path/CHANGELOG.md" +} +test_display_mode(){ + pgrep -a gamescope | grep -q "generate-drm-mode" + if [[ $? -eq 0 ]]; then + echo gm + else + echo dm + fi +} +check_architecture(){ + local cpu=$(< /proc/cpuinfo awk -F": " '/AMD Custom APU [0-9]{4}$/ {print $2; exit}') + read -a APU_MODEL <<< "$cpu" + if [[ ${APU_MODEL[3]} != "0932" ]] && [[ ${APU_MODEL[3]} != "0405" ]]; then + is_steam_deck=0 + logger INFO "Setting architecture to 'desktop'" + return + fi + + if [[ $(test_display_mode) == "gm" ]]; then + is_steam_deck=2 + else + is_steam_deck=1 + fi + logger INFO "Setting architecture to 'Steam Deck'" +} +check_map_count(){ + [[ $is_steam_deck -gt 0 ]] && return 0 + local map_count_file="/proc/sys/vm/max_map_count" + local min_count=1048576 + local conf_file="/etc/sysctl.d/dayz.conf" + local current_count + if [[ ! -f ${map_count_file} ]]; then + logger WARN "File '${map_count_file}' doesn't exist!" + return 1 + fi + current_count=$(cat ${map_count_file}) + if [[ $current_count -ge $min_count ]]; then + logger DEBUG "System map count is set to ${current_count}" + return 0 + fi + qdialog "sudo password required to set system vm map count." "OK" "Cancel" + if [[ $? -eq 0 ]]; then + local pass + logger INFO "Prompting user for sudo escalation" + pass=$($steamsafe_zenity --password) + if [[ $? -eq 1 ]]; then + logger WARN "User aborted password prompt" + return 1 + fi + logger DEBUG "Old map count is $current_count" + [[ $current_count -lt $min_count ]] && current_count=$min_count + sudo -S <<< "$pass" sh -c "echo 'vm.max_map_count=${current_count}' > $conf_file" + sudo sysctl -p "$conf_file" + logger DEBUG "Updated map count to $min_count" + else + logger WARN "User aborted map count prompt" + return 1 + fi +} +qdialog(){ + local text="$1" + local ok="$2" + local cancel="$3" + $steamsafe_zenity --question --text="$1" --ok-label="$ok" --cancel-label="$cancel" "${zenity_flags[@]}" +} +pdialog(){ + $steamsafe_zenity --progress --pulsate --auto-close "${zenity_flags[@]}" --text="$1" +} +fdialog(){ + $steamsafe_zenity --warning --ok-label="Exit" --text="$1" "${zenity_flags[@]}" +} +tdialog(){ + $steamsafe_zenity --info --text="$1" "${zenity_flags[@]}" +} +steam_deps(){ + local flatpak + local steam + [[ $(command -v flatpak) ]] && flatpak=$(flatpak list | grep valvesoftware.Steam) + steam=$(command -v steam) + if [[ -z "$steam" ]] && [[ -z "$flatpak" ]]; then + local msg="Found neither Steam nor Flatpak Steam" + raise_error_and_quit "$msg" + exit 1 + elif [[ -n "$steam" ]] && [[ -n "$flatpak" ]]; then + [[ -n $preferred_client ]] && return 0 + if [[ -z $preferred_client ]]; then + preferred_client="steam" + fi + elif [[ -n "$steam" ]]; then + preferred_client="steam" + else + preferred_client="flatpak" + fi + update_config + logger INFO "Preferred client set to '$preferred_client'" +} +migrate_files(){ + if [[ ! -f $config_path/dztuirc.oldapi ]]; then + cp $config_file $config_path/dztuirc.oldapi + logger INFO "Migrated old API file" + fi + [[ ! -f $hist_file ]] && return + rm $hist_file + logger INFO "Wiped old history file" +} +stale_symlinks(){ + local game_dir="$steam_path/steamapps/common/DayZ" + for l in $(find "$game_dir" -xtype l); do + logger DEBUG "Updating stale symlink '$l'" + unlink "$l" + done +} +local_latlon(){ + if [[ -z $(command -v dig) ]]; then + local local_ip=$(curl -Ls "https://ipecho.net/plain") + else + local local_ip=$(dig -4 +short myip.opendns.com @resolver1.opendns.com) + fi + local url="http://ip-api.com/json/$local_ip" + local res=$(curl -Ls "$url" | jq -r '"\(.lat)\n\(.lon)"') + if [[ -z "$res" ]]; then + logger WARN "Failed to get local coordinates" + return 1 + fi + echo "$res" > "$coords_file" +} +lock(){ + [[ ! -f $lock_file ]] && touch $lock_file + local pid=$(cat $lock_file) + ps -p $pid -o pid= >/dev/null 2>&1 + res=$? + if [[ $res -eq 0 ]]; then + local msg="DZGUI already running ($pid)" + raise_error_and_quit "$msg" + elif [[ $pid == $$ ]]; then + : + else + echo $$ > $lock_file + fi +} +get_hash(){ + local file="$1" + md5sum "$1" | awk '{print $1}' +} +fetch_a2s(){ + # this file is currently monolithic + [[ -d $helpers_path/a2s ]] && { logger INFO "A2S helper is current"; return 0; } + local sha=c7590ffa9a6d0c6912e17ceeab15b832a1090640 + local author="yepoleb" + local repo="python-a2s" + local url="https://github.com/$author/$repo/tarball/$sha" + local prefix="${author^}-$repo-${sha:0:7}" + local file="$prefix.tar.gz" + local res=$(get_response_code "$url") + [[ $res -ne 200 ]] && raise_error_and_quit "Remote resource unavailable: '$file'" + curl -Ls "$url" > "$helpers_path/$file" + tar xf "$helpers_path/$file" -C "$helpers_path" "$prefix/a2s" --strip=1 + rm "$helpers_path/$file" + logger INFO "Updated A2S helper to sha '$sha'" +} +fetch_dzq(){ + local sum="9caed1445c45832f4af87736ba3f9637" + local file="$helpers_path/a2s/dayzquery.py" + if [[ -f $file ]] && [[ $(get_hash "$file") == $sum ]]; then + logger INFO "DZQ is current" + return 0 + fi + local sha=3088bbfb147b77bc7b6a9425581b439889ff3f7f + local author="yepoleb" + local repo="dayzquery" + local url="https://raw.githubusercontent.com/$author/$repo/$sha/dayzquery.py" + local res=$(get_response_code "$url") + [[ $res -ne 200 ]] && raise_error_and_quit "Remote resource unavailable: 'dayzquery.py'" + curl -Ls "$url" > "$file" + logger INFO "Updated DZQ to sha '$sha'" +} +fetch_icons(){ + res=( + "16" + "24" + "32" + "48" + "64" + "96" + "128" + "256" + ) + url="$stable_url/images/icons" + for i in "${res[@]}"; do + size="${i}x${i}" + dir="$HOME/.local/share/icons/hicolor/$size/apps" + icon="$dir/$app_name.png" + [[ -f $icon ]] && return + if [[ ! -d $dir ]]; then + mkdir -p "$dir" + fi + logger INFO "Updating $size Freedesktop icon" + curl -Ls "${url}/${i}.png" > "$icon" + done +} +fetch_helpers_by_sum(){ + [[ -f "$config_file" ]] && source "$config_file" + declare -A sums + sums=( + ["ui.py"]="d3ad9153d8599bea0eede9fd3121ee8e" + ["query_v2.py"]="55d339ba02512ac69de288eb3be41067" + ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" + ["funcs"]="6a1c7ce585d9b76e2e75dba9d4295f8d" + ["lan"]="c62e84ddd1457b71a85ad21da662b9af" + ) + local author="aclist" + local repo="dztui" + local realbranch + local file + local sum + local full_path + + # first time setup + if [[ -z $branch ]]; then + realbranch="dzgui" + else + realbranch="$branch" + fi + if [[ $realbranch == "stable" ]]; then + realbranch="dzgui" + fi + + for i in "${!sums[@]}"; do + file="$i" + sum="${sums[$i]}" + full_path="$helpers_path/$file" + + url="${url_prefix}/$realbranch/helpers/$file" + + if [[ -f "$full_path" ]] && [[ $(get_hash "$full_path") == $sum ]]; then + logger INFO "$file is current" + else + logger WARN "File '$full_path' checksum != '$sum'" + local res=$(get_response_code "$url") + [[ $res -ne 200 ]] && raise_error_and_quit "Remote resource unavailable: '$url'" + curl -Ls "$url" > "$full_path" + if [[ ! $? -eq 0 ]]; then + raise_error_and_quit "Failed to fetch the file '$file'. Possible timeout?" + fi + if [[ $(get_hash $full_path) != $sum ]]; then + logger WARN "Downloaded new '$file', but checksum != '$sum'" + fi + logger INFO "Updated '$full_path' to sum '$sum'" + fi + [[ $file == "funcs" ]] && chmod +x "$full_path" + [[ $file == "lan" ]] && chmod +x "$full_path" + done + return 0 +} +fetch_geo_file(){ + # for binary releases + local geo_sum="28ccd75b3e03cf07a7011f22ef0cd69b" + local km_sum="b038fdb8f655798207bd28de3a004706" + local gzip="$helpers_path/ips.csv.gz" + if [[ ! -f $geo_file ]] || [[ $(get_hash $geo_file) != $geo_sum ]]; then + local res=$(get_response_code "$geo_file_url") + [[ $res -ne 200 ]] && raise_error_and_quit "Remote resource unavailable: '$geo_file_url'" + curl -Ls "$geo_file_url" > "$gzip" + #force overwrite + gunzip -f "$gzip" + fi + if [[ ! -f $km_helper ]] || [[ $(get_hash $km_helper) != $km_sum ]]; then + local res=$(get_response_code "$km_helper_url") + [[ $res -ne 200 ]] && raise_error_and_quit "Remote resource unavailable: '$km_helper_url'" + curl -Ls "$km_helper_url" > "$km_helper" + chmod +x "$km_helper" + fi +} +fetch_helpers(){ + fetch_a2s + fetch_dzq + fetch_geo_file + fetch_helpers_by_sum + [[ ! -f $share_path/icon.png ]] && freedesktop_dirs + fetch_icons +} +raise_error_and_quit(){ + local msg="$1" + logger CRITICAL "$msg" + fdialog "$msg" + exit 1 +} +test_steam_api(){ + local key="$1" + [[ -z $key ]] && return 1 + local url="https://api.steampowered.com/IGameServersService/GetServerList/v1/?filter=\appid\221100&limit=10&key=$key" + local code=$(curl -ILs "$url" | grep -E "^HTTP") + [[ ! $code =~ 200 ]] && echo 1 + [[ $code =~ 200 ]] && echo 0 +} +test_bm_api(){ + local bm_api="https://api.battlemetrics.com/servers" + local key="$1" + [[ -z $key ]] && return 1 + local code=$(curl -ILs "$bm_api" \ + -H "Authorization: Bearer "$key"" -G \ + -d "filter[game]=$game" \ + | grep -E "^HTTP") + [[ $code =~ 401 ]] && echo 1 + [[ $code =~ 200 ]] && echo 0 +} +find_default_path(){ + _discover(){ + readarray -t paths < <(find / -type d \( -path "/proc" -o -path "*/timeshift" -o -path \ + "/tmp" -o -path "/usr" -o -path "/boot" -o -path "/proc" -o -path "/root" \ + -o -path "/sys" -o -path "/etc" -o -path "/var" -o -path "/lost+found" \) -prune \ + -o -regex ".*Steam/config/libraryfolders.vdf$" -print 2>/dev/null | sed 's@/config/libraryfolders.vdf@@') + + if [[ "${#paths[@]}" -gt 1 ]]; then + echo "100" + default_steam_path=$(printf "%s\n" "${paths[@]}" | $steamsafe_zenity --list --column="paths" --hide-header --text="Found multiple valid Steam paths. Select your default Steam installation." --title="DZGUI") + [[ -z "$default_steam_path" ]] && exit 1 + else + default_steam_path="${paths[0]}" + fi + } + if [[ $is_steam_deck -gt 0 ]]; then + default_steam_path="$HOME/.local/share/Steam" + logger INFO "Set default Steam path to $default_steam_path" + return 0 + fi + local def_path + local ubuntu_path + local flatpak_path + local debian_path + def_path="$HOME/.local/share/Steam" + ubuntu_path="$HOME/.steam/steam" + debian_path="$HOME/.steam/debian-installation" + flatpak_path="$HOME/.var/app/com.valvesoftware.Steam/data/Steam" + + #ubuntu path must precede default path because + #both exist on ubuntu systems, but only ubuntu path contains library data + for i in "$ubuntu_path" "$def_path" "$debian_path" "$flatpak_path"; do + if [[ -d "$i" ]]; then + default_steam_path="$i" + return 0 + fi + done + + local msg="Let DZGUI auto-discover Steam path (accurate, slower)\nSelect the Steam path manually (less accurate, faster)" + local res=$(echo -e "$msg" | $steamsafe_zenity --list \ + --column="Choice" \ + --title="DZGUI" \ + --hide-header \ + --text="Steam is not installed in a standard location." \ + $sd_res) + + case "$res" in + *auto*) _discover > >(pdialog "Scanning paths") ;; + *manual*) + zenity --info --text="\nSelect the top-level entry point to the location where Steam (not DayZ)\nis installed and before entering the \"steamapps\" path.\n\nE.g., if Steam is installed at:\n\"/media/mydrive/Steam\"\n\nCorrect:\n- \"/media/mydrive/Steam\"\n\nIncorrect:\n- \"/media/mydrive/Steam/steamapps/common/DayZ\"\n- \"/media/mydrive/\"" --width=500 && + file_picker ;; + esac +} +file_picker(){ + local path=$($steamsafe_zenity --file-selection --directory) + logger INFO "File picker path resolved to: $path" + if [[ -z "$path" ]]; then + logger WARN "Steam path selection was empty" + return + else + default_steam_path="$path" + fi +} +find_library_folder(){ + local search_path="$1" + steam_path="$(python3 "$helpers_path/vdf2json.py" -i "$1/steamapps/libraryfolders.vdf" \ + | jq -r '.libraryfolders[]|select(.apps|has("221100")).path')" + if [[ ! $? -eq 0 ]] || [[ -z $steam_path ]]; then + logger WARN "Failed to parse Steam path using '$search_path'" + return 1 + fi + logger INFO "Steam path resolved to: $steam_path" +} +create_config(){ + #if old path is malformed and this function is forcibly called, + #wipe paths from memory before entering the loop to force path rediscovery + unset default_steam_path + unset steam_path + + while true; do + local player_input="$($steamsafe_zenity \ + --forms \ + --add-entry="Player name (required for some servers)" \ + --add-entry="Steam API key" \ + --add-entry="BattleMetrics API key (optional)" \ + --title="DZGUI" \ + --text="DZGUI" $sd_res \ + --separator="@")" + #explicitly setting IFS crashes $steamsafe_zenity in loop + #and mapfile does not support high ascii delimiters, so split fields with newline + readarray -t args < <(<<< "$player_input" sed 's/@/\n/g') + name="${args[0]}" + steam_api="${args[1]}" + api_key="${args[2]}" + + if [[ -z $player_input ]]; then + logger WARN "User aborted setup process" + exit 1 + fi + if [[ -z $steam_api ]]; then + tdialog "Steam API key canot be empty" + continue + elif [[ "${#steam_api}" -lt 32 ]] || [[ $(test_steam_api "$steam_api") -eq 1 ]]; then + tdialog "Invalid Steam API key" + continue + fi + if [[ -n $api_key ]] && [[ $(test_bm_api $api_key) -eq 1 ]]; then + tdialog "Invalid BM API key" + continue + fi + while true; do + if [[ -n $steam_path ]]; then + write_config + [[ $? -eq 0 ]] && logger INFO "Successfully created config file" + return 0 + fi + find_default_path + find_library_folder "$default_steam_path" + if [[ -z $steam_path ]]; then + logger raise_error "Steam path was empty" + zenity --question --text="DayZ not found or not installed at the Steam library given. NOTE: if you recently installed DayZ or moved its location, you MUST restart Steam first for these changes to synch." --ok-label="Choose path manually" --cancel-label="Exit" + if [[ $? -eq 0 ]]; then + logger INFO "User selected file picker" + file_picker + find_library_folder "$default_steam_path" + else + fdialog "Failed to find Steam at the provided location" + exit 1 + fi + else + branch="stable" + update_config + logger INFO "Wrote config to '$config_file'" + return 0 + fi + done + done +} +varcheck(){ + local msg="Config file '$config_file' missing. Start first-time setup now?" + local msg2="The Steam paths set in your config file appear to be invalid. Restart first-time setup now?" + if [[ ! -f $config_file ]]; then + qdialog "$msg" "Yes" "Exit" + if [[ $? -eq 1 ]]; then + logger CRITICAL "Config file missing, but user aborted setup" + exit 1 + fi + create_config + fi + source "$config_file" + local workshop_dir="$steam_path/steamapps/workshop/content/$aid" + local game_dir="$steam_path/steamapps/common/DayZ" + if [[ ! -d $steam_path ]] || [[ ! -d $game_dir ]] || [[ ! $(find $game_dir -type f) ]]; then + logger WARN "DayZ path resolved to '$game_dir'" + logger WARN "Workshop path resolved to '$workshop_dir'" + qdialog "$msg2" "Yes" "Exit" + if [[ $? -eq 1 ]]; then + logger CRITICAL "Malformed Steam path, but user aborted setup" + exit 1 + fi + 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 + logger WARN "DayZ may be scheduling updates" + return 0 + fi +} +is_steam_running(){ + local res=$(ps aux | grep "steamwebhelper" | grep -v grep) + if [[ -z $res ]]; then + logger WARN "Steam may not be running" + tdialog "Is Steam running? For best results, make sure Steam is open in the background." + return 0 + fi +} +get_response_code(){ + local url="$1" + curl -Ls -I -o /dev/null -w "%{http_code}" "$url" +} +test_connection(){ + source "$config_file" + declare -A hr + local res1 + local res2 + local str="No connection could be established to the remote server" + hr=( + ["steampowered.com"]="https://api.steampowered.com/IGameServersService/GetServerList/v1/?key=$steam_api" + ["github.com"]="https://github.com/$author" + ["codeberg.org"]="https://codeberg.org/$author" + ) + # steam API is mandatory, except on initial setup + if [[ -n $steam_api ]]; then + res=$(get_response_code "${hr["steampowered.com"]}") + [[ $res -ne 200 ]] && raise_error_and_quit "$str ("steampowered.com")" + fi + + res=$(get_response_code "${hr["github.com"]}") + if [[ $res -ne 200 ]]; then + logger WARN "Remote host '${hr["github.com"]}' unreachable', trying fallback" + remote_host=cb + logger INFO "Set remote host to '${hr["codeberg.org"]}'" + res=$(get_response_code "${hr["codeberg.org"]}") + [[ $res -ne 200 ]] && raise_error_and_quit "$str (${hr["codeberg.org"]})" + fi + if [[ $remote_host == "cb" ]]; then + url_prefix="https://codeberg.org/$author/$repo/raw/branch" + releases_url="https://codeberg.org/$author/$repo/releases/download/browser" + stable_url="$url_prefix/dzgui" + testing_url="$url_prefix/testing" + km_helper_url="$releases_url/latlon" + geo_file_url="$releases_url/ips.csv.gz" + fi +} +legacy_cols(){ + [[ ! -f $cols_file ]] && return + local has=$(< "$cols_file" jq '.cols|has("Queue")') + [[ $has == "true" ]] && return + < $cols_file jq '.cols += { "Queue": 120 }' > $cols_file.new && + mv $cols_file.new $cols_file +} +stale_mod_signatures(){ + local workshop_dir="$steam_path/steamapps/workshop/content/$aid" + if [[ -d $workshop_dir ]]; then + readarray -t old_mod_ids < <(awk -F, '{print $1}' $versions_file) + for ((i=0; i<${#old_mod_ids[@]}; ++i)); do + if [[ ! -d $workshop_dir/${old_mod_ids[$i]} ]]; then + "$HOME/.local/share/$app_name/helpers/funcs" "align_local" "${old_mod_ids[$i]}" + fi + done + fi + +} +create_new_links(){ + "$HOME/.local/share/$app_name/helpers/funcs" "update_symlinks" +} +initial_setup(){ + setup_dirs + setup_state_files + depcheck + check_pyver + test_gobject + watcher_deps + check_architecture + test_connection +# fetch_helpers > >(pdialog "Checking helper files") + varcheck + source "$config_file" + lock + legacy_vars + legacy_cols + check_version + check_map_count + steam_deps + migrate_files + stale_symlinks + stale_mod_signatures + create_new_links + local_latlon + is_steam_running + is_dzg_downloading + print_config_vals +} +uninstall(){ + _full(){ + for i in "$config_path" "$state_path" "$cache_path" "$share_path"; do + echo "Deleting the path '$i'" + rm -rf "$i" + done + } + _partial(){ + for i in "$cache_path" "$share_path"; do + echo "Deleting the path '$i'" + rm -rf "$i" + done + } + local choice=$($steamsafe_zenity \ + --list \ + --radiolist \ + --column="a" \ + --column="b" \ + --hide-header \ + --text="Choose an uninstall routine below." \ + TRUE "Keep user config files" \ + FALSE "Delete all DZGUI files" \ + --title="DZGUI" + ) + + case "$choice" in + "Keep user config files") + _partial + ;; + "Delete all DZGUI files") + _full + ;; + "") + echo "User aborted uninstall process" + exit 1 + ;; + esac + local self="$(realpath "$0")" + echo "Deleting '$self'" + rm "$self" + echo "Uninstall routine complete" +} +main(){ + local zenv=$(zenity --version 2>/dev/null) + [[ -z $zenv ]] && { echo "Requires zenity >= ${deps[$steamsafe_zenity]}"; exit 1; } + if [[ $1 == "--uninstall" ]] || [[ $1 == "-u" ]]; then + uninstall && + exit 0 + fi + if [[ $1 == "--steam" ]] || [[ $1 == "-s" ]]; then + export STEAM_LAUNCH=1 + fi + + set_im_module + + printf "Initializing setup...\n" + initial_setup + + printf "All OK. Kicking off UI...\n" + python3 "$ui_helper" "--init-ui" "$version" "$is_steam_deck" +} +main "$@" +#TODO: tech debt: cruddy handling for steam forking +[[ $? -eq 1 ]] && pkill -f dzgui.sh From d072c8107e7579312d2e30066fc38ab6b8355afb Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Sun, 9 Feb 2025 19:01:30 +0900 Subject: [PATCH 088/115] chore: drop extraneous file --- dzgui.sh.old | 1024 -------------------------------------------------- 1 file changed, 1024 deletions(-) delete mode 100755 dzgui.sh.old diff --git a/dzgui.sh.old b/dzgui.sh.old deleted file mode 100755 index 65b151b..0000000 --- a/dzgui.sh.old +++ /dev/null @@ -1,1024 +0,0 @@ -#!/usr/bin/env bash -set -o pipefail - -version=5.7.0-beta.5 - -#CONSTANTS -aid=221100 -game="dayz" -app_name="dzgui" -app_name_upper="DZGUI" -workshop="steam://url/CommunityFilePage/" -sd_res="--width=1280 --height=800" -steamsafe_zenity="/usr/bin/zenity" -zenity_flags=("--width=500" "--title=DZGUI") -declare -A deps -deps=([awk]="5.1.1" [curl]="7.80.0" [jq]="1.6" [tr]="9.0" [$steamsafe_zenity]="3.44.1") - -#CONFIG -config_path="$HOME/.config/dztui" -config_file="$config_path/dztuirc" - -#PATHS -state_path="$HOME/.local/state/$app_name" -cache_path="$HOME/.cache/$app_name" -share_path="$HOME/.local/share/$app_name" -script_path="$share_path/dzgui.sh" -helpers_path="$share_path/helpers" - -#LOGS -log_path="$state_path/logs" -debug_log="$log_path/DZGUI_DEBUG.log" - -#STATE FILES -prefix="dzg" -history_file="$state_path/$prefix.history" -versions_file="$state_path/$prefix.versions" -lock_file="$state_path/$prefix.lock" -cols_file="$state_path/$prefix.cols.json" - -#CACHE FILES -coords_file="$cache_path/$prefix.coords" - -#legacy paths -hist_file="$config_path/history" -version_file="$config_path/versions" - -#XDG -freedesktop_path="$HOME/.local/share/applications" - -#HELPERS -ui_helper="$helpers_path/ui.py" -geo_file="$helpers_path/ips.csv" -km_helper="$helpers_path/latlon" -sums_path="$helpers_path/sums.md5" -func_helper="$helpers_path/funcs" - -#REMOTE -remote_host=gh -author="aclist" -repo="dztui" -url_prefix="https://raw.githubusercontent.com/$author/$repo" -stable_url="$url_prefix/dzgui" -testing_url="$url_prefix/testing" -releases_url="https://github.com/$author/$repo/releases/download/browser" -km_helper_url="$releases_url/latlon" -geo_file_url="$releases_url/ips.csv.gz" - - -set_im_module(){ - #TODO: drop pending SteamOS changes - pgrep -a gamescope | grep -q "generate-drm-mode" - if [[ $? -eq 0 ]]; then - GTK_IM_MODULE="" - logger INFO "Detected Steam Deck (Game Mode), unsetting GTK_IM_MODULE" - else - return - fi -} -redact(){ - sed 's@\(/home/\)[^/]*@\1REDACTED@g' -} -logger(){ - local date="$(date "+%F %T,%3N")" - local tag="$1" - local string="$2" - local self="${BASH_SOURCE[0]}" - local caller="${FUNCNAME[1]}" - local line="${BASH_LINENO[0]}" - printf "%s␞%s␞%s::%s()::%s␞%s\n" "$date" "$tag" "$self" "$caller" "$line" "$string" \ - | redact >> "$debug_log" -} -setup_dirs(){ - for dir in "$state_path" "$cache_path" "$share_path" "$helpers_path" "$freedesktop_path" "$config_path" "$log_path"; do - if [[ ! -d $dir ]]; then - mkdir -p "$dir" - fi - done -} -setup_state_files(){ - if [[ -f "$debug_log" ]]; then - rm "$debug_log" && touch $debug_log - logger INFO "Initializing DZGUI version $version" - fi - if [[ -f "$version_file" ]]; then - mv "$version_file" "$versions_file" && - logger INFO "Migrating legacy version file" - fi - # wipe cache files - local path="$cache_path" - if find "$path" -mindepth 1 -maxdepth 1 | read; then - for file in $path/*; do - rm "$file" - done - logger INFO "Wiped cache files" - fi -} -print_config_vals(){ - local keys=( - "branch" - "name" - "fav_server" - "fav_label" - "auto_install" - "steam_path" - "default_steam_path" - "preferred_client" - ) - for i in "${keys[@]}"; do - logger INFO "Read key '$i': '${!i}'" - done - if [[ ${#ip_list[@]} -lt 1 ]]; then - logger WARN "No IPs in saved server list" - fi - -} -test_gobject(){ - python3 -c "import gi" - if [[ ! $? -eq 0 ]]; then - logger CRITICAL "Missing PyGObject" - fdialog "Requires PyGObject (python-gobject)" - exit 1 - fi - logger INFO "Found PyGObject in Python env" -} -update_config(){ - # handling for legacy files - [[ -z $branch ]] && branch="stable" - [[ -f $config_file ]] && mv $config_file ${config_file}.old - write_config > $config_file && return 90 || return 1 - logger INFO "Updated config file at '$config_file'" -} -setup_steam_client(){ - local flatpak - local steam - local steam_cmd - [[ -n $preferred_client ]] && return 0 - [[ $(command -v flatpak) ]] && flatpak=$(flatpak list | grep valvesoftware.Steam) - steam=$(command -v steam) - if [[ -z "$steam" ]] && [[ -z "$flatpak" ]]; then - raise_error_and_quit "Requires Steam or Flatpak Steam" - elif [[ -n "$steam" ]] && [[ -n "$flatpak" ]]; then - preferred_client="steam" - elif [[ -n "$steam" ]]; then - preferred_client="steam" - else - steam_cmd="flatpak run com.valvesoftware.Steam" - fi - update_config && logger INFO "Preferred client set to '$steam_cmd'" || return 1 -} -print_ip_list(){ - [[ ${#ip_list[@]} -eq 0 ]] && return 1 - printf "\t\"%s\"\n" "${ip_list[@]}" -} -write_config(){ -cat <<-END -#Path to DayZ installation -steam_path="$steam_path" - -#Battlemetrics API key -api_key="$api_key" - -#Favorited server IP:PORT array -ip_list=( -$(print_ip_list) -) - -#Favorite server to fast-connect to (limit one) -fav_server="$fav_server" - -#Favorite server label (human readable) -fav_label="$fav_label" - -#Custom player name (optional, required by some servers) -name="$name" - -#Set to 1 to perform dry-run and print launch options -debug="$debug" - -#Toggle stable/testing branch -branch="$branch" - -#Start in fullscreen -fullscreen="$fullscreen" - -#Steam API key -steam_api="$steam_api" - -#Auto-install mods -auto_install="$auto_install" - -#Automod staging directory -staging_dir="$staging_dir" - -#Path to default Steam client -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(){ - for dep in "${!deps[@]}"; do - command -v "$dep" 2>&1>/dev/null - if [[ $? -eq 1 ]]; then - local msg="Requires $dep >= ${deps[$dep]}" - raise_error_and_quit "$msg" - fi - done - local jqmsg="jq must be compiled with support for oniguruma" - local jqtest - jqtest=$(echo '{"test": "foo"}' | jq '.test | test("^foo$")') - [[ $? -ne 0 ]] && raise_error_and_quit "$jqmsg" - logger INFO "Initial dependencies satisfied" -} -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" - raise_error_and_quit "$msg" - fi - logger INFO "Found Python version: $pyver" -} -watcher_deps(){ - if [[ ! $(command -v wmctrl) ]] && [[ ! $(command -v xdotool) ]]; then - raise_error_and_quit "Missing dependency: requires 'wmctrl' or 'xdotool'" - exit 1 - fi - logger INFO "Found DZG Watcher dependencies" -} -format_version_url(){ - [[ -z "$branch" ]] && branch="stable" - case "$branch" in - "stable") - version_url="$stable_url/dzgui.sh" - ;; - "testing") - version_url="$testing_url/dzgui.sh" - ;; - esac - echo "$version_url" -} -write_desktop_file(){ -cat <<-END -[Desktop Entry] -Version=1.0 -Type=Application -Terminal=false -Exec=$share_path/dzgui.sh -Name=$app_name_upper -Comment=$app_name -Icon=$share_path/$app_name -Categories=Game -END -} -freedesktop_dirs(){ - local version_url=$(format_version_url) - local img_url="$stable_url/images" - curl -s "$version_url" > "$script_path" - chmod +x "$script_path" - for i in dzgui grid.png hero.png logo.png icon.png; do - curl -s "$img_url/$i" > "$share_path/$i" - done - write_desktop_file > "$freedesktop_path/$app_name.desktop" - [[ $is_steam_deck -eq 0 ]] && return - write_desktop_file > "$HOME/Desktop/$app_name.desktop" -} -legacy_vars(){ - local suffix="fav" - local hr_msg="Config file contains values based on old API. Please update and re-run setup." - local msg="Config file contains legacy API value: '$suffix'" - if [[ -n $fav ]]; then - logger WARN "$msg" - fdialog "$hr_msg" - exit 1 - fi - if [[ -n $whitelist ]]; then - suffix="whitelist" - logger WARN "$msg" - fdialog "$hr_msg" - exit 1 - fi -} -merge_config(){ - [[ -z $staging_dir ]] && staging_dir="/tmp" - update_config - tdialog "Wrote new config format to \n${config_file}\nIf errors occur, you can restore the file:\n${config_file}.old" -} -check_unmerged(){ - if [[ -f ${config_path}.unmerged ]]; then - merge_config - rm ${config_path}.unmerged - fi -} -check_version(){ - local version_url=$(format_version_url) - local upstream=$(curl -Ls "$version_url" | awk -F= '/^version=/ {print $2}') - local res=$(get_response_code "$version_url") - [[ $res -ne 200 ]] && raise_error_and_quit "Remote resource unavailable: '$version_url'" - logger INFO "Local branch: '$branch', local version: $version" - if [[ $branch == "stable" ]]; then - version_url="$stable_url/dzgui.sh" - elif [[ $branch == "testing" ]]; then - version_url="$testing_url/dzgui.sh" - fi - [[ ! -f "$freedesktop_path/$app_name.desktop" ]] && freedesktop_dirs - if [[ $version == $upstream ]]; then - logger INFO "Local version is same as upstream" - check_unmerged - else - logger WARN "Local and remote version mismatch: $version != $upstream" - prompt_dl - fi -} -download_new_version(){ - local version_url="$(format_version_url)" - logger INFO "Version URL is '$version_url'" - logger INFO "$src_path" - mv "$src_path" "$src_path.old" - curl -L "$version_url" > "$src_path" 2>$debug_log - rc=$? - if [[ $rc -eq 0 ]]; then - dl_changelog - logger INFO "Wrote new version to $src_path" - chmod +x "$src_path" - touch "${config_path}.unmerged" - fdialog "DZGUI $upstream successfully downloaded. To use the new version, select Exit and restart." - logger INFO "User exited after version upgrade" - exit 0 - else - mv "$src_path.old" "$src_path" - logger WARN "curl failed to fetch new version. Rolling back" - fdialog "Failed to download the new version. Restoring old version" - return 1 - fi -} -prompt_dl(){ - _text(){ - cat <<-EOF - Version conflict. - - Your branch: $branch - Your version: $version - Upstream version: $upstream - - Version updates introduce important bug fixes and are encouraged. Attempt to download the latest version? - EOF - } - qdialog "$(_text)" "Yes" "No" - if [[ $? -eq 1 ]]; then - return 0 - else - download_new_version - fi -} -dl_changelog(){ - local mdbranch - local md - [[ $branch == "stable" ]] && mdbranch="dzgui" - [[ $branch == "testing" ]] && mdbranch="testing" - local md="$url_prefix/${mdbranch}/$file" - curl -Ls "$md" > "$state_path/CHANGELOG.md" -} -test_display_mode(){ - pgrep -a gamescope | grep -q "generate-drm-mode" - if [[ $? -eq 0 ]]; then - echo gm - else - echo dm - fi -} -check_architecture(){ - local cpu=$(< /proc/cpuinfo awk -F": " '/AMD Custom APU [0-9]{4}$/ {print $2; exit}') - read -a APU_MODEL <<< "$cpu" - if [[ ${APU_MODEL[3]} != "0932" ]] && [[ ${APU_MODEL[3]} != "0405" ]]; then - is_steam_deck=0 - logger INFO "Setting architecture to 'desktop'" - return - fi - - if [[ $(test_display_mode) == "gm" ]]; then - is_steam_deck=2 - else - is_steam_deck=1 - fi - logger INFO "Setting architecture to 'Steam Deck'" -} -check_map_count(){ - [[ $is_steam_deck -gt 0 ]] && return 0 - local map_count_file="/proc/sys/vm/max_map_count" - local min_count=1048576 - local conf_file="/etc/sysctl.d/dayz.conf" - local current_count - if [[ ! -f ${map_count_file} ]]; then - logger WARN "File '${map_count_file}' doesn't exist!" - return 1 - fi - current_count=$(cat ${map_count_file}) - if [[ $current_count -ge $min_count ]]; then - logger DEBUG "System map count is set to ${current_count}" - return 0 - fi - qdialog "sudo password required to set system vm map count." "OK" "Cancel" - if [[ $? -eq 0 ]]; then - local pass - logger INFO "Prompting user for sudo escalation" - pass=$($steamsafe_zenity --password) - if [[ $? -eq 1 ]]; then - logger WARN "User aborted password prompt" - return 1 - fi - logger DEBUG "Old map count is $current_count" - [[ $current_count -lt $min_count ]] && current_count=$min_count - sudo -S <<< "$pass" sh -c "echo 'vm.max_map_count=${current_count}' > $conf_file" - sudo sysctl -p "$conf_file" - logger DEBUG "Updated map count to $min_count" - else - logger WARN "User aborted map count prompt" - return 1 - fi -} -qdialog(){ - local text="$1" - local ok="$2" - local cancel="$3" - $steamsafe_zenity --question --text="$1" --ok-label="$ok" --cancel-label="$cancel" "${zenity_flags[@]}" -} -pdialog(){ - $steamsafe_zenity --progress --pulsate --auto-close "${zenity_flags[@]}" --text="$1" -} -fdialog(){ - $steamsafe_zenity --warning --ok-label="Exit" --text="$1" "${zenity_flags[@]}" -} -tdialog(){ - $steamsafe_zenity --info --text="$1" "${zenity_flags[@]}" -} -steam_deps(){ - local flatpak - local steam - [[ $(command -v flatpak) ]] && flatpak=$(flatpak list | grep valvesoftware.Steam) - steam=$(command -v steam) - if [[ -z "$steam" ]] && [[ -z "$flatpak" ]]; then - local msg="Found neither Steam nor Flatpak Steam" - raise_error_and_quit "$msg" - exit 1 - elif [[ -n "$steam" ]] && [[ -n "$flatpak" ]]; then - [[ -n $preferred_client ]] && return 0 - if [[ -z $preferred_client ]]; then - preferred_client="steam" - fi - elif [[ -n "$steam" ]]; then - preferred_client="steam" - else - preferred_client="flatpak" - fi - update_config - logger INFO "Preferred client set to '$preferred_client'" -} -migrate_files(){ - if [[ ! -f $config_path/dztuirc.oldapi ]]; then - cp $config_file $config_path/dztuirc.oldapi - logger INFO "Migrated old API file" - fi - [[ ! -f $hist_file ]] && return - rm $hist_file - logger INFO "Wiped old history file" -} -stale_symlinks(){ - local game_dir="$steam_path/steamapps/common/DayZ" - for l in $(find "$game_dir" -xtype l); do - logger DEBUG "Updating stale symlink '$l'" - unlink "$l" - done -} -local_latlon(){ - if [[ -z $(command -v dig) ]]; then - local local_ip=$(curl -Ls "https://ipecho.net/plain") - else - local local_ip=$(dig -4 +short myip.opendns.com @resolver1.opendns.com) - fi - local url="http://ip-api.com/json/$local_ip" - local res=$(curl -Ls "$url" | jq -r '"\(.lat)\n\(.lon)"') - if [[ -z "$res" ]]; then - logger WARN "Failed to get local coordinates" - return 1 - fi - echo "$res" > "$coords_file" -} -lock(){ - [[ ! -f $lock_file ]] && touch $lock_file - local pid=$(cat $lock_file) - ps -p $pid -o pid= >/dev/null 2>&1 - res=$? - if [[ $res -eq 0 ]]; then - local msg="DZGUI already running ($pid)" - raise_error_and_quit "$msg" - elif [[ $pid == $$ ]]; then - : - else - echo $$ > $lock_file - fi -} -get_hash(){ - local file="$1" - md5sum "$1" | awk '{print $1}' -} -fetch_a2s(){ - # this file is currently monolithic - [[ -d $helpers_path/a2s ]] && { logger INFO "A2S helper is current"; return 0; } - local sha=c7590ffa9a6d0c6912e17ceeab15b832a1090640 - local author="yepoleb" - local repo="python-a2s" - local url="https://github.com/$author/$repo/tarball/$sha" - local prefix="${author^}-$repo-${sha:0:7}" - local file="$prefix.tar.gz" - local res=$(get_response_code "$url") - [[ $res -ne 200 ]] && raise_error_and_quit "Remote resource unavailable: '$file'" - curl -Ls "$url" > "$helpers_path/$file" - tar xf "$helpers_path/$file" -C "$helpers_path" "$prefix/a2s" --strip=1 - rm "$helpers_path/$file" - logger INFO "Updated A2S helper to sha '$sha'" -} -fetch_dzq(){ - local sum="9caed1445c45832f4af87736ba3f9637" - local file="$helpers_path/a2s/dayzquery.py" - if [[ -f $file ]] && [[ $(get_hash "$file") == $sum ]]; then - logger INFO "DZQ is current" - return 0 - fi - local sha=3088bbfb147b77bc7b6a9425581b439889ff3f7f - local author="yepoleb" - local repo="dayzquery" - local url="https://raw.githubusercontent.com/$author/$repo/$sha/dayzquery.py" - local res=$(get_response_code "$url") - [[ $res -ne 200 ]] && raise_error_and_quit "Remote resource unavailable: 'dayzquery.py'" - curl -Ls "$url" > "$file" - logger INFO "Updated DZQ to sha '$sha'" -} -fetch_icons(){ - res=( - "16" - "24" - "32" - "48" - "64" - "96" - "128" - "256" - ) - url="$stable_url/images/icons" - for i in "${res[@]}"; do - size="${i}x${i}" - dir="$HOME/.local/share/icons/hicolor/$size/apps" - icon="$dir/$app_name.png" - [[ -f $icon ]] && return - if [[ ! -d $dir ]]; then - mkdir -p "$dir" - fi - logger INFO "Updating $size Freedesktop icon" - curl -Ls "${url}/${i}.png" > "$icon" - done -} -fetch_helpers_by_sum(){ - [[ -f "$config_file" ]] && source "$config_file" - declare -A sums - sums=( - ["ui.py"]="d3ad9153d8599bea0eede9fd3121ee8e" - ["query_v2.py"]="55d339ba02512ac69de288eb3be41067" - ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" - ["funcs"]="6a1c7ce585d9b76e2e75dba9d4295f8d" - ["lan"]="c62e84ddd1457b71a85ad21da662b9af" - ) - local author="aclist" - local repo="dztui" - local realbranch - local file - local sum - local full_path - - # first time setup - if [[ -z $branch ]]; then - realbranch="dzgui" - else - realbranch="$branch" - fi - if [[ $realbranch == "stable" ]]; then - realbranch="dzgui" - fi - - for i in "${!sums[@]}"; do - file="$i" - sum="${sums[$i]}" - full_path="$helpers_path/$file" - - url="${url_prefix}/$realbranch/helpers/$file" - - if [[ -f "$full_path" ]] && [[ $(get_hash "$full_path") == $sum ]]; then - logger INFO "$file is current" - else - logger WARN "File '$full_path' checksum != '$sum'" - local res=$(get_response_code "$url") - [[ $res -ne 200 ]] && raise_error_and_quit "Remote resource unavailable: '$url'" - curl -Ls "$url" > "$full_path" - if [[ ! $? -eq 0 ]]; then - raise_error_and_quit "Failed to fetch the file '$file'. Possible timeout?" - fi - if [[ $(get_hash $full_path) != $sum ]]; then - logger WARN "Downloaded new '$file', but checksum != '$sum'" - fi - logger INFO "Updated '$full_path' to sum '$sum'" - fi - [[ $file == "funcs" ]] && chmod +x "$full_path" - [[ $file == "lan" ]] && chmod +x "$full_path" - done - return 0 -} -fetch_geo_file(){ - # for binary releases - local geo_sum="28ccd75b3e03cf07a7011f22ef0cd69b" - local km_sum="b038fdb8f655798207bd28de3a004706" - local gzip="$helpers_path/ips.csv.gz" - if [[ ! -f $geo_file ]] || [[ $(get_hash $geo_file) != $geo_sum ]]; then - local res=$(get_response_code "$geo_file_url") - [[ $res -ne 200 ]] && raise_error_and_quit "Remote resource unavailable: '$geo_file_url'" - curl -Ls "$geo_file_url" > "$gzip" - #force overwrite - gunzip -f "$gzip" - fi - if [[ ! -f $km_helper ]] || [[ $(get_hash $km_helper) != $km_sum ]]; then - local res=$(get_response_code "$km_helper_url") - [[ $res -ne 200 ]] && raise_error_and_quit "Remote resource unavailable: '$km_helper_url'" - curl -Ls "$km_helper_url" > "$km_helper" - chmod +x "$km_helper" - fi -} -fetch_helpers(){ - fetch_a2s - fetch_dzq - fetch_geo_file - fetch_helpers_by_sum - [[ ! -f $share_path/icon.png ]] && freedesktop_dirs - fetch_icons -} -raise_error_and_quit(){ - local msg="$1" - logger CRITICAL "$msg" - fdialog "$msg" - exit 1 -} -test_steam_api(){ - local key="$1" - [[ -z $key ]] && return 1 - local url="https://api.steampowered.com/IGameServersService/GetServerList/v1/?filter=\appid\221100&limit=10&key=$key" - local code=$(curl -ILs "$url" | grep -E "^HTTP") - [[ ! $code =~ 200 ]] && echo 1 - [[ $code =~ 200 ]] && echo 0 -} -test_bm_api(){ - local bm_api="https://api.battlemetrics.com/servers" - local key="$1" - [[ -z $key ]] && return 1 - local code=$(curl -ILs "$bm_api" \ - -H "Authorization: Bearer "$key"" -G \ - -d "filter[game]=$game" \ - | grep -E "^HTTP") - [[ $code =~ 401 ]] && echo 1 - [[ $code =~ 200 ]] && echo 0 -} -find_default_path(){ - _discover(){ - readarray -t paths < <(find / -type d \( -path "/proc" -o -path "*/timeshift" -o -path \ - "/tmp" -o -path "/usr" -o -path "/boot" -o -path "/proc" -o -path "/root" \ - -o -path "/sys" -o -path "/etc" -o -path "/var" -o -path "/lost+found" \) -prune \ - -o -regex ".*Steam/config/libraryfolders.vdf$" -print 2>/dev/null | sed 's@/config/libraryfolders.vdf@@') - - if [[ "${#paths[@]}" -gt 1 ]]; then - echo "100" - default_steam_path=$(printf "%s\n" "${paths[@]}" | $steamsafe_zenity --list --column="paths" --hide-header --text="Found multiple valid Steam paths. Select your default Steam installation." --title="DZGUI") - [[ -z "$default_steam_path" ]] && exit 1 - else - default_steam_path="${paths[0]}" - fi - } - if [[ $is_steam_deck -gt 0 ]]; then - default_steam_path="$HOME/.local/share/Steam" - logger INFO "Set default Steam path to $default_steam_path" - return 0 - fi - local def_path - local ubuntu_path - local flatpak_path - local debian_path - def_path="$HOME/.local/share/Steam" - ubuntu_path="$HOME/.steam/steam" - debian_path="$HOME/.steam/debian-installation" - flatpak_path="$HOME/.var/app/com.valvesoftware.Steam/data/Steam" - - #ubuntu path must precede default path because - #both exist on ubuntu systems, but only ubuntu path contains library data - for i in "$ubuntu_path" "$def_path" "$debian_path" "$flatpak_path"; do - if [[ -d "$i" ]]; then - default_steam_path="$i" - return 0 - fi - done - - local msg="Let DZGUI auto-discover Steam path (accurate, slower)\nSelect the Steam path manually (less accurate, faster)" - local res=$(echo -e "$msg" | $steamsafe_zenity --list \ - --column="Choice" \ - --title="DZGUI" \ - --hide-header \ - --text="Steam is not installed in a standard location." \ - $sd_res) - - case "$res" in - *auto*) _discover > >(pdialog "Scanning paths") ;; - *manual*) - zenity --info --text="\nSelect the top-level entry point to the location where Steam (not DayZ)\nis installed and before entering the \"steamapps\" path.\n\nE.g., if Steam is installed at:\n\"/media/mydrive/Steam\"\n\nCorrect:\n- \"/media/mydrive/Steam\"\n\nIncorrect:\n- \"/media/mydrive/Steam/steamapps/common/DayZ\"\n- \"/media/mydrive/\"" --width=500 && - file_picker ;; - esac -} -file_picker(){ - local path=$($steamsafe_zenity --file-selection --directory) - logger INFO "File picker path resolved to: $path" - if [[ -z "$path" ]]; then - logger WARN "Steam path selection was empty" - return - else - default_steam_path="$path" - fi -} -find_library_folder(){ - local search_path="$1" - steam_path="$(python3 "$helpers_path/vdf2json.py" -i "$1/steamapps/libraryfolders.vdf" \ - | jq -r '.libraryfolders[]|select(.apps|has("221100")).path')" - if [[ ! $? -eq 0 ]] || [[ -z $steam_path ]]; then - logger WARN "Failed to parse Steam path using '$search_path'" - return 1 - fi - logger INFO "Steam path resolved to: $steam_path" -} -create_config(){ - #if old path is malformed and this function is forcibly called, - #wipe paths from memory before entering the loop to force path rediscovery - unset default_steam_path - unset steam_path - - while true; do - local player_input="$($steamsafe_zenity \ - --forms \ - --add-entry="Player name (required for some servers)" \ - --add-entry="Steam API key" \ - --add-entry="BattleMetrics API key (optional)" \ - --title="DZGUI" \ - --text="DZGUI" $sd_res \ - --separator="@")" - #explicitly setting IFS crashes $steamsafe_zenity in loop - #and mapfile does not support high ascii delimiters, so split fields with newline - readarray -t args < <(<<< "$player_input" sed 's/@/\n/g') - name="${args[0]}" - steam_api="${args[1]}" - api_key="${args[2]}" - - if [[ -z $player_input ]]; then - logger WARN "User aborted setup process" - exit 1 - fi - if [[ -z $steam_api ]]; then - tdialog "Steam API key canot be empty" - continue - elif [[ "${#steam_api}" -lt 32 ]] || [[ $(test_steam_api "$steam_api") -eq 1 ]]; then - tdialog "Invalid Steam API key" - continue - fi - if [[ -n $api_key ]] && [[ $(test_bm_api $api_key) -eq 1 ]]; then - tdialog "Invalid BM API key" - continue - fi - while true; do - if [[ -n $steam_path ]]; then - write_config - [[ $? -eq 0 ]] && logger INFO "Successfully created config file" - return 0 - fi - find_default_path - find_library_folder "$default_steam_path" - if [[ -z $steam_path ]]; then - logger raise_error "Steam path was empty" - zenity --question --text="DayZ not found or not installed at the Steam library given. NOTE: if you recently installed DayZ or moved its location, you MUST restart Steam first for these changes to synch." --ok-label="Choose path manually" --cancel-label="Exit" - if [[ $? -eq 0 ]]; then - logger INFO "User selected file picker" - file_picker - find_library_folder "$default_steam_path" - else - fdialog "Failed to find Steam at the provided location" - exit 1 - fi - else - branch="stable" - update_config - logger INFO "Wrote config to '$config_file'" - return 0 - fi - done - done -} -varcheck(){ - local msg="Config file '$config_file' missing. Start first-time setup now?" - local msg2="The Steam paths set in your config file appear to be invalid. Restart first-time setup now?" - if [[ ! -f $config_file ]]; then - qdialog "$msg" "Yes" "Exit" - if [[ $? -eq 1 ]]; then - logger CRITICAL "Config file missing, but user aborted setup" - exit 1 - fi - create_config - fi - source "$config_file" - local workshop_dir="$steam_path/steamapps/workshop/content/$aid" - local game_dir="$steam_path/steamapps/common/DayZ" - if [[ ! -d $steam_path ]] || [[ ! -d $game_dir ]] || [[ ! $(find $game_dir -type f) ]]; then - logger WARN "DayZ path resolved to '$game_dir'" - logger WARN "Workshop path resolved to '$workshop_dir'" - qdialog "$msg2" "Yes" "Exit" - if [[ $? -eq 1 ]]; then - logger CRITICAL "Malformed Steam path, but user aborted setup" - exit 1 - fi - 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 - logger WARN "DayZ may be scheduling updates" - return 0 - fi -} -is_steam_running(){ - local res=$(ps aux | grep "steamwebhelper" | grep -v grep) - if [[ -z $res ]]; then - logger WARN "Steam may not be running" - tdialog "Is Steam running? For best results, make sure Steam is open in the background." - return 0 - fi -} -get_response_code(){ - local url="$1" - curl -Ls -I -o /dev/null -w "%{http_code}" "$url" -} -test_connection(){ - source "$config_file" - declare -A hr - local res1 - local res2 - local str="No connection could be established to the remote server" - hr=( - ["steampowered.com"]="https://api.steampowered.com/IGameServersService/GetServerList/v1/?key=$steam_api" - ["github.com"]="https://github.com/$author" - ["codeberg.org"]="https://codeberg.org/$author" - ) - # steam API is mandatory, except on initial setup - if [[ -n $steam_api ]]; then - res=$(get_response_code "${hr["steampowered.com"]}") - [[ $res -ne 200 ]] && raise_error_and_quit "$str ("steampowered.com")" - fi - - res=$(get_response_code "${hr["github.com"]}") - if [[ $res -ne 200 ]]; then - logger WARN "Remote host '${hr["github.com"]}' unreachable', trying fallback" - remote_host=cb - logger INFO "Set remote host to '${hr["codeberg.org"]}'" - res=$(get_response_code "${hr["codeberg.org"]}") - [[ $res -ne 200 ]] && raise_error_and_quit "$str (${hr["codeberg.org"]})" - fi - if [[ $remote_host == "cb" ]]; then - url_prefix="https://codeberg.org/$author/$repo/raw/branch" - releases_url="https://codeberg.org/$author/$repo/releases/download/browser" - stable_url="$url_prefix/dzgui" - testing_url="$url_prefix/testing" - km_helper_url="$releases_url/latlon" - geo_file_url="$releases_url/ips.csv.gz" - fi -} -legacy_cols(){ - [[ ! -f $cols_file ]] && return - local has=$(< "$cols_file" jq '.cols|has("Queue")') - [[ $has == "true" ]] && return - < $cols_file jq '.cols += { "Queue": 120 }' > $cols_file.new && - mv $cols_file.new $cols_file -} -stale_mod_signatures(){ - local workshop_dir="$steam_path/steamapps/workshop/content/$aid" - if [[ -d $workshop_dir ]]; then - readarray -t old_mod_ids < <(awk -F, '{print $1}' $versions_file) - for ((i=0; i<${#old_mod_ids[@]}; ++i)); do - if [[ ! -d $workshop_dir/${old_mod_ids[$i]} ]]; then - "$HOME/.local/share/$app_name/helpers/funcs" "align_local" "${old_mod_ids[$i]}" - fi - done - fi - -} -create_new_links(){ - "$HOME/.local/share/$app_name/helpers/funcs" "update_symlinks" -} -initial_setup(){ - setup_dirs - setup_state_files - depcheck - check_pyver - test_gobject - watcher_deps - check_architecture - test_connection -# fetch_helpers > >(pdialog "Checking helper files") - varcheck - source "$config_file" - lock - legacy_vars - legacy_cols - check_version - check_map_count - steam_deps - migrate_files - stale_symlinks - stale_mod_signatures - create_new_links - local_latlon - is_steam_running - is_dzg_downloading - print_config_vals -} -uninstall(){ - _full(){ - for i in "$config_path" "$state_path" "$cache_path" "$share_path"; do - echo "Deleting the path '$i'" - rm -rf "$i" - done - } - _partial(){ - for i in "$cache_path" "$share_path"; do - echo "Deleting the path '$i'" - rm -rf "$i" - done - } - local choice=$($steamsafe_zenity \ - --list \ - --radiolist \ - --column="a" \ - --column="b" \ - --hide-header \ - --text="Choose an uninstall routine below." \ - TRUE "Keep user config files" \ - FALSE "Delete all DZGUI files" \ - --title="DZGUI" - ) - - case "$choice" in - "Keep user config files") - _partial - ;; - "Delete all DZGUI files") - _full - ;; - "") - echo "User aborted uninstall process" - exit 1 - ;; - esac - local self="$(realpath "$0")" - echo "Deleting '$self'" - rm "$self" - echo "Uninstall routine complete" -} -main(){ - local zenv=$(zenity --version 2>/dev/null) - [[ -z $zenv ]] && { echo "Requires zenity >= ${deps[$steamsafe_zenity]}"; exit 1; } - if [[ $1 == "--uninstall" ]] || [[ $1 == "-u" ]]; then - uninstall && - exit 0 - fi - if [[ $1 == "--steam" ]] || [[ $1 == "-s" ]]; then - export STEAM_LAUNCH=1 - fi - - set_im_module - - printf "Initializing setup...\n" - initial_setup - - printf "All OK. Kicking off UI...\n" - python3 "$ui_helper" "--init-ui" "$version" "$is_steam_deck" -} -main "$@" -#TODO: tech debt: cruddy handling for steam forking -[[ $? -eq 1 ]] && pkill -f dzgui.sh From f3b3f79bfb77af0d963a75fa3a068e035ea0354d Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Sun, 9 Feb 2025 19:53:25 +0900 Subject: [PATCH 089/115] chore: back up templates from main --- .github/ISSUE_TEMPLATE/bug_report.yml | 53 +++++++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 1 + .github/ISSUE_TEMPLATE/feature.yml | 47 ++++++++++++++++++++++++ .github/ISSUE_TEMPLATE/trouble.yml | 46 +++++++++++++++++++++++ 4 files changed, 147 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature.yml create mode 100644 .github/ISSUE_TEMPLATE/trouble.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..0ad8d65 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,53 @@ +name: Bug report +description: Submit bugs that affect functionality here +title: "[BUG] Your title here" +labels: ["bug"] +assignees: + - aclist +body: + - type: checkboxes + id: kb + attributes: + label: Did you check if this issue already exists? + options: + - label: I have checked the [Knowledge Base](https://aclist.github.io/dzgui/kb.html) and searched through [past issues](https://github.com/aclist/dztui/issues?q=is%3Aissue+is%3Aclosed) and did not find my issue there. + required: true + - type: dropdown + id: device + attributes: + label: Device type + options: + - Desktop PC + - Steam Deck + default: 0 + validations: + required: true + - type: input + id: version + attributes: + label: DZGUI version + validations: + required: true + placeholder: "5.6.0" + - type: input + id: distro + attributes: + label: Linux distribution + validations: + required: true + placeholder: "Arch Linux" + - type: textarea + id: what-happened + attributes: + label: Describe the bug + description: What did you expect to happen? + placeholder: "E.g., When doing X, Y occurred. Include as much detail as possible." + validations: + required: true + - type: textarea + id: logs + attributes: + label: Additional log output + description: Attach the file `$HOME/.local/state/dzgui/DZGUI_DEBUG.log` by clicking this area to highlight it and then dragging the file in. + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..3ba13e0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml new file mode 100644 index 0000000..3b350f2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -0,0 +1,47 @@ +name: Feature suggestion +description: Submit requests for new features here +title: "[FEAT] Your title here" +labels: ["enhancement"] +assignees: + - aclist +body: + - type: dropdown + id: device + attributes: + label: Device type + options: + - Desktop PC + - Steam Deck + default: 0 + validations: + required: true + - type: input + id: version + attributes: + label: DZGUI version + validations: + required: true + placeholder: "5.6.0" + - type: input + id: distro + attributes: + label: Linux distribution + validations: + required: true + placeholder: "Arch Linux" + - type: textarea + id: what-happened + attributes: + label: Describe the feature + description: A clear and detailed description + placeholder: "E.g., Add a dialog to the Options menu that automatically lets the user do Y" + validations: + required: true + - type: textarea + id: why + attributes: + label: Describe the benefit + description: How will this feature benefit large numbers of users? + placeholder: "E.g., Currently, users have to manually do X to achieve Y. Implementing this feature would achieve A, B, and C." + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/trouble.yml b/.github/ISSUE_TEMPLATE/trouble.yml new file mode 100644 index 0000000..1c25e69 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/trouble.yml @@ -0,0 +1,46 @@ +name: Troubleshooting +description: Submit user error/troubleshooting questions here +title: "[HELP] Your title here" +labels: ["troubleshooting"] +assignees: + - aclist +body: + - type: dropdown + id: device + attributes: + label: Device type + options: + - Desktop PC + - Steam Deck + default: 0 + validations: + required: true + - type: input + id: version + attributes: + label: DZGUI version + validations: + required: true + placeholder: "5.6.0" + - type: input + id: distro + attributes: + label: Linux distribution + validations: + required: true + placeholder: "Arch Linux" + - type: textarea + id: what-happened + attributes: + label: Describe the issue + description: A detailed description. What did you expect to happen? + placeholder: "Include as much detail as possible and state the steps leading up to the problem. E.g., First I do this, then I do this, then this happens." + validations: + required: true + - type: textarea + id: logs + attributes: + label: Additional log output + description: Attach the file `$HOME/.local/state/dzgui/DZGUI_DEBUG.log` by clicking this area to highlight it and then dragging the file in. + validations: + required: false From 66e114a400f656ae6e518045f461453554989c09 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 10 Feb 2025 17:54:45 +0900 Subject: [PATCH 090/115] chore: backports --- CHANGELOG.md | 6 +++++- README.md | 2 +- dzgui.sh | 13 +++++-------- helpers/funcs | 7 +++---- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 676d7f1..55911b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog -## [5.6.6] 2024-02-09 +## [5.6.4] 2024-02-10 +### Changed +- Drop launch flag and check for invocation through Steam automatically + +## [5.6.3] 2024-02-09 ### Changed - Update IP database records for 2025-02 diff --git a/README.md b/README.md index 553e72e..607f7dd 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ This overcomes certain limitations in the Linux client and helps prepare the gam Refer to the documentation for installation and setup instructions: -- [GitHub](https://aclist.github.io/dzgui/dzgui.html) +- [GitHub](https://aclist.github.io/dzgui/index.html) - [Mirror (Codeberg)](https://aclist.codeberg.page) diff --git a/dzgui.sh b/dzgui.sh index ae93854..a20203b 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.6.3 +version=5.6.4 #CONSTANTS aid=221100 @@ -590,7 +590,7 @@ fetch_helpers_by_sum(){ ["ui.py"]="5a876efacf208d12b5fe761996425412" ["query_v2.py"]="55d339ba02512ac69de288eb3be41067" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" - ["funcs"]="417bd5eaffbefc905a843985c691dc64" + ["funcs"]="3703739856936a5fa11d92a0d2964773" ["lan"]="c62e84ddd1457b71a85ad21da662b9af" ) local author="aclist" @@ -922,14 +922,14 @@ stale_mod_signatures(){ readarray -t old_mod_ids < <(awk -F, '{print $1}' $versions_file) for ((i=0; i<${#old_mod_ids[@]}; ++i)); do if [[ ! -d $workshop_dir/${old_mod_ids[$i]} ]]; then - "$HOME/.local/share/$app_name/helpers/funcs" "align_local" "${old_mod_ids[$i]}" + "$func_helper" "align_local" "${old_mod_ids[$i]}" fi done fi } create_new_links(){ - "$HOME/.local/share/$app_name/helpers/funcs" "update_symlinks" + "$func_helper" "update_symlinks" } initial_setup(){ setup_dirs @@ -1007,10 +1007,7 @@ main(){ uninstall && exit 0 fi - if [[ $1 == "--steam" ]] || [[ $1 == "-s" ]]; then - export STEAM_LAUNCH=1 - fi - + set_im_module printf "Initializing setup...\n" diff --git a/helpers/funcs b/helpers/funcs index c747c82..7e51b3d 100755 --- a/helpers/funcs +++ b/helpers/funcs @@ -59,7 +59,6 @@ geo_file="$helpers_path/ips.csv" km_helper="$helpers_path/latlon" sums_path="$helpers_path/sums.md5" query_helper="$helpers_path/query_v2.py" -func_helper="$helpers_path/funcs" lan_helper="$helpers_path/lan" #STEAM PATHS @@ -1271,7 +1270,7 @@ symlinks(){ link="@$encoded_id" mod="${arr[$i]}" logger INFO "Creating link '$game_dir/$link' for '$workshop_dir/$mod'" - [[ $STEAM_LAUNCH -eq 1 ]] && echo "# Creating mod link $((i+1))/${#arr[@]}" + [[ -n $STEAMSCRIPT ]] && echo "# Creating mod link $((i+1))/${#arr[@]}" ln -s "$workshop_dir/$mod" "$game_dir/$link" done } @@ -1286,7 +1285,7 @@ symlinks(){ if [[ ${#links[@]} -eq 0 ]]; then logger INFO "No symlinks present in '$game_dir', creating them" - if [[ $STEAM_LAUNCH -eq 1 ]]; then + if [[ -n $STEAMSCRIPT ]]; then _create_links "${mods[@]}" > >(_pulse) else _create_links "${mods[@]}" @@ -1304,7 +1303,7 @@ symlinks(){ # update missing targets logger INFO "Found ${#hits[@]} unlinked mods" - if [[ $STEAM_LAUNCH -eq 1 ]]; then + if [[ -n $STEAMSCRIPT ]]; then _create_links "${hits[@]}" > >(_pulse) else _create_links "${hits[@]}" From 6dc9a719eefb7a47c36e9c03c5277a5691fb6eb4 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Wed, 5 Mar 2025 11:13:20 +0900 Subject: [PATCH 091/115] fix: split up batch queries --- CHANGELOG.md | 4 ++++ dzgui.sh | 4 ++-- helpers/funcs | 9 +++++++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 55911b7..028099d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [5.6.5] 2024-03-04 +## Fixed +- Livonia server results being dropped from batch queries + ## [5.6.4] 2024-02-10 ### Changed - Drop launch flag and check for invocation through Steam automatically diff --git a/dzgui.sh b/dzgui.sh index a20203b..fcd36c1 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.6.4 +version=5.6.5 #CONSTANTS aid=221100 @@ -590,7 +590,7 @@ fetch_helpers_by_sum(){ ["ui.py"]="5a876efacf208d12b5fe761996425412" ["query_v2.py"]="55d339ba02512ac69de288eb3be41067" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" - ["funcs"]="3703739856936a5fa11d92a0d2964773" + ["funcs"]="0d2d7a2b08f1112dc2474ba81a489002" ["lan"]="c62e84ddd1457b71a85ad21da662b9af" ) local author="aclist" diff --git a/helpers/funcs b/helpers/funcs index 7e51b3d..80f45f2 100755 --- a/helpers/funcs +++ b/helpers/funcs @@ -452,10 +452,15 @@ get_dist(){ } get_remote_servers(){ params=( - "\\nor\1\map\chernarusplus\\nor\1\map\sakhal" + "\\nor\1\map\chernarusplus\\nor\1\map\sakhal\\nor\1\map\enoch\empty\1\\nor\1\map\namalsk" + "\map\namalsk\empty\1" + "\map\namalsk\noplayers\1" "\map\chernarusplus\empty\1" "\map\chernarusplus\noplayers\1" - "\map\\sakhal" + "\map\\sakhal\empty\1" + "\map\\sakhal\noplayers\1" + "\map\\enoch\empty\1" + "\map\\enoch\noplayers\1" ) local limit=10000 local url="https://api.steampowered.com/IGameServersService/GetServerList/v1/?" From d6d0b241e0ae2950c8fc94c05dff8d5bf8381d72 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Sat, 15 Mar 2025 17:00:08 +0900 Subject: [PATCH 092/115] chore: update to new index url --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 553e72e..607f7dd 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ This overcomes certain limitations in the Linux client and helps prepare the gam Refer to the documentation for installation and setup instructions: -- [GitHub](https://aclist.github.io/dzgui/dzgui.html) +- [GitHub](https://aclist.github.io/dzgui/index.html) - [Mirror (Codeberg)](https://aclist.codeberg.page) From 8193980878d1dcafec34e477ba5a9cf5315aeb1c Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Sun, 16 Mar 2025 12:17:41 +0900 Subject: [PATCH 093/115] chore: update ip records --- dzgui.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dzgui.sh b/dzgui.sh index fcd36c1..650d17e 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.6.5 +version=5.6.6 #CONSTANTS aid=221100 @@ -639,7 +639,7 @@ fetch_helpers_by_sum(){ } fetch_geo_file(){ # for binary releases - local geo_sum="9824e9b9a75a4830a2423932cc188b06" + local geo_sum="76ec9e25b92022de5d2e9c41baf88772" local km_sum="b038fdb8f655798207bd28de3a004706" local gzip="$helpers_path/ips.csv.gz" if [[ ! -f $geo_file ]] || [[ $(get_hash $geo_file) != $geo_sum ]]; then From fbd1a355d5293a46924a7a1ed1f8ec268b6c55e2 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Sat, 5 Apr 2025 09:03:29 +0900 Subject: [PATCH 094/115] chore: drop pre-boot api check --- CHANGELOG.md | 4 ++++ dzgui.sh | 7 ------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 028099d..7dacc35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [5.6.6] 2024-04-04 +## Dropped +- Removed extraneous pre-boot API checks that could cause error messages to be printed if the user had not set up an API key yet + ## [5.6.5] 2024-03-04 ## Fixed - Livonia server results being dropped from batch queries diff --git a/dzgui.sh b/dzgui.sh index 650d17e..e19a4b5 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -876,21 +876,14 @@ get_response_code(){ curl -Ls -I -o /dev/null -w "%{http_code}" "$url" } test_connection(){ - source "$config_file" declare -A hr local res1 local res2 local str="No connection could be established to the remote server" hr=( - ["steampowered.com"]="https://api.steampowered.com/IGameServersService/GetServerList/v1/?key=$steam_api" ["github.com"]="https://github.com/$author" ["codeberg.org"]="https://codeberg.org/$author" ) - # steam API is mandatory, except on initial setup - if [[ -n $steam_api ]]; then - res=$(get_response_code "${hr["steampowered.com"]}") - [[ $res -ne 200 ]] && raise_error_and_quit "$str ("steampowered.com")" - fi res=$(get_response_code "${hr["github.com"]}") if [[ $res -ne 200 ]]; then From 459dd6935905726b87501e968e0901589d561798 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Sat, 5 Apr 2025 09:07:02 +0900 Subject: [PATCH 095/115] chore: bump version --- CHANGELOG.md | 6 +++++- dzgui.sh | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7dacc35..8791f2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,13 @@ # Changelog -## [5.6.6] 2024-04-04 +## [5.6.7] 2024-04-04 ## Dropped - Removed extraneous pre-boot API checks that could cause error messages to be printed if the user had not set up an API key yet +## [5.6.6] 2024-04-04 +## Changed +- Update IP database records for 2025-03 + ## [5.6.5] 2024-03-04 ## Fixed - Livonia server results being dropped from batch queries diff --git a/dzgui.sh b/dzgui.sh index e19a4b5..40cbf4e 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.6.6 +version=5.6.7 #CONSTANTS aid=221100 From 728e4daf7c680b8bfd9dd7b1159e9843f43b0f9f Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Sat, 5 Apr 2025 09:15:23 +0900 Subject: [PATCH 096/115] chore: update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8791f2b..7e395f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ## Dropped - Removed extraneous pre-boot API checks that could cause error messages to be printed if the user had not set up an API key yet -## [5.6.6] 2024-04-04 +## [5.6.6] 2024-03-16 ## Changed - Update IP database records for 2025-03 From 5393bf1f5f4bb3fc3d1027a3c149b6abbefe469e Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 17 Apr 2025 21:43:43 +0900 Subject: [PATCH 097/115] fix: more robust ping method --- helpers/funcs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/helpers/funcs b/helpers/funcs index 80f45f2..57e87f5 100755 --- a/helpers/funcs +++ b/helpers/funcs @@ -784,12 +784,17 @@ logger(){ } test_ping(){ shift + local time + local res local ip="$1" local qport="$2" - local res - res=$(ping -c1 -4 -W0.5 $1 | grep time= | awk -F= '{print $4}') - [[ ! $? -eq 0 ]] && res="Timed out" - printf "%s" "$res" + res=$(a2s $ip $qport info) + if [[ -z $res ]]; then + time="Timed out" + else + time=$(<<< "$res" jq -r '.[].ping') + fi + printf "%s" "$time" } show_server_modlist(){ shift From a35bfda5f1bb28db77a3c4b077db051a5ec3c3a1 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 17 Apr 2025 21:47:47 +0900 Subject: [PATCH 098/115] fix: constrain window to viewport --- dzgui.sh | 6 +-- helpers/ui.py | 135 ++++++++++++++++++++++++++++++++++---------------- 2 files changed, 96 insertions(+), 45 deletions(-) diff --git a/dzgui.sh b/dzgui.sh index 40cbf4e..621370f 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.6.7 +version=5.6.8 #CONSTANTS aid=221100 @@ -587,10 +587,10 @@ fetch_helpers_by_sum(){ [[ -f "$config_file" ]] && source "$config_file" declare -A sums sums=( - ["ui.py"]="5a876efacf208d12b5fe761996425412" + ["ui.py"]="a6fdbf3e3eb92b7bc78e6ae23882b10b" ["query_v2.py"]="55d339ba02512ac69de288eb3be41067" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" - ["funcs"]="0d2d7a2b08f1112dc2474ba81a489002" + ["funcs"]="f6e8b113e586a4bb2ea40c9ee56ebc95" ["lan"]="c62e84ddd1457b71a85ad21da662b9af" ) local author="aclist" diff --git a/helpers/ui.py b/helpers/ui.py index ae28ede..4180957 100644 --- a/helpers/ui.py +++ b/helpers/ui.py @@ -17,7 +17,7 @@ import gi gi.require_version("Gtk", "3.0") from gi.repository import Gtk, GLib, Gdk, GObject, Pango -# 5.6.0 +# 5.7.0 app_name = "DZGUI" cache = {} @@ -50,6 +50,7 @@ helpers_path = '%s/.local/share/dzgui/helpers' %(user_path) log_path = '%s/logs' %(state_path) changelog_path = '%s/CHANGELOG.md' %(state_path) geometry_path = '%s/dzg.cols.json' %(state_path) +res_path = '%s/dzg.res.json' %(state_path) funcs = '%s/funcs' %(helpers_path) mods_temp_file = '%s/dzg.mods_temp' %(cache_path) stale_mods_temp_file = '%s/dzg.stale_mods_temp' %(cache_path) @@ -88,10 +89,10 @@ log_cols = [ ] filters = { "1PP": True, - "3PP": True, "Day": True, - "Night": True, "Empty": False, + "3PP": True, + "Night": True, "Full": False, "Low pop": True, "Non-ASCII": False, @@ -685,7 +686,7 @@ def process_shell_return_code(transient_parent, msg, code, original_input): process_tree_option([treeview.view, RowType.HANDSHAKE], treeview) case 255: spawn_dialog(transient_parent, "Update complete. Please close DZGUI and restart.", Popup.NOTIFY) - Gtk.main_quit() + save_res_and_quit(transient_parent) def process_tree_option(input, treeview): @@ -874,19 +875,36 @@ class OuterWindow(Gtk.Window): self.add(self.grid) if is_game_mode is True: self.fullscreen() + elif query_config(None, "fullscreen")[0] == "true": + logger.info("User preference for 'fullscreen' is 'true'") + self.maximize() else: - if query_config(None, "fullscreen")[0] == "true": - self.maximize() + if os.path.isfile(res_path): + with open(res_path, "r") as infile: + try: + data = json.load(infile) + valid_json = True + except json.decoder.JSONDecodeError: + logger.critical("JSON decode error in '%s'" %(res_path)) + valid_json = False + else: + valid_json = False + if valid_json: + res = data["res"] + w = res["width"] + h = res["height"] + logger.info("Restoring window size to %s,%s" %(w,h)) + self.set_default_size(w, h) - # Hide FilterPanel on main menu self.show_all() + # Hide FilterPanel on main menu self.grid.right_panel.set_filter_visibility(False) self.grid.sel_panel.set_visible(False) self.grid.scrollable_treelist.treeview.grab_focus() def halt_proc_and_quit(self, window, event): self.grid.terminate_treeview_process() - Gtk.main_quit() + save_res_and_quit(window) class ScrollableTree(Gtk.ScrolledWindow): @@ -896,7 +914,6 @@ class ScrollableTree(Gtk.ScrolledWindow): self.treeview = TreeView(is_steam_deck) self.add(self.treeview) - class RightPanel(Gtk.Box): def __init__(self, is_steam_deck): super().__init__(spacing=6) @@ -925,8 +942,7 @@ class RightPanel(Gtk.Box): self.question_button.connect("clicked", self._on_button_clicked) self.pack_start(self.debug_toggle, False, True, 0) - if is_steam_deck is False: - self.pack_start(self.question_button, False, True, 0) + self.pack_start(self.question_button, False, True, 0) def _on_button_toggled(self, button, command): grid = self.get_parent() @@ -971,7 +987,7 @@ class ButtonBox(Gtk.Box): button.set_opacity(0.6) self.buttons.append(button) button.connect("clicked", self._on_selection_button_clicked) - self.pack_start(button, False, False, True) + self.pack_start(button, False, False, 0) self.buttons[0].set_opacity(1.0) @@ -1043,7 +1059,9 @@ class ButtonBox(Gtk.Box): if context == ButtonType.EXIT: logger.info("Normal user exit") - Gtk.main_quit() + widgets = relative_widget(self) + window = widgets["outer"] + save_res_and_quit(window) return cols = treeview.get_columns() @@ -1073,12 +1091,13 @@ class ButtonBox(Gtk.Box): class CalcDist(multiprocessing.Process): - def __init__(self, widget, addr, result_queue, cache): + def __init__(self, widget, addr, qport, result_queue, cache): super().__init__() self.widget = widget self.result_queue = result_queue self.addr = addr + self.qport = str(qport) self.ip = addr.split(':')[0] def run(self): @@ -1087,7 +1106,7 @@ class CalcDist(multiprocessing.Process): self.result_queue.put([self.addr, cache[self.addr][0], cache[self.addr][1]]) return proc = call_out(self.widget, "get_dist", self.ip) - proc2 = call_out(self.widget, "test_ping", self.ip) + proc2 = call_out(self.widget, "test_ping", self.ip, self.qport) km = proc.stdout ping = proc2.stdout self.result_queue.put([self.addr, km, ping]) @@ -1314,6 +1333,7 @@ class TreeView(Gtk.TreeView): if self.view == WindowContext.TABLE_API or self.view == WindowContext.TABLE_SERVER: addr = self.get_column_at_index(7) + qport = self.get_column_at_index(8) if addr is None: server_tooltip[0] = format_tooltip() grid.update_statusbar(server_tooltip[0]) @@ -1327,7 +1347,7 @@ class TreeView(Gtk.TreeView): grid.update_statusbar(tooltip) return self.emit("on_distcalc_started") - self.current_proc = CalcDist(self, addr, self.queue, cache) + self.current_proc = CalcDist(self, addr, qport, self.queue, cache) self.current_proc.start() else: tooltip = format_metadata(row_sel) @@ -1582,6 +1602,7 @@ class TreeView(Gtk.TreeView): column_title = "Name" saved_size = data["cols"][column_title] column.set_fixed_width(saved_size) + column.set_expand(True) else: if ("Name" in column_title): column.set_fixed_width(800) @@ -2330,12 +2351,8 @@ class Grid(Gtk.Grid): self._version = "%s %s" %(app_name, sys.argv[2]) self.scrollable_treelist = ScrollableTree(is_steam_deck) - if is_steam_deck is True: - self.scrollable_treelist.set_hexpand(False) - self.scrollable_treelist.set_vexpand(True) - else: - self.scrollable_treelist.set_hexpand(True) - self.scrollable_treelist.set_vexpand(True) + self.scrollable_treelist.set_hexpand(False) + self.scrollable_treelist.set_vexpand(True) self.right_panel = RightPanel(is_steam_deck) self.sel_panel = ModSelectionPanel() @@ -2352,14 +2369,9 @@ class Grid(Gtk.Grid): self.bar.add(self.status_right_label) self.update_right_statusbar() - if is_steam_deck is True: - self.attach(self.scrollable_treelist, 0, 0, 4, 1) - self.attach_next_to(self.bar, self.scrollable_treelist, Gtk.PositionType.BOTTOM, 4, 1) - self.attach_next_to(self.right_panel, self.scrollable_treelist, Gtk.PositionType.RIGHT, 1, 1) - else: - self.attach(self.scrollable_treelist, 0, 0, 7, 5) - self.attach_next_to(self.bar, self.scrollable_treelist, Gtk.PositionType.BOTTOM, 7, 1) - self.attach_next_to(self.right_panel, self.scrollable_treelist, Gtk.PositionType.RIGHT, 1, 1) + self.attach(self.scrollable_treelist, 0, 0, 3, 1) + self.attach_next_to(self.bar, self.scrollable_treelist, Gtk.PositionType.BOTTOM, 3, 1) + self.attach_next_to(self.right_panel, self.scrollable_treelist, Gtk.PositionType.RIGHT, 1, 1) def update_right_statusbar(self): config_vals.clear() @@ -2438,16 +2450,50 @@ class App(Gtk.Application): self.win = OuterWindow(is_steam_deck, is_game_mode) self.win.set_icon_name("dzgui") + accel = Gtk.AccelGroup() accel.connect(Gdk.KEY_q, Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE, self._halt_window_subprocess) self.win.add_accel_group(accel) - GLib.unix_signal_add(GLib.PRIORITY_DEFAULT, signal.SIGINT, Gtk.main_quit) + + GLib.unix_signal_add(GLib.PRIORITY_DEFAULT, signal.SIGINT, self._catch_sigint) Gtk.main() - def _halt_window_subprocess(self, accel_group, window, code, flag): - self.win.halt_proc_and_quit(self, None) + def _catch_sigint(self): + self.win.halt_proc_and_quit(self.win, None) + def _halt_window_subprocess(self, accel_group, window, code, flag): + self.win.halt_proc_and_quit(self.win, None) + + +def save_res_and_quit(window): + if window.props.is_maximized: + Gtk.main_quit() + return + rect = window.get_size() + + def write_json(rect): + data = {"res": { "width": rect.width, "height": rect.height } } + j = json.dumps(data, indent=2) + with open(res_path, "w") as outfile: + outfile.write(j) + logger.info("Wrote initial window size to '%s'" %(res_path)) + + if os.path.isfile(res_path): + with open(res_path, "r") as infile: + try: + data = json.load(infile) + data["res"]["width"] = rect.width + data["res"]["height"] = rect.height + with open(res_path, "w") as outfile: + outfile.write(json.dumps(data, indent=2)) + except json.decoder.JSONDecodeError: + logger.critical("JSON decode error in '%s'" %(res_path)) + write_json(rect) + else: + write_json(rect) + + Gtk.main_quit() class ModSelectionPanel(Gtk.Box): def __init__(self): @@ -2471,7 +2517,6 @@ class ModSelectionPanel(Gtk.Box): button.connect("clicked", self._on_button_clicked) self.pack_start(button, False, True, 0) - def initialize(self): l = len(self.get_children()) last = self.get_children()[l-1] @@ -2483,7 +2528,6 @@ class ModSelectionPanel(Gtk.Box): case "Unhighlight stale": i.set_label("Highlight stale") - def _on_button_clicked(self, button): self.active_button = button label = button.get_label() @@ -2512,7 +2556,6 @@ class ModSelectionPanel(Gtk.Box): path = Gtk.TreePath(i) treeview.get_selection().select_path(path) - def _remove_last_button(self): children = self.get_children() l = len(children) @@ -2616,7 +2659,7 @@ class FilterPanel(Gtk.Box): self.keyword_entry.set_placeholder_text("Filter by keyword") self.keyword_entry.connect("activate", self._on_keyword_enter) self.keyword_entry.connect("key-press-event", self._on_esc_pressed) - + completion = Gtk.EntryCompletion(inline_completion=True) completion.set_text_column(0) completion.set_minimum_key_length(1) @@ -2625,7 +2668,7 @@ class FilterPanel(Gtk.Box): renderer_text = Gtk.CellRendererText(ellipsize=Pango.EllipsizeMode.END) self.maps_combo = Gtk.ComboBox.new_with_model_and_entry(map_store) self.maps_combo.set_entry_text_column(0) - + # instantiate maps completer entry self.maps_entry = self.maps_combo.get_child() self.maps_entry.set_completion(completion) @@ -2637,12 +2680,20 @@ class FilterPanel(Gtk.Box): self.maps_combo.connect("changed", self._on_map_changed) self.maps_combo.connect("key-press-event", self._on_esc_pressed) - self.pack_start(self.filters_label, False, False, True) - self.pack_start(self.keyword_entry, False, False, True) - self.pack_start(self.maps_combo, False, False, True) + self.pack_start(self.filters_label, False, False, 0) + self.pack_start(self.keyword_entry, False, False, 0) + self.pack_start(self.maps_combo, False, False, 0) + button_grid = Gtk.Grid() + row = 1 + col = 0 for i, check in enumerate(checks[0:]): - self.pack_start(checks[i], False, False, True) + col = col + 1 + if (col > 3): + row = row + 1 + col = 1 + button_grid.attach(checks[i], col, row, 1, 1) + self.pack_start(button_grid, False, False, 0) def _on_map_entry_keypress(self, entry, event): match event.keyval: From 59fdd30236a543269a21683f3a7825a40a75b1d9 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 17 Apr 2025 21:49:35 +0900 Subject: [PATCH 099/115] docs: update changelog --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e395f1..6d86472 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [5.7.0] 2024-04-17 +## Added +- Save application dimensions when quitting and restore on subsequent boot +## Fixed +- Issues with the window exceeding the bounds of the screen when displaying some table contexts +## Changed +- More direct server ping query method that should return marginally more accurate times + ## [5.6.7] 2024-04-04 ## Dropped - Removed extraneous pre-boot API checks that could cause error messages to be printed if the user had not set up an API key yet From b86dd37b50318be98c86a1aa98376fcca866d3c4 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 17 Apr 2025 21:50:33 +0900 Subject: [PATCH 100/115] chore: bump minor version --- dzgui.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dzgui.sh b/dzgui.sh index 621370f..448c1eb 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.6.8 +version=5.7.0 #CONSTANTS aid=221100 From 23e3d34947667e04e593e0a235a161d9d7a7ab47 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 17 Apr 2025 21:52:36 +0900 Subject: [PATCH 101/115] chore: update IP checksum --- dzgui.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dzgui.sh b/dzgui.sh index 448c1eb..02fb76f 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -639,7 +639,7 @@ fetch_helpers_by_sum(){ } fetch_geo_file(){ # for binary releases - local geo_sum="76ec9e25b92022de5d2e9c41baf88772" + local geo_sum="83bf7655a4197214b4be73dfa9a7b319" local km_sum="b038fdb8f655798207bd28de3a004706" local gzip="$helpers_path/ips.csv.gz" if [[ ! -f $geo_file ]] || [[ $(get_hash $geo_file) != $geo_sum ]]; then From 2a59441dbc9fc42990746911c0684479d37a5f11 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 5 Jun 2025 17:47:07 +0900 Subject: [PATCH 102/115] feat: add code of conduct --- CODE_OF_CONDUCT.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..c3838f0 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,34 @@ +# Preamble +This project is free and open source software (FOSS) that is improved upon through the collaborative efforts of its community. + +To foster a collegial and productive atmosphere, all interactions with this project and its members shall be subject to these standards. + +"Members" refers to all project maintainers, contributors, developers, and end-users. +Bear in mind that members may come from different countries, age groups, and backgrounds, and have differing experience levels. + +# Standards +- Do not engage in antagonistic, offensive, discriminatory, threatening, or inflammatory behavior or trolling towards other members under any circumstances. +- Engage in professional communication and stay on topic. Keep banter and jokes to a minimum, as they are liable to be misconstrued. +- Do not post offensive or inflammatory off-site content, or content violating the above standards or the terms of service of this site. +- Do not post spam. The site operator implements anti-spam measures that may lead to your account being revoked. +- While this project relates to the DayZ computer game, it is not a forum for non-technical discussion about the game, or a place to post unsolicited links. +- Do not use images, emoji reactions, or other non-verbal gags as justification for skirting the above standards. + +# Off-site content +From time to time, it may be necessary to include off-site reference material or links. Use discretion when selecting this content and provide +the minimum necessary for a technical discussion of the matter. Do not willfully include content that violates the above standards. + +# Enforcement +Violations of the above standards will be subject to moderation decisions. + +Project maintainers reserve the right to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are +not aligned with these standards, and will communicate reasons for moderation decisions when appropriate. + +Depending on the nature of the violation, or if the violation is not corrected after a warning has been issued, the user may be permanently barred from further interaction with the project. + +# Technical support +This project is free software, but this does not imply a guarantee of free, unlimited tech support and troubleshooting in perpetuity. +The software is provided as-is, and no warranty is made as to its fitness for a given purpose or that it is free from defects. + +Project members volunteer their time. Do not disparage other members when they attempt to assist you. +Be aware that if you cannot provide enough information when filing a ticket, this may lead to the ticket being closed as non-actionable. From cefd041e089b173a161514275b8106878a4bb558 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 5 Jun 2025 17:48:38 +0900 Subject: [PATCH 103/115] feat: add code of conduct --- CODE_OF_CONDUCT.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..c3838f0 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,34 @@ +# Preamble +This project is free and open source software (FOSS) that is improved upon through the collaborative efforts of its community. + +To foster a collegial and productive atmosphere, all interactions with this project and its members shall be subject to these standards. + +"Members" refers to all project maintainers, contributors, developers, and end-users. +Bear in mind that members may come from different countries, age groups, and backgrounds, and have differing experience levels. + +# Standards +- Do not engage in antagonistic, offensive, discriminatory, threatening, or inflammatory behavior or trolling towards other members under any circumstances. +- Engage in professional communication and stay on topic. Keep banter and jokes to a minimum, as they are liable to be misconstrued. +- Do not post offensive or inflammatory off-site content, or content violating the above standards or the terms of service of this site. +- Do not post spam. The site operator implements anti-spam measures that may lead to your account being revoked. +- While this project relates to the DayZ computer game, it is not a forum for non-technical discussion about the game, or a place to post unsolicited links. +- Do not use images, emoji reactions, or other non-verbal gags as justification for skirting the above standards. + +# Off-site content +From time to time, it may be necessary to include off-site reference material or links. Use discretion when selecting this content and provide +the minimum necessary for a technical discussion of the matter. Do not willfully include content that violates the above standards. + +# Enforcement +Violations of the above standards will be subject to moderation decisions. + +Project maintainers reserve the right to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are +not aligned with these standards, and will communicate reasons for moderation decisions when appropriate. + +Depending on the nature of the violation, or if the violation is not corrected after a warning has been issued, the user may be permanently barred from further interaction with the project. + +# Technical support +This project is free software, but this does not imply a guarantee of free, unlimited tech support and troubleshooting in perpetuity. +The software is provided as-is, and no warranty is made as to its fitness for a given purpose or that it is free from defects. + +Project members volunteer their time. Do not disparage other members when they attempt to assist you. +Be aware that if you cannot provide enough information when filing a ticket, this may lead to the ticket being closed as non-actionable. From de524bd2a5b125e447558ee47b9e143969a9884f Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Sun, 6 Jul 2025 12:37:29 +0900 Subject: [PATCH 104/115] chore: backports from testing --- CHANGELOG.md | 24 +++++---- dzgui.sh | 134 +++++++++++++++++++++++++++++++++++++++++++------- helpers/funcs | 21 +++++++- helpers/ui.py | 12 +++-- 4 files changed, 156 insertions(+), 35 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d86472..55d17ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Changelog -## [5.7.0] 2024-04-17 +## [5.8.0] 2025-07-06 +## Added +- Filter servers by official/unofficial status +## Changed +- Updated internal versioning of helper files + +## [5.7.0] 2025-04-17 ## Added - Save application dimensions when quitting and restore on subsequent boot ## Fixed @@ -8,35 +14,35 @@ ## Changed - More direct server ping query method that should return marginally more accurate times -## [5.6.7] 2024-04-04 +## [5.6.7] 2025-04-04 ## Dropped - Removed extraneous pre-boot API checks that could cause error messages to be printed if the user had not set up an API key yet -## [5.6.6] 2024-03-16 +## [5.6.6] 2025-03-16 ## Changed - Update IP database records for 2025-03 -## [5.6.5] 2024-03-04 +## [5.6.5] 2025-03-04 ## Fixed - Livonia server results being dropped from batch queries -## [5.6.4] 2024-02-10 +## [5.6.4] 2025-02-10 ### Changed - Drop launch flag and check for invocation through Steam automatically -## [5.6.3] 2024-02-09 +## [5.6.3] 2025-02-09 ### Changed - Update IP database records for 2025-02 -## [5.6.2] 2024-01-22 +## [5.6.2] 2025-01-22 ### Fixed - Resolve regression introduced with IP resolution feature in 5.6.0 (restores functionality of right-click action: Add to My Servers) -## [5.6.1] 2024-01-10 +## [5.6.1] 2025-01-10 ### Fixed - Add fallback support for jq 1.6 -## [5.6.0] 2024-01-06 +## [5.6.0] 2025-01-06 ### Added - Application header bar and controls - Menu context subtitle in header bar diff --git a/dzgui.sh b/dzgui.sh index 02fb76f..02f5274 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.7.0 +version=5.8.0 #CONSTANTS aid=221100 @@ -49,10 +49,9 @@ freedesktop_path="$HOME/.local/share/applications" #HELPERS ui_helper="$helpers_path/ui.py" -geo_file="$helpers_path/ips.csv" km_helper="$helpers_path/latlon" -sums_path="$helpers_path/sums.md5" func_helper="$helpers_path/funcs" +geo_helper="$helpers_path/ips.csv" #REMOTE remote_host=gh @@ -63,7 +62,6 @@ stable_url="$url_prefix/dzgui" testing_url="$url_prefix/testing" releases_url="https://github.com/$author/$repo/releases/download/browser" km_helper_url="$releases_url/latlon" -geo_file_url="$releases_url/ips.csv.gz" set_im_module(){ @@ -587,10 +585,10 @@ fetch_helpers_by_sum(){ [[ -f "$config_file" ]] && source "$config_file" declare -A sums sums=( - ["ui.py"]="a6fdbf3e3eb92b7bc78e6ae23882b10b" + ["ui.py"]="f128a97e744e9e11036d707198feb8a8" ["query_v2.py"]="55d339ba02512ac69de288eb3be41067" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" - ["funcs"]="f6e8b113e586a4bb2ea40c9ee56ebc95" + ["funcs"]="94287c75a5ae0a06a95dd439711e6fba" ["lan"]="c62e84ddd1457b71a85ad21da662b9af" ) local author="aclist" @@ -637,18 +635,8 @@ fetch_helpers_by_sum(){ done return 0 } -fetch_geo_file(){ - # for binary releases - local geo_sum="83bf7655a4197214b4be73dfa9a7b319" +fetch_km_helper(){ local km_sum="b038fdb8f655798207bd28de3a004706" - local gzip="$helpers_path/ips.csv.gz" - if [[ ! -f $geo_file ]] || [[ $(get_hash $geo_file) != $geo_sum ]]; then - local res=$(get_response_code "$geo_file_url") - [[ $res -ne 200 ]] && raise_error_and_quit "Remote resource unavailable: '$geo_file_url'" - curl -Ls "$geo_file_url" > "$gzip" - #force overwrite - gunzip -f "$gzip" - fi if [[ ! -f $km_helper ]] || [[ $(get_hash $km_helper) != $km_sum ]]; then local res=$(get_response_code "$km_helper_url") [[ $res -ne 200 ]] && raise_error_and_quit "Remote resource unavailable: '$km_helper_url'" @@ -656,10 +644,119 @@ fetch_geo_file(){ chmod +x "$km_helper" fi } +get_response_code(){ + local url="$1" + curl -Ls -I -o /dev/null -w "%{http_code}" "$url" +} +raise_error_and_quit(){ + echo "$1" + exit 1 +} +fetch_ip_db(){ + parse_dl_url(){ + curl -Ls "$url" \ + | grep "csv.gz" \ + | awk -F"['']" '{print $2}' + } + + parse_dl_url_date(){ + local url="$1" + <<< "$url" \ + awk -F/ '{print $5}' \ + | awk -F"dbip-city-lite-" '{print $2}' \ + | awk -F'.csv.gz' '{print $1}' + } + + fetch(){ + logger INFO "Triggering fetch routine" + local url="$1" + + curl -Ls "$url" > "$base_file" + if [[ $? -ne 0 ]]; then + logger WARN "Abnormal exit while accessing '$url'" + return + fi + + gunzip -f "$base_file" + if [[ $? -ne 0 ]]; then + rm "$base_file" + logger WARN "Abnormal exit while unpacking gzip '$base_file'" + return + fi + + < "$extracted_file" grep -vE "^[a-z0-9]{4}:" | grep -v "::" > "$ip_file" + if [[ $? -ne 0 ]]; then + logger WARN "Abnormal exit while parsing IPs" + return + fi + rm "${state_path}/${month}.csv" + + readarray -t records < <(cat $ip_file | awk -F, 'NR==1 {print $1} END {print $1}') + if [[ ${records[0]} != "0.0.0.0" ]] && [[ ${records[1]} != "224.0.0.0" ]]; then + logger WARN "Anchor records missing in '$ip_file', possibly malformed" + rm "$ip_file" + return + fi + + mv "$ip_file" "$geo_helper" + if [[ $? -ne 0 ]]; then + logger WARN "Abnormal exit while moving '$ip_file' to '$helpers_path'" + rm "$ip_file" + fi + + echo "$month" > "$month_file" + logger INFO "Wrote '$month' to stub '$month_file'" + logger INFO "Updated '$ip_file'" + } + + local url="https://db-ip.com/db/download/ip-to-city-lite" + local month_file="${state_path}/.month" + local ip_file="${state_path}/ips.csv" + + # test main url + local res=$(get_response_code "$url") + if [[ $res -ne 200 ]]; then + logger WARN "Failed to retrieve remote resource: '$url' ($res)" + return + fi + logger INFO "Resolved remote URL: '$url'" + + # test dl url + local dl_url="$(parse_dl_url)" + local res=$(get_response_code "$dl_url") + if [[ $res -ne 200 ]]; then + logger WARN "Remote resource unavailable: '$dl_url' ($res)" + return + fi + logger INFO "Resolved download URL: '$dl_url'" + + local month=$(parse_dl_url_date "$dl_url") + local base_file="${state_path}/${month}.csv.gz" + local extracted_file="${state_path}/${month}.csv" + + # no stub file + if [[ ! -f $month_file ]]; then + logger WARN "No stub file '$month_file' present" + fetch "$dl_url" + return + fi + + # local needs update + local last_month=$(< "$month_file") + if [[ $last_month != "$month" ]]; then + logger WARN "Local stub '$last_month' does not match remote stub '$month'" + fetch "$dl_url" + return + fi + + # if stub is same date, abort + logger INFO "Local stub '$last_month' is identical to remote, skipping" +} fetch_helpers(){ fetch_a2s fetch_dzq - fetch_geo_file + fetch_km_helper + fetch_ip_db fetch_helpers_by_sum [[ ! -f $share_path/icon.png ]] && freedesktop_dirs fetch_icons @@ -899,7 +996,6 @@ test_connection(){ stable_url="$url_prefix/dzgui" testing_url="$url_prefix/testing" km_helper_url="$releases_url/latlon" - geo_file_url="$releases_url/ips.csv.gz" fi } legacy_cols(){ diff --git a/helpers/funcs b/helpers/funcs index 57e87f5..31b5f59 100755 --- a/helpers/funcs +++ b/helpers/funcs @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -o pipefail -version=5.6.0 +version="5.8.0" #CONSTANTS aid=221100 @@ -605,6 +605,20 @@ filter_servers(){ <<< "$filtered" awk -F$separator '!seen[$1]++' fi } + filter_official(){ + if [[ ${filters[*]} =~ Official ]]; then + echo -n "$filtered" + else + <<< "$filtered" awk -F$separator '$10 == "Community"' + fi + } + filter_community(){ + if [[ ${filters[*]} =~ Unoffic ]]; then + echo -n "$filtered" + else + <<< "$filtered" awk -F$separator '$10 == "Official"' + fi + } filtered=$(filter_perspective) filtered=$(filter_full) @@ -615,6 +629,8 @@ filter_servers(){ filtered=$(filter_ascii) filtered=$(filter_duplicates) filtered=$(filter_keyword) + filtered=$(filter_official) + filtered=$(filter_community) if [[ -z "$filtered" ]]; then logger WARN "Filter result is empty" @@ -652,7 +668,8 @@ parse_server_json(){ "\(.max_players)␞" + "\(if .gametype == null then "0" elif .gametype|split("lqs")[1] == null then "0" else .gametype|split("lqs")[1]|split(",")[0] end)␞" + "\(.addr|split(":")[0]):\(if .gameport == null then "XXXX" else .gameport end)␞" + - "\(.addr|split(":")[1])" + "\(.addr|split(":")[1])␞" + + "\(if .gametype == null then "null" else (.gametype|split(",")|if any(. == "external") then "Community" else "Official" end) end)" ' | sort -k1 } align_versions_file(){ diff --git a/helpers/ui.py b/helpers/ui.py index 4180957..e167277 100644 --- a/helpers/ui.py +++ b/helpers/ui.py @@ -17,7 +17,6 @@ import gi gi.require_version("Gtk", "3.0") from gi.repository import Gtk, GLib, Gdk, GObject, Pango -# 5.7.0 app_name = "DZGUI" cache = {} @@ -38,7 +37,7 @@ mod_store = Gtk.ListStore(str, str, str, float, str) #cf. log_cols log_store = Gtk.ListStore(str, str, str, str) #cf. browser_cols -server_store = Gtk.ListStore(str, str, str, str, int, int, int, str, int) +server_store = Gtk.ListStore(str, str, str, str, int, int, int, str, int, str) default_tooltip = "Select a row to see its detailed description" server_tooltip = [None, None] @@ -96,7 +95,9 @@ filters = { "Full": False, "Low pop": True, "Non-ASCII": False, - "Duplicate": False + "Duplicate": False, + "Official": True, + "Unoffic.": True, } @@ -553,7 +554,7 @@ def parse_server_rows(data): lines = data.stdout.splitlines() reader = csv.reader(lines, delimiter=delimiter) try: - rows = [[row[0], row[1], row[2], row[3], int(row[4]), int(row[5]), int(row[6]), row[7], int(row[8])] for row in reader if row] + rows = [[row[0], row[1], row[2], row[3], int(row[4]), int(row[5]), int(row[6]), row[7], int(row[8]), row[9]] for row in reader if row] except IndexError: return 1 for row in rows: @@ -1609,7 +1610,8 @@ class TreeView(Gtk.TreeView): if (column_title == "Map"): column.set_fixed_width(300) - self.append_column(column) + if i != 10: + self.append_column(column) self.update_first_col(mode.dict["label"]) From e02f02b775e1af3376dc5e1ec231deba25382c63 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 7 Jul 2025 10:18:25 +0900 Subject: [PATCH 105/115] chore: update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 55d17ee..befe399 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,8 +3,11 @@ ## [5.8.0] 2025-07-06 ## Added - Filter servers by official/unofficial status +- Automatically fetch geolocation records ## Changed - Updated internal versioning of helper files +## Fixed +- Corrected erroneous 2024 date in prior changelog entries ## [5.7.0] 2025-04-17 ## Added From 46a54cef12d3060d42e6d4e86146095c7508fd81 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 30 Oct 2025 11:47:10 +0900 Subject: [PATCH 106/115] docs: add contributing file --- CONTRIBUTING.md | 71 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..4e302b8 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,71 @@ +# Introduction + +Thank you for your interest in DZGUI! + +This guide goes over development conventions and best practices for contributors. +If you are a developer, you can skip to the end. + +# Requesting help + +If you encounter a problem with DZGUI, you can submit tickets on the GitHub +(issue tracker)[https://github.com/aclist/dzgui-devel/issues] under the +`troubleshooting` tag. + +# How can I help the project? + +There are several ways to help this project. +1. Report bugs that you find +2. Request features that you would like +3. Contribute features and fixes to the codebase +4. Contribute documentation to the project + +Before making any contribution, please read the `CODE_OF_CONDUCT.md` and act +accordingly. + +## Submitting a ticket + +Navigate to the GitHub (issue tracker)[https://github.com/aclist/dzgui-devel/issues]. +From there, follow the onscreen prompts. You will be asked questions such as: + +- What version are you using? +- What distribution are you using? +- What is the issue that you found? +- How can we reproduce the issue? + +You can also attach screenshots, logs, or other data that can help us. + +## Requesting a feature + +You can also request features via the same issue tracker. It is good practice to +first search for your idea to see if a similar one has already been posted. +If not, open a ticket where you describe your feature and its possible benefits. + +Please note that this is a community project, so it takes time for us to develop +features. Putting in a feature request does not mean that it will be implemented, +but we will do our best to support as many cool ideas as possible. + +## Contributing code or documentation + +If you would like to take ownership or assist with an issue on the issue tracker, or +contribute a new change, please follow the guidelines below. + +Fork this repository and check out the code up to `prerelease/`. +If there is no pending prerelease PR, you can base your changes off of +the `testing` branch. You may later be asked to retarget your PR to the prerelease +branch once a new one is made. This is because out-of-band PRs are consolidated into +the next release before merging. + +The following naming conventions apply for PRs: +- fix/ - patch/hotfix branches +- feat/ - feature branches +- doc/ - documentation branches +- infra/ - infrastructure branches + +Implement your changes and test them locally. If they work you may +open a merge request, and then we review your changes. If everything is OK, it +will be merged to `prerelease/`, then `testing`, and after a live +testing phase, to `stable` as well. + +It is recommended to follow +(Conventional Commits)[https://www.conventionalcommits.org/en/v1.0.0/], as this +integrates well with tooling and helps the project review your code. From c37800795bbcb59918c9ece0a0ef6f27f541fcd2 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Sat, 27 Dec 2025 20:39:09 +0900 Subject: [PATCH 107/115] fix: malformed vdf path discovery --- dzgui.sh | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/dzgui.sh b/dzgui.sh index 02f5274..7c977d4 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -851,12 +851,26 @@ file_picker(){ } find_library_folder(){ local search_path="$1" - steam_path="$(python3 "$helpers_path/vdf2json.py" -i "$1/steamapps/libraryfolders.vdf" \ - | jq -r '.libraryfolders[]|select(.apps|has("221100")).path')" - if [[ ! $? -eq 0 ]] || [[ -z $steam_path ]]; then + readarray -t paths < <(python3 "$helpers_path/vdf2json.py" -i "$1/steamapps/libraryfolders.vdf" \ + | jq -r '.libraryfolders[]|select(.apps|has("221100")).path') + if [[ ! $? -eq 0 ]]; then logger WARN "Failed to parse Steam path using '$search_path'" return 1 fi + if [[ ${#paths[@]} -eq 0 ]]; then + logger WARN "No valid VDF paths in '$search_path'" + return 1 + fi + if [[ ${#paths[@]} -gt 1 ]]; then + for path in "${paths[@]}"; do + if [[ -d "$path" ]]; then + steam_path="$path" + break + fi + done + else + steam_path="${paths[0]}" + fi logger INFO "Steam path resolved to: $steam_path" } create_config(){ From 4bcf8947049e034a0d743ed9d9ab9f9ba9af9439 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Sat, 27 Dec 2025 20:41:25 +0900 Subject: [PATCH 108/115] chore: update installscript branch --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 13f96cc..efe9f08 100755 --- a/install.sh +++ b/install.sh @@ -11,7 +11,7 @@ fetch(){ local file="dzgui.sh" local author="aclist" local repo="dztui" - local branch="dzgui" + local branch="fix/malformed-vdf" local url local res gh_url="https://raw.githubusercontent.com/$author/$repo/$branch/$file" From b9c30b4f52deb351aee79c635363fd6da974c328 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Sat, 27 Dec 2025 21:06:44 +0900 Subject: [PATCH 109/115] fix: encapsulate paths --- dzgui.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dzgui.sh b/dzgui.sh index 7c977d4..815345f 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -488,7 +488,7 @@ migrate_files(){ } stale_symlinks(){ local game_dir="$steam_path/steamapps/common/DayZ" - for l in $(find "$game_dir" -xtype l); do + for l in "$(find "$game_dir" -xtype l)"; do logger DEBUG "Updating stale symlink '$l'" unlink "$l" done From 0cd561b62ae35e9656b2a0a907fc371f363a87fe Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Sat, 27 Dec 2025 23:06:11 +0900 Subject: [PATCH 110/115] fix: enclose game_dir in quotes --- dzgui.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dzgui.sh b/dzgui.sh index 815345f..e3893fd 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -952,7 +952,7 @@ varcheck(){ source "$config_file" local workshop_dir="$steam_path/steamapps/workshop/content/$aid" local game_dir="$steam_path/steamapps/common/DayZ" - if [[ ! -d $steam_path ]] || [[ ! -d $game_dir ]] || [[ ! $(find $game_dir -type f) ]]; then + if [[ ! -d $steam_path ]] || [[ ! -d $game_dir ]] || [[ ! $(find "$game_dir" -type f) ]]; then logger WARN "DayZ path resolved to '$game_dir'" logger WARN "Workshop path resolved to '$workshop_dir'" qdialog "$msg2" "Yes" "Exit" From 34ee8c6645fff4c153cccb503e811284b8a14fcc Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Sat, 27 Dec 2025 23:42:49 +0900 Subject: [PATCH 111/115] fix: enclose whitespaces during setup --- .github/ISSUE_TEMPLATE/bug_report.yml | 4 ++++ .github/ISSUE_TEMPLATE/trouble.yml | 4 ++++ install.sh | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 0ad8d65..e572b50 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -5,6 +5,10 @@ labels: ["bug"] assignees: - aclist body: + - type: markdown + attributes: + value: | + ### WARNING: When posting log/config data, redact any sensitive information like API keys. - type: checkboxes id: kb attributes: diff --git a/.github/ISSUE_TEMPLATE/trouble.yml b/.github/ISSUE_TEMPLATE/trouble.yml index 1c25e69..e890c62 100644 --- a/.github/ISSUE_TEMPLATE/trouble.yml +++ b/.github/ISSUE_TEMPLATE/trouble.yml @@ -5,6 +5,10 @@ labels: ["troubleshooting"] assignees: - aclist body: + - type: markdown + attributes: + value: | + ### WARNING: When posting log/config data, redact any sensitive information like API keys. - type: dropdown id: device attributes: diff --git a/install.sh b/install.sh index efe9f08..13f96cc 100755 --- a/install.sh +++ b/install.sh @@ -11,7 +11,7 @@ fetch(){ local file="dzgui.sh" local author="aclist" local repo="dztui" - local branch="fix/malformed-vdf" + local branch="dzgui" local url local res gh_url="https://raw.githubusercontent.com/$author/$repo/$branch/$file" From 203ca0d388dced9babfefdb9247ec77ea7821afa Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Sat, 27 Dec 2025 23:44:54 +0900 Subject: [PATCH 112/115] chore: update changelog --- CHANGELOG.md | 5 +++++ dzgui.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index befe399..ad04a4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## [5.8.0] 2025-12-27 +## Fixed +- Path discovery during first-time setup when parsing filepaths with whitespaces +- First-time setup dialog continuously triggering when DayZ install path had whitespaces in it + ## [5.8.0] 2025-07-06 ## Added - Filter servers by official/unofficial status diff --git a/dzgui.sh b/dzgui.sh index e3893fd..da73642 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.8.0 +version=5.8.1 #CONSTANTS aid=221100 From d90c069a738bf41cfbc3f9898c2bd406c77d5d20 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Sun, 28 Dec 2025 00:01:30 +0900 Subject: [PATCH 113/115] chore: correct version number in changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad04a4f..655c00d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## [5.8.0] 2025-12-27 +## [5.8.1] 2025-12-27 ## Fixed - Path discovery during first-time setup when parsing filepaths with whitespaces - First-time setup dialog continuously triggering when DayZ install path had whitespaces in it From fbcfa1fb34d9b7db2f56a90b59bd459057c69b57 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Sun, 4 Jan 2026 21:24:06 +0900 Subject: [PATCH 114/115] fix: regression introduced in 5.8.1. --- CHANGELOG.md | 4 ++++ dzgui.sh | 9 +++++---- helpers/funcs | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 655c00d..90d4b7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [5.8.2] 2026-01-01 +## Fixed +- Fix regression in symlink routine introduced by previous hotfix + ## [5.8.1] 2025-12-27 ## Fixed - Path discovery during first-time setup when parsing filepaths with whitespaces diff --git a/dzgui.sh b/dzgui.sh index da73642..faf60ad 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.8.1 +version=5.8.2 #CONSTANTS aid=221100 @@ -488,9 +488,10 @@ migrate_files(){ } stale_symlinks(){ local game_dir="$steam_path/steamapps/common/DayZ" - for l in "$(find "$game_dir" -xtype l)"; do - logger DEBUG "Updating stale symlink '$l'" - unlink "$l" + readarray -t links < <(find "$game_dir" -xtype l) + for link in "${links[@]}"; do + logger DEBUG "Updating stale symlink '$link'" + unlink "$link" done } local_latlon(){ diff --git a/helpers/funcs b/helpers/funcs index 31b5f59..651ad64 100755 --- a/helpers/funcs +++ b/helpers/funcs @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -o pipefail -version="5.8.0" +version="5.8.2" #CONSTANTS aid=221100 From 4c10958d1049fecf7f21f9566e98aebf48b92539 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Sun, 4 Jan 2026 21:33:56 +0900 Subject: [PATCH 115/115] chore: normalize checksums --- CHANGELOG.md | 6 +++++- dzgui.sh | 4 ++-- helpers/funcs | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90d4b7e..eb7d338 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog -## [5.8.2] 2026-01-01 +## [5.8.3] 2026-01-04 +## Fixed +- Normalize checksum numbers and dates + +## [5.8.2] 2026-01-04 ## Fixed - Fix regression in symlink routine introduced by previous hotfix diff --git a/dzgui.sh b/dzgui.sh index faf60ad..6523fc1 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.8.2 +version=5.8.3 #CONSTANTS aid=221100 @@ -589,7 +589,7 @@ fetch_helpers_by_sum(){ ["ui.py"]="f128a97e744e9e11036d707198feb8a8" ["query_v2.py"]="55d339ba02512ac69de288eb3be41067" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" - ["funcs"]="94287c75a5ae0a06a95dd439711e6fba" + ["funcs"]="93402a7b9ebae2901debb5cc3bc011a6" ["lan"]="c62e84ddd1457b71a85ad21da662b9af" ) local author="aclist" diff --git a/helpers/funcs b/helpers/funcs index 651ad64..4e2895e 100755 --- a/helpers/funcs +++ b/helpers/funcs @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -o pipefail -version="5.8.2" +version="5.8.3" #CONSTANTS aid=221100