I have a 32-bits buildbox where I have only the i686 version of the mingw-w64. Except the Contrib/System folder, the build was ok, but running the program, I get an error:
+ /opt/xbb/bin/makensis /tmp/example1.nsi
NSISRT_Initialize failed!
The command '/bin/sh -c linux32 bash -x /xbb-input/build-v1.sh' returned a non-zero code: 1
Exactly the same build script, on a 64-bits system using the x86-64 version of mingw-w64, behaves as expected.
Need more info: version of nsis, what OS is used, command line used to compile nsis.
I've compiled on ubuntu 12.04 32bit, 14.04 32bit and 64bit, 16.04 64bit, and 17.10 64bit, all work fine. Compiling the stubs and plugins with x86_64 mingw-w64 is supported but still unofficial.
I'm using the latest source (3.02.1).
I have two different 32/64 build boxes based on CentOS 6 with the latest tools (GCC 7.2, mingw GCC 7.2, latest Python, latest scons, etc) compiled in a separate folder. The windows zlib is compiled and installed in the mingw folder.
If I compile nsis (complete, including plugins and stubs and everyting) on the 64-bits machine, although not supported, it results in a functional makensis on that machine. (I did not try the resulting setup, I expected it to be functional on a 64-bits windows).
If I compile the same complete nsis on the 32-bits machine, the build is ok, but makensis fails to start on the same machine. If it would start, I expect it to create a 32-bits setup.
From what you say, the resulting setup should always be a 32-bits application.
Unfortunately, even when building only compiler, and using the plugins and stubs from the provided zip, I got the same error when starting the 32-bits makensis on a 32-bits machine.
The build instructions do not explain the 32-bits only restriction and are not very clear, at least for me.
To complete the story, when I tried to use the apparently functional 64-bits makensis on a real application, it complained that something is wrong with the plug-ins, and failed to create the setup.
So, since using the 32-bits mingw on the 32-bits machine fialed and my mingw is not multiplib, so on the 64-bits machine I cannot build a 32-bits application, it looks there are not many options left, and I have to scrap creating windows setups...
MakeNSIS (32 or 64 bit, does not matter) can produce 32 and 64 bit installers. The default is 32-bit (on POSIX) but can be changed with the undocumented (for now) Target attribute. You need the correct 32 and/or 64 bit stubs and plug-ins of course.
super!
if you want, you can use my Docker images to test this, they include complete 32/64-bits build environments (https://github.com/xpack/dockerfiles/blob/67039616d2a4f88a5f6253c9c0982aa780398ad1/centos/6-xbb/image/build-v1.sh#L2257). for the moment, in my images, nsis is disabled.
when you have a stable multi-platform source code, I can test it again with my code, but for now, nothing worked, in the 32-bits case the makensis failed to start, and in the 64-bits case makensis started, but failed while processing some lines related to menus, apparently somehthing was wrong with the plugins.
as with many unix tools, my favourite solution is to build everything from source code in my environment, which is slightly different from ususal environments, by having the tools located in a custom folder, not in the system locations. as per #1201, this might be a problem for your
sconsbuild.