Add GUI desktop application
- Add gui/ package: CustomTkinter app with dashboard, mods, tools, logs, and settings views; first-run SetupWizard for config.json generation - Add gui.py root entry point (calls gui.run_app()) - Add selection.json for GUI selection state persistence - Add customtkinter to requirements.txt - Fix link_mods.py minor issues surfaced during GUI integration - Add modlist_html/Test_Preset_A.html and Test_Preset_B.html as example inputs - Update README.md: add GUI prerequisites, gui.py script section, gui/ folder structure, customtkinter to prerequisites table - Update CLAUDE.md: add python gui.py to common commands, document GUI package architecture and views Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
23
CLAUDE.md
23
CLAUDE.md
@@ -20,6 +20,9 @@ python run.py --skip-fetch --skip-link
|
||||
# Diagnose mod folder name / steam_id issues
|
||||
python check_names.py
|
||||
python check_names.py --fix --fix-ids
|
||||
|
||||
# Launch the GUI
|
||||
python gui.py
|
||||
```
|
||||
|
||||
There is no build step, linter config, or package install beyond `pip install -r requirements.txt`.
|
||||
@@ -80,6 +83,26 @@ Pass 2 builds `ok_disk_names` — the set of disk names that already match the s
|
||||
|
||||
`--fix-ids` corrects `meta.cpp` using steam IDs from `comparison.json` (sourced from Steam Workshop URLs in the HTML presets) as the authoritative source.
|
||||
|
||||
### GUI package
|
||||
|
||||
`gui/` is a CustomTkinter desktop application wrapping the CLI toolchain. Entry point is `gui.py` at the project root, which calls `gui.run_app()`.
|
||||
|
||||
**Key files:**
|
||||
- `gui/__init__.py` — sets dark theme + blue color scheme; exports `run_app()`
|
||||
- `gui/app.py` — `ArmaModManagerApp` main window; manages view routing, config loading, thread-safe log queue, and background pipeline execution
|
||||
- `gui/wizard.py` — `SetupWizard` dialog shown on first launch when no `config.json` exists
|
||||
- `gui/_constants.py` — window dimensions, status color constants, file paths
|
||||
- `gui/_io.py` — `_QueueWriter` redirects stdout/stderr to a thread-safe queue so pipeline output streams into the Logs view
|
||||
|
||||
**Views** (`gui/views/`): each inherits `BaseView`; `build()` runs once on creation, `refresh()` runs on each navigation:
|
||||
- `dashboard.py` — overview, status, quick stats
|
||||
- `mods.py` — browse and manage downloaded mods by group
|
||||
- `tools.py` — link/unlink, rename folders, sync missing mods, check server
|
||||
- `logs.py` — real-time log viewer fed from the stdout/stderr queue
|
||||
- `settings.py` — in-app editor for `config.json` (server URL, paths, credentials)
|
||||
|
||||
**`selection.json`** — GUI selection state file, tracked in git. Persists which mods/groups are selected between GUI sessions. Written by the GUI; safe to delete (GUI recreates it on next save).
|
||||
|
||||
## Python Version Compatibility
|
||||
|
||||
Minimum is Python **3.9**. All files that use `X | Y` union type annotations **must** have `from __future__ import annotations` as the first import. Without it, the `|` syntax raises `TypeError` at runtime on Python < 3.10. Every module in `arma_modlist_tools/` already has it; any new CLI script you add must include it too.
|
||||
|
||||
Reference in New Issue
Block a user