mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-03 10:23:03 +08:00
37 lines
734 B
Go
37 lines
734 B
Go
// +build linux
|
|
|
|
package system
|
|
|
|
import (
|
|
"github.com/wailsapp/wails/v2/internal/system/operatingsystem"
|
|
"github.com/wailsapp/wails/v2/internal/system/packagemanager"
|
|
)
|
|
|
|
func (i *Info) discover() error {
|
|
|
|
var err error
|
|
osinfo, err := operatingsystem.Info()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
i.OS = osinfo
|
|
|
|
i.PM = packagemanager.Find(osinfo.ID)
|
|
if i.PM != nil {
|
|
dependencies, err := packagemanager.Dependancies(i.PM)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
i.Dependencies = dependencies
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// IsAppleSilicon returns true if the app is running on Apple Silicon
|
|
// Credit: https://www.yellowduck.be/posts/detecting-apple-silicon-via-go/
|
|
// NOTE: Not applicable to linux
|
|
func IsAppleSilicon() bool {
|
|
return false
|
|
}
|