Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Building a Source Distribution

NI LabVIEW 8.6 Help
June 2008

NI Part Number:
371361E-01

»View Product Info

A source distribution is a collection of files that you can package and send to users. Source distributions are useful if you want to send code to other developers to use in LabVIEW. 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 in a source distribution without breaking the links between VIs and subVIs.

Before you create a build specification or start the build process, review the caveats and recommendations for LabVIEW build specifications.

Complete the following steps to build a source distribution.

  1. Open the LabVIEW project you want to use to build the source distribution. You must have a project open and saved to configure a source distribution build specification.
  2. Prepare the VIs you want to use to build the source distribution. Save changes to any VIs in memory.
  3. Expand My Computer. Right-click Build Specifications and select New»Source Distribution from the shortcut menu to display the Source Distribution Properties dialog box. If you previously hid Build Specifications in the Project Explorer window, you must display the item again to access it.
  4. Complete the following items on the Information page of the dialog box.
    1. 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.
    2. Enter the location for the source distribution in the Destination directory text box. You can use the Browse button to navigate to and select a location.
    3. Enter a description for the build specification in the Build specification description text box.
  5. Complete the following items on the Source Files page.
    1. From the Project Files tree, select the items you want to define as always included. You also can select multiple files in the Project Files tree to add several files at one time to the Always Included or Always Excluded listboxes.
    2. Click the Add Item arrow button next to the Always Included listbox to move the selected items to the Always Included listbox.
    3. Click the Add Item arrow button next to the Always Excluded listbox to move the selected VIs to the Always Excluded listbox.

      You cannot include a polymorphic VI or a LabVIEW class in the Always Included or Always Excluded listboxes. Use an instance of the polymorphic VI instead.
  6. From the Destinations page, configure the destination options for the source distribution.
  7. From the Source File Settings page, click an item in the Project Files tree to display the configuration options for destination directory, password options, and VI settings. Click the Customize VI Properties button to open the VI Properties dialog box, which you can use to change VI settings such as window appearance.
  8. From the Additional Exclusions page, select the options you want LabVIEW to exclude from the source distribution.
  9. From the Preview page, click the Generate Preview button to review the generated file hierarchy for the source distribution.
  10. 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.
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.
  1. Right-click the source distribution build specification name and select Build from the shortcut menu. You can find the resulting source distribution in the directory specified in the Destination directory on the Information page of the build specification.

    You also can click the Build button in the Source Distribution Properties dialog box to build the source distribution and update the build specification in the project.

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 a source distribution programmatically from a build specification.


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit