How recol/dlss-updater works
Main Components
• User Interface: The GUI of the application is implemented in the “dlss_updater/main_ui” directory and is built with PyQt6. This component is the primary interaction point for users.
• Business Logic and Updater: Modules such as “auto_updater.py”, “updater.py”, and “scanner.py” are central to the functionality. These handle updating the DLLs, scanning for game installations, and interacting with the configuration.
• Configuration/Constants: Files like “config.py” and “constants.py” are used to set up runtime parameters and manage paths/settings.
• Logging and Utilities: The “logger.py” and “utils.py” modules capture operational details and offer auxiliary functions.
• Threading Support: The “dlss_updater/lib/threading_lib.py” module suggests that some operations execute in parallel (for instance, scanning or updating tasks).
• External Dependencies: Included libraries (such as PyQt6, pefile, psutil, and others provided via _internal packaging) represent third-party components. Also note that hooks (in the “hooks” directory) exist to support packaging with PyInstaller.
• Packaging and Deployment: The “dist” directory contains the built executable along with an embedded copy of required libraries and a special internal structure. Additional deployment support files are present (such as the Chocolatey scripts in “tools”).
Relationships and Interactions
• The GUI layer sends events (such as “start scan,” “initiate update,” etc.) to the core application logic.
• The updater and scanner components communicate with the file system to detect game installations and update DLLs.
• The configuration module supplies runtime variables for both the updater and the scanner.
• The logging module is used throughout the system to record events and actions.
• The threading library is used to decouple long-running tasks (like scanning directories or updating files) from the UI, ensuring responsiveness.
• The application fetches the up-to-date blacklist (or whitelist hosted externally) and integrates this data to determine which games should be skipped.
• Build and packaging components (PyInstaller spec file and hooks) wrap these modules with internal dependencies into a distributable application.
Architectural Patterns and Design Principles
• Separation of Concerns: The application cleanly separates the UI (main_ui) from the core business logic (updater, scanner, config, and utilities).
• Modularization: The code is compartmentalized into logically separate modules (configuration, logging, updater, and threading support).
• Event-Driven Design: The GUI (using PyQt6) is built on an event-driven paradigm where user events trigger processes in the updater and scanner modules.
• Packaging for Distribution: The project uses PyInstaller, with proper hooks, to collect dependencies into a standalone executable.