Compiling NVDA Installer

In this article, You'll find information on how to compile the NVDA installer, so You can install any trunk build which is even not posted on snapshots page and distribute it, or if You have made any modifications to your NVDA.NSI install script and You wish to have compiled NVDA installer with your modifications, such as changed default path where NVDA is installed, modified start menu shortcuts, etc. Please be careful with modifying NVDA.nsi file, because you may get wrong results and installer may crash or even not work.

Steps

  1. You'll need free and open source NSIS (Nullsoft Installer) to compile your .NSI installation script files. You can find it at the following address: http://nsis.sourceforge.net Download and save the file in any location on your hard drive and run the file in order to instal NSIS on your system.
  2. You'll need to have NVDA source code, and you'll need to have it already compiled (please see CompilingNVDA). If you try to compile the installer, but don't have NVDA already compiled and placed into your "Dist" directory under your "Source" directory, nothing will be compiled. So, after compiling NVDA, please don't move your "Dist" folder anywhere from your "Source" folder. Leave it under the "Source" directory where it is compiled and just go to the next step.
  3. Switch to the "Installer" folder under the folder where your NVDA source code from subversion repository is saved, on my system it is C:\NVDA\Installer. Under this directory, find NVDA.NSI file. If you press Enter on it, it will open in Notepad or other text editor such as Akelpad and you'll be able to modify it as you like. Please be careful! However if you don't want or you don't need to modify anything in, don't press Enter! Instead, just find NVDA.NSI file, and then press the Application key, or SHIFT+F10, to open it's context menu. There You'll have a few options that may currently interest you. One is "Compile NSIS script", and "Compile NSIS script (choose compression)". If you choose the second option I have mentioned, you'll be able to choose better compression method for your installer. Higher the compression, smaller the size of your resulting setup file, and for higher compression, the compilation takes more time. The most time it will take for best compressor, but you'll have less than 10 MB installer! You can experiment with various compression types, and find out what's best for you. In every situation after choosing the compressor, you can hit Enter and then wait until Windows Exclamation sound is played. You can find the results of compilation in read only edit field so you can read compilation progress. The NSIS will search for \source\dist path by default, and if it doesn't find it, the compilation will stop! After announcement from exclamation sound you are finished with compiling. Close the NSIS window because it will not close automatically!
  4. Now you're done! After closing the NSIS compilation window, press F5 to refresh the content of the window and arrow through the list. You should find something like "NVDA_SVNTrunk.exe" or "NVDA_RXXX.exe" where XXX is a revision number. But if you are making installer for Trunk version, it'll be "NVDA_SVN-Trunk.exe". This is our compiled NVDA installer file we just compiled in previous steps! Congratulations! Now just run newly compiled installer and test it, and if everything works well, then you're done!