mirror of
https://github.com/taigrr/wails.git
synced 2026-04-07 15:42:42 -07:00
Compare commits
4 Commits
develop
...
387-Suppor
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6203dba146 | ||
|
|
0cd8d6b760 | ||
|
|
7dd51bc4db | ||
|
|
8b1d20f979 |
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")
|
||||||
|
}
|
||||||
|
stdout, _, _, _ := eopkg.Run("info", packageName)
|
||||||
|
return strings.HasPrefix(stdout, "Installed"), 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: &solusdefaultlibraries
|
||||||
|
- name: libgtk-3-devel
|
||||||
|
help: Please install with `sudo eopkg it libgtk-3-devel` and try again
|
||||||
|
- name: libwebkit-gtk-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)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user