Compare commits

...

5 Commits

Author SHA1 Message Date
Lea Anthony
62f7070e0c chore: hotfix version bump 2019-07-31 18:26:12 +10:00
Lea Anthony
dd418b36c2 Merge pull request #178 from bh90210/169-improve-wails-issue-linux-quick-fixes
169 improve wails issue linux quick fixes
2019-07-31 18:04:51 +10:00
bh90210
f4f04f2199 fix: typo 2019-07-31 03:20:08 +03:00
bh90210
3a7514bbdc fix: issue report 2019-07-31 02:54:59 +03:00
admin_3.exe
213f07fed4 Merge pull request #3 from wailsapp/develop
Develop
2019-07-31 01:48:54 +03:00
2 changed files with 21 additions and 7 deletions

View File

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

View File

@@ -42,10 +42,12 @@ To help you in this process, we will ask for some information, add Go/Wails deta
gomodule = "(Not Set)"
}
// Get versions for GCC, node & npm
// get version numbers 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")
@@ -54,11 +56,23 @@ To help you in this process, we will ask for some information, add Go/Wails deta
gccVersion = strings.TrimSpace(stdout)
}
case "linux":
gcc := program.FindProgram("gcc")
if gcc != nil {
gccVersion, _, _, _ := gcc.Run("-dumpfullversion")
gccVersion = gccVersion[:len(gccVersion)-1]
gccVersion = strings.TrimSpace(gccVersion)
// 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)
}
}
// TODO: windows support