Creating Packages for Distribution with LabVIEW

Create packages with LabVIEW to distribute the software you create to clients through NI Package Manager, through SystemLink, or as an executable.

Note This build output requires Application Builder. LabVIEW Professional edition includes Application Builder. If you use another LabVIEW edition, you can purchase the LabVIEW Application Builder Module separately at ni.com.

Before creating packages, do the following:

  • Create code or other build outputs to include in the package you create. Include the code in a project.
  • Save the project. To create a build specification, the project must be saved.
  • Prepare the source files for distribution.

A distribution is a collection of software content wrapped up for consumption by clients of the software. You can create multiple types of distributions with the Package build specification in LabVIEW:

  • Package—Contents of the distribution build into an NI Package Manager package file (.nipkg). Your clients can install the distribution directly from NI Package Manager.
  • Package installer—Installer file .exe that contains packages included within the distribution. By default, the package installer includes all the package dependencies in the output so that your clients can install the distribution without network access.
  • Feed—Collection of package files that includes a manifest with information on the included packages. With feeds, you can create a single location where you host and maintain all packages intended for end user access. You can add packages to a feed so that clients can subscribe to the feed and install the distribution from NI Package Manager via network access.
  • Table 40. When to Use Different Package Types
    Option When to Use
    Package
    • Make your software available to users through NI Package Manager
    • Basis for creating package installers or feeds.
    Package installer
    • Bundle dependencies of your software with the package itself
    • Distribute the package to users without requiring users to go through NI Package Manager
    Feed
    • Make packages that have dependencies on one another available to users through NI Package Manager or SystemLink
    • Enable users to subscribe to the feed so that they can receive updated versions of the feed if you make changes to your software
    Note You cannot distribute stand-alone VIs.

    This procedure describes the basic options to create this build specification. For details on each configuration option for the build specification, refer to the links for each page of the dialog box.

    To use your LabVIEW project to bundle software into a package and, optionally, a package installer or a feed, complete the following steps.

    1. In the Project Explorer window, right-click Build Specifications and select New » Package.
    2. (Recommended) Under Information, name the package and the build specification, and choose the highest-level save directory for the build product.

      The package name must be all lowercase and contain no spaces.

      NI Package Manager and other packages use this name to reference the package you create.
    3. (Recommended) Under Destinations, set up any destination folders where you plan to install the package in the client.

      Destination path defines the location of these files relative to the overall save directory for the build you specified in step 2.

      Note If you intend to include this distribution in an installer, specify the build output of the build specification relative to the primary destination of the build specification. For details, see Caveats and Recommendations for Building Installers with LabVIEW.
    4. (Recommended) Under Source Files, specify which files or build specification outputs you want to install.
    5. Optional: (Windows) Under Shortcuts, you can add a shortcut to the Startup menu if you want your application to run as soon as the system starts up.

      You can also add a shortcut to the Desktop or Program Menu on Windows. By default, LabVIEW adds a shortcut in the Windows Program menu for each application included in the package.

    6. (Recommended) Under Package, specify the display name and synopsis for your package.
    7. Display name—Name that users see in NI Package Manager or SystemLink when they install the package.
    8. Synopsis—First line of the description that users see before they click on a package to see its full description.
    9. Note If you intend to create a package installer or a feed, you need to configure a package.
    10. Optional: Under Dependencies, specify dependencies on any currently installed packages.
      1. Configure the relationship of the dependency. You can define a dependency as required, recommended, or suggested and specify version ranges.
      2. To prompt the user to install your package when they install a related package, place a checkmark in the Include enhanced relationship checkbox.
    11. Optional: Under Version Information, specify the version of your package and what version you want to display to the user.

      If you remove the display version, the user sees the full version in NI Package Manager.

      For more information about setting versions, refer to Managing Application Versions.

    12. Optional: Under Advanced, set your package to run executables or scripts while it installs or uninstalls.
      For example, you can specify whether the process for installing or uninstalling the package waits for a certain action to complete.
    13. Optional: To include any LabVIEW Web services with the distribution, add the service under Web Services.
    14. Optional: Build your package into a package installer or a feed.
      OptionDescription
      Package installer (.exe) Under Package Installer, place a checkmark in the Create a Package Installer checkbox.
      Feed Under Feed, choose whether to add your package to a local feed or publish the package to a feed on the SystemLink server.
    15. Apply any updated settings for your build specification by clicking OK.
      The dialog box closes and the build specification name appears in the project under Build Specifications.
    16. Build the application.
      OptionDescription
      Interactive
      • Right-click the build specification and select Build.
      • From the Properties window, click Build.
      Programmatic Use the Build VI or the ExecuteBuildSpec command line operation.
      An .nipkg file (Windows) or .ipk file (NI Linux Real-Time) appears in the destination you specified.

    After you create the distribution, distribute the package to clients through NI Package Manager or SystemLink, in most cases.

    • (Windows) Your clients can use NI Package Manager or SystemLink to subscribe to a feed to find and install your packages.
    • (NI Linux Real-Time) Your clients can install packages through SystemLink or from the command line on the NI Linux Real-Time target. NI Package Manager does not support .ipk files.