mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-04 10:42:51 +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
|
ArchLabs
|
||||||
// PopOS distribution
|
// PopOS distribution
|
||||||
PopOS
|
PopOS
|
||||||
|
// Solus distribution
|
||||||
|
Solus
|
||||||
)
|
)
|
||||||
|
|
||||||
// DistroInfo contains all the information relating to a linux distribution
|
// DistroInfo contains all the information relating to a linux distribution
|
||||||
@ -163,6 +165,8 @@ func parseOsRelease(osRelease string) *DistroInfo {
|
|||||||
result.Distribution = Leap
|
result.Distribution = Leap
|
||||||
case "pop":
|
case "pop":
|
||||||
result.Distribution = PopOS
|
result.Distribution = PopOS
|
||||||
|
case "solus":
|
||||||
|
result.Distribution = Solus
|
||||||
default:
|
default:
|
||||||
result.Distribution = Unknown
|
result.Distribution = Unknown
|
||||||
}
|
}
|
||||||
@ -199,6 +203,17 @@ func DpkgInstalled(packageName string) (bool, error) {
|
|||||||
return exitCode == 0, nil
|
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.
|
// PacmanInstalled uses pacman to see if a package is installed.
|
||||||
func PacmanInstalled(packageName string) (bool, error) {
|
func PacmanInstalled(packageName string) (bool, error) {
|
||||||
program := NewProgramHelper()
|
program := NewProgramHelper()
|
||||||
|
@ -241,6 +241,25 @@ distributions:
|
|||||||
gccversioncommand: *gccdumpfullversion
|
gccversioncommand: *gccdumpfullversion
|
||||||
programs: *debiandefaultprograms
|
programs: *debiandefaultprograms
|
||||||
libraries: *debiandefaultlibraries
|
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:
|
opensuse-tumbleweed:
|
||||||
id: opensuse-tumbleweed
|
id: opensuse-tumbleweed
|
||||||
|
@ -284,6 +284,8 @@ func CheckDependencies(logger *Logger) (bool, error) {
|
|||||||
libraryChecker = EqueryInstalled
|
libraryChecker = EqueryInstalled
|
||||||
case VoidLinux:
|
case VoidLinux:
|
||||||
libraryChecker = XbpsInstalled
|
libraryChecker = XbpsInstalled
|
||||||
|
case Solus:
|
||||||
|
libraryChecker = EOpkgInstalled
|
||||||
default:
|
default:
|
||||||
return false, RequestSupportForDistribution(distroInfo)
|
return false, RequestSupportForDistribution(distroInfo)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user