Update wails installer to parity with CLI#404
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request updates the Wails installer to achieve feature parity with the BetterDiscord CLI. The primary goals are adding WSL (Windows Subsystem for Linux) support, refactoring Discord installation path handling, improving error handling, and updating dependencies.
Changes:
- Added comprehensive WSL detection and support for Discord installations running in WSL environments
- Refactored Discord installation path validation logic into shared functions (
validateWindowsStyleInstall,validateUnixStyleInstall) - Changed struct fields from private to public (exported) for better API design and JSON serialization
- Fixed critical bug in
utils/paths.goFilter function that was appending to wrong slice - Added extensive test coverage for utilities, types, and BetterDiscord installation
- Updated frontend dependencies and ESLint configuration to use custom config packages
- Updated Go dependencies (Wails v2.10.1 → v2.11.0, go-webview2, gorilla/websocket)
- Improved logging consistency with emoji prefixes and explicit newline handling
Reviewed changes
Copilot reviewed 46 out of 53 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| go.mod | Updated Go version to 1.26.0 and Wails to v2.11.0 |
| wsl/wsl.go | New package for WSL environment detection and path conversion |
| utils/strings.go | Added version comparison and formatting utilities |
| utils/paths.go | Fixed bug in Filter function appending to wrong slice |
| utils/download.go | Improved error handling with proper defer patterns |
| discord/paths_common.go | Extracted common path validation logic into shared functions |
| discord/paths_linux.go | Added WSL support for Linux, delegates to common validation |
| discord/paths_darwin.go | Simplified to use common Unix-style validation |
| discord/paths_windows.go | Simplified to use common Windows-style validation |
| discord/install.go | Refactored struct fields to exported, improved logging |
| discord/injection.go | Updated field references, added IsInjected helper |
| discord/process.go | Improved restart logic and error messages |
| betterdiscord/install.go | Added WSL support, IsAsarInstalled, RemoveAll methods |
| betterdiscord/download.go | Improved version display and error handling |
| app.go | Fixed version comparison using new CompareVersions function |
| frontend/* | Updated dependencies and ESLint config to use @zerebos packages |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.