5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-15 16:39:32 +08:00

Add NSIS to doctor checks

This commit is contained in:
Lea Anthony 2023-12-29 20:13:23 +11:00
parent 46127c8d4d
commit d8f9ea7a33
No known key found for this signature in database
GPG Key ID: 33DAF7BB90A58405

View File

@ -5,6 +5,7 @@ package doctor
import (
"github.com/samber/lo"
"github.com/wailsapp/go-webview2/webviewloader"
"os/exec"
)
func getInfo() (map[string]string, bool) {
@ -17,5 +18,18 @@ func getInfo() (map[string]string, bool) {
webviewVersion = "Error:" + err.Error()
}
result["WebView2 Version"] = webviewVersion
// add nsis
result["NSIS"] = getNSISVersion()
return result, ok
}
func getNSISVersion() string {
// Execute nsis
output, err := exec.Command("makensis", "-VERSION").Output()
if err != nil {
return "Not Installed"
}
return string(output)
}