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.