Microsoft Windows users love setup files …

… and I used to love them too. Nowadays, Linux is my favorite operating and development system, but most users of my RCP application “OpenChrom” are still using Microsoft Windows. That’s why I searched for a way to offer a nice installer/uninstaller without confusing them with sentences like “Just download, unzip and execute the application.” or other statements. Nooope, they’d like to have a good old installer. And they’ll get it. Arrggh, but I don’t want to switch to Microsoft Windows only to compile the setup executables. Good news, I don’t need to. It works also under Linux utilizing NSIS (nullsoft scriptable install system) and really, NSIS is marvelous!

The screenshots are in german, but I’m sure you’ll get the point.

Let me show you how to install a build process using “Ubuntu Linux 10.04“. It works both on the “Desktop” as well on the “Server Edition”. First of all, let’s install the NSIS package (version 2.46).

$sudo aptitude install nsis

Sometimes, we do need the zip package too. Zack, install it.

$sudo aptitude install zip

NSIS works now, but RCP applications aren’t working without an existing JRE. That’s why NSIS can be enriched by further plug-ins to make automatic JRE checks whilst installing the RCP application.

For this purpose we need the plug-ins “InetLoad

$sudo cp InetLoad.dll /usr/share/nsis/Plugins/
$sudo chown root:root /usr/share/nsis/Plugins/InetLoad.dll

and “JREDyna“.

$sudo cp JREDyna.nsh /usr/share/nsis/Include/
$sudo chown root:root /usr/share/nsis/Include/JREDyna.nsh

Ok, done. But there’s one problem left. How to delete application specific files of users we don’t actually know? Again, plug-ins are the solution. There’s a NSIS plug-in called “NT Profile Paths” to detect all user profiles whilst uninstalling the system. Copy the “NTProfiles.nsh” to your home folder.

$sudo cp NTProfiles.nsh /usr/share/nsis/Include/
$sudo chown root:root /usr/share/nsis/Include/NTProfiles.nsh

That’s it. NSIS scripts can be now compiled using the command line. Save the script “setup.nsi” for example in your home folder.

# Example script
Name "RCP Application Setup"
OutFile "setup.exe"
MessageBox MB_OK "NSIS is cool!"

Compile it using the following command.

$makensis setup.nsi

Here are the links:

NSIS at Wikipedia (
InetLoad (
JREDyna – Java Runtime Environment Dynamic Installer (
NT Profile Paths (
Ubuntu (


It would be too much to discuss all NSIS directives here, but the setup file of OpenChrom is a good example to have a look at the features of NSIS:

Anyhow, OpenChrom needs further files to be ready for compilation. The project specific header files are stored in the graphics package NSIS relative to the setup_openchrom_x86.nsi script. All other NSIS icons are stored in “/usr/share/nsis/Contrib/Graphics/Icons/”.

The resulting executable can be downloaded here:


About Philip Wenig

Founder of OpenChrom
This entry was posted in Uncategorized. Bookmark the permalink.

6 Responses to Microsoft Windows users love setup files …

  1. An installer… you know, a lot if not all Linux distros already have one. rpm, deb, yum, etcetera etcetera. Why not just package your product and use the installers that exist? They already have a frontend, different ones even, most of them can be driven from the command line and almost all of them have an established infrastructure behind them including the use of security.

    In all my years in the Linux environment I almost never see people using NSIS. And system administrators tend to hate installers that need to be point-and-clicked… for numerous reasons. I think that this will hold your application back and will slow down adoption of it.

  2. Manuel says:

    I am successfully using for the same purpose.

  3. You actually make it appear so easy along with your presentation but I find this matter to be actually one thing which I feel I might never understand. It seems too complex and very huge for me. I am looking ahead for your subsequent post, I will try to get the cling of it!

    • eselmeister says:

      The installer is as easy as it is shown for end users. Just execute the setup and proceed with the installation. The steps described to build such a setup.exe are indeed a bit more complicated, especially when you’ll try to compile a Windows setup executable on a Linux operating system. Once the setup build process works, the process don’t need to be changed drastically. Finally, the complexity to install an RCP application is thereby hidden using the setup executable. I hope, that answers your questions well.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s