-
Notifications
You must be signed in to change notification settings - Fork 34
Refactor InstallPageViewModel and add CLI installer #590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Adding onto this, to help with review, here’s a quick overview of the larger structural changes and what each new service is responsible for.
Overall, the goal was to make the install flow easier to follow, test, and extend without re-growing the ViewModel. |
|
After some debate in Discord, we decided to split the installer into separate projects to better separate shared logic from GUI and CLI entry points and allow independent distribution. Before After
|
This PR restructures the installer to reduce complexity and improve maintainability, and introduces a new CLI-based installer.
The previously large
InstallPageViewModel(1,112 lines) has been split into focused service classes responsible for archive extraction, tool setup, VS Code installation, and shortcut creation. These services are registered via DI and shared across entry points, resulting in clearer separation of concerns and improved testability.A new CLI installer has been added that reuses the same services as the GUI. It supports multiple installation modes via
--install-mode:The CLI also supports offline VS Code installation. If a download fails, it automatically searches for a local VS Code archive and continues with a warning if the hash does not match.
Additional improvements include:
IProgress<InstallProgress>--helpdocumentation with usage examplesOverall, this change makes the installer easier to understand, test, and extend, while enabling scripted and offline installations through the new CLI.