Recent

Author Topic: Distributing FPC, with my app, and Lazarus' units...  (Read 7011 times)

Nafees

  • Jr. Member
  • **
  • Posts: 55
Distributing FPC, with my app, and Lazarus' units...
« on: May 23, 2015, 01:12:55 pm »
Hi!
This is my first post on this forum! And.. I've got a few questions.
I'm making a game engine, something like GameMaker: Studio, and I've used Delphi till now (for making the IDE). But when time cam to make the runner (interpreter), at first, it was easy as a,b, and c, but when I started working on the object-oriented part, it didn't work, I've spent 2 months on it, yet it doesn't work. Ok, now back to the topic: I've decided to make a compiler, that converts the scripts to pascal (object-pascal ) file and then compiles it using FPC, and of course, I'll need some of the units included in Lazarus, so my questions are:
  • Am I allowed to distribute my game-engine with the FPC, without opening the source of my game engine?
  • Can I distribute some of the units (.pas files) that come with Lazarus?
Any help will be appreciated greatly!

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4467
  • I like bugs.
Re: Distributing FPC, with my app, and Lazarus' units...
« Reply #1 on: May 23, 2015, 01:47:34 pm »
Am I allowed to distribute my game-engine with the FPC, without opening the source of my game engine?

Yes.

Quote
Can I distribute some of the units (.pas files) that come with Lazarus?

Yes.

Good questions especially because we have seen some wildly wrong interpretations of GPL.
Misunderstandings seem to be common as written in a recent DistroWatch article by Jesse Smith.
Myths and Misunderstandings: GPL
  http://distrowatch.com/weekly.php?issue=20150518#myth

Interesting ... I must read the license texts carefully myself, too.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11452
  • FPC developer.
Re: Distributing FPC, with my app, and Lazarus' units...
« Reply #2 on: May 23, 2015, 02:17:21 pm »
Misunderstandings seem to be common as written in a recent DistroWatch article by Jesse Smith.
Myths and Misunderstandings: GPL
  http://distrowatch.com/weekly.php?issue=20150518#myth

(
IMHO that is just pro GPL FUD, inducing deliberate misunderstanding to obscure the issues. Basically the post has a pattern where perceived issue with GPL is considered not true , because there is one limited exception to it.

A sane person would conclude that the issues are grosso modo true then, but in their twisted mind that negates the issues and fixes the GPL.

It's like saying that it is ok that a car doesn't drive because you can tow it.

E.g.
- you can charge anything for a program, but are still required to ship source, and can't limit its redistribution. So charging any non trivial price is difficult.
- You don't have to distribute source if you are the only user. (read: you can't ship it)

Yes, these exceptions exist, but they don't fix GPL being a restrictive license.

etc etc.
)

Back on topic though, as long as you don't link to core FPC parts (the fpc compiler source, the lazarus IDE), you are pretty safe. FPC/Lazarus were specifically engineered to allow generating programs with a license that is permissable for a broad category of users (both home and enterprise)

Redistributing FPC/Lazarus itself is GPL, but as long as you don't link to parts that are not provided in ppu in the distribution (but only execute it), you are reasonably safe.
« Last Edit: May 24, 2015, 12:28:42 pm by marcov »

Nafees

  • Jr. Member
  • **
  • Posts: 55
Re: Distributing FPC, with my app, and Lazarus' units...
« Reply #3 on: May 24, 2015, 05:55:59 am »
And if I plan to sell my Game Engine, am I still allowed to distribute FPC and the units from Lazarus? ( More importantly, units from Lazarus. )

EDIT:
@macrov, I've read the license many times but one thing confuses me, GPL says that IF I modify the source of a GPLed program, and I plan on distributing it, then I must provide the source with it. GPL doesn't say that even if I want to distribute a GPLed program, I'll have to open source my program as well, correct me if wrong.

EDIT2:
Quote
Redistributing FPC/Lazarus itself is GPL, but as long as you don't link to parts that are not provided in ppu in the distribution (but only execute it), you are reasonably safe.
What is this "ppu"?
« Last Edit: May 24, 2015, 06:27:20 am by Nafees »

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Distributing FPC, with my app, and Lazarus' units...
« Reply #4 on: May 24, 2015, 07:21:10 am »
But when time cam to make the runner (interpreter), at first, it was easy as a,b, and c, but when I started working on the object-oriented part, it didn't work, I've spent 2 months on it, yet it doesn't work. Ok, now back to the topic: I've decided to make a compiler, that converts the scripts to pascal (object-pascal ) file and then compiles it using FPC

An alternative approach - covert the script to Lua ;)

Nafees

  • Jr. Member
  • **
  • Posts: 55
