1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-09-24 11:28:25 +02:00
upscayl/electron/getDeviceSpecs.ts
Nayam Amarshe 8759f29798 Fix image
2023-09-04 21:29:17 +05:30

33 lines
537 B
TypeScript

"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";
}
};