The following list describes some of the caveats and recommendations to consider when you prepare files for build specifications and distribute builds such as source distributions, stand-alone applications, shared libraries, or web services. (Windows) If you also are building an installer, consider the installer caveats and recommendations.
Preparing Files for Build Specifications
- Save changes to VIs in memory before you create or edit a build specification to ensure that the build is accurate.
- Make sure that the settings in the VI Properties dialog box are correct. For example, you might want to configure a VI to hide scroll bars, or you might want to hide the buttons on the toolbar.
- Files with the same name cannot go to the same destination. If you have two files with the same name, even if they belong to different libraries including LabVIEW classes, consider renaming these files on the Source File Settings page when you configure the build. If you don't rename the files, Application Builder moves the files to different folders for you to avoid a filename collision. Any renaming of files might necessitate updating code that references the renamed files by path or by name.
- If a VI includes a MathScript Node, remove any unsupported MathScript functions from your scripts.
- (Windows) If a VI includes a MathScript Node that calls functions from the libraries class, add the DLL and the header file to the project before you create or edit a build specification. Also make sure that the paths to these files are correct in the application. For example, if you build header.h into an application, its path is C:\..\Application.exe\..\header.h, where C:\..\Application.exe represents the path to the application and its filename.
- Resolve all conflicts before you create a build specification. The Application Builder does not allow building an application if the LabVIEW project contains conflicts.
Configuring Build Specifications
-
If a VI loads other VIs dynamically using the VI Server or references a dynamically loaded VI through Call By Reference Nodes, you must add those VIs to the Always Included listbox on the Source Files page of the Application Properties, Shared Library Properties, Source Distribution Properties, or Web Service Properties dialog box.
- If a VI loads other VIs dynamically using the VI Server or references a dynamically loaded VI through Call By Reference Nodes, make sure the application, shared library, or source distribution creates the paths for the VIs correctly. When you include the dynamically loaded VIs in the application or shared library, the paths to the VIs change. For example, if you build foo.vi into an application, its path is C:\..\Application.exe\foo.vi, where C:\..\Application.exe represents the path to the application and its filename.
- If a VI uses the Current VI's Path function, make sure the function works as expected in the application or shared library. In an application or shared library, the Current VI's Path function returns the path to the VI in the application file and treats the application file as an LLB. For example, if you build foo.vi into an application, the function returns a path of C:\..\Application.exe\foo.vi, where C:\..\Application.exe represents the path to the application and its filename.
- If you place a checkmark in the Use the default LabVIEW Configuration file checkbox on the Advanced page of the Application Properties dialog box, an error might occur if a user is running a separate application. When a user runs a separate application, in particular the LabVIEW development environment, and tries to run the built application at the same time, an error might occur if the VI Server and the application share the same port. If a user tries to run VI Server at the same time as the application, VI Server does not run and the user receives no warning that the port is already in use.
- (Windows) If a VI includes a MathScript Node that calls functions from the libraries class, add the DLL and the header file to the Always Included listbox on the Source Files page of the Application Properties dialog box.
Distributing Builds
 | Note Do not distribute the LabVIEW product documentation. The LabVIEW product documentation is copyrighted material. |
Considerations for the LabVIEW Run-Time Engine
- 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. You must log on as an Administrator or a user with administrator privileges to run an installer you build using the Application Builder. (Linux) When you install the LabVIEW Run-Time Engine on a target computer where you want to run an application that uses the Mathematics or Signal Processing VIs, enter yes when prompted to install the LabVIEW Run-Time Advanced Analysis Support package (labview-rte-aal-1.1-1.i386.rpm).
- Some VI Server properties and methods are not supported in the LabVIEW Run-Time Engine. Avoid using these properties and methods in the VIs you include in an application or shared library.
- Incorporate error handling into the VIs of the application because LabVIEW does not display automatic error handling dialog boxes in the LabVIEW Run-Time Engine.
- If the VI uses custom run-time menus, make sure the application menu items that the VI uses are available in the LabVIEW Run-Time Engine.
- When you close all front panel windows in an application, the application stops. If the VI you build into the application contains code that executes after the last front panel window closes, this code does not execute in the application. Avoid writing block diagram code that executes after the last front panel window closes.
- If you reference a VI in an application using the Call By Reference Node, if a VI uses Property Nodes to set front panel properties, or if a front panel window appears to users, remove the checkmark in the Remove front panel checkbox for that VI from the Use default save settings section on the Source File Settings page of the Application Properties dialog box. If you remove the front panel window, the Call By Reference Node or Property Nodes that refer to the front panel window will return errors that might affect the behavior of the application.
Using Shared Variables in Stand-Alone Applications or Shared Libraries
If you plan to distribute a stand-alone application or shared library that uses shared variables, do not include the .lvlib file in an LLB, the executable, or the shared library. Use the Source Files Setting page of the Application Properties dialog box or the Source Files Setting page of the Shared Library Properties dialog box to change the Destination of the .lvlib file to a destination outside the executable, LLB, or shared library.