Re: Distributing FPC, with my app, and Lazarus' units...
« Reply #5 on: May 24, 2015, 07:37:36 am »
That's not an option! Lua is slow, and creating a game engine with Lua is just like grabbing an old tractor for a race. And I want to achieve a higher Frame Rate, that's impossible with Lua, I even tested my interpreter against Lua, my interpreter was faster than Lua, yet I want to have the games compiled into binary form.
« Last Edit: May 24, 2015, 07:41:21 am by Nafees »

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Distributing FPC, with my app, and Lazarus' units...
« Reply #6 on: May 24, 2015, 07:41:35 am »
Let me ask you this. Are you planning to do compilation during run-time of a game?

Nafees

  • Jr. Member
  • **
  • Posts: 55
Re: Distributing FPC, with my app, and Lazarus' units...
« Reply #7 on: May 24, 2015, 07:45:56 am »
Let me ask you this. Are you planning to do compilation during run-time of a game?
No, the games made from the engine have to be native.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Distributing FPC, with my app, and Lazarus' units...
« Reply #8 on: May 24, 2015, 09:39:14 am »
And if I plan to sell my Game Engine, am I still allowed to distribute FPC and the units from Lazarus? ( More importantly, units from Lazarus. )
Yes.
GPL doesn't say that even if I want to distribute a GPLed program, I'll have to open source my program as well, correct me if wrong.
I don't remember if it's explicitly stated, but no. You don't have to open source your own program, only the GPL program that you use and the modifications to it parts that your program links to.
Redistributing FPC/Lazarus itself is GPL, but as long as you don't link to parts that are not provided in ppu in the distribution (but only execute it), you are reasonably safe.
http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_meaning_of_the_various_file_extensions_used_by_Lazarus.3F
[/quote]

lagprogramming

  • Sr. Member
  • ****
  • Posts: 406
Re: Distributing FPC, with my app, and Lazarus' units...
« Reply #9 on: May 24, 2015, 11:13:32 am »
Can you give more details? I can only guess what you want to do. I expect 3 items to be involved:
1) FreePascal/Lazarus
2) GameEngine(used to compile and build the GameClient, something that resembles a Lazarus fork)
3) GameClient

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11452
  • FPC developer.
Re: Distributing FPC, with my app, and Lazarus' units...
« Reply #10 on: May 24, 2015, 12:27:37 pm »
And if I plan to sell my Game Engine, am I still allowed to distribute FPC and the units from Lazarus? ( More importantly, units from Lazarus. )

EDIT:
@macrov, I've read the license many times but one thing confuses me, GPL says that IF I modify the source of a GPLed program, and I plan on distributing it, then I must provide the source with it. GPL doesn't say that even if I want to distribute a GPLed program, I'll have to open source my program as well, correct me if wrong.

You are correct as long as you don't link FPC or Lazarus parts into your program. The GPL applies but is limited to the bounderies of the .EXE. This means you must be able to provide source and mutations for the FPC/Lazarus parts, not your own parts.

And even that is only on request, and you may charge a nominal fee for your trouble. (which can be say 50-100 Eur).

If you don't modify yourself, a mentioning of the http://www.freepascal.org and the lazarus site is considered enough, but keep the FPC/Lazarus sources of what you distribute in the case of a very unlikely request. (afaik no timeperiod is mentioned in the GPL, probably an untested aspect of it)

Quote
EDIT2:
Quote
Redistributing FPC/Lazarus itself is GPL, but as long as you don't link to parts that are not provided in ppu in the distribution (but only execute it), you are reasonably safe.
What is this "ppu"?

precompiled FPC units.   So if some part of FPC and Lazarus is not provided precompiled as .o and .ppu files, there is a chance it is GPL and not the way more permissive LGPL-with-static-linking-exception

Nafees

  • Jr. Member
  • **
  • Posts: 55
Re: Distributing FPC, with my app, and Lazarus' units...
« Reply #11 on: May 25, 2015, 11:09:34 am »
Thanks everyone, specially macrov, for your time and help! I've had these questions from a long time, but this is the only place which gave me answers, others gave me more and more questions.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11452
  • FPC developer.
Re: Distributing FPC, with my app, and Lazarus' units...
« Reply #12 on: May 25, 2015, 01:48:45 pm »
I forgot there is also a wiki page about licensing issues.

Nafees

  • Jr. Member
  • **
  • Posts: 55
Re: Distributing FPC, with my app, and Lazarus' units...
« Reply #13 on: May 27, 2015, 08:56:37 am »
And what about *.lfm files in <LazarusDir>\lcl\units\i386-win32?

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4467
  • I like bugs.
Re: Distributing FPC, with my app, and Lazarus' units...
« Reply #14 on: May 27, 2015, 09:41:47 am »
And what about *.lfm files in <LazarusDir>\lcl\units\i386-win32?

Those are copies of the original ones needed by FPC during compilation. The original *.lfm form file always goes together with the form's Pascal file. Same rules apply for them.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

 

TinyPortal © 2005-2018