mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-04 16:40:41 +08:00
linux working
This commit is contained in:
parent
ddec01a429
commit
6e81a36ada
@ -6,6 +6,7 @@ import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"os/exec"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
@ -46,22 +47,29 @@ To help you in this process, we will ask for some information, add Go/Wails deta
|
||||
program := cmd.NewProgramHelper()
|
||||
var gccVersion, nodeVersion, npmVersion string
|
||||
|
||||
gcc := program.FindProgram("gcc")
|
||||
if gcc != nil {
|
||||
stdout, _, _, _ := gcc.Run("--version")
|
||||
gccVersion = stdout
|
||||
}
|
||||
//gcc := program.FindProgram("gcc")
|
||||
//if gcc != nil {
|
||||
// stdout, _, _, _ := gcc.Run("--version", "|", "sed", "'s/[^0-9.]*\\([0-9.]*\\).*/\\1/'", "|", "grep", "-m1", "''")
|
||||
// gccVersion = stdout
|
||||
//}
|
||||
|
||||
gccCmd := "gcc --version | sed 's/[^0-9.]*\\([0-9.]*\\).*/\\1/' | grep -m1 ''"
|
||||
gcc, _ := exec.Command("bash", "-c", gccCmd).Output()
|
||||
gccVersion = string(gcc)
|
||||
gccVersion = gccVersion[:len(gccVersion)-1]
|
||||
|
||||
npm := program.FindProgram("npm")
|
||||
if npm != nil {
|
||||
stdout, _, _, _ := npm.Run("--version")
|
||||
nodeVersion = stdout
|
||||
nodeVersion = nodeVersion[:len(nodeVersion)-1]
|
||||
}
|
||||
|
||||
node := program.FindProgram("node")
|
||||
if node != nil {
|
||||
stdout, _, _, _ := node.Run("--version")
|
||||
npmVersion = stdout
|
||||
npmVersion = npmVersion[:len(npmVersion)-1]
|
||||
}
|
||||
|
||||
str.WriteString("\n| Name | Value |\n| ----- | ----- |\n")
|
||||
@ -70,9 +78,9 @@ To help you in this process, we will ask for some information, add Go/Wails deta
|
||||
str.WriteString(fmt.Sprintf("| Platform | %s |\n", runtime.GOOS))
|
||||
str.WriteString(fmt.Sprintf("| Arch | %s |\n", runtime.GOARCH))
|
||||
str.WriteString(fmt.Sprintf("| GO111MODULE | %s |\n", gomodule))
|
||||
str.WriteString(fmt.Sprintf("| Gcc | %s |\n", gccVersion))
|
||||
str.WriteString(fmt.Sprintf("| Npm | %s |\n", npmVersion))
|
||||
str.WriteString(fmt.Sprintf("| Node | %s |\n", nodeVersion))
|
||||
str.WriteString(fmt.Sprintf("| GCC | %s |\n", gccVersion))
|
||||
str.WriteString(fmt.Sprintf("| Npm | %s |\n", npmVersion))
|
||||
str.WriteString(fmt.Sprintf("| Node | %s |\n", nodeVersion))
|
||||
|
||||
fmt.Println()
|
||||
fmt.Println("Processing template and preparing for upload.")
|
||||
|
Loading…
Reference in New Issue
Block a user