From 105073e4122ce3e13392062a564d9c7da3f93d9a Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Tue, 25 Jun 2019 18:32:25 +1000 Subject: [PATCH] fix: add Debian support across tooling --- README.md | 2 +- cmd/prerequisites.go | 3 +-- cmd/system.go | 2 +- cmd/wails/0_setup.go | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ce1bc390a..65b7cf286 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 +#### Ubuntu 18.04, Debian 9 `sudo apt install pkg-config build-essential libgtk-3-dev libwebkit2gtk-4.0-dev` diff --git a/cmd/prerequisites.go b/cmd/prerequisites.go index 0f6bbe66c..0d1a5901d 100644 --- a/cmd/prerequisites.go +++ b/cmd/prerequisites.go @@ -49,11 +49,10 @@ func getRequiredProgramsLinux() *Prerequisites { result := &Prerequisites{} distroInfo := GetLinuxDistroInfo() switch distroInfo.Distribution { - case Ubuntu: + case Ubuntu, Debian: result.Add(newPrerequisite("gcc", "Please install with `sudo apt install build-essentials` and try again")) result.Add(newPrerequisite("pkg-config", "Please install with `sudo apt install pkg-config` and try again")) result.Add(newPrerequisite("npm", "Please install with `sudo snap install node --channel=12/stable --classic` and try again")) - default: result.Add(newPrerequisite("gcc", "Please install with your system package manager and try again")) result.Add(newPrerequisite("pkg-config", "Please install with your system package manager and try again")) diff --git a/cmd/system.go b/cmd/system.go index adb0f6f52..86ce69d9b 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: + case Ubuntu, Debian: installed, err := DpkgInstalled(library.Name) if err != nil { return false, err diff --git a/cmd/wails/0_setup.go b/cmd/wails/0_setup.go index b8413736c..a9c8c0041 100644 --- a/cmd/wails/0_setup.go +++ b/cmd/wails/0_setup.go @@ -96,7 +96,7 @@ func checkLibraries() (errors bool, err error) { distroInfo := cmd.GetLinuxDistroInfo() for _, library := range *requiredLibraries { switch distroInfo.Distribution { - case cmd.Ubuntu: + case cmd.Ubuntu, cmd.Debian: installed, err := cmd.DpkgInstalled(library.Name) if err != nil { return false, err