NI Package Management

cancel
Showing results for 
Search instead for 
Did you mean: 

Distribute Packages Using NI Package Manager

This document is part of the NI Package Management Portal.

 

Distribute Packages Using NI Package Manager

If you create a single package that does not have any dependencies, you could install that package by simply double-clicking the .nipkg file on a computer that has NI Package Manager (NIPM) installed.

 

If your package has dependencies or you want end-users to browse/install your package using the NI Package Manager GUI, then you should follow the instructions below:

  1. Create a feed.
  2. Publish your package to a feed.
  3. Register the feed on the target computer.
  4. Install the package on the target computer using the NIPM GUI.
  5. Update source files and package on development computer.
  6. Install the update on the target computer using the NIPM GUI.

 

1) Create a feed
If you do not have an existing feed yet, create a feed using one of the following methods:

 

NIPM CLI Method

  1. Place one or more packages (.nipkg) in a single source directory.
  2. Open a command prompt.
  3. Change directories to the location of Package Manager. The default location is C:\Program Files\National Instruments\NI Package Manager.
  4. Run the following command: nipkg feed-create <target location of feed> <location of source directory of packages>.

Example
Let’s say you have placed several packages (.nipkg) on a network folder at “\\mycompany\Feeds\My Feed”, and you want to create a feed in the same folder as these packages. You would run the following command in the NIPM CLI, and see the following output.

nipm cli - feed-create.png

 

Your feed folder would then look like this. NI Package Manager created the feed manifest files (Packages, Packages.gz, Packages.stamps) in the “\\mynetwork\Feeds\My Feed” directory using the package (.nipkg) files in “\\mynetwork\Feeds\My Feed” directory.

nipm cli - feed-create folder.png

 

Feed Manager GUI Method

If you would prefer to use a GUI and you have LabVIEW 2014 or later, then you can use the Feed Manager GUI (created in LabVIEW).

  1. Install the NIPM API and Feed Manager GUI.
  2. In LabVIEW, launch the NIPM Feed Manager GUI by selecting Tools»NIPM Feed Manager»NIPM Feed Manager from the LabVIEW toolbar.
  3. Create a feed, as shown below.

feed manager gui - create new feed workflow.png

Note: Launching the NIPM Feed Manager launches a VI. The VI resides in the <labview>\project\NIPM Feed Manager directory. You can modify the VI to suit your needs.

 

2) Publish your package to the feed
There are two methods to publish your package to a feed. You can either use the NIPM CLI or a Feed Manager GUI.

 

NIPM CLI Method

  1. Place the package in a directory. You can place the package either in the same source directory as the other packages in the feed or in a different directory.
  2. Open a command prompt.
  3. Change directories to the location of Package Manager. The default location is C:\Program Files\National Instruments\NI Package Manager.
  4. Run the following command: nipkg feed-add-pkg <location of feed> <name and filepath of package(s)>.
    For example, if you enter C:\Program Files\National Instruments\NI Package Manager> nipkg feed-add-pkg C:\temp\myTestFeed C:\temp\myTestPackage\my-test-package.nipkg, Package Manager updates the feed manifest files in the C:\temp\myTestFeed directory using the package files in C:\temp\myTestPackage.

 

Example
You have already created a feed at \\mynetwork\Feeds\My Feed. Now you want to add your compdemo-main_1.0.0-7_windows_x64.nipkg package file to this feed. First, you can copy the package file to the same directory as the other packages in this feed. Then, you would run the following command in the NIPM CLI, and see the following output.

nipm cli - feed-add-pkg.png

 

Feed Manager GUI Method

If you would prefer to use a GUI and you have LabVIEW 2014 or later, then you can use the Feed Manager GUI.

  1. Select your feed.
  2. Click the Publish Package button, and select the package(s) that you want to publish to the feed. This will 1) copy the package to the specified package destination folder for the feed, and 2) add the package to the feed.
  3. Your package should now show up in the Packages in Feed listbox. You can click your package to view its package attributes (metadata) in the Package Attributes table on the right.
  4. (Optional) If you need to remove a package from the feed (e.g. old version of package that has a critical bug), you can select the package and click the Unpublish Package button.

feed manager gui - publish feed workflow.png

 

3) Register the feed on the target computer

  1. Go to the target computer.
  2. Ensure that NI Package Manager is installed.
  3. Launch NI Package Manager.
  4. Enable the Settings»Show available packages and feed management tools checkbox.
    nipm gui - settings - general - show feed tools checkbox.png
  5. Go to Settings»Feeds and click the Add button.
  6. Register your feed by browsing to the feed.
    nipm gui - add feed dialog.png
  7. Your feed should now show up in the list of registered feeds.
    nipm gui - registered feeds.png

 

4) Install the package on the target computer using the NIPM GUI

  1. Launch NI Package Manager.
  2. Go to the PACKAGES tab. This tab lists all the packages that are available to install from all the registered feeds. This tab does not show packages that are already installed.
  3. Select the package(s) that you want to install, and click Install.

nipm gui - install package.png

 

5) Update source files and package on development computer

Do the following on your development computer:

  1. Make the necessary updates to your source files.
  2. Build a new version of your package.
    Note: If you enable the Auto-increment checkbox in the Package build specification, building a package will automatically increment the version of the built package.
  3. Publish the new version of your package to the feed. If you do not want target computer to be able to access the old version(s) of the package, then unpublish the old version(s) of the package from the feed.
    Note: Refer to the Publish your package to the feed section above for step-by-step instructions.

nipm - update workflow.PNG

 

6) Install the update on the target computer using the NIPM GUI

  1. Launch NI Package Manager.
  2. Go to the UPDATES tab. This tab lists all the packages that have an update available from the registered feeds.
  3. Select the package(s) that you want to update, and click Update.

nipm gui - update package.png

Comments
Gregory
Trusted Enthusiast
Trusted Enthusiast
on

I have found a bug that prevented me from installing packages published with this tool. In the support VI "Read Feed INI.vi" the Package Destination Folderpath should have the input "read raw string" set to True. (Well, it should actually be using a path, not a string). Otherwise if the path is a network folder beginning "\\" one of the slashes is removed and instead of being a network path it becomes a relative path. 

CL_eisenwr
Active Participant
Active Participant
on

@allen_h

Is there way to automate "Register the feed on the target computer"? I have noticed that NI had a package that installed/updated a NIPM Feed.

__________________________________
Bill Eisenhower
Certified LabVIEW & TestStand Developer
Gregory
Trusted Enthusiast
Trusted Enthusiast
on

Hi Bill,

 

I do it using the NIPM API in the following way:

Capture.PNG

STDenis
Member
Member
on

Great hint there @Gregory ! I had exactly the same problem and was wondering what was exactly happening - saved me a lot of time 😉

 

Thanks a lot !

Sincerely yours,

Denis

Contributors