Multiple projects

159 views
Skip to first unread message

botella...@gmail.com

unread,
Apr 28, 2020, 7:31:14 AM4/28/20
to licensecc users

Question moved from https://github.com/open-license-manager/open-license-manager/issues/84


I have several projects and each project has several libraries. I would like to control the license at library scale.


How should I do that? Do I need to generate one license file for each library of each project?

Message has been deleted

Gabriele Contini

unread,
Apr 28, 2020, 7:38:59 AM4/28/20
to licensecc users

Hi Arnaud,

I guess you want different licenses for each library because you want to have different functions in your software based on the fact that the library is licensed or not.


So one project of yours (group of library) = one licensecc project = one private-public key pair.


Then you can explore something called product-name (lccgen parameter --product-name). Indeed you need to issue one license for every project for every library for every user.

Luckily licenses can be concatenated in the same file... so you can concatenate all together and send them to your client. You can use a script to do this tedious operation. 


your license file may look like:

[library1]
.....
[library2]
...


and to verify a specific product name well... there is a parameter 'project_name' (i need to rename it) in the api...

I'll try to document this process and make an example.

Arnaud Botella

unread,
Apr 28, 2020, 7:43:24 AM4/28/20
to licensecc users
My projects are part of a larger framework. So could I use the framework name as project-name and then use a different product-name for each library? I think it could do the trick.

Do you have a tool that concatenate the licenses or should I do it by hand?

Arnaud Botella

unread,
Apr 29, 2020, 11:06:16 AM4/29/20
to licensecc users
I have an error, here are the commands I did:
$ lccgen project init -n MyFramework -t licensecc/src/templates
$ lccgen license issue -p MyFramework -n MyProduct -o product.lic
base64not recognized value error
product-namenot recognized value error
License written 

Should I do something to make the product-name recognized?
Thanks for your help

Gabriele Contini

unread,
Apr 30, 2020, 9:53:15 AM4/30/20
to licensecc users

I'll take a look at it this Sunday. Be patient please. 
I guess i need to add a test for this.

Arnaud Botella

unread,
Apr 30, 2020, 9:56:10 AM4/30/20
to licensecc users
I will be patient do not worry. I am just reporting what I found.

BTW, I started a PR to solve this issue.

Gabriele Contini

unread,
May 4, 2020, 7:09:06 AM5/4/20
to licensecc users
Hi Arnaud,

Your PR was merged.
The parameter --product-name was renamed in --feature-names. The value can be a (comma separated) list of features to enable, the license generator will issue the corresponding licenses all in one file.
The license issue command will append licenses automatically now, if you reissue it over the same license file.
I still have to write some documentation for this... It will come soon.

I would like to review the answer i gave you in the first place, considering some details from other exchanges we had:
If you plan to link all your libraries statically in one project then you can only have one licensecc "project" and many "features".
However if you want to have many dynamic libraries linked into your main project you may have one licensecc "project" for every dynamic library, linking licensecc into each dynamic library statically, so you can use the dynamic libraries between many project without need of linking them again. I have never tried this configuration.

Gabriele

Arnaud Botella

unread,
May 4, 2020, 7:27:19 AM5/4/20
to licensecc users
Great to here about this feature-names parameter! That is exactly what I need.

What I did for now is to statically linked licensecc into the main shared library of my project and wraped basic api inside it.
Now, all my other shared libraries are using licensecc indirectly through my main shared library.
It seems to work on both Linux and Windows.
Reply all
Reply to author
Forward
0 new messages