View Single Post
Old 10th February 2019, 02:29   #9
dgnuff
Junior Member
 
Join Date: Jun 2014
Posts: 3
Thumbs up

It turns out it's fairly simple to build a 64 bit stub. Since this is obviously a Windows only thing I didn't bother trying to set up Python and SCons, I just built a standard VS 2019 Preview solution.

The code compiles as is, with one exception, I got a ton of complaints about NSISCALL. It's defined in api.h, but (for example) components.c tries to use it without including api.h. Since stdcall and cdecl have no effect for amd64 builds with MSVC anyway, I just defined NSISCALL to be empty in Platform.h, and moved on.

It took quite a while to find the commands needed to use the 64 bit stub, since as far as I can tell, the CPU command isn't documented in nsis.chm. Not really a surprise, since the standard Windows distribution only has x86 stubs. However a little code archaeology found it in tokens.cpp, and by adding these two lines to the top of my script, just after setting the compression:

CPU amd64
Unicode true

it all works right.

I'd need to make a total of five more stubs for a complete set: three compressors and solid / non-solid for each: I only have lzma non-solid working now. If you're interested, I can get that done, it'll be pretty fast now that I know how, and send the whole lot your way.

I'd have to leave it to one of you to convert from the MSVC solution to SCons, but I'd guess that you guys being experts with SCons should be able to get it done fairly easily. That should give you the ability to create 64 bit installers for those that need them. My main reason is so that the installer won't even start on a 32 bit system, since 64 bit software is all I create nowadays.
dgnuff is offline   Reply With Quote