Nullsoft, the makers of the Winamp MP3 software, have released a powerful free installer called NSIS, available here. This application allows you to make installation packages for Windows applications.You create NSIS packages by writing a NSIS script and then compiling it. Depending on the application, NSIS can often be a better choice than more expensive installation generators, since NSIS installations are easy to create, are small and fast, and yet can be configured with many features.
When you install Leo, you'll find that it comes with a script for generating an installer for Leo. This script is called leo.nsi, and is distributed in the Leo file nsis.leo .If you have NSIS installed, right-clicking on a .nsi file will give you the option of compiling the script to create a package.
Since the NSIS script for the Leo installation is included in the Leo distribution in the nsis.leo file, it is easy to understand the how the script works. This .nsi file creates an installer that packages all of the Leo program files, and creates a desktop shortcut, a Program Menu item, and the file association for .leo files.
In this screenshot we're looking at the code that checks to see whether Python has been installed.Since Leo is a Python application, modifying this installation script to create a script to build a Windows installer for your own Python application is relatively simple. You would leave this section alone, and check other sections for the program name "Leo", and change these to your program name.
For example, here is the section that creates a registry entry for associating the .leo extension with Leo. You would change the name "Leo" to the name of your application.If you are going to use NSIS to create an installer for something other than a Python application, this .leo file still contains examples of several useful NSIS techniques, which can be easily referred to, since the script is documented in outline form in a Leo file.
