Skip to content

Specify path to license.lic at runtime #921

@genachka

Description

@genachka

Unless I missed something, the only ability to have license.lic not in the same directory is using symbolic link as described here: https://pyarmor.readthedocs.io/en/latest/advanced.html#storing-runtime-file-license-lic-to-any-location

This doesn't work in most cases for us. We distributed a binary made by pyinstaller for multiple operating systems and folks copy and move the binary around, with some Linux folks running it on a server that may have multiple people putting it in to their home folders. Often the Linux admin wants to put things in a shared folder, i.e. /opt/acme/myapp (both binary and license.lic) and when the user runs from their home /home/userx (i.e. linuxbox1:/home/userx$ /opt/acme/myapp) it will complain it can't find the license. The admin doesn't want to allow symbolic links for the users.

We'd like to be able to pass a command line switch to our app that can provide the path to where the license.lic file resides at runtime. Something like this:
linuxbox1:/home/userx$ /opt/acme/myapp --license /opt/acme/license.lic --otherswitches

we would parse the command line args within the app and when we see --license we'd pass to some pyarmor API the path where to find the license.lic file at runtime.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions