# pepinolatte/winstep_nexus-fixer architecture

> Architecture diagram of the GitHub repository pepinolatte/winstep_nexus-fixer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pepinolatte/winstep_nexus-fixer
- Repository: https://github.com/pepinolatte/winstep_nexus-fixer

## Overview

Winstep Nexus Localization Fixer is a Windows utility for repairing Chinese localization and display issues in Winstep Nexus/Xtreme. The user starts the GUI or CLI, selects or auto-detects Nexus.exe, and runs diagnostics, a full repair, a patch-only operation, or backup restoration. Full repair coordinates process shutdown/restart, the binary tooltip patch, registry settings for tabs and font, and language-pack deployment. The excerpts show the CLI and portions of GUI wiring; README capabilities supplement the incomplete GUI excerpt, so uncertain GUI action links are omitted.

Main entry points: [`main.py`](https://github.com/pepinolatte/winstep_nexus-fixer/blob/main/main.py) (CLI / dispatcher), [`gui/app.py`](https://github.com/pepinolatte/winstep_nexus-fixer/blob/main/gui/app.py) (Tkinter GUI), [`core/patcher.py`](https://github.com/pepinolatte/winstep_nexus-fixer/blob/main/core/patcher.py) (PE patcher), [`core/lang_manager.py`](https://github.com/pepinolatte/winstep_nexus-fixer/blob/main/core/lang_manager.py) (Language manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entry"]
  node_main["CLI / dispatcher<br/>[main.py]"]
  node_gui["Tkinter GUI<br/>[app.py]"]
end

subgraph group_binary["Binary repair"]
  node_patcher["PE patcher<br/>[patcher.py]"]
end

subgraph group_settings["Settings and language"]
  node_registry["Registry manager"]
  node_lang["Language manager<br/>[lang_manager.py]"]
  node_bundled["Bundled language packs"]
end

subgraph group_lifecycle["Process lifecycle"]
  node_process["Process manager<br/>[process_manager.py]"]
end

node_user(("Windows user"))
node_nexus["Nexus executable"]
node_backup["Executable backup"]
node_winreg[("Windows registry")]
node_installed["Installed language packs"]
node_windows["Windows process APIs"]

node_user -->|"runs"| node_main
node_main -->|"launches GUI"| node_gui
node_main -->|"detects / controls"| node_process
node_main -->|"checks / patches / restores"| node_patcher
node_main -->|"checks / configures"| node_registry
node_main -->|"deploys packs"| node_lang
node_user -->|"uses"| node_gui
node_gui -->|"detects / stops / starts"| node_process
node_gui -->|"checks / patches / restores"| node_patcher
node_gui -->|"checks / configures"| node_registry
node_gui -->|"installs packs"| node_lang
node_patcher -->|"analyzes / patches"| node_nexus
node_patcher -->|"creates / restores"| node_backup
node_registry -->|"reads / writes"| node_winreg
node_lang -->|"reads"| node_bundled
node_lang -->|"copies / normalizes"| node_installed
node_process -->|"detects / terminates / launches"| node_windows
node_process -->|"locates / launches"| node_nexus

click node_main "https://github.com/pepinolatte/winstep_nexus-fixer/blob/main/main.py"
click node_gui "https://github.com/pepinolatte/winstep_nexus-fixer/blob/main/gui/app.py"
click node_patcher "https://github.com/pepinolatte/winstep_nexus-fixer/blob/main/core/patcher.py"
click node_registry "https://github.com/pepinolatte/winstep_nexus-fixer/blob/main/core/registry_manager.py"
click node_lang "https://github.com/pepinolatte/winstep_nexus-fixer/blob/main/core/lang_manager.py"
click node_bundled "https://github.com/pepinolatte/winstep_nexus-fixer/tree/main/Languages"
click node_process "https://github.com/pepinolatte/winstep_nexus-fixer/blob/main/core/process_manager.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_gui,node_user toneBlue
class node_patcher,node_winreg toneAmber
class node_registry,node_lang,node_bundled,node_windows toneMint
class node_process toneRose
class node_nexus,node_backup,node_installed toneIndigo
```

## Components

### User entry

- [CLI / dispatcher](https://github.com/pepinolatte/winstep_nexus-fixer/blob/main/main.py): `main.py`
- [Tkinter GUI](https://github.com/pepinolatte/winstep_nexus-fixer/blob/main/gui/app.py): `gui/app.py`

### Binary repair

- [PE patcher](https://github.com/pepinolatte/winstep_nexus-fixer/blob/main/core/patcher.py): `core/patcher.py`

### Settings and language

- [Registry manager](https://github.com/pepinolatte/winstep_nexus-fixer/blob/main/core/registry_manager.py): `core/registry_manager.py`
- [Language manager](https://github.com/pepinolatte/winstep_nexus-fixer/blob/main/core/lang_manager.py): `core/lang_manager.py`
- [Bundled language packs](https://github.com/pepinolatte/winstep_nexus-fixer/tree/main/Languages): `Languages`

### Process lifecycle

- [Process manager](https://github.com/pepinolatte/winstep_nexus-fixer/blob/main/core/process_manager.py): `core/process_manager.py`

### Other components

- **Windows user**
- **Nexus executable**
- **Executable backup**
- **Windows registry**
- **Installed language packs**
- **Windows process APIs**

## Connections

- Windows user → CLI / dispatcher: runs
- CLI / dispatcher → Tkinter GUI: launches GUI
- CLI / dispatcher → Process manager: detects / controls
- CLI / dispatcher → PE patcher: checks / patches / restores
- CLI / dispatcher → Registry manager: checks / configures
- CLI / dispatcher → Language manager: deploys packs
- Windows user → Tkinter GUI: uses
- Tkinter GUI → Process manager: detects / stops / starts
- Tkinter GUI → PE patcher: checks / patches / restores
- Tkinter GUI → Registry manager: checks / configures
- Tkinter GUI → Language manager: installs packs
- PE patcher → Nexus executable: analyzes / patches
- PE patcher → Executable backup: creates / restores
- Registry manager → Windows registry: reads / writes
- Language manager → Bundled language packs: reads
- Language manager → Installed language packs: copies / normalizes
- Process manager → Windows process APIs: detects / terminates / launches
- Process manager → Nexus executable: locates / launches
