This tutorial walks you through the entire process of adding licensing and activation to a LabVIEW Add-on. From creating the license file to adding the licensing information to actually activating the Add-on as an end user.
You do not need to buy any software to go through this tutorial – all the steps assume that you are using trial licenses of Concept Software’s SoftwareKey solution – Protection PLUS 4 SDK and SOLO Server.
If you decide to use this licensing solution in your product, you will have to buy a license for Protection PLUS 4 SDK. National Instruments has negotiated a special pricing for NI LabVIEW Partners. See the pricing section for details.
For more getting-started resources using SoftwareKey with LabVIEW visit:
Prerequisites:
In order to add licensing to a product, we first need a license file. LFEdit is a utility that ships with Concept Software’s Protection PLUS 4 SDK that allows us to create a custom license file.
Creating a license file is a two-step process: first we create a “Product Definition” which is basically information about how we want to license the product (software/hardware binding, evaluation periods, etc). Once we have a product definition, we can create a license file from it.
Note: If you get an error message “Cannot Create License File”, make sure that the directory C:\Temp exists on your computer.
You just created a license file using LFEdit that contains the information about how you want to license your product. You can now use this license file to add licensing to your LabVIEW Add-on. But first, set up the license server (SOLO server) to enable online activation.
In order to allow users to automatically activate the Add-on automatically over the web, you first need to set up SOLO Server with the information about the product and how you want users to activate it.
In addition, from here, you can set up the E-Commerce for your Add-on.
You have just successfully added the product information to the SOLO Server. This will enable your users to automatically activate the Add-on over the web once they buy the add-on.
Using the SOLO Server, we can also generate test licenses to verify that our licensing works correctly in-product.
Next, we will add the licensing information to our Add-on in LabVIEW.
In order to add licensing to a LabVIEW Code library, we have to package our library as a .lvlib file and then embed the licensing information directly to the .lvlib file using a wizard that installs with the Third Party Licensing & Activation Toolkit.
The licensing information here includes information about how to activate the product as well as activation modes (online, manual, etc).
Note: Once we add the licensing information, we would typically create an installer or package to distribute the library. We will skip this step in this tutorial.
Note: If the Automated Online Activation is checked, the Enable Deactivation checkbox appears.
For deactivating a toolkit the required Key ID, Secure Key, Client Key can be found on the SOLO account.
Refer to Configure > Products
For the next step, please, go to Actions > View Encryption Key Data
The three values are highlighted below, as the Encryption Key ID, Server Key (XML), and Client Key (XML)
You have successfully added licensing to a LabVIEW Code Library with an evaluation period.
Licensing provides a way to protect your IP while giving you the ability to provide evaluation software. This means that users of this library will only be able to use it for a certain amount of time before they have to activate it. It also prevents users from building installers for applications that uses your library without first activating it.
In case of need, the users can deactivate the product(s).
Now we will look at how an end user would activate the software once they purchase it (manually or automatically over the web).
LabVIEW gives user the ability to activate their Add-ons either manually or automatically over the web.
When a user purchases the Add-on, they will receive a License ID and password. The user can activate their add-on directly from LabVIEW using just the License ID and password.
Note: If you do not use the E-Commerce functionality of the SOLO Server, you can still manually generate License IDs and passwords for users.
You’ve now seen how a user can activate a LabVIEW Code Library online using LabVIEW’s activation dialog.
You can also enable manual activation for situations where your users cannot access the internet from their computer.
SoftwareKey provides a special pricing package for NI Partners that want to use this licensing solution.
LabVIEW gives user the ability to activate their Add-ons either manually or automatically over the web.
The manual activation is meant for situations where your uses do not have an internet connection, or for situations where you do not want to use Concept Software’s SOLO Server backend for activation.
Manual activation can be done over the phone, or through a web page that you set up. Basically, the user will give you two unique identifiers and you will use those in LFEdit to generate an activation code for them. The user will then use this activation code to activate the Add-on from LabVIEW.
You’ve now seen how a user can activate a LabVIEW Code Library offline manually using LabVIEW’s activation dialog.
You can also enable automated activation via the web if you use the SOLO Server for activations.
SoftwareKey provides a special pricing package for NI Partners that want to use this licensing solution.
The two basic components of the SoftwareKey solution are:
NI partners can purchase the SoftwareKey Protection + Automation solution starting at only $49/month!
https://www.softwarekey.com/buy-now/
This gives you the ability to:
For more information on fees collected for activations and sales, refer to:
https://www.softwarekey.com/buy-now/
Looks like a nice tutorial. However, I'd like to see the same tutorial for doing an executable instead of a code library. Is this possible?
There isn't a step-by-step tutorial available, but you can try taking a look at this document if you haven't already:
http://decibel.ni.com/content/docs/DOC-13939
Otherwise, there should also be an example that ships as part of the Third Party Licensing & Activation Toolkit that has an example application with licensing. The name of the example in the example finder is "Calculator.vi" (not the most appropriate name, admittedly) and can be found in the [LabVIEW 2010]\examples\addonlicensing\06 Sample Licensed Application directory.
For protecting a .exe file you should look at Instant PLUS from SoftwareKEY. It takes only a few minutes to protect your .exe and can be set to use the .lf file system as in the TPLA. No coding, no changes in LabVIEW code. Nice way to protect an executable.
(It also has an API for getting the "days remaining" and others but that requires a bit of LabVIEW coding).
Drawback: License dialogs are in English only but some text and graphics can be modified from the wizard.
When I look at the LabVIEW Help for Licensing a Development Add-On for Advanced Mode (which is what I'm interested in to take advantage of the extra features), step 5 refers to using the Add-On Licensing Tool to "add licensing to the add-on". What exactly does this do to my VIs, classes, controls etc.? It's always a little disconcerting when a tool claims to 'modify all your code' - that usually means I end up pulling a recent commit from the source code control server to undo the mysteriously invisible changes. Can someone please explain in more detail what will happen so that I don't get hives about running this? Are we talking binary level alterations to the VI files themselves?
Alterations are at the LVLIB level. Your lvlib is password protected and special activation magic is added. This means that from that point on, if you want to use your lvlib and associated VIs, you must activate it via LabVIEW>Help>Activate Add-Ons. This means you should not add licensing to the lvlib in source. You can avoid this by using the dynamic License binding at package build time which is a feature in VIPM Pro.
Great reply Michael.
If I apply the licensing features within VIPM I can see that I can avoid having to create a clone of my add-on for licensing before creating the package, which is a great advantage. But are there any limitations to licensing this way, or are all the options from NI's tool also available through VIPM? I've take a quick look at the available options, but to be honest I'm still a little confused by all these options so I don't truly get it all yet
Hi Thoric,
All of the licensing options using Advanced mode are added to the license file which is created with the third party tool Protection Plus. After this license file is made, VIPM and Third Party Licensing & Activation Toolkit both do exactly the same thing. They both take in a license file and an lvlib file and output a new lvlib file with licensing added to it.
I try to download
Step by Step Tutorial for Adding Licensing to a LabVIEW Code Library (Complete).pdf
But the webpage return this
"Sorry, but the page that you requested may have been moved or deleted. Search our site or use the links below:"
Where can I download this document?
Thanks,
Hello,
I notified our forum administrators, and it seems they have resolved the problem. This PDF should be available now. Let us know if there are any other issues.
Thanks!
David
Hi,
I am currently navigating the seemingly endless path that leads towards adding a license to a toolkit and the more questions I ask the more confused I seem to get. My latest hurdle is the difference between using VIPM and TPLAT, which according to the above posts is exactly the same. However a guy from SoftwareKey claims that it is not possible to apply a license created using their software to a toolkit using VIPM, only if I were distributing an executable.
Is this true? If so why would this be the case?
Cheers,
Darren.
Hello Darren,
From the last email that we received from you, it sounds like we (SoftwareKey) had helped answer most of your outstanding questions. If not, please reply to your ticket with us and we will work to answer your questions.
It is my understanding the TPLAT is used for the Simple and Advanced licensing modes of protecting libraries/add-ons and VIPM is used to create the installer for the library.
Mike
As Mike mentioned, VIPM and TPLAT have two seperate functions and purposes, but they can definitely both be used together. Documentation on doing this can be found at https://decibel.ni.com/content/docs/DOC-22491.
Hope this helps clear things up,
David
Hi David, Mike,
Thank you both for your replies, however it is still not much clearer.
When I am licensing a lvlib file using TPLAT the process goes: Source files -> licensed lvlib -> VIPM package (for distribution, assuming I am not using the LabVIEW installer). If I use VIPM and check the little box that says "Bind license to library at build time" then don't I go from Source files to VIPM package in one step? Thus avoiding the extra files, simplifying source code control and avoiding potentially overwriting my source files with the licensed version.
Maybe I am misunderstanding this whole process, or maybe I didn't explain my issue well enough in the first place.
Cheers,
Darren.
Darren, this is correct. If you have VIPM Pro, you can use the "Bind license to library at build time" option to add your licensing to your VI Package without having to do the intermediate licensing step. You still need to use either the LFEdit tool or the Standard Mode of the Add-on licensing tool to create the .lf file first, then you just enter the lvlib and lf file information in VIPM to apply the licensing to your packaged toolkit.
Does this help? I think I may be misunderstanding your question, so forgive me for any lack of clarity on my part.