Skip to content

Latest commit

 

History

History
80 lines (60 loc) · 1.89 KB

File metadata and controls

80 lines (60 loc) · 1.89 KB

Checkpoint: GRF Extract GUI

Date: 2026-07-12
Status: OK (user confirmed)
Backup: grf_extract.py.bak_20260712_pre_gui (local)

Files

File Role
grf_extract_gui.py Tkinter desktop UI
Open GUI.bat Windows double-click launcher
grf_extract.py progress= callback + GUI when no CLI args

Features

  • Browse .grf + output folder
  • Toggle Action4 aircraft rename
  • Background-thread extract (UI stays responsive)
  • Live log + indeterminate progress bar
  • Open output folder
  • Auto-selects Real_Aircrafts_Beta.grf if present beside the script

Design

Hangar-bench utility palette:

BG = "#1a1f26"
BG_PANEL = "#222933"
ACCENT = "#e8a838"
LOG_BG = "#12161c"
FONT_LOG = ("Consolas", 9)

Stdlib tkinter only (+ Pillow already required by the extractor).

Launch

python grf_extract.py
python grf_extract.py --gui
.\Open GUI.bat

Worker pattern (illustrated)

def _start_extract(self):
    def worker():
        def progress(done, total, msg):
            self._msg_q.put(("progress", msg))
        n = detect_and_extract(grf, out, rename=rename, progress=progress)
        self._msg_q.put(("done", n, str(out)))

    threading.Thread(target=worker, daemon=True).start()

# UI thread polls the queue:
def _drain_queue(self):
    while True:
        item = self._msg_q.get_nowait()
        # update log / status / messagebox
    self.after(100, self._drain_queue)

CLI still available

python grf_extract.py Real_Aircrafts_Beta.grf
python grf_extract.py Real_Aircrafts_Beta.grf --no-rename

Rollback

Copy-Item -LiteralPath "grf_extract.py.bak_20260712_pre_gui" -Destination "grf_extract.py" -Force
Remove-Item -LiteralPath "grf_extract_gui.py","Open GUI.bat" -Force

See also: ../README.md, EXTRACT_Real_Aircrafts_Beta.md