From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Developer Center Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Licensing and Installer for complex Toolkit's

Our company has a quite large Toolkit that we are about to publish on the Tools Network and we are looking into the best way for licensing and deployment. The Toolkit consists of several Labview libraries (*.lvlib) and one executable. Until know we have been using the Installer feature in the “NI Build Specification”. But an installer created from there does not work very well if the customer has several versions of Labview installed. We want the customer to decide for which Labview version the Toolkit shall be installed for. We saw that an installer created from the VIPB does handle several Labview version’s but the problem with VIPB is that it can only inject licensing into ONE *.lvlib (?). We have several…. During the installation we also want to create shortcuts to our executable from the windowsX start menu and I can’t find that kind of functionality in VIPB.

Do you guy’s have any good tips for us? Perhaps we need to create the installer as an ordinary Windows installer using for instance WiX (wixtoolset.org). That is however a bit complicated and will take some time to implement and if so we must still use the NI Build Specification to remove the block diagrams from our private VI’s and then inject licensing information into the *.lvlib’s and *.vi’s using Third-Party Licensing and Activation Toolkit.

0 Kudos
Message 1 of 20
(12,138 Views)

David or Rob will correct me if I'm wrong, but I think you can use the Third Party Licensing and Activation Toolkit to manually apply licensing to your libraries. You can use VI Package Builder to create your package, but pre-license the libraries in LabVIEW yourself. I think you also need to be sure you make a copy of the libraries before you license them.

An alternative approach is to make one package per licensed library, then one more master package which is set to require the others are dependencies. This can be set up in VI Package Builder. Thus, when someone installs your toolkit (the master package), the others are all installed too.

Regarding start menu items, you can achieve this in custom code. VI Package Builder can launch a VI pre- and post- installation of your toolkit. Use a post-install VI to create a shortcut in the Start menu. If you ask VI Package Builder to create the template VI for you, it includes the various inputs that you can receive from VI Package Manager and I believe that includes the Operating System version and the LabVIEW Version. With that information you should be able to locate your executable and create an appropriate shortcut yourself.

Message was edited by: Thoric

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 2 of 20
(5,681 Views)

Thoric wrote:

Use a post-install VI to create a shortcut in the Start menu.

How is can a VI create Start menu shortcut?  Doesn't that require Admin privelages?  How will the VI know the location of the object to be linked?

Do you have example?

0 Kudos
Message 3 of 20
(5,681 Views)

I myself have used the VI Package Builder pre-install custom VI to perform administrative tasks. In PTP Sequencer we have to make a fix to certain registry entries, for which we wrote a simple executable that, via a manifest file, requests elevated privileges. The custom VI launches the executable, which performs the changes.

In this case, you could write an executable that creates the shortcut. Embed a manifest file to ensures elevated privileges for admin access (if that's required for creating a shortcut in "Start"?). Call the executable from within the post-install VI.

I didn't say it would be easy

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 4 of 20
(5,681 Views)

Thanks for the response.

The pre-license approach sounds interesting, but how to do that. I mean, in the VIPB I should not use the “Licensing & Activation” feature at all? If so, how is our Toolkit registered, i.e. how is the RegAddon called?

Thanks for the tip about creating shortcuts. I’ll try that!

0 Kudos
Message 5 of 20
(5,681 Views)

gunnar.andersson wrote:

Thanks for the response.

The pre-license approach sounds interesting, but how to do that. I mean, in the VIPB I should not use the “Licensing & Activation” feature at all? If so, how is our Toolkit registered, i.e. how is the RegAddon called?

Thanks for the tip about creating shortcuts. I’ll try that!

To be honest, I don't recall. As I said above, I might be wrong and if so David and Rob will correct me once they spot this thread. VIPM has always been the recommended approach so I'm not sure how to go about licensing a toolkit without it. I presume you've tried a search?

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 6 of 20
(5,681 Views)

It might be that you have to create your own bit of code for license validation checking, and launching the activation wizard: https://decibel.ni.com/content/docs/DOC-13939

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 7 of 20
(5,681 Views)

Hi Gunnar,

What you are trying to do with regards to licensing is very possible, with a little bit of trickery.  As Thoric said, you have to first license the lvlib using the Add-on Licensing tool in either Standard or Advanced mode, depending on whichever method you are using already.   Then you have to copy the rest of your source code (examples, documentation, etc) from the original source directory into the new "Licensed" directory.  Finally, open your new source code to make sure all of the linking is correct and then activate it on your build computer.  These last two things are the most important steps that are often missed in this process.  Once your new licensed source code looks correct and works, you can build your VIP from this new licensed directory and everything should work as expected.  You still need to set the "License file path" and "Licensed library path" in VI Package builder, but you don't need to enable "Build license to library at build time' since the license has already been applied to the library.  Then of course, test out installing your VI Package on a clean computer to make sure everything runs as expected.

Hope this works for your needs, but let us know if you run into any snags. 

David

0 Kudos
Message 8 of 20
(5,681 Views)

how is our Toolkit registered, i.e. how is the RegAddon called?

As David mentioned:

You still need to set the "License file path" and "Licensed library path" in VI Package builder

This is the info that VIPM uses to determine if registration with the activation system is required during install. If the above is defined then VIPM will install it correctly.

As far as Win shortcuts. The exe approach will work but be carefull not to build a labview exe. Because then the exe won't run unless you have the approapriate run-time.

0 Kudos
Message 9 of 20
(5,681 Views)

Hi again. I’ve been trying to create the shortcut to my EXE from a Post Install VI in the way Thoric mentioned in his first response. VIPB has created a VI template with a variant containing an attribute "Files Installed". I’m scanning through the filenames in there and if it’s a *.exe it creates a shortcut. This works well, but only if the destination of my EXE is <Labview>\xxxxx. If I create a custom destination with  Base Path “OS Application Path”, i.e. [ProgramFiles]\MyCompanyName, then the EXE files is correctly copied to that location, but the variant attribute “Files Installed” in the Post Install VI does NOT include the *.exe file. It looks like the “Files Installed” attribute only includes files in a <Labview> base path. Is this some kind of bug (oh.. sorry.. feature  ) in VIPB ?

0 Kudos
Message 10 of 20
(5,681 Views)