Incorrect architecture check (x86|x64)
LodewijkSioen opened this issue · 4 comments
It's not you, it's node.
Long story short: os.arch
doesn't report the architecture of the processor, but the architecture node runs in. So if you're running node for x86 on an x64 system, os.arch
will report ia32. This was the case for my (appveyor)[http://www.appveyor.com] build.
You can fix this by not using os.arch
, but by checking for the existence of the c:\Program Files (x86)\
directory. If it exists, you'll need to look for MsBuild there, otherwise it'll be in c:\Program Files\
.
You can use the same check to switch between Framework
and Framework64
Hm interesting thing.
I will use this to check for 64bit Windows:
process.env.hasOwnProperty('ProgramFiles(x86)')
Thanks for this @LodewijkSioen :)
I have released a new version with the fix. Can you try it again and report back if it worked for you?
Updated, removed the hardcoded path to MsBuild, ran it trough AppVeyor and the build went green. That was quick!
🙌
Great :)