mirror of
https://github.com/aclist/dztui.git
synced 2026-11-19 16:15:39 +01:00
Compare commits
10
Commits
26a2362172
...
1a065123bb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a065123bb | ||
|
|
2586306323 | ||
|
|
1ccb99d935 | ||
|
|
054fe968d1 | ||
|
|
1760e6e928 | ||
|
|
a2a39e9927 | ||
|
|
e664f68624 | ||
|
|
2e41856348 | ||
|
|
e92df8c062 | ||
|
|
494311e8df |
No files matched your search
@@ -162,7 +162,6 @@ def add_steam_shortcut(steam_path: Path, exe_path: Path) -> None:
|
|||||||
images = Path(str(traversable))
|
images = Path(str(traversable))
|
||||||
icon = images.joinpath("icon.png")
|
icon = images.joinpath("icon.png")
|
||||||
|
|
||||||
# TEST: assert that record (start dir and exe combo) is in shortcuts after creation
|
|
||||||
shortcuts = Shortcuts(Path(steam_path))
|
shortcuts = Shortcuts(Path(steam_path))
|
||||||
shortcuts.add_shortcut(APP_NAME, start_dir, exe_path, icon)
|
shortcuts.add_shortcut(APP_NAME, start_dir, exe_path, icon)
|
||||||
shortcuts.save_shortcuts()
|
shortcuts.save_shortcuts()
|
||||||
|
|||||||
+32
-20
@@ -15,6 +15,7 @@ from dzgui.const.constants import (
|
|||||||
APPID_DAYZ,
|
APPID_DAYZ,
|
||||||
APPID_DAYZ_EXP,
|
APPID_DAYZ_EXP,
|
||||||
APP_NAME,
|
APP_NAME,
|
||||||
|
DAYZ_BINARY,
|
||||||
DEBIAN_STEAM_PATH,
|
DEBIAN_STEAM_PATH,
|
||||||
DEFAULT_STEAM_PATH,
|
DEFAULT_STEAM_PATH,
|
||||||
FLATPAK_STEAM_PATH,
|
FLATPAK_STEAM_PATH,
|
||||||
@@ -38,19 +39,16 @@ logger = logging.getLogger(APP_NAME)
|
|||||||
|
|
||||||
class AppNotInstalledError(Exception):
|
class AppNotInstalledError(Exception):
|
||||||
"""App not present in user's libraryfolders"""
|
"""App not present in user's libraryfolders"""
|
||||||
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class AppMovedError(Exception):
|
class AppMovedError(Exception):
|
||||||
"""VDF points to a nonexistent location on disk"""
|
"""VDF points to a nonexistent location on disk"""
|
||||||
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class VDFLoadError(Exception):
|
class VDFLoadError(Exception):
|
||||||
"""Malformed VDF or JSON conversion"""
|
"""Malformed VDF or JSON conversion"""
|
||||||
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
@@ -219,6 +217,7 @@ def find_user_id(path: Path) -> str | None:
|
|||||||
logger.warn(e)
|
logger.warn(e)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
def find_user_id_32(path: Path) -> int:
|
def find_user_id_32(path: Path) -> int:
|
||||||
uid = find_user_id(path)
|
uid = find_user_id(path)
|
||||||
if uid is None:
|
if uid is None:
|
||||||
@@ -301,21 +300,24 @@ def get_running_app() -> int | None:
|
|||||||
PROC_NAME = "steam"
|
PROC_NAME = "steam"
|
||||||
SUBPROC_NAME = "reaper"
|
SUBPROC_NAME = "reaper"
|
||||||
FLAG = "AppId"
|
FLAG = "AppId"
|
||||||
|
# NOTE: may cause conflicts if multiple apps are running
|
||||||
for proc in psutil.process_iter():
|
try:
|
||||||
if proc.name() == PROC_NAME:
|
for proc in psutil.process_iter():
|
||||||
subprocs = proc.children()
|
if proc.name() == PROC_NAME:
|
||||||
filtered = (proc for proc in subprocs if proc.name() == SUBPROC_NAME)
|
subprocs = proc.children()
|
||||||
try:
|
filtered = (proc for proc in subprocs if proc.name() == SUBPROC_NAME)
|
||||||
proc = next(filtered)
|
try:
|
||||||
except StopIteration:
|
proc = next(filtered)
|
||||||
return None
|
except StopIteration:
|
||||||
args = proc.cmdline()
|
return None
|
||||||
appid = (row for row in args if FLAG in row)
|
args = proc.cmdline()
|
||||||
try:
|
appid = (row for row in args if FLAG in row)
|
||||||
return int(next(appid).split("=")[1])
|
try:
|
||||||
except StopIteration:
|
return int(next(appid).split("=")[1])
|
||||||
return None
|
except StopIteration:
|
||||||
|
return None
|
||||||
|
except Exception as e:
|
||||||
|
logger.debug(e)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
@@ -337,9 +339,11 @@ def get_app_allows_downloads(path: Path, appid: int) -> bool:
|
|||||||
case _:
|
case _:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
def get_config(path: Path) -> Path:
|
def get_config(path: Path) -> Path:
|
||||||
return path.joinpath("config/config.vdf")
|
return path.joinpath("config/config.vdf")
|
||||||
|
|
||||||
|
|
||||||
def get_client_allows_downloads(path: Path) -> bool:
|
def get_client_allows_downloads(path: Path) -> bool:
|
||||||
config = get_config(path)
|
config = get_config(path)
|
||||||
try:
|
try:
|
||||||
@@ -360,8 +364,16 @@ def get_client_allows_downloads(path: Path) -> bool:
|
|||||||
|
|
||||||
|
|
||||||
def is_dayz_running() -> bool:
|
def is_dayz_running() -> bool:
|
||||||
appid = get_running_app()
|
"""Subprocesses spawned from Steam will not show up in regular process tree"""
|
||||||
return appid in (APPID_DAYZ, APPID_DAYZ_EXP)
|
procs = []
|
||||||
|
substring = DAYZ_BINARY
|
||||||
|
for proc in psutil.process_iter():
|
||||||
|
try:
|
||||||
|
procs.append(proc.cmdline())
|
||||||
|
except Exception as e:
|
||||||
|
logger.warning(e)
|
||||||
|
continue
|
||||||
|
return any(substring in item for sublist in procs for item in sublist)
|
||||||
|
|
||||||
|
|
||||||
def get_app_path(folders_path: Path, appid: int) -> Path:
|
def get_app_path(folders_path: Path, appid: int) -> Path:
|
||||||
|
|||||||
+29
-28
@@ -1,6 +1,7 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## Added
|
## [7.0.0] Unreleased
|
||||||
|
### Added
|
||||||
- Setup wizard
|
- Setup wizard
|
||||||
- Changelog text wrapping and formatting
|
- Changelog text wrapping and formatting
|
||||||
- Changelog ships with source
|
- Changelog ships with source
|
||||||
@@ -44,7 +45,7 @@
|
|||||||
- Generate Steam shortcuts and cover art
|
- Generate Steam shortcuts and cover art
|
||||||
- Warn user if background downloads are disabled
|
- Warn user if background downloads are disabled
|
||||||
|
|
||||||
## Changed
|
### Changed
|
||||||
- Conform to PEP 440 versioning for beta versions
|
- Conform to PEP 440 versioning for beta versions
|
||||||
- Reduce padding on keys button
|
- Reduce padding on keys button
|
||||||
- Boldface breadcrumbs
|
- Boldface breadcrumbs
|
||||||
@@ -61,58 +62,58 @@
|
|||||||
- Enable LAN page Empty/Full filters on first run of app
|
- Enable LAN page Empty/Full filters on first run of app
|
||||||
- Propagate subscribed mods to Steam client
|
- Propagate subscribed mods to Steam client
|
||||||
|
|
||||||
## Dropped
|
### Dropped
|
||||||
- Debug mode
|
- Debug mode
|
||||||
- Branch switching
|
- Branch switching
|
||||||
- Manual mod install mode (describe rationale)
|
- Manual mod install mode (describe rationale)
|
||||||
- Force update mods
|
- Force update mods
|
||||||
|
|
||||||
## Fixed
|
### Fixed
|
||||||
- Longstanding issue with left clicks not registering as tree selection changes after spamming keyboard input
|
- Longstanding issue with left clicks not registering as tree selection changes after spamming keyboard input
|
||||||
- Center server title text on server dialogs
|
- Center server title text on server dialogs
|
||||||
- Rare segfaults when changing maps (threading)
|
- Rare segfaults when changing maps (threading)
|
||||||
- Moved dialogs out of threads
|
- Moved dialogs out of threads
|
||||||
|
|
||||||
## Unreleased
|
### Unreleased
|
||||||
- Load offline mods
|
- Load offline mods
|
||||||
- Local documentation
|
- Local documentation
|
||||||
- Raw debug command in context menu
|
- Raw debug command in context menu
|
||||||
|
|
||||||
## Developer-facing
|
### Developer-facing
|
||||||
- Add pyproject.toml file
|
- Add pyproject.toml file
|
||||||
- Show deprecation warnings
|
- Show deprecation warnings
|
||||||
- Options -> Dev page
|
- Options -> Dev page
|
||||||
|
|
||||||
## [6.0.5] 2026-05-17
|
## [6.0.5] 2026-05-17
|
||||||
## Changed
|
### Changed
|
||||||
- Update symlink hash logic to align with DZGUI 7 beta
|
- Update symlink hash logic to align with DZGUI 7 beta
|
||||||
- Update A2S helper to latest commit
|
- Update A2S helper to latest commit
|
||||||
|
|
||||||
## [6.0.4] 2026-04-13
|
## [6.0.4] 2026-04-13
|
||||||
## Fixed
|
### Fixed
|
||||||
- Update A2S module checksums to support servers with missing description field
|
- Update A2S module checksums to support servers with missing description field
|
||||||
|
|
||||||
## [6.0.3] 2026-04-12
|
## [6.0.3] 2026-04-12
|
||||||
## Fixed
|
### Fixed
|
||||||
- Use GLibUnix namespace where available when setting up SIGINT callback
|
- Use GLibUnix namespace where available when setting up SIGINT callback
|
||||||
|
|
||||||
## [6.0.2] 2026-01-26
|
## [6.0.2] 2026-01-26
|
||||||
## Fixed
|
### Fixed
|
||||||
- Explicitly use Python 3.13 when calling subprocesses
|
- Explicitly use Python 3.13 when calling subprocesses
|
||||||
- Raise error correctly from module
|
- Raise error correctly from module
|
||||||
- Do not spawn dialogs from inside of thread when fetching prereqs
|
- Do not spawn dialogs from inside of thread when fetching prereqs
|
||||||
## Changed
|
### Changed
|
||||||
- Optimize time complexity of startup checks
|
- Optimize time complexity of startup checks
|
||||||
- Optimize coordinate calculation by using local records first
|
- Optimize coordinate calculation by using local records first
|
||||||
- Rename some internal functions
|
- Rename some internal functions
|
||||||
- Wrap entire startup process in dialog
|
- Wrap entire startup process in dialog
|
||||||
|
|
||||||
## [6.0.1] 2026-01-16
|
## [6.0.1] 2026-01-16
|
||||||
## Fixed
|
### Fixed
|
||||||
- Explicitly use Python 3.13 when calling subprocesses
|
- Explicitly use Python 3.13 when calling subprocesses
|
||||||
|
|
||||||
## [6.0.0] 2026-01-14
|
## [6.0.0] 2026-01-14
|
||||||
## Added
|
### Added
|
||||||
- Support DayZ Experimental
|
- Support DayZ Experimental
|
||||||
- Ping display on server tables
|
- Ping display on server tables
|
||||||
- Save descriptive text notes on a per-server basis
|
- Save descriptive text notes on a per-server basis
|
||||||
@@ -138,7 +139,7 @@
|
|||||||
- Commandline usage help text (GaryBlackbourne)
|
- Commandline usage help text (GaryBlackbourne)
|
||||||
- More descriptive help dialogs when initial dependencies are missing
|
- More descriptive help dialogs when initial dependencies are missing
|
||||||
|
|
||||||
## Fixed
|
### Fixed
|
||||||
- Script failing to start when remote endpoints are unavailable (GaryBlackbourne)
|
- Script failing to start when remote endpoints are unavailable (GaryBlackbourne)
|
||||||
- Key stickiness when quickly navigating through entries in tables
|
- Key stickiness when quickly navigating through entries in tables
|
||||||
- Servers returning malformed A2S_INFO blocking server browser from loading
|
- Servers returning malformed A2S_INFO blocking server browser from loading
|
||||||
@@ -177,7 +178,7 @@
|
|||||||
- Path discovery during first-time setup when parsing filepaths with whitespaces
|
- 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
|
- First-time setup dialog continuously triggering when DayZ install path had whitespaces in it
|
||||||
|
|
||||||
## Changed
|
### Changed
|
||||||
- Require Python 3.13
|
- Require Python 3.13
|
||||||
- Reduced global API cooldown from 60s to 30s
|
- Reduced global API cooldown from 60s to 30s
|
||||||
- Clarify dialog messages when DayZ path could not be found
|
- Clarify dialog messages when DayZ path could not be found
|
||||||
@@ -189,50 +190,50 @@
|
|||||||
- Rewrote distance calculation module (GaryBlackbourne)
|
- Rewrote distance calculation module (GaryBlackbourne)
|
||||||
- Changed preferred client setting from radio toggle to combobox
|
- Changed preferred client setting from radio toggle to combobox
|
||||||
|
|
||||||
## Dropped
|
### Dropped
|
||||||
- Ping readout in statusbar
|
- Ping readout in statusbar
|
||||||
- Extraneous information from right statusbar
|
- Extraneous information from right statusbar
|
||||||
|
|
||||||
## [5.8.3] 2026-01-04
|
## [5.8.3] 2026-01-04
|
||||||
## Fixed
|
### Fixed
|
||||||
- Normalize checksum numbers and dates
|
- Normalize checksum numbers and dates
|
||||||
|
|
||||||
## [5.8.2] 2026-01-04
|
## [5.8.2] 2026-01-04
|
||||||
## Fixed
|
### Fixed
|
||||||
- Fix regression in symlink routine introduced by previous hotfix
|
- Fix regression in symlink routine introduced by previous hotfix
|
||||||
|
|
||||||
## [5.8.1] 2025-12-27
|
## [5.8.1] 2025-12-27
|
||||||
## Fixed
|
### Fixed
|
||||||
- Path discovery during first-time setup when parsing filepaths with whitespaces
|
- 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
|
- First-time setup dialog continuously triggering when DayZ install path had whitespaces in it
|
||||||
|
|
||||||
## [5.8.0] 2025-07-06
|
## [5.8.0] 2025-07-06
|
||||||
## Added
|
### Added
|
||||||
- Filter servers by official/unofficial status
|
- Filter servers by official/unofficial status
|
||||||
- Automatically fetch geolocation records
|
- Automatically fetch geolocation records
|
||||||
## Changed
|
### Changed
|
||||||
- Updated internal versioning of helper files
|
- Updated internal versioning of helper files
|
||||||
## Fixed
|
### Fixed
|
||||||
- Corrected erroneous 2024 date in prior changelog entries
|
- Corrected erroneous 2024 date in prior changelog entries
|
||||||
|
|
||||||
## [5.7.0] 2025-04-17
|
## [5.7.0] 2025-04-17
|
||||||
## Added
|
### Added
|
||||||
- Save application dimensions when quitting and restore on subsequent boot
|
- Save application dimensions when quitting and restore on subsequent boot
|
||||||
## Fixed
|
### Fixed
|
||||||
- Issues with the window exceeding the bounds of the screen when displaying some table contexts
|
- Issues with the window exceeding the bounds of the screen when displaying some table contexts
|
||||||
## Changed
|
### Changed
|
||||||
- More direct server ping query method that should return marginally more accurate times
|
- More direct server ping query method that should return marginally more accurate times
|
||||||
|
|
||||||
## [5.6.7] 2025-04-04
|
## [5.6.7] 2025-04-04
|
||||||
## Dropped
|
### 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
|
- 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] 2025-03-16
|
## [5.6.6] 2025-03-16
|
||||||
## Changed
|
### Changed
|
||||||
- Update IP database records for 2025-03
|
- Update IP database records for 2025-03
|
||||||
|
|
||||||
## [5.6.5] 2025-03-04
|
## [5.6.5] 2025-03-04
|
||||||
## Fixed
|
### Fixed
|
||||||
- Livonia server results being dropped from batch queries
|
- Livonia server results being dropped from batch queries
|
||||||
|
|
||||||
## [5.6.4] 2025-02-10
|
## [5.6.4] 2025-02-10
|
||||||
|
|||||||
@@ -55,8 +55,11 @@ class ConfigManager:
|
|||||||
self.update_config(Preferences.IP_LIST, ips)
|
self.update_config(Preferences.IP_LIST, ips)
|
||||||
|
|
||||||
def update_history_file(self, fqip: str) -> None:
|
def update_history_file(self, fqip: str) -> None:
|
||||||
with open(self.prefs.paths.history, "r") as f:
|
try:
|
||||||
ips = [line.rstrip() for line in f.readlines()]
|
with open(self.prefs.paths.history, "r") as f:
|
||||||
|
ips = [line.rstrip() for line in f.readlines()]
|
||||||
|
except FileNotFoundError:
|
||||||
|
ips = []
|
||||||
|
|
||||||
seen = set()
|
seen = set()
|
||||||
ips.append(fqip)
|
ips.append(fqip)
|
||||||
|
|||||||
Reference in new issue
Block a user