mirror of
https://github.com/taigrr/wails.git
synced 2026-04-13 18:38:11 -07:00
Merge branch 'develop' into linux-db
This commit is contained in:
10
README.md
10
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
|
||||
|
||||
|
||||
10
cmd/linux.go
10
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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package cmd
|
||||
|
||||
// Version - Wails version
|
||||
const Version = "v0.17.9-pre"
|
||||
const Version = "v0.17.11-pre"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user