Archive: building nsis on macos: some solutions & some questions


building nsis on macos: some solutions & some questions
I tried to build on MacOS. I had some compilation errors, which I was able to solve by editing SCons/Config/gnu and changing the line 25 from:
defenv['MAP_FLAG'] = '-Wl,-Map,${TARGET.base}.map'
to
defenv['MAP_FLAG'] = '-Wl'

I don't know if it qualify as a patch... maybe I had this error because I'm not using the right tools ? I use gcc version 3.3 20030304 (Apple Computer, Inc. build 1666), and scons v0.96.91.D001.

in anycase, running:
scons SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all PREFIX=/Users/farialima install
now works, it creates a 'makensis' in my personal bin folder, but it's missing some stubs, for zlib and other things. Running 'makensis' gives
Error: opening stub "/Users/farialima/share/nsis/Stubs/zlib"
Error initalizing CEXEBuild: error setting default stub

How can I complete my installation on the Mac ? should I take some other files from another installation ? I could not find any documentation beside the "appendix G" at http://nsis.sourceforge.net/Docs/AppendixG.html (great name BTW) ?

I am not familiar with the internals of NSIS; is there any hope to have a complete NSIS (including the MUI...) running on MacoS ?


thanks

François


You should use the compiled makensis along with files from a matching compiled version. As said in the documentation, right below the scons command line you've used:

This should only build makensis. Once you have makensis, you can drop it in a downloaded precompiled package such as the nightly build. Note that the in order for this to work, the precompiled package must be compiled using the exact same sources as makensis. In particular, Source\exehead\config.h and Source\exehead\fileform.h must be identical.
However, even if you do that, you won't be able to run makensis on MacOS X. makensis doesn't yet run on big-endian platforms like PowerPC. The current CVS version almost runs, but not yet. Unless you have the new mactel, you won't be able to run makensis.

I'll a test to the code that'll check if the -map flag is available or not.

Sorry for not knowing how to read. :(. Thanks for pointing me to the right info.

I had also looked at the DarwinPort, which I was able to compile, and which seems to take care of the BigEnding thing, but it is an older version (2.05) and it has other problems. You may be interesting in knowing about it. I've entered two bugs on it, I'm not sure it's still maintained:
http://bugzilla.opendarwin.org/show_bug.cgi?id=7502
http://bugzilla.opendarwin.org/show_bug.cgi?id=7504

I'm not familiar enough with the code, and with MacOS, to be able to help on the coding side, but if you need testing or anything, please contact me.


The DarwinPort took care of only one of many big endian problems. It took care of the one that made makensis crash immediately and that's it. SourceForge compile farm has a PowerPC to test on and I also have a MacOS X machine in the house, so testing is not needed. But if you'd like to get into the code, patches are always appreciated.


OK. Just one last thing, I'll waste bandwidth but it has to be said: thanks for this excellent tool. NSIS is clearly the best. Just right between complexity and features. Extensible to hell if needed. Clearly the best. Congratulations.


With the next version, or CVS, I recommend that you turn on the NSIS_CONFIG_CONST_DATA_PATH option when building on MacOSX. This will make makensis look for stuff in the subdirectory where makensis is located, instead of some predefined location. This way you can move the directory around and it will still work. I think this should be made the default on MacOSX, should notify any mac packagers though. What do you think kichik?


Why should it be the default for MacOS X? makensis is a console application, like ls and tar, and should therefore be installed to /usr/bin. If it was a GUI (cocoa?) application, it should have had the ability to move.


Hmm, didn't really consider that.