This commit is contained in:
aclist authored and GitHub committed 2025-11-10 03:07:51 +00:00
commit fb728e0418
4 files changed
+43 -30

No files matched your search

+9
View File
@@ -1,5 +1,14 @@
# Changelog # Changelog
## [6.0.1-beta.2] 2025-11-10
## Fixed
- Python 3.14 error in finally block
- Require Python version between 3.11 and 3.12
## [6.0.1-beta.1] 2025-11-05
## Fixed
- UI not being constructed correctly if CHANGELOG.md was missing
## [6.0.0-beta.8] 2025-11-04 ## [6.0.0-beta.8] 2025-11-04
## Added ## Added
- Internal flag to allow distribution packaged releases to disable in-app updates - Internal flag to allow distribution packaged releases to disable in-app updates
+13 -12
View File
@@ -1,7 +1,10 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -o pipefail set -o pipefail
version=6.0.0.beta-8 src_path=$(realpath "$0")
version=6.0.1.beta-2
reference_branch="prerelease/6.0.1-beta.1"
#CONSTANTS #CONSTANTS
aid=221100 aid=221100
@@ -218,9 +221,6 @@ default_steam_path="$default_steam_path"
#Preferred Steam launch command (for Flatpak support) #Preferred Steam launch command (for Flatpak support)
preferred_client="$preferred_client" preferred_client="$preferred_client"
#DZGUI source path
src_path="$src_path"
END END
} }
depcheck(){ depcheck(){
@@ -239,8 +239,8 @@ depcheck(){
check_pyver(){ check_pyver(){
local pyver=$(python3 --version | awk '{print $2}') local pyver=$(python3 --version | awk '{print $2}')
local minor=$(<<< $pyver awk -F. '{print $2}') local minor=$(<<< $pyver awk -F. '{print $2}')
if [[ -z $pyver ]] || [[ ${pyver:0:1} -lt 3 ]] || [[ $minor -lt 10 ]]; then if [[ -z $pyver ]] || [[ ${pyver:0:1} -lt 3 ]] || [[ $minor -lt 11 ]] || [[ $minor -gt 12 ]]; then
local msg="Requires Python >=3.10" local msg="Requires Python 3.11 or 3.12"
raise_error_and_quit "$msg" raise_error_and_quit "$msg"
fi fi
logger INFO "Found Python version: $pyver" logger INFO "Found Python version: $pyver"
@@ -317,6 +317,7 @@ check_unmerged(){
fi fi
} }
check_version(){ check_version(){
[[ -n $reference_branch ]] && return
local version_url=$(format_version_url) local version_url=$(format_version_url)
local upstream=$(curl -Ls "$version_url" | awk -F= '/^version=/ {print $2}') local upstream=$(curl -Ls "$version_url" | awk -F= '/^version=/ {print $2}')
local res=$(get_response_code "$version_url") local res=$(get_response_code "$version_url")
@@ -615,10 +616,10 @@ fetch_helpers_by_sum(){
[[ -f "$config_file" ]] && source "$config_file" [[ -f "$config_file" ]] && source "$config_file"
declare -A sums declare -A sums
sums=( sums=(
["funcs"]="6ae3ead7034dc8e7543472bddee75c63" ["funcs"]="5d7d92b7b8a9c788b133ce5271a76553"
["query_v2.py"]="55d339ba02512ac69de288eb3be41067" ["query_v2.py"]="55d339ba02512ac69de288eb3be41067"
["servers.py"]="ed442c3aecf33f777d59dcf53650d263" ["servers.py"]="ed442c3aecf33f777d59dcf53650d263"
["ui.py"]="8d05bbd7b8e15a97fae568e9a3dbf4d6" ["ui.py"]="2476397883a4272eaf940403ba5a6575"
["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397"
["pefile.py"]="21531f2c0d9dfa5f110cf6779f9d22c0" ["pefile.py"]="21531f2c0d9dfa5f110cf6779f9d22c0"
) )
@@ -639,6 +640,10 @@ fetch_helpers_by_sum(){
realbranch="dzgui" realbranch="dzgui"
fi fi
if [[ -n $reference_branch ]]; then
realbranch="$reference_branch"
fi
for i in "${!sums[@]}"; do for i in "${!sums[@]}"; do
file="$i" file="$i"
sum="${sums[$i]}" sum="${sums[$i]}"
@@ -979,10 +984,6 @@ varcheck(){
create_config create_config
return 0 return 0
fi fi
if [[ $src_path != $(realpath "$0") ]]; then
src_path=$(realpath "$0")
update_config
fi
} }
is_dzg_downloading(){ is_dzg_downloading(){
if [[ -d $steam_path ]] && [[ -d $steam_path/downloading/$aid ]]; then if [[ -d $steam_path ]] && [[ -d $steam_path/downloading/$aid ]]; then
+1 -1
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -o pipefail set -o pipefail
version="6.0.0-beta.8" version="6.0.1-beta.2"
#CONSTANTS #CONSTANTS
aid=221100 aid=221100
+20 -17
View File
@@ -18,6 +18,7 @@ from enum import Enum
from collections.abc import Callable from collections.abc import Callable
from concurrent.futures import wait from concurrent.futures import wait
from concurrent.futures import ThreadPoolExecutor from concurrent.futures import ThreadPoolExecutor
from pathlib import Path
from typing import Literal, Self, Any from typing import Literal, Self, Any
import servers as Servers # noqa E402 import servers as Servers # noqa E402
@@ -823,8 +824,7 @@ def query_history() -> list | None:
rows = [row.rstrip("\n") for row in f] rows = [row.rstrip("\n") for row in f]
except OSError: except OSError:
rows = None rows = None
finally: return rows
return rows
def query_favorites() -> None | list: def query_favorites() -> None | list:
@@ -1016,7 +1016,7 @@ def process_tree_option(choice: RowType) -> None:
return return
if command == RowType.CHANGELOG: if command == RowType.CHANGELOG:
App.grid.notebook.set_page_by_enum(NotebookPage.CHANGELOG) App.grid.notebook.open_changelog()
return return
if command == RowType.QUICK_CONNECT: if command == RowType.QUICK_CONNECT:
@@ -4325,22 +4325,20 @@ class KeybindingsDialog(Gtk.Box):
class Changelog(Gtk.Box): class Changelog(Gtk.Box):
def __init__(self): def __init__(self):
super().__init__() super().__init__()
self.changelog_label = Gtk.Label()
self.add(self.changelog_label)
def open_changelog(self, path: Path) -> None:
try: try:
with open(changelog_path, "r") as f: changelog = path.read_text()
changelog = f.read()
changelog_label = Gtk.Label()
changelog = self.format_pango(changelog)
changelog_label.set_markup(changelog)
self.add(changelog_label)
except FileNotFoundError:
msg = f"Failed to find CHANGELOG.md at {changelog_path}"
logger.critical(msg)
spawn_dialog(msg, Popup.WARN)
return
except OSError as e: except OSError as e:
spawn_dialog(f"Something went wrong: {e}", Popup.WARN) spawn_dialog(f"Something went wrong: {e}", Popup.NOTIFY)
logger.critical(e) logger.critical(e)
return return Exception
formatted = self.format_pango(changelog)
self.changelog_label.set_markup(formatted)
App.grid.notebook.set_page_by_enum(NotebookPage.CHANGELOG)
def format_pango(self, text: str) -> str: def format_pango(self, text: str) -> str:
medium = '<span size="medium"><b>' medium = '<span size="medium"><b>'
@@ -4357,7 +4355,8 @@ class Notebook(Gtk.Notebook):
def __init__(self): def __init__(self):
super().__init__(show_tabs=False, show_border=False) super().__init__(show_tabs=False, show_border=False)
self.clog = ScrollableNote(Changelog()) self.changelog = Changelog()
self.clog = ScrollableNote(self.changelog)
self.clog.type = RowType.CHANGELOG self.clog.type = RowType.CHANGELOG
self.clog.show_all() self.clog.show_all()
self.append_page(self.clog) self.append_page(self.clog)
@@ -4376,6 +4375,10 @@ class Notebook(Gtk.Notebook):
self.connect("switch-page", self._on_page_changed) self.connect("switch-page", self._on_page_changed)
self.connect("key-press-event", self._on_keypress) self.connect("key-press-event", self._on_keypress)
def open_changelog(self) -> None:
path = Path(changelog_path)
self.changelog.open_changelog(path)
def _set_adjustment(self, adjustment: VAdjustment) -> None: def _set_adjustment(self, adjustment: VAdjustment) -> None:
INCREMENT = 50 INCREMENT = 50
page = self.get_page() page = self.get_page()