Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to generate a text file containing all the licenses that apply to a compiled program. #204

Merged
merged 4 commits into from
Oct 2, 2022

Conversation

mkilgore
Copy link
Contributor

@mkilgore mkilgore commented Oct 1, 2022

This change gives QB64-PE the ability to generate a file containing all of the licenses that apply to a compiled program. These licenses come from the QB64-PE runtime itself and also the various libraries we make use of. The file is different depending on what functionality you use and thus what libraries are used by your program.

You can trigger QB64-PE to produce the file either via the IDE or on the command line using the -f:GenerateLicenseFile=[true/false] switch. The menu option can be seen below:

image

I modified the testing framework to allow testing that the generated license is as expected (which largely just varies that all the dependency licenses can be correctly found, and I examined the produced licenses to verify the make sense). The expected output also gives an example of what the license files look like.

Fixes: #145

This gives QB64-PE the ability to automatically generate a text file
comprising all of the licenses that apply to your QB64 program. This
file can then be distributed with your program to meet the requirements
of those licenses, and also examined to understand what licenses apply
to your program.

The generation is controlled via a configuration flag, settable either
via the `Run` dialog, or via a new `-f` setting on the comamnd line.

Fixes: QB64-Phoenix-Edition#145
@mkilgore mkilgore added the enhancement New feature or request label Oct 1, 2022
This adds logic for testing the new license generation functionality.
This is done by having the expected license for a variety of
tests that use different dependencies, and then comparing that against
the license QB64-PE actually produces when compiling these test files.

Note that because the actual used dependencies changes depending upon
the OS, we have separate expected licenses for each of Linux, Windows,
and Mac OS. This required some build changes to accomidate, in addition
to the testing logic changes themselves.
This file was checked-in with Windows line endings, but it should have
Unix/Linux ones. Windows will automatically convert it into Windows line
endings when checking the file out, so it's not a problem in that case.
@mkilgore mkilgore merged commit 5cb05f0 into QB64-Phoenix-Edition:main Oct 2, 2022
@mkilgore mkilgore mentioned this pull request Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

QB64-PE should be able to produce a license file for a compiled program
2 participants