Alternative to LabVIEW’s Installer Builder
Most people who develop software in LabVIEW are familiar with the installer build process from within LabVIEW. If you haven’t built an installer from within LabVIEW, it is similar to building an executable. The first step is to build your executable. Next you right click on Build Specifications in the project explorer window and select New>Installer. That will bring up the Installer Builder window shown below.
Next select the desired executable under source files and edit any other relevant settings. The idea is that while the executable build script creates your executable, building the installer packages the executable along with any support files and creates a directory structure similar to what is shown below.
Running setup.exe will then install your program, which means it will put the executable and support files in the correct locations and add any registry settings and shortcuts that you may want. Then you can take the whole folder and zip it up and send it off to customers.
What I do like about the LabVIEW installer
Before I talk about what I don’t like about the LabVIEW Installer Builder, let me talk about what I do like about it. I like that it is integrated with LabVIEW. There are no external programs to manage. I can do my entire workflow from within LabVIEW. I like the graphical user interface. It is very intuitive and similar to the executable builder, so it seems very familiar. I particularly like the GUI for editing registry values. I like the fact that it makes it easy to install the LabVIEW Run-Time Engine as well as any relevant NI drivers (which it will find for you). It will even let you install a MAX Configuration file.
Why use an alternative?
My main issue with the LabVIEW Installer can be seen in the folder contents above. The results are not lightweight. After running the installer build scritp, it creates a whole set of files and folders that need to be zipped up and sent off. Also, it’s not obvious from the image above, but the overall size is quite large. For a recent project the size was over 288 MB for a project with only about 25 vis. If you want to distribute your installer over internet, the size can be a big deal.
Due to the size issue, I started looking at other tools. After some research I settled on Innosetup. It’s a free tool that allows you to create your own installer. It has similar capabilities to the LabVIEW installer, however some of the LabVIEW/National Instruments features are not there, such as easily including the Run-Time Engine, NI drivers, or MAX configuration. The main difference is that it is script based in nature. Therefore, being a LabVIEW programmer instead of a text-based programmer, I found it a little bit harder to use. However it does have a very well-written help file. Below is a screenshot.
The biggest thing I like about Innosetup is the results. As shown below, my 288MB LabVIEW generated installer package was reduced to a single 2.5MB executable file. In my case, that was worth the extra hassle.
So my point in this blogpost was to get the word out to other LabVIEW developers that there are alternatives to the LabVIEW Installer Builder. When I found Innosetup I found several others (WIX being another popular one). There are some tradeoffs to think about before using a different installer builder.
Here are some of the advantages I see to the NI builder:
- Simplify your workflow – do all your work in LabVIEW
- Nice familiar GUI interface
- Easy to include NI drivers and RunTime Engine
- Ability to Load Max Configuration files
Here are some of the advantages of using a 3rd party tool:
- Size of final installer
- More control – not limited to options presented in LabVIEWs built in GUI.
- Script based – so potentially easier to automate.
Hopefully you all found this useful.