1) Get the hostID

You will need to get the hostID of the computer on which this demo application will run.

To get the hostID youcan use 'flmid' command.

use 'flmid -h' to get a list of supported command options.

2) Create a license file

You can use sample_node_locked_license.txt distributed with FortLM as a template to create your node-locked license files.

HOSTID= 02004C4F4F50;
START=2011-04-11; EXPIRE=2012-05-10;

In our demo application, we use the feature string "demo" so we need to change the FEATURE= to FEATURE=demo;. We need to change the hostID= to the hostID of the computer on which the protected software will be running (normally your customer should find and send this hostID to you). We also need to change the START= and EXPIRE= dates. Finally we need to assign an UUID (universal unique ID, used as Serial Number) for tracking purpose. You can generate an UUID using the "uuidgen" utility command on both Windows and Linux platforms. Of course you are also free to use your own Serial Number scheme.

3) Sign the license file

You must use FortLM's utility command flmsign to sign the license file. 

flmsign -f /path-to/-champsign-license-file sample_floating_license.key sample_vendor_priv_key.pem

4) Deliver the signed license file to your customer

This usually is done via email or an automated license file generation and distribution back-end system application.

5) Your customer use the license file to unlock your application

An environment variable needs to be set up and points to the license file in order to run your application. The name of that environment variable is picked by your application ("CHAMPLMS_DEMO_APP_LICENSE for the demo application). In the real world, your application will probably automate this step by placing the license file in a fixed location.

For instance, on Windows 7, to set the environment variable, click "Start->Control Panel->System and Security->System", select "Advanced System Settings", and then select "Environment Variables". Now in the "system variables" section or "user variables for..." section, click the "new" button, create a variable named as "CHAMPLMS_DEMO_APP_LICENSE", and set its value to "C:\myLicenses\license.txt", assuming the license file "license.txt" is stored under "C:\myLicenses".

On Linux, using bash, one can edit the .bashrc under the user's home directory, and add the following line:

export CHAMPLMS_DEMO_APP_LICENSE=/path-to/my-license.txt

Now your customer can run champlm_demo successfully. They should see the following message printed in the console:

>>Process license file: c:\fortlm\x86\win\sample_floating_license.key
Feature demo verified Ok.
Now we have passed license checking, do some work...
Working ...