How chika3742/dqm_installer_flt works
Project Type and Purpose
• dqm_installer_flt is a cross-platform desktop application built with Flutter.
• It serves as an installer/launcher helper for Minecraft DQM, handling installation logic, compatibility checks, and user interface on Windows, macOS, and Linux.
• The presence of lib/pages, lib/libs, and platform folders (windows/, macos/, linux/) confirms a Flutter UI front end with core Dart business logic and native embedding code per platform.
High-Level Architectural Components
a. Flutter Application Layer
• UI Pages (lib/pages/home.dart, installation_progress.dart)
• Shared Widgets & Themes (from the local packages/timelines package)
• Message definitions (lib/messages.dart) if using Pigeon for method channels
b. Core Logic Layer (lib/libs/)
• compatibility_checker.dart – verifies OS and launcher version
• installer.dart – orchestrates download, extraction, and setup
• profiles.dart – reads/writes Minecraft profile data
• seven_zip.dart – handles archive extraction (likely invoking native 7-Zip or system unzip)
c. Utility Layer (lib/utils/)
• precondition.dart – validation routines
• ui.dart – UI helper functions
• utils.dart – general helpers (logging, file I/O wrappers)
d. Asset Layer (assets/)
• JSON data (dqm4.json, legacy.json)
• Font resources (assets/fonts)
e. Platform Embedding Layer
• macOS: macos/Runner/… and Flutter plugin registrant
• Windows: windows/runner/… and CMake setup
• Linux: linux/… and CMake/GLFW embedding
f. External Services & OS Interfaces
• File system (reading/writing Minecraft folders)
• Native processes (invoking Java launcher, 7-Zip CLI)
• Environment variables, shell commands (via Dart’s Process API)
Relationships and Data Flow
• UI Layer invokes Core Logic APIs (Installer, Checker, Profiles).
• Core Logic reads/writes Asset and File System, calls utilities.
• For archive tasks, Core Logic calls seven_zip module, which spawns a native process.
• Profiles module reads launcher data from user’s OS directories.
• Platform Embedding initializes Flutter engine, connects method channels (if any) to native code.
Architectural Patterns & Principles
• Clear separation of concerns: UI vs. business logic vs. utilities.
• Use of a local plugin/package (packages/timelines) for UI theming and custom widgets.
• Dependency injection by passing service classes into pages (implicit via Dart imports).
• Asset-driven configuration (JSON files decoupled from code).