I spent the better part of this morning working on the installer for CLAW. There’s not a lot that needs to be done: my requirements are fairly simple:
-
Must be scriptable from a NAnt build script
-
Must support silent installs / uninstalls (especially for smoke testing)
-
Must be able to register / unregister COM objects
-
Must be able to add the appropriate variables into the global environment block to enable the profiler
I was quite disappointed by my ancient copy of WISE 6.0. It doesn’t appear to be callable from a build script. So I punted it. After asking around a bit on some mailing lists that I belong to, Brad Wilson told me that Wise 8.1 supported command line installer building. The problem is that I didn’t really want to pay $450 for yet another installer package; particularly since my needs are so simple.
After a bit more looking around, I discovered NSIS. This is the Nullsoft Installation System (yes, brought to you by the same folks that created WinAmp). It’s a free open-source installation system with quite a flexible scripting language built in. It also comes with a simple command-line compiler: makensis.
NSIS generates single-file installs. It supports uninstalls as well. It had support for every single one of my requirements except for the last one. However, it’s a fairly simple task to add some additional code into a call to DllRegisterServer to add the appropriate variables to the global environment block. I’m off to the races!
If you’re interested in checking out what an NSIS script looks like, click here.