This commit is contained in:
aclist 2025-11-10 03:07:51 +00:00 committed by GitHub
commit fb728e0418
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 43 additions and 30 deletions

View File

@ -1,5 +1,14 @@
# 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
## Added
- Internal flag to allow distribution packaged releases to disable in-app updates

View File

@ -1,7 +1,10 @@
#!/usr/bin/env bash
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
aid=221100
@ -218,9 +221,6 @@ default_steam_path="$default_steam_path"
#Preferred Steam launch command (for Flatpak support)
preferred_client="$preferred_client"
#DZGUI source path
src_path="$src_path"
END
}
depcheck(){
@ -239,8 +239,8 @@ depcheck(){
check_pyver(){
local pyver=$(python3 --version | awk '{print $2}')
local minor=$(<<< $pyver awk -F. '{print $2}')
if [[ -z $pyver ]] || [[ ${pyver:0:1} -lt 3 ]] || [[ $minor -lt 10 ]]; then
local msg="Requires Python >=3.10"
if [[ -z $pyver ]] || [[ ${pyver:0:1} -lt 3 ]] || [[ $minor -lt 11 ]] || [[ $minor -gt 12 ]]; then
local msg="Requires Python 3.11 or 3.12"
raise_error_and_quit "$msg"
fi
logger INFO "Found Python version: $pyver"
@ -317,6 +317,7 @@ check_unmerged(){
fi
}
check_version(){
[[ -n $reference_branch ]] && return
local version_url=$(format_version_url)
local upstream=$(curl -Ls "$version_url" | awk -F= '/^version=/ {print $2}')
local res=$(get_response_code "$version_url")
@ -615,10 +616,10 @@ fetch_helpers_by_sum(){
[[ -f "$config_file" ]] && source "$config_file"
declare -A sums
sums=(
["funcs"]="6ae3ead7034dc8e7543472bddee75c63"
["funcs"]="5d7d92b7b8a9c788b133ce5271a76553"
["query_v2.py"]="55d339ba02512ac69de288eb3be41067"
["servers.py"]="ed442c3aecf33f777d59dcf53650d263"
["ui.py"]="8d05bbd7b8e15a97fae568e9a3dbf4d6"
["ui.py"]="2476397883a4272eaf940403ba5a6575"
["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397"
["pefile.py"]="21531f2c0d9dfa5f110cf6779f9d22c0"
)
@ -639,6 +640,10 @@ fetch_helpers_by_sum(){
realbranch="dzgui"
fi
if [[ -n $reference_branch ]]; then
realbranch="$reference_branch"
fi
for i in "${!sums[@]}"; do
file="$i"
sum="${sums[$i]}"
@ -979,10 +984,6 @@ varcheck(){
create_config
return 0
fi
if [[ $src_path != $(realpath "$0") ]]; then
src_path=$(realpath "$0")
update_config
fi
}
is_dzg_downloading(){
if [[ -d $steam_path ]] && [[ -d $steam_path/downloading/$aid ]]; then

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -o pipefail
version="6.0.0-beta.8"
version="6.0.1-beta.2"
#CONSTANTS
aid=221100

View File

@ -18,6 +18,7 @@ from enum import Enum
from collections.abc import Callable
from concurrent.futures import wait
from concurrent.futures import ThreadPoolExecutor
from pathlib import Path
from typing import Literal, Self, Any
import servers as Servers # noqa E402
@ -823,8 +824,7 @@ def query_history() -> list | None:
rows = [row.rstrip("\n") for row in f]
except OSError:
rows = None
finally:
return rows
return rows
def query_favorites() -> None | list:
@ -1016,7 +1016,7 @@ def process_tree_option(choice: RowType) -> None:
return
if command == RowType.CHANGELOG:
App.grid.notebook.set_page_by_enum(NotebookPage.CHANGELOG)
App.grid.notebook.open_changelog()
return
if command == RowType.QUICK_CONNECT:
@ -4325,22 +4325,20 @@ class KeybindingsDialog(Gtk.Box):
class Changelog(Gtk.Box):
def __init__(self):
super().__init__()
self.changelog_label = Gtk.Label()
self.add(self.changelog_label)
def open_changelog(self, path: Path) -> None:
try:
with open(changelog_path, "r") as f:
changelog = f.read()
changelog_label = Gtk.Label()
changelog = self.format_pango(changelog)
changelog_label.set_markup(changelog)
self.add(changelog_label)
except FileNotFoundError:
msg = f"Failed to find CHANGELOG.md at {changelog_path}"
logger.critical(msg)
spawn_dialog(msg, Popup.WARN)
return
changelog = path.read_text()
except OSError as e:
spawn_dialog(f"Something went wrong: {e}", Popup.WARN)
spawn_dialog(f"Something went wrong: {e}", Popup.NOTIFY)
logger.critical(e)
return
return Exception
formatted = self.format_pango(changelog)
self.changelog_label.set_markup(formatted)
App.grid.notebook.set_page_by_enum(NotebookPage.CHANGELOG)
def format_pango(self, text: str) -> str:
medium = '<span size="medium"><b>'
@ -4357,7 +4355,8 @@ class Notebook(Gtk.Notebook):
def __init__(self):
super().__init__(show_tabs=False, show_border=False)
self.clog = ScrollableNote(Changelog())
self.changelog = Changelog()
self.clog = ScrollableNote(self.changelog)
self.clog.type = RowType.CHANGELOG
self.clog.show_all()
self.append_page(self.clog)
@ -4376,6 +4375,10 @@ class Notebook(Gtk.Notebook):
self.connect("switch-page", self._on_page_changed)
self.connect("key-press-event", self._on_keypress)
def open_changelog(self) -> None:
path = Path(changelog_path)
self.changelog.open_changelog(path)
def _set_adjustment(self, adjustment: VAdjustment) -> None:
INCREMENT = 50
page = self.get_page()