You can use the Application Builder to create a build specification for and build a stand-alone application. You can configure settings for specified VIs to add passwords, remove block diagrams, or apply other settings. You also can select different destination directories for VIs without breaking the links between VIs and subVIs. Before you create a build specification or start the build process, review the Building Applications Checklist.
|Note The LabVIEW Professional Development System includes the Application Builder. If you use the LabVIEW Base Package or Full Development System, you can purchase the Application Builder separately by visiting the National Instruments Web site.|
Complete the following steps to build an application in LabVIEW. Refer to the NI Developer Zone for a step-by-step tutorial on creating a sample stand-alone application.
|Note (Windows) Building a stand-alone application is the same as creating a .exe file.|
- Open the LabVIEW project for which you want to build the application. You must have a project open and saved to configure a build specification.
- Prepare the VIs you want to use to build the application. Save changes to any VIs in memory.
|Note Make sure the front panels of these VIs are designed the way you want. You cannot edit the layout of front panel controls on a built application.|
Configuring the Build Specification
- Expand My Computer. Right-click Build Specifications and select New»Application from the shortcut menu to display the Application Properties dialog box. If you previously hid Build Specifications in the Project Explorer window, you must display the item again to access it.
- Complete the following items on the Information page of the Application Properties dialog box.
- Enter a name for the build specification in the Build specification name text box. This name appears under Build Specifications in the Project Explorer window. The name must be unique among other build specification names in the project.
- Enter a name for the application in the Target filename text box. (Windows) Applications must have a .exe extension. (Mac OS X) Applications must have a .app extension.
- Enter the location for the built application in the Destination directory text box. You can use the Browse button to navigate to and select a location.
- Complete the following items on the Source Files page.
- From the Project Files tree, select the VI you want to define as a startup VI for the application. You also can select multiple files in the Project Files tree to add several files at one time to the Startup VIs or Always Included listbox. Startup VIs open and run when a user launches the application. You must define at least one VI as a startup VI for the application.
- Click the Add Item arrow button next to the Startup VIs listbox to move the selected VIs to the Startup VIs listbox.
- Click the Add Item arrow button next to the Always Included listbox to move the selected items to the Always Included listbox.
If you build an application that uses VIs on the Source Control palette, you must manually add the source control configuration information to the .ini file for the built application. Add the SCCConfigData, SCCProviderName, and SCCProviderLocation tokens to the .ini file for the application or to a custom .ini file if you are building an installer.
- From the Destinations page, configure destination settings, add destination directories for the application, and indicate whether LabVIEW adds the files to a new project library.
- From the Source File Settings page, edit destinations and properties for individual files and folders in the application.
LabVIEW places an item set to Same as caller in the directory of the caller. If you set an item to Same as caller and two different callers are in different directories, LabVIEW places the item in the same directory as the build.
Note If you plan to distribute a stand-alone application that uses shared variables, do not include the .lvlib file in an LLB or in the executable. Change the Destination of the .lvlib file to a destination outside the executable or LLB.|
Customizing Advanced Application Options
- From the Icon page, select the icon file to associate with the application. You also can view the icon using the Icon Image pull-down menu.
- From the Advanced page, configure advanced settings for the application.
- From the Additional Exclusions page, configure settings to disconnect type definitions, remove unused polymorphic VI instances, and remove unused members of project libraries to reduce the size of the application.
- From the Version Information page, configure the version number and other application information.
- From the Run-Time Languages page, set the language preferences for the application.
|Note The LabVIEW Run-Time Engine must be installed on any computer on which users run the application or shared library. You can distribute the LabVIEW Run-Time Engine with the application or shared library. (Windows) You also can include the LabVIEW Run-Time Engine in an installer.|
- From the Pre/Post Build Actions page, specify VIs for LabVIEW to execute before or after the build.
Previewing and Building the Application
- From the Preview page, click the Generate Preview button to review the generated files for the application.
- Click the OK button to update the build specification settings in the project and close the dialog box. The build specification name appears in the project under Build Specifications.
Creating or updating the build specification does not build the application. You must complete the next step to build the application.
|Note When you update the build specification settings, the settings become part of the project. However, you must save the project if you want to save the settings.|
- Right-click the application build specification name and select Build from the shortcut menu. You can find the resulting application in the directory specified in the Destination path on the Destinations page.
You also can click the Build button in the Application Properties dialog box to update the build specification and build the application.
You can duplicate build specifications. Right-click the build specification item you want to duplicate and select Duplicate from the shortcut menu to create a copy of the build specification item.
If you rebuild a given specification, LabVIEW overwrites the existing files from the previous build that are part of the current build.
You also can build an application programmatically from a build specification using the Build VI.
|Note (Windows) You might run out of memory during the build process if you build a very large application. To reduce the risk of reaching the memory limit, you can enable LabVIEW to use up to 3 GB of virtual memory. For more information, refer to Extending Virtual Memory Usage for 32-bit Windows.|
Building and Distributing Applications Home