# Issue license License files are created from the lccgen command line tool which is built when you build the static License Manager library. There are some ways of defining the license described below. You will always need the secret key from your projects folder to issue new licenses. Examples below assumes you have the projects and the install folder besides each other. ## Different types of licenses The most useful below * With hardware ID (bounded to one display) * Without hardware ID (can be copied to multiple displays, could be used as a demo license) --- * With time limit * Without time limit --- * With certain features * Without any features set --- You can combine some of the types above ### Useful arguments to key generator ```text -e [ --valid-to ] arg Specify the expire date for this license. Format YYYYMMDD. If not specified the license won't expire -s [ --client-signature ] arg The signature of the hardware that requires the license. It should be in the format XXXX-XXXX-XXXX. If not specified the license won't be linked to a specific hardware (eg. demo license). -o [ --output-file-name ] arg License output file name. May contain / that will be interpreded as subfolders. -f [ --feature-names ] arg Feature names: comma separate list of project features to enable. if not specified will be taken as project name. --primary-key arg Primary key location, in case it is not in default folder -p [ --project-folder ] arg (=.) path to where project configurations and licenses are stored. this license apply to. -x [ --extra-data ] arg Specify extra data to be included into the license ``` ### License with hardware ID Will lock this license-file to a specific device ```text install/bin/lccgen license issue -p projects/ProjectX -s AKAa-UA6C-j78= -o ProjectXApp_Display_1.lic ``` The generated license `ProjectXApp_Display_1.lic` can only be used on the display with the hardware ID `AKAa-UA6C-j78=` ### License with time limit License will work until a specific date in the example below the license file will be valid until 2023-12-24. ```text install/bin/lccgen license issue -p projects/ProjectX -e 20231224 -o ProjectXApp_Display_Timelimit.lic ``` ### License with feature In example below, lets assume your software has two features you want to enable, called feature1 and feature3. Features are listed as a comma separated list, don't put space after commas. ```text install/bin/lccgen license issue -p projects/ProjectX -f feature1,feature3 -o ProjectXApp_features.lic ``` When validating a license you can check for features. ### Combine the above A time limited license with specific features bound to a specific device. ```text install/bin/lccgen license issue -p projects/ProjectX -e 20230801 -f feature1,feature3 -s AKAa-UA6C-j78= -o Limited_Display_1.lic ``` ### Why project map is important (with secret/public keys) When building the LM static lib you got the project folder for your software. Within that structure the `private_key.rsa` is stored which is used when you issue new licenses. Without that file you cannot issue any more licenses. Normally you point out the project folder as in the examples above assuming you named it `ProjectX`. You can also use the argument like below to pick the private key. ```text install/bin/lccgen license issue --primary-key projects/ProjectX/private_key.rsa -o DemoLicense.lic ``` ### Issue license from any computer The minimal setup for generating licenses would be having the key generator **lccgen** and a copy of the private key from the projects folder. Having the private key in the same folder as lccgen you would not need to provide the path to it via the -p or --primary-key parameter in lccgen. It defaults to **private_key.rsa** in the same folder.