[all] fixes for windows

This commit is contained in:
2019-09-03 20:56:23 +03:00
parent 414099bd67
commit 7fa0174a7b
11 changed files with 117 additions and 69 deletions

27
haxetool/system.js Executable file
View File

@@ -0,0 +1,27 @@
const os = require('os');
class System {
static get isWindows() {
return os.type() === 'Windows_NT';
}
static get isLinux() {
return os.type() === 'Linux';
}
static get archInt() {
if (os.arch() === 'ia32') return 32;
if (os.arch() === 'x64') return 64;
}
static get isArch32() {
return this.archInt === 32;
}
static get isArch64() {
return this.archInt === 64;
}
}
module.exports = System;