After we compile an executable and deploy it on a machine, we cannot run the executable immediately. We must set up the machine with the correct software before we can run the executable. It is troublesome if we have to install multiple software on the machine before we can run the executable. In this recipe, we will learn how to package the executable with the required software into one installer, so that we only need to double-click on the installer and everything will be installed automatically.
A standalone application is just an installer that comprises an executable and drivers required by the executable. We will use an executable that we created previously.
We will open the project ExeExample.lvproj from the recipe where we learned how to compile an executable. We right-click on Build Specification and select New | Installer; the My Installer Properties dialog, where we can set up the properties of the installer, appears.
In the Product Information category, we specify the Build specification name with
ExeExampleInstaller
, Product name withExeExample
, and Installer destination with a convenient place for the example.In the Destination category, we can set up where the content of our program will go. We will use the default setting, and that will create a folder inside the Program Files folder in your local drive.
In the Source Files category, we select the executable and all relevant files on the left and transfer them to the right.
In a compiled standalone application, it can be sent as an installer to deploy onto another machine. In the installer, everything that is needed to execute a program is included. The user only needs to double-click on the received installer, and the program with all its dependencies will be installed automatically.
In the Additional Installers category, we select all the additional installers that our program needs during execution. At the very least, the NI LabVIEW Run-Time Engine is needed. If you used other features such as DAQmx, VISA, FPGA, and so on, more installers will be needed. If you are unsure about what is needed, click on each installer and read its description to see whether the installer describes a feature in our code or not.