2004-07-08
NullSoft Scriptable Install System (NSIS) allows programmers to easily build automated installation programs for Windows. Many Windows programs use NSIS to install themselves.

If you cross-compile your Windows executables from a Linux host then you may be interested in running makensis natively. For a long time I ran the Windows makensis under WINE. However WINE is a bit cumbersome to run from a cron job because it normally requires X (the graphical display subsystem used on UNIX Systems).

Today I noticed that makensis will now mostly compile natively on POSIX compliant operating systems (such as Linux). By mostly I mean that some components require a Windows compiler (such as MinGW) even though the main executable builds natively under Linux.

What you need:

  • WINE installed and working.
  • MinGW installed as a cross compiler.
  • GCC installed as a native Linux compiler.
  • The latest CVS version of NSIS
    cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/nsis login
    # There is no password, just press enter.
    cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/nsis co NSIS

How to do it:

  1. cd NSIS
  2. create a shell script named Source/exehead/bin2h
  3. chmod a+x Source/exehead/bin2h
  4. cd Source/exehead
  5. cross-make
  6. cd ..
  7. make makensis
  8. cd ..
  9. cp -a . /usr/local/lib/makensis
  10. rm -Rf /usr/local/lib/makensis/Source
  11. create a shell script named /usr/local/bin/makensis to run your native version.
  12. chmod a+x /usr/local/bin/makensis

Now you can run makensis natively on Linux...

$ makensis

MakeNSIS v2.01 - Copyright 1999-2004 Nullsoft, Inc.

You may download my native NSIS build for Linux made on 2004-07-08 under Fedora Core 2.