Building a Stand-Alone Application in Modular Programming
Recommended by 0 users
Creating a stand-alone application and an installer simplifies deploying an application on multiple machines. In order to deploy the application, you first prepare the code, create an Application (Exe) Build Specification, and then create an Installer Build Specification.
A stand-alone application allows the user to run VIs without installing the LabVIEW development system. Installers are used to distribute the stand-alone application. Installers can include the LabVIEW Run-Time Engine, which is necessary for running stand-alone applications. However, you can also download the LabVIEW Run-Time Engine at ni.com.
To create a professional, stand-alone application with VIs, you must consider several programming issues. First, know what outside code your applications uses. For example, do you call any system or custom DLLs or shared libraries? Another issue is the path names you use in the VI. Assume you read data from a file during the application, and the path to the file is hard-coded on the block diagram. Once an application is built, the file is embedded in the executable, changing the path of the file. Being aware of these issues will help you build more robust applications in the future. Another issue that affects the application you have currently built is that the top-level VI does not quit LabVIEW or close the front panel when it is finished executing. To completely quit and close the top-level VI, you must call the Quit LabVIEW function on the block diagram of the top-level VI.
Building the Application and Installer
Use Build Specifications in LabVIEW to create stand-alone applications and installers.
Stand-alone applications: Use stand-alone applications to provide other users with executable versions of VIs. Applications are useful when you want users to run VIs without installing the LabVIEW development system. (Windows) Applications have a .exe extension. (Mac OS) Applications have a .app extension.
Installers (Windows): Use installers to distribute stand-alone applications, shared libraries, and source distributions that you create with the Application Builder. Installers that include the LabVIEW Run-Time Engine are useful if you want users to be able to run applications or use shared libraries without installing LabVIEW.
Use Build Specifications in the Project Explorer window to create build specifications for source distributions and other types of LabVIEW builds. A build specification contains all the settings for the build, such as files to include, directories to create and settings for directories of VIs.
Application (EXE) Build Specification
- Right-click Build Specifications in the Project Explorer window and select New»Application (EXE) from the shortcut menu.
- Modify the filename of the target and destination directory for the application in the Application Information category.
- Select the Application Information category.
Change the Target filename to your filename.exe.