Compare commits

..

1 Commits

Author SHA1 Message Date
Lea Anthony
9164bf17c0 chore: hotfix 2019-07-31 06:56:12 +10:00
2 changed files with 7 additions and 21 deletions

View File

@@ -1,4 +1,4 @@
package cmd
// Version - Wails version
const Version = "v0.17.10-pre"
const Version = "v0.17.9-pre"

View File

@@ -42,12 +42,10 @@ To help you in this process, we will ask for some information, add Go/Wails deta
gomodule = "(Not Set)"
}
// get version numbers for GCC, node & npm
// Get versions for GCC, node & npm
program := cmd.NewProgramHelper()
// string helpers
var gccVersion, nodeVersion, npmVersion string
// choose between OS (mac,linux,win)
switch runtime.GOOS {
case "darwin":
gcc := program.FindProgram("gcc")
@@ -56,23 +54,11 @@ To help you in this process, we will ask for some information, add Go/Wails deta
gccVersion = strings.TrimSpace(stdout)
}
case "linux":
// for linux we have to collect
// the distribution name
distro := cmd.GetLinuxDistroInfo()
// and use it as nested switch
switch distro.ID {
default: // most supported distros are printing the right result with just 'gcc -dumpversion'
gcc := program.FindProgram("gcc")
if gcc != nil {
stdout, _, _, _ := gcc.Run("-dumpversion")
gccVersion = strings.TrimSpace(stdout)
}
case "fedora", "ubuntu": // except fedora & ubuntu that require 'gcc -dumpfullversion'
gcc := program.FindProgram("gcc")
if gcc != nil {
stdout, _, _, _ := gcc.Run("-dumpfullversion")
gccVersion = strings.TrimSpace(stdout)
}
gcc := program.FindProgram("gcc")
if gcc != nil {
gccVersion, _, _, _ := gcc.Run("-dumpfullversion")
gccVersion = gccVersion[:len(gccVersion)-1]
gccVersion = strings.TrimSpace(gccVersion)
}
// TODO: windows support