WISDOMBAY

in4mation ... organized

Dealing with NSIS made Simpler

Page 1

An article that explains the steps related to creating an Installer with NSIS.
Posted by Mohammed Arfath

This article is an attempt by me to get those souls out there who are looking for an installer solution, acquainted with one of Industries best installer option – NSIS (it’s not only good but also FREE!!!). If you ever wondered how to create an installer for your application, complete with the .exe file along with all the supporting files such as .dll, .ocx etc then this article is for you. There are more than enough of installers available for download, both for purchase and free. To avoid confusion, here I am limiting my discussion strictly to NSIS (Nullsoft Scriptable Install System).

Those of you who are already familiar with creating installers using NSIS may skip reading this paper, (because this is an attempt by me for those who are not at all familiar about the intricacies of creating an installer for their application) but may be you can get one or two new tips or points from here :-).

I will guide you in the process of creating an NSIS Installer by little steps through this paper by splitting the whole operation in to easy steps.

Requirements

  • NSIS 2.05 or above , which can be downloaded free of cost from http://nsis.sourceforge.net
  • An editor for NSIS. You can use one like HM NIS Edit ( the one i personally prefer) which is available for free download from http://hmne.sourceforge.net/ . You can also use plain vanilla text editors like notepad , but I strongly recommend you to download this tool, which has many added features like : Syntax highlighting with customizable colours, Basic NSIS command help and many more.

Let's Start

Lets begin our workshop on creating an NSIS Installer for your application here,

Your application may be having atleast one exe file, say myexe.exe and some supporting files, say mydll.dll and myocx.ocx (these names will be used here after to refer to the files included in the example script). For the sample script given below we are dealing with an application setup that contains the above 3 files only. Since this is an attempt for giving a sample to newbies, I am following the simplest Installer Creation methodology.

First you have to decide what all files you will be supplying with your application.

Step 1: Group all your application files

You have to put all those files or directories which you wish to ship with your installer in to one single directory. Then rename that directory with the name of your application.

Eg: Suppose your application’s name is “Myapp” and you want to install all your files to the location – “anydrive:\Program Files\Myapp\”. Rename the above main directory to “Myapp”.

Now Myapp will contain three files - myexe.exe, mydll.dll and myocx.ocx.

Step 2: Compress your folder

Compress the folder “Myapp” into “Myapp.zip” file

Now we are ready to start the coding part. If you haven’t installed NSIS and HM NIS Edit yet, it is time you did that... :-)

Google