diff --git a/README.md b/README.md index cb8b94d5..8ec4a7a5 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Make sure you have the xcode command line tools installed. This can be done by r ### Linux -#### Ubuntu 18.04, Debian 9, Zorin 15 +#### Debian 9, Ubuntu 18.04, Zorin 15, Parrot 4.7 `sudo apt install libgtk-3-dev libwebkit2gtk-4.0-dev` @@ -54,13 +54,17 @@ Make sure you have the xcode command line tools installed. This can be done by r `sudo pacman -S webkit2gtk gtk3` +#### Centos 7 + +`sudo yum install webkitgtk3-devel gtk3-devel` + #### Fedora 30 `sudo yum install webkit2gtk3-devel gtk3-devel` -#### Centos 7 +#### Gentoo -`sudo yum install webkitgtk3-devel gtk3-devel` +`sudo emerge gtk+:3 webkit-gtk` ### Windows diff --git a/cmd/linux.go b/cmd/linux.go index 698c2552..c5b22a60 100644 --- a/cmd/linux.go +++ b/cmd/linux.go @@ -17,22 +17,22 @@ type LinuxDistribution int const ( // Unknown is the catch-all distro Unknown LinuxDistribution = iota + // Debian distribution + Debian // Ubuntu distribution Ubuntu // Arch linux distribution Arch - // RedHat linux distribution - RedHat // CentOS linux distribution CentOS // Fedora linux distribution Fedora - // Debian distribution - Debian // Gentoo distribution Gentoo // Zorin distribution Zorin + // Parrot distribution + Parrot ) // DistroInfo contains all the information relating to a linux distribution @@ -105,6 +105,8 @@ func parseOsRelease(osRelease string) *DistroInfo { result.Distribution = Gentoo case "zorin": result.Distribution = Zorin + case "parrot": + result.Distribution = Parrot default: result.Distribution = Unknown } diff --git a/cmd/system.go b/cmd/system.go index f607a924..c70e7a83 100644 --- a/cmd/system.go +++ b/cmd/system.go @@ -272,7 +272,7 @@ func CheckDependencies(logger *Logger) (bool, error) { distroInfo := GetLinuxDistroInfo() for _, library := range *requiredLibraries { switch distroInfo.Distribution { - case Ubuntu, Zorin, Debian: + case Ubuntu, Debian, Zorin, Parrot: installed, err := DpkgInstalled(library.Name) if err != nil { return false, err @@ -294,7 +294,7 @@ func CheckDependencies(logger *Logger) (bool, error) { } else { logger.Green("Library '%s' installed.", library.Name) } - case RedHat, Fedora, CentOS: + case CentOS, Fedora: installed, err := RpmInstalled(library.Name) if err != nil { return false, err diff --git a/cmd/version.go b/cmd/version.go index 78c1333e..781e0af0 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -1,4 +1,4 @@ package cmd // Version - Wails version -const Version = "v0.17.9-pre" +const Version = "v0.17.11-pre" diff --git a/cmd/wails/9_issue.go b/cmd/wails/9_issue.go index 3bc77977..24d7f64d 100644 --- a/cmd/wails/9_issue.go +++ b/cmd/wails/9_issue.go @@ -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