mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-03 22:02:01 +08:00
Initial support for solus
This commit is contained in:
parent
ad034d3950
commit
5d35dd3105
15
cmd/linux.go
15
cmd/linux.go
@ -61,6 +61,8 @@ const (
|
||||
ArchLabs
|
||||
// PopOS distribution
|
||||
PopOS
|
||||
// Solus distribution
|
||||
Solus
|
||||
)
|
||||
|
||||
// DistroInfo contains all the information relating to a linux distribution
|
||||
@ -163,6 +165,8 @@ func parseOsRelease(osRelease string) *DistroInfo {
|
||||
result.Distribution = Leap
|
||||
case "pop":
|
||||
result.Distribution = PopOS
|
||||
case "solus":
|
||||
result.Distribution = Solus
|
||||
default:
|
||||
result.Distribution = Unknown
|
||||
}
|
||||
@ -199,6 +203,17 @@ func DpkgInstalled(packageName string) (bool, error) {
|
||||
return exitCode == 0, nil
|
||||
}
|
||||
|
||||
// EOpkgInstalled uses dpkg to see if a package is installed
|
||||
func EOpkgInstalled(packageName string) (bool, error) {
|
||||
program := NewProgramHelper()
|
||||
eopkg := program.FindProgram("eopkg")
|
||||
if eopkg == nil {
|
||||
return false, fmt.Errorf("cannot check dependencies: eopkg not found")
|
||||
}
|
||||
_, _, exitCode, _ := eopkg.Run("li", "|", "grep", "-w", packageName)
|
||||
return exitCode == 0, nil
|
||||
}
|
||||
|
||||
// PacmanInstalled uses pacman to see if a package is installed.
|
||||
func PacmanInstalled(packageName string) (bool, error) {
|
||||
program := NewProgramHelper()
|
||||
|
@ -241,6 +241,25 @@ distributions:
|
||||
gccversioncommand: *gccdumpfullversion
|
||||
programs: *debiandefaultprograms
|
||||
libraries: *debiandefaultlibraries
|
||||
solus:
|
||||
id: solus
|
||||
releases:
|
||||
default:
|
||||
version: default
|
||||
name: Solus
|
||||
gccversioncommand: *gccdumpfullversion
|
||||
programs: &solusdefaultprograms
|
||||
- name: gcc
|
||||
help: Please install with `sudo eopkg it -c system.devel` and try again
|
||||
- name: pkg-config
|
||||
help: Please install with `sudo eopkg it -c system.devel` and try again
|
||||
- name: npm
|
||||
help: Please install with `sudo eopkg it nodejs` and try again
|
||||
libraries: &opensusedefaultlibraries
|
||||
- name: gtk3-devel
|
||||
help: Please install with `sudo eopkg it libgtk-3-devel` and try again
|
||||
- name: webkit2gtk3-devel
|
||||
help: Please install with `sudo eopkg it libwebkit-gtk-devel` and try again
|
||||
|
||||
opensuse-tumbleweed:
|
||||
id: opensuse-tumbleweed
|
||||
|
@ -284,6 +284,8 @@ func CheckDependencies(logger *Logger) (bool, error) {
|
||||
libraryChecker = EqueryInstalled
|
||||
case VoidLinux:
|
||||
libraryChecker = XbpsInstalled
|
||||
case Solus:
|
||||
libraryChecker = EOpkgInstalled
|
||||
default:
|
||||
return false, RequestSupportForDistribution(distroInfo)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user