fix: add support back for ubuntu, redhat

This commit is contained in:
Lea Anthony
2019-07-29 17:52:22 +10:00
parent 9cac336708
commit 5e047debfc
4 changed files with 16 additions and 4 deletions

View File

@@ -23,6 +23,10 @@ const (
Arch
// RedHat linux distribution
RedHat
// CentOS linux distribution
CentOS
// Fedora linux distribution
Fedora
// Debian distribution
Debian
// Gentoo distribution
@@ -77,12 +81,18 @@ func GetLinuxDistroInfo() *DistroInfo {
result.Release = version
result.DiscoveredBy = "os-release"
switch osID {
case "fedora", "centos":
case "rhel":
result.Distribution = RedHat
case "fedora":
result.Distribution = Fedora
case "centos":
result.Distribution = CentOS
case "arch":
result.Distribution = Arch
case "debian", "ubuntu":
case "debian":
result.Distribution = Debian
case "ubuntu":
result.Distribution = Ubuntu
case "gentoo":
result.Distribution = Gentoo
case "zorin":

View File

@@ -102,7 +102,7 @@ func getRequiredLibrariesLinux() (*Prerequisites, error) {
case Arch:
result.Add(newPrerequisite("gtk3", "Please install with `sudo pacman -S gtk3` and try again"))
result.Add(newPrerequisite("webkit2gtk", "Please install with `sudo pacman -S webkit2gtk` and try again"))
case RedHat:
case RedHat, Fedora, CentOS:
result.Add(newPrerequisite("gtk3-devel", "Please install with `sudo yum install gtk3-devel` and try again"))
result.Add(newPrerequisite("webkit2gtk3-devel", "Please install with `sudo yum install webkit2gtk3-devel` and try again"))
default:

View File

@@ -294,7 +294,7 @@ func CheckDependencies(logger *Logger) (bool, error) {
} else {
logger.Green("Library '%s' installed.", library.Name)
}
case RedHat:
case RedHat, Fedora, CentOS:
installed, err := RpmInstalled(library.Name)
if err != nil {
return false, err

2
go.sum
View File

@@ -68,6 +68,8 @@ github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/wailsapp/webview v0.2.7 h1:fN5L5H9Oivg9IJPk7uaXQnjqB68Fny11ZWkIaTIZHmk=
github.com/wailsapp/webview v0.2.7/go.mod h1:XO9HJbKWokDxUYTWQEBCYg95n/To1v7PxvanDNVf8hY=
github.com/zserge/webview v0.0.0-20190123072648-16c93bcaeaeb/go.mod h1:a1CV8KR4Dd1eP2g+mEijGOp+HKczwdKHWyx0aPHKvo4=
golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=