mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-16 00:49:32 +08:00
Add NSIS to doctor checks
This commit is contained in:
parent
46127c8d4d
commit
d8f9ea7a33
@ -5,6 +5,7 @@ package doctor
|
|||||||
import (
|
import (
|
||||||
"github.com/samber/lo"
|
"github.com/samber/lo"
|
||||||
"github.com/wailsapp/go-webview2/webviewloader"
|
"github.com/wailsapp/go-webview2/webviewloader"
|
||||||
|
"os/exec"
|
||||||
)
|
)
|
||||||
|
|
||||||
func getInfo() (map[string]string, bool) {
|
func getInfo() (map[string]string, bool) {
|
||||||
@ -17,5 +18,18 @@ func getInfo() (map[string]string, bool) {
|
|||||||
webviewVersion = "Error:" + err.Error()
|
webviewVersion = "Error:" + err.Error()
|
||||||
}
|
}
|
||||||
result["WebView2 Version"] = webviewVersion
|
result["WebView2 Version"] = webviewVersion
|
||||||
|
|
||||||
|
// add nsis
|
||||||
|
result["NSIS"] = getNSISVersion()
|
||||||
|
|
||||||
return result, ok
|
return result, ok
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func getNSISVersion() string {
|
||||||
|
// Execute nsis
|
||||||
|
output, err := exec.Command("makensis", "-VERSION").Output()
|
||||||
|
if err != nil {
|
||||||
|
return "Not Installed"
|
||||||
|
}
|
||||||
|
return string(output)
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user