Building the 32-bit FlexNet Publisher Toolkit for Certificate Use
Building FlexNet Publisher Toolkit Via the Command Line
First, you’ll need to build the FlexNet Publisher toolkit (11.16.4.0_v6) via the command line using a Visual Studio Command Prompt.
To build the FlexNet Publisher toolkit via command line:
- Add your vendor keys and vendor name to the
lm_code.hfile, then set your seed values and signature strength – this file can be found in the..\i86_n3-11.16.4.0_v6\machinddirectory. For example:#define VENDOR_KEY1 <XXXX> #define VENDOR_KEY2 <XXXX> #define VENDOR_KEY3 <XXXX> #define VENDOR_KEY4 <XXXX> #define VENDOR_KEY5 <XXXX> #define VENDOR_NAME "demo" #define LM_SEED1 <YYYY> #define LM_SEED2 <YYYY> #define LM_SEED3 <YYYY> #define LM_STRENGTH LM_STRENGTH_239BIT - Edit the makefile and add your vendor name to the
VENDORNAMEfield - this file can be found in the…\i86_n3-11.16.4.0_v6\i86_n3directory. For example:VENDORNAME = demo DAEMON = $(VENDORNAME).exe - In the
…\i86_n3-11.16.4.0_v6\i86_n3directory, changedemo.rcto the name of your vendor daemon. For example:demo.rc > Flexera.rc - In the Visual Studio command prompt, run the following:
…\i86_n3-11.16.4.0_v6\i86_n3> nmake -f makefile
Now your FlexNet Publisher toolkit is built to use certificate-based licensing.
Building lmflex Using Visual Studio 2015
Follow these steps to build lmflex using Visual Studio.
To build lmflex using Visual Studio 2015:
- Create a Win32 Console Project called
lmflex. - Copy the
lmflex.ccode from the toolkit, found in the following location..\i86_n3-11.16.4.0_v6\machindand comment out the Trusted Storage code as shown below. Or you can copy the code below for just certificate only licensing:/************************************************************************************************** * Copyright (c) 1997-2018 Flexera. All Rights Reserved. **************************************************************************************************/ /* * * Description: This is a sample application program, to illustrate * the use of the Flexible License Manager. * */ #include "lmclient.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include "lm_attr.h" #include "lm_redir_std.h" #ifdef PC #define LICPATH "@localhost" #else #define LICPATH "@localhost:license.dat:." #endif /* PC */ #define FEATURE "f1" VENDORCODE code; LM_HANDLE *lm_job; //JoeMC: Uncomment to use TS //static void init(struct flexinit_property_handle **); //static void cleanup(struct flexinit_property_handle *); int main(int argc, char * argv[]) { char feature[MAX_FEATURE_LEN * 2] = {'\0'}; struct flexinit_property_handle *initHandle = NULL; int nlic = 1; //JoeMC: Uncomment to use TS //init(&initHandle); if (argc > 1) { nlic = atoi(argv[1]); } if (lc_new_job(0, lc_new_job_arg2, &code, &lm_job)) { lc_perror(lm_job, "lc_new_job failed"); //JoeMC: Uncomment to use TS //cleanup(initHandle); exit(lc_get_errno(lm_job)); } printf("Enter \"f1\" to demo floating functionality\n"); printf("Enter \"f2\" to demo node-locked functionality\n"); printf("Enter feature to checkout [default: \"%s\"]: ", FEATURE); fgets(feature, MAX_FEATURE_LEN + 2, lm_flex_stdin()); /* add 2 for \n and \0 */ feature[strlen(feature) - 1] = '\0'; if(!*feature) strcpy(feature, FEATURE); (void)lc_set_attr(lm_job, LM_A_LICENSE_DEFAULT, (LM_A_VAL_TYPE)LICPATH); if(lc_checkout(lm_job, feature, "1.0", nlic, LM_CO_NOWAIT, &code, LM_DUP_NONE)) { lc_perror(lm_job, "checkout failed"); //JoeMC: Uncomment to use TS //cleanup(initHandle); exit (lc_get_errno(lm_job)); } printf("%s checked out...", feature); printf("press return to exit..."); /* * Wait till user hits return */ getchar(); lc_checkin(lm_job, feature, 0); lc_free_job(lm_job); //JoeMC: Uncomment to use TS //cleanup(initHandle); return 0; } //JoeMC: Uncomment to use TS /* static void init(struct flexinit_property_handle **handle) { #ifndef NO_ACTIVATION_SUPPORT struct flexinit_property_handle *ourHandle = NULL; int stat; if ((stat = lc_flexinit_property_handle_create(&ourHandle))) { fprintf(lm_flex_stderr(), "lc_flexinit_property_handle_create() failed: %d\n", stat); exit(1); } if ((stat = lc_flexinit_property_handle_set(ourHandle, (FLEXINIT_PROPERTY_TYPE)FLEXINIT_PROPERTY_USE_TRUSTED_STORAGE, (FLEXINIT_VALUE_TYPE)1))) { fprintf(lm_flex_stderr(), "lc_flexinit_property_handle_set failed: %d\n", stat); exit(1); } if ((stat = lc_flexinit(ourHandle))) { fprintf(lm_flex_stderr(), "lc_flexinit failed: %d\n", stat); exit(1); } *handle = ourHandle; #endif // NO_ACTIVATION_SUPPORT } static void cleanup(struct flexinit_property_handle *initHandle) { #ifndef NO_ACTIVATION_SUPPORT int stat; if ((stat = lc_flexinit_cleanup(initHandle))) { fprintf(lm_flex_stderr(), "lc_flexinit_cleanup failed: %d\n", stat); } if ((stat = lc_flexinit_property_handle_free(initHandle))) { fprintf(lm_flex_stderr(), "lc_flexinit_property_handle_free failed: %d\n", stat); } #endif // NO_ACTIVATION_SUPPORT } */ - Right click on the lmflex project and open Properties.
- In the General settings, change the Character Set to Use Multi-Byte Character Set.
- In the C/C++ settings under the General section, add the following to the Additional Include Directories:
…\i86_n3-11.16.4.0_v6\machind
and…\i86_n3-11.16.4.0_v6\machind\activation\include - In the C/C++ settings under the Preprocessors section, add the following to the Preprocessors Definitions:
_CRT_SECURE_NO_WARNINGS - In the Linker settings under the General section, add the following to the Additional Library Directories:
…\i86_n3-11.16.4.0_v6\i86_n3
and…\i86_n3-11.16.4.0_v6\i86_n3\activation\lib - In the Linker settings under the Input section, add the following libraries to the Additional Dependencies:
lm_new.obj lmgr_trl.lib libsb.lib libcrvs.lib .\activation\lib\libnoact.lib libredir_std.lib oldnames.lib kernel32.lib user32.lib netapi32.lib gdi32.lib comdlg32.lib comctl32.lib wsock32.lib shell32.lib Rpcrt4.lib oleaut32.lib Ole32.lib Wbemuuid.lib wintrust.lib crypt32.lib Ws2_32.lib iphlpapi.lib Psapi.lib advapi32.lib Shlwapi.lib userenv.lib lmgr_dongle_stub.lib msvcrt.lib vcruntime.lib legacy_stdio_definitions.lib legacy_stdio_wide_specifiers.lib ucrt.lib Dhcpcsvc.lib libvcruntime.lib - In the Linker settings under the ‘Ignore All Default Libraries, set this to Yes (/NODEFAULTLIB).
- In your project, change the
lmflex.cppfilename tolmflex.cand thestdafx.cpptostdafx.c - Then build lmflex.
Now, you should be able to run lmflex and perform a checkout from a license server.
Setting Up a License Server to Serve a Certificate License
To set up a license server to serve a certificate license:
- Edit
counted.licfrom the…\i86_n3-11.16.4.0_v6\i86_n3directory and change the vendor name demo to your vendor name. For example, change it from this:
To this:SERVER this_host ANY VENDOR demo USE_SERVER #a counted license FEATURE f1 demo 1.0 permanent 4 SIGN="003D B062 54D1 47E3 1FF6 145F \ 59CE 0200 8002 FE69 0FBC F4FF AA10 FFB3 6EB3"SERVER this_host ANY VENDOR flexera USE_SERVER #a counted license FEATURE f1 flexera 1.0 permanent 4 SIGN="003D B062 54D1 47E3 1FF6 145F \ 59CE 0200 8002 FE69 0FBC F4FF AA10 FFB3 6EB3" - Encrypt
counted.liclicense file using the VS command prompt, such as:…\i86_n3-11.16.4.0_v6\i86_n3> lmcrypt.exe counted.lic - Start the license server by running the following in the command prompt, such as:
…\i86_n3-11.16.4.0_v6\i86_n3> lmgrd.exe -z -c counted.lic - Perform a checkout using the lmflex you built previously, such as:
…\i86_n3-11.16.4.0_v6\i86_n3> lmflex.exe - Enter
f1to demo floating functionality. - Enter
f2to demo node-locked functionality. - Enter feature to checkout:
[default: "f1"]: f1
Related Articles
What Version of FlexNet Publisher Provides Support for Visual Studio 2015? 5Number of Views Assign Microsoft Visual Studio with MSDN licenses in Snow License Manager 4Number of Views How To Set the Visual Studio Environment settings for the FlexNet Publisher Toolkit Builds On Windows 9Number of Views Build Only The InstallShield Project When Integrated With Visual Studio 4Number of Views Issue With InstallShield 2022 Integration With Visual Studio 2022 Version 17.4 5Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Case id: 00001065
Activity: Status change: 2 hours ago