Forum > General

may I ship FPC with my app ?

(1/3) > >>

dragos:
Dear Lazarus / FPC Community!
I am new to this community.
I appreciate Lazarus very much, and I must say that, as an old Delphi user, I like Lazarus GUI, the fact that it's cross - platform, its L&F, it's awesome (I use it on my Windows computer, on Linux Mint, also on my Raspberry Pi!). Pascal was my firstly - learnt programming language.
However, my question today would be a fairly simple one, related to the possibility to compile some (small) portions of user-defined Pascal code -> during the program operation. In other words, the application I'm creating (and shipping to the user) assumes, at some point, that the structure is dynamic, or variable (and, therefore, the user needs to define his/her piece of Pascal code, e.g. to define his/her function, or class).
I need to provide a means of compiling (some small piece of) Pascal source code at program runtime, namely the user-defined Pascal code.
As a most-probable use-case, this user code will not contain LCL components, but just "plain text", having a functionality/behavior that is unknown at design time. Now the question is: may I ship (redistribute) the FPC compiler with my application (app) ? What if it would allow the user to create a GUI item (dialog box) at runtime (thereby using the LCL library) ?
Of course, I can acknowledge the fact that I use Lazarus, FPC compiler, in the Help/About dialog box, in the readme.txt file, documentation etc.
May I use the Free Pascal Compiler, in this situation, as a redistributable object (e.g., in a subfolder), or I may not ? I am not very accustomed to reading licenses, but one important thing is that the enclosed application (.exe) would contain, potentially, some IP, therefore I would tend not to make it an open - source. However, as  I mentioned, I shall make clear that the application is built / created with Lazarus & FPC.
Therefore, in short, my questions would be:
- may I use the FPC compiler as redistributable only for text-like (console) app by the user ?
- may I use/ship the FPC as redistributable also for LCL-containing objects (e.g., an user-defined dialog box for his/her component) ?
- if I may not, then the only way that the app will ever work would be to ask the user to have the FPC installed on his/her computer, prior to using my app -> as a prerequisite. It would be rather complicated, in this case. What would be the limitation, in this case ?

Thank you for your support! Sorry for my long question(s)!
Dragos
P.S. I apologize if the topic is wrongly placed. I'm totally new to the forum.

Laksen:
What (IMO) it comes down to is the distribution clause of the GPL license. You can ship FPC and Lazarus with your program but that would mean your program would become GPL as well.

So in that case a user would legally be in their right to request the source code for the entire codebase that you distribute, and you would have to oblige them.

The only way to do it properly if you will not provide the source code is to use the third option that you list. Instruct the user in how to install it on their own and not ship anything under GPL license together with your program.

Another option that you could consider could be to use uPascalScript

MarkMLl:

--- Quote from: Laksen on November 02, 2022, 06:45:44 pm ---What (IMO) it comes down to is the distribution clause of the GPL license. You can ship FPC and Lazarus with your program but that would mean your program would become GPL as well.

--- End quote ---

I'm afraid I disagree.

If OP's program linked into modified FPC/PPC binaries, which are GPLed, then his program would become GPLed.

If OP's program invoked the FPC/PPC binaries, then it would be like any other nested program execution.

To expand on the second point slightly, if somebody had a proprietary IDE or make-like tool, and invoked the FPC wrapper or the actual PPC compiler from it, it would not force that tool or IDE to be GPLed. And as a specific example, at one time Borland used the FPC compiler for ARM code and I don't believe that anybody pounced on them insisting that they open-source the Delphi IDE.

If in doubt, simply tell the customers that they need to download the tools themselves, and provide copious documentation explaining how to do so.

I see no reason why the same principles should not extend to the Lazarus IDE: if it is merely invoked rather than modified and linked into a product, then the licenses remain distinct.

*HOWEVER*, it remains OP's responsibility to get suitable legal advice, since if he strays from the spirit of the licence agreement and thereby incurs the wrath of the core team he is likely to have to explain himself to his employers and backers.

And "can't be arsed to read and understand the license" is not, and has never been, a valid defence.

MarkMLl

Thaddy:

--- Quote from: MarkMLl on November 02, 2022, 07:21:19 pm ---
--- Quote from: Laksen on November 02, 2022, 06:45:44 pm ---What (IMO) it comes down to is the distribution clause of the GPL license. You can ship FPC and Lazarus with your program but that would mean your program would become GPL as well.

--- End quote ---

I'm afraid I disagree.

--- End quote ---
I am afraid you are - very - wrong regarding GPL2. Laksen is correct. Not opinion but fact.

MarkMLl:

--- Quote from: Thaddy on November 02, 2022, 07:37:00 pm ---I am afraid you are - very - wrong regarding GPL2. Laksen is correct. Not opinion but fact.

--- End quote ---

https://www.gnu.org/licenses/gpl-faq.html#GPLPlugins

MarkMLl

Navigation

[0] Message Index

[#] Next page

Go to full version