mirror of
https://github.com/taigrr/wails.git
synced 2026-04-02 05:08:54 -07:00
Merge pull request #137 from wailsapp/135-Add-Debian-support
135 add debian support
This commit is contained in:
@@ -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`
|
||||
|
||||
|
||||
10
cmd/linux.go
10
cmd/linux.go
@@ -23,6 +23,8 @@ const (
|
||||
Arch
|
||||
// RedHat linux distribution
|
||||
RedHat
|
||||
// Debian distribution
|
||||
Debian
|
||||
)
|
||||
|
||||
// DistroInfo contains all the information relating to a linux distribution
|
||||
@@ -62,8 +64,8 @@ func GetLinuxDistroInfo() *DistroInfo {
|
||||
result.Distribution = Ubuntu
|
||||
case "Arch", "ManjaroLinux":
|
||||
result.Distribution = Arch
|
||||
// case "Debian":
|
||||
// result.Distribution = Debian
|
||||
case "Debian":
|
||||
result.Distribution = Debian
|
||||
}
|
||||
case "Description":
|
||||
result.Description = value
|
||||
@@ -109,8 +111,8 @@ func GetLinuxDistroInfo() *DistroInfo {
|
||||
result.Distribution = RedHat
|
||||
case "Arch Linux":
|
||||
result.Distribution = Arch
|
||||
// case "Debian GNU/Linux":
|
||||
// result.Distribution = Debian
|
||||
case "Debian GNU/Linux":
|
||||
result.Distribution = Debian
|
||||
default:
|
||||
result.Distribution = Unknown
|
||||
result.DistributorID = osName
|
||||
|
||||
@@ -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"))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user