mirror of
https://github.com/aclist/dztui.git
synced 2026-08-29 03:06:56 +02:00
Merge 74bf4b5cfc into d3f64c1ba5
This commit is contained in:
commit
6966db8ae7
@ -14,5 +14,10 @@ sphinx-build -M html source build -a
|
|||||||
|
|
||||||
# Building standalone DZGUI release binaries
|
# Building standalone DZGUI release binaries
|
||||||
1. Run `./scripts/dl_pyapp.sh`
|
1. Run `./scripts/dl_pyapp.sh`
|
||||||
2. Run `python3 scripts/release.py`
|
# TODO: secondary script that packs this archive
|
||||||
3. Generate a release and tag against the bundled `dzgui` executable
|
2. Download cpython 3.13, linux, gnu, v3
|
||||||
|
https://github.com/astral-sh/python-build-standalone/releases/download/20251014/cpython-3.13.9%2B20251014-x86_64_v3-unknown-linux-gnu-install_only_stripped.tar.gz
|
||||||
|
3. Explicitly install dependencies into site-packages
|
||||||
|
4. Pack back into a tarball
|
||||||
|
5. Run `python3 scripts/release.py`
|
||||||
|
6. Generate a release and tag against the bundled `dzgui` executable
|
||||||
|
|||||||
@ -106,7 +106,7 @@ class A2SInfo:
|
|||||||
|
|
||||||
def get_netmask() -> str:
|
def get_netmask() -> str:
|
||||||
hostname = os.uname()[1]
|
hostname = os.uname()[1]
|
||||||
i = socket.gethostbyname(hostname)
|
i = socket.gethostbyname(f"{hostname}.local")
|
||||||
netmask = i.rsplit(".", 1)[0]
|
netmask = i.rsplit(".", 1)[0]
|
||||||
return netmask
|
return netmask
|
||||||
|
|
||||||
|
|||||||
@ -112,6 +112,9 @@ def main() -> None:
|
|||||||
copy_state_files(xdg_paths["XDG_STATE_HOME"])
|
copy_state_files(xdg_paths["XDG_STATE_HOME"])
|
||||||
# TODO: add logging inside wizard
|
# TODO: add logging inside wizard
|
||||||
SetupWizard(_is_steam_deck, XDG.config)
|
SetupWizard(_is_steam_deck, XDG.config)
|
||||||
|
|
||||||
|
# NOTE: implies that setup wizard failed or was closed
|
||||||
|
if has_new_config(XDG.config) is False:
|
||||||
return
|
return
|
||||||
|
|
||||||
setup_logger(XDG.debug)
|
setup_logger(XDG.debug)
|
||||||
@ -127,7 +130,7 @@ def main() -> None:
|
|||||||
if has_steam_client() is False:
|
if has_steam_client() is False:
|
||||||
EarlyAlertDialog(init.requires_steam)
|
EarlyAlertDialog(init.requires_steam)
|
||||||
|
|
||||||
# NOTE: clear versions file of unlinked mods
|
# NOTE: clears versions file of unlinked mods
|
||||||
rebuild_symlinks(XDG.config)
|
rebuild_symlinks(XDG.config)
|
||||||
remove_stale_signatures(XDG.config, XDG.version)
|
remove_stale_signatures(XDG.config, XDG.version)
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,6 @@ import gi
|
|||||||
gi.require_version("Gtk", "3.0")
|
gi.require_version("Gtk", "3.0")
|
||||||
from gi.repository.Gtk import main_quit # noqa E402
|
from gi.repository.Gtk import main_quit # noqa E402
|
||||||
|
|
||||||
# import dzgui.api.servers as Servers
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from dzgui.config.userprefs import UserPrefs
|
from dzgui.config.userprefs import UserPrefs
|
||||||
from dzgui.controllers.mc import Controller
|
from dzgui.controllers.mc import Controller
|
||||||
|
|||||||
@ -20,7 +20,10 @@ logger = logging.getLogger(APP_NAME)
|
|||||||
class NoteManager:
|
class NoteManager:
|
||||||
def __init__(self, controller: "Controller", path: "Path") -> None:
|
def __init__(self, controller: "Controller", path: "Path") -> None:
|
||||||
self.notes_path = path
|
self.notes_path = path
|
||||||
self.cache: dict[str, str] = read_json(self.notes_path)
|
try:
|
||||||
|
self.cache: dict[str, str] = read_json(self.notes_path)
|
||||||
|
except Exception:
|
||||||
|
self.cache = {}
|
||||||
|
|
||||||
def add_note(self, server: str, note: str) -> None:
|
def add_note(self, server: str, note: str) -> None:
|
||||||
self.cache[server] = note
|
self.cache[server] = note
|
||||||
|
|||||||
@ -67,4 +67,4 @@ label_client = "Steam client"
|
|||||||
|
|
||||||
### Completion page
|
### Completion page
|
||||||
heading_completion = "Setup complete"
|
heading_completion = "Setup complete"
|
||||||
blurb_completion = "Configuration completed successfully. Please exit and restart DZGUI to apply changes."
|
blurb_completion = "Configuration completed successfully. Click 'Close' to close this dialog and launch DZGUI."
|
||||||
|
|||||||
@ -101,7 +101,7 @@ build_corrupted = (
|
|||||||
"Steam settings or DayZ installation may be corrupted. Try restarting Steam."
|
"Steam settings or DayZ installation may be corrupted. Try restarting Steam."
|
||||||
)
|
)
|
||||||
api_warn_msg = """No servers returned. Please wait and try again.
|
api_warn_msg = """No servers returned. Please wait and try again.
|
||||||
If this issue persists, your API key may be defunct or your network is blocking requests.
|
This usually indicates a transitory network timeout. If this issue persists, your API key or network may be malfunctioning.
|
||||||
"""
|
"""
|
||||||
server_timeout = "Timed out when querying server, check IP or try again later."
|
server_timeout = "Timed out when querying server, check IP or try again later."
|
||||||
server_error = (
|
server_error = (
|
||||||
|
|||||||
@ -262,8 +262,8 @@ class Grid(Gtk.Grid):
|
|||||||
|
|
||||||
self.emitter.connect("server_page_toggled", self.toggle_filter_panels)
|
self.emitter.connect("server_page_toggled", self.toggle_filter_panels)
|
||||||
|
|
||||||
|
# TODO: drop, use map/signal
|
||||||
def hide_widgets_on_init(self) -> None:
|
def hide_widgets_on_init(self) -> None:
|
||||||
self.conpan.set_lan_visible(False)
|
|
||||||
self.right_panel.sel_panel.hide()
|
self.right_panel.sel_panel.hide()
|
||||||
|
|
||||||
def toggle_filter_panels(self, emitter: "Emitter", state: bool) -> None:
|
def toggle_filter_panels(self, emitter: "Emitter", state: bool) -> None:
|
||||||
|
|||||||
@ -278,9 +278,7 @@ class ConnectPanel(Gtk.Box):
|
|||||||
|
|
||||||
for el in self.lan, self.fav, self.add_panel:
|
for el in self.lan, self.fav, self.add_panel:
|
||||||
self.add(el)
|
self.add(el)
|
||||||
|
self.lan.set_visible(False)
|
||||||
def set_lan_visible(self, state: bool) -> None:
|
|
||||||
self.lan.set_visible(state)
|
|
||||||
|
|
||||||
def _on_lan_tab_toggled(self, emitter: "Emitter", state: bool) -> None:
|
def _on_lan_tab_toggled(self, emitter: "Emitter", state: bool) -> None:
|
||||||
self.set_lan_visible(state)
|
self.lan.set_visible(state)
|
||||||
|
|||||||
@ -11,5 +11,5 @@ class ModsMixin:
|
|||||||
self, tree: TreeView, path: Gtk.TreePath, column: Gtk.TreeViewColumn
|
self, tree: TreeView, path: Gtk.TreePath, column: Gtk.TreeViewColumn
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
||||||
path = self.get_focused_row_path() # type: ignore
|
mod = self.get_value_at_index(2)
|
||||||
self.controller.open_mod_page(path) # type: ignore
|
self.controller.open_workshop_page(mod) # type: ignore
|
||||||
|
|||||||
@ -17,7 +17,7 @@ from dzgui.views.trees.tree_server_mods import ServerModTreeView
|
|||||||
import gi
|
import gi
|
||||||
|
|
||||||
gi.require_version("Gtk", "3.0")
|
gi.require_version("Gtk", "3.0")
|
||||||
from gi.repository import Gdk, Gtk # type: ignore # noqa E402
|
from gi.repository import Gdk, Gtk # noqa E402
|
||||||
|
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
|
|||||||
@ -162,8 +162,8 @@ class ServerTreeView(ContextMixin, TreeView): # type: ignore
|
|||||||
|
|
||||||
def _on_map(self, widget: Self) -> None:
|
def _on_map(self, widget: Self) -> None:
|
||||||
# TODO: disable filter panel if current model is None
|
# TODO: disable filter panel if current model is None
|
||||||
if self.get_enum() is ServerTab.LAN:
|
state = self.get_enum() is ServerTab.LAN
|
||||||
self.emitter.emit("lan_tab_toggled", True)
|
self.emitter.emit("lan_tab_toggled", state)
|
||||||
|
|
||||||
store = self.filter_man.get_map_store()
|
store = self.filter_man.get_map_store()
|
||||||
|
|
||||||
@ -178,8 +178,6 @@ class ServerTreeView(ContextMixin, TreeView): # type: ignore
|
|||||||
# NOTE: removes queue checker for this tab
|
# NOTE: removes queue checker for this tab
|
||||||
GLib.Source.remove(self.queue_id)
|
GLib.Source.remove(self.queue_id)
|
||||||
self.emitter.disconnect(self.handler_id)
|
self.emitter.disconnect(self.handler_id)
|
||||||
if self.get_enum() is ServerTab.LAN:
|
|
||||||
self.emitter.emit("lan_tab_toggled", False)
|
|
||||||
|
|
||||||
def _on_col_width_changed(
|
def _on_col_width_changed(
|
||||||
self, col: Gtk.TreeViewColumn, width: GObject.ParamSpecInt
|
self, col: Gtk.TreeViewColumn, width: GObject.ParamSpecInt
|
||||||
|
|||||||
@ -4,7 +4,7 @@ description = "DayZ server browser and mod manager for Linux"
|
|||||||
authors = [
|
authors = [
|
||||||
{name = "aclist"}
|
{name = "aclist"}
|
||||||
]
|
]
|
||||||
version = "7.0.0b2"
|
version = "7.0.0b3"
|
||||||
license = "GPL-3.0-or-later"
|
license = "GPL-3.0-or-later"
|
||||||
license-files = ["LICENSE"]
|
license-files = ["LICENSE"]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|||||||
@ -9,6 +9,7 @@ root = Path(__file__).resolve().parents[1]
|
|||||||
output = root.joinpath("dist")
|
output = root.joinpath("dist")
|
||||||
|
|
||||||
pyapp_dir = root.joinpath("pyapp-latest")
|
pyapp_dir = root.joinpath("pyapp-latest")
|
||||||
|
cpython = root.joinpath("build/cpython/airgapped.tar.gz")
|
||||||
|
|
||||||
builder = build.ProjectBuilder(root)
|
builder = build.ProjectBuilder(root)
|
||||||
wheel = builder.build("wheel", output_directory=output)
|
wheel = builder.build("wheel", output_directory=output)
|
||||||
@ -26,9 +27,15 @@ env["PYAPP_PROJECT_VERSION"] = version
|
|||||||
env["PYAPP_PROJECT_NAME"] = appname
|
env["PYAPP_PROJECT_NAME"] = appname
|
||||||
env["PYAPP_EXEC_SPEC"] = entrypoint
|
env["PYAPP_EXEC_SPEC"] = entrypoint
|
||||||
env["PYAPP_PROJECT_PATH"] = wheel
|
env["PYAPP_PROJECT_PATH"] = wheel
|
||||||
env["PYAPP_DISTRIBUTION_EMBED"] = "true"
|
|
||||||
env["PYAPP_PYTHON_VERSION"] = "3.13"
|
|
||||||
env["PYAPP_PASS_LOCATION"] = "true"
|
env["PYAPP_PASS_LOCATION"] = "true"
|
||||||
|
# env["PYAPP_PYTHON_VERSION"] = "3.13"
|
||||||
|
|
||||||
|
# NOTE: explicitly install all dependencies into distribution
|
||||||
|
env["PYAPP_SKIP_INSTALL"] = "true"
|
||||||
|
env["PYAPP_DISTRIBUTION_EMBED"] = "true"
|
||||||
|
env["PYAPP_FULL_ISOLATION"] = "true"
|
||||||
|
env["PYAPP_DISTRIBUTION_PATH"] = str(cpython)
|
||||||
|
env["PYAPP_DISTRIBUTION_PYTHON_PATH"] = "python/bin/python3"
|
||||||
|
|
||||||
proc = subprocess.run(["cargo", "build", "--release"], env=env, cwd=pyapp_dir)
|
proc = subprocess.run(["cargo", "build", "--release"], env=env, cwd=pyapp_dir)
|
||||||
if proc.returncode == 0:
|
if proc.returncode == 0:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user