mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 14:45:49 +01:00
[V3] fix: enhance doctor command to verify Windows SDK dependencies (#4392)
* fix: enhance doctor command to verify Windows SDK dependencies ([#4390](https://github.com/wailsapp/wails/issues/4390)) - Updated the doctor command to check for the presence of Windows SDK dependencies, improving the setup process for Windows users. - Added relevant entry to the changelog for better documentation of this fix. * Update changelog --------- Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
This commit is contained in:
parent
e11479170a
commit
584872eb9a
2 changed files with 26 additions and 6 deletions
|
|
@ -24,8 +24,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
*/
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
- `app.Env.GetAccentColor` to get the accent color of a user's system. Works on MacOS. by [@etesam913](https://github.com/etesam913)
|
||||
|
||||
### Fixed
|
||||
- Fixed doctor command to check for Windows SDK dependencies by [@kodumulo](https://github.com/kodumulo) in [#4390](https://github.com/wailsapp/wails/issues/4390)
|
||||
|
||||
|
||||
## v3.0.0-alpha.11 - 2025-07-12
|
||||
|
||||
## Added
|
||||
|
|
|
|||
|
|
@ -3,10 +3,11 @@
|
|||
package doctor
|
||||
|
||||
import (
|
||||
"github.com/samber/lo"
|
||||
"github.com/wailsapp/go-webview2/webviewloader"
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"github.com/samber/lo"
|
||||
"github.com/wailsapp/go-webview2/webviewloader"
|
||||
)
|
||||
|
||||
func getInfo() (map[string]string, bool) {
|
||||
|
|
@ -43,12 +44,25 @@ func getMakeAppxVersion() string {
|
|||
func getMSIXPackagingToolVersion() string {
|
||||
// Check if MSIX Packaging Tool is installed
|
||||
// Use PowerShell to check if the app is installed from Microsoft Store
|
||||
cmd := exec.Command("powershell", "-Command", "Get-AppxPackage -Name Microsoft.MsixPackagingTool")
|
||||
cmd := exec.Command("powershell", "-Command", "Get-AppxPackage -Name Microsoft.MSIXPackagingTool")
|
||||
output, err := cmd.Output()
|
||||
if err != nil || len(output) == 0 || !strings.Contains(string(output), "Microsoft.MsixPackagingTool") {
|
||||
if err != nil || len(output) == 0 || !strings.Contains(string(output), "Microsoft.MSIXPackagingTool") {
|
||||
return "Not Installed"
|
||||
}
|
||||
return "Installed"
|
||||
|
||||
if strings.Contains(string(output), "Version") {
|
||||
lines := strings.Split(string(output), "\n")
|
||||
for _, line := range lines {
|
||||
if strings.Contains(line, "Version") {
|
||||
parts := strings.Split(line, ":")
|
||||
if len(parts) > 1 {
|
||||
return strings.TrimSpace(parts[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return "Installed (Version Unknown)"
|
||||
}
|
||||
|
||||
func getSignToolVersion() string {
|
||||
|
|
@ -64,7 +78,7 @@ func checkPlatformDependencies(result map[string]string, ok *bool) {
|
|||
checkCommonDependencies(result, ok)
|
||||
// add nsis
|
||||
result["NSIS"] = getNSISVersion()
|
||||
|
||||
|
||||
// Add MSIX tooling checks
|
||||
result["MakeAppx.exe (Windows SDK)"] = getMakeAppxVersion()
|
||||
result["MSIX Packaging Tool"] = getMSIXPackagingToolVersion()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue