1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-11-24 07:30:19 +01:00
upscayl/electron/utils/get-device-specs.ts

33 lines
537 B
TypeScript
Raw Normal View History

2023-09-04 17:59:17 +02:00
"use strict";
import { platform, arch } from "os";
export const getPlatform = () => {
switch (platform()) {
case "aix":
case "freebsd":
case "linux":
case "openbsd":
case "android":
return "linux";
case "darwin":
case "sunos":
return "mac";
case "win32":
return "win";
}
};
export const getArch = () => {
switch (arch()) {
case "x64":
return "x64";
case "x32":
return "x86";
case "arm":
return "arm";
case "arm64":
return "arm64";
}
};