First attempt at 32 bit windows building

This commit is contained in:
David Baker 2020-02-18 11:01:34 +00:00
parent 28b17d0ec3
commit 3b642389f2

View file

@ -42,6 +42,17 @@ function getTarget(packageJson) {
}
}
function detectArch() {
if (process.platform === 'win32') {
const targetArch = process.env.VSCMD_ARG_TGT_ARCH;
if (targetArch === 'x86') {
return 'ia32';
} else if (targetArch === 'x64') {
return 'x64';
}
}
return process.arch;
}
module.exports = class HakEnv {
constructor(prefix, packageJson) {
@ -50,7 +61,7 @@ module.exports = class HakEnv {
runtime: getRuntime(packageJson),
target: getTarget(packageJson),
platform: process.platform,
arch: process.arch,
arch: detectArch(),
// paths
projectRoot: prefix,