Page 1 of 1

SDL License

Posted: Sat Sep 19, 2009 6:19 pm
by Jaxerhaxer
I have a question.
If I were to make a sdl game and sell it, would i need to buy any license or anything? Not that i would make this game, but i am just wondering.

Re: SDL License

Posted: Sat Sep 19, 2009 6:39 pm
by andrew
http://www.libsdl.org/license-lgpl.php
The Simple DirectMedia Layer library is currently available under the GNU Lesser General Public License (LGPL) version 2.1 or newer.

SDL's use of the LGPL is twofold:

* Allow end users to use custom versions of the library, to support bug fixes and other enhancements.
* Allow any improvements made to the library for one project to benefit the community as a whole.

To comply with this license, you must give prominent notice that you use the Simple DirectMedia Layer library, and that it is included under the terms of the LGPL license. You must provide a copy of the LGPL license.
You must also do one of the following:

1. Link with the library as a shared object (e.g. SDL.dll or libSDL.so)
2. Provide the object or source code to your application along with any libraries and custom tools not available with a standard platform development kit. You may also simply provide a written offer, valid for three years, to provide these materials upon request to anyone with a legal copy of your application.

If you include the SDL library in binary form, you should also make available the source code to the version you provide, including any customizations you have made. If you link to a standard version of the library, simply referring to the SDL website is sufficient.
You can only buy a commercial license for SDL 1.3.

Re: SDL License

Posted: Sat Sep 19, 2009 6:39 pm
by Moosader

Re: SDL License

Posted: Sun Sep 20, 2009 5:32 pm
by RyanPridgeon
Does that mean we can sell SDL games as long as SDL is linked as a DLL?

Re: SDL License

Posted: Sun Sep 20, 2009 9:21 pm
by andrew
RyanPridgeon wrote:Does that mean we can sell SDL games as long as SDL is linked as a DLL?
Short answer: yes.

To comply with this license, you must give prominent notice that you use the Simple DirectMedia Layer library, and that it is included under the terms of the LGPL license. You must provide a copy of the LGPL license.

If you include the SDL library in binary form, you should also make available the source code to the version you provide, including any customizations you have made. If you link to a standard version of the library, simply referring to the SDL website is sufficient.
This means if you compiled your own version of the library you have to provide the source code to it.

You can do either of these:
1. Link with the library as a shared object (e.g. SDL.dll or libSDL.so)
This is what you would normally do if you don't want your code to be open source.

2. Provide the object or source code to your application along with any libraries and custom tools not available with a standard platform development kit. You may also simply provide a written offer, valid for three years, to provide these materials upon request to anyone with a legal copy of your application.
If you want to link the library statically to your code you must make your source code available. This is what you would do if you want to make your project open source.

Go here for more information:
http://galaxygameworks.com/

Re: SDL License

Posted: Mon Sep 21, 2009 4:02 am
by RyanPridgeon
Awesome.

I'll never finish a game good enough though >.<

Re: SDL License

Posted: Mon Sep 21, 2009 12:31 pm
by captjack
Andrew is spot on, and I'll elaborate (copiously) for those who are interested.

Generally one can sell any software one writes assuming one hasn't stolen anything which makes up that software. For example, let's say I work at a software company and we're writing a graphics driver. I think it's neat and want to incorporate it into my own game. In doing so, I would be stealing my company's property. Forget about the game I'm writing - I could go to jail!

The LGPL states that non-derivative works can be close-source (i.e. proprietary) if one chooses, but one must dynamically link to the library. Static linking requires one to open their source code.

The GPL grants the rights of "the free software definition". That definition provides language addressing "software freedom". Free software is defined to mean the recipient has the freedom to:
  1. run the program (for any purpose)
  2. study how the program works (and be able to adapt it to one's needs
  3. redistribute copies
  4. improve the program (and be able to redistribute one's program)
Access to source code is a pre-condition for 2 and 4.

Once condition of the GPL states that any product that uses GPL'ed code must have that freedom. If I write a piece of GPL'ed software (library or otherwise) and you want to use it in your project, then by all means do so. Your project must, however, be GPL as well (which, as stated above, be open source). The license indicates you must document all the authors whose code you've used in your project (giving credit where credit is due).

You can even sell GPL software (freedom 3). Red Hat, after all sells Enterprise Linux which is practically all GPL code from the GNU project. But do notice, dear reader, that they provide all the source RPMs...

Using the GCC to create code (gcc, g++, g77, etc) does not imply your project be open source. The glibc, for example, is LGPL and, as such, linking to it dynamically allows you to close your source. (This is some tricksy shit, yes?)

Close your source if you want to. You must open it, however, if you use code (or derivatives) from other sources that are GPL'ed.

-capt jack

(No, I am not a lawyer.)

Re: SDL License

Posted: Tue Sep 22, 2009 5:31 pm
by MarauderIIC
Reading captjack's post, it seems like he doesn't come right out and say it:
If you have GPL'd code in your source files, your source files must be GPL'd.
If you have GLP'd code in another library, that library must remain GPL'd. But things that use that library do not have to be.

Re: SDL License

Posted: Wed Sep 23, 2009 12:13 pm
by captjack
MarauderIIC wrote:Reading captjack's post, it seems like he doesn't come right out and say it:
If you have GPL'd code in your source files, your source files must be GPL'd.
If you have GLP'd code in another library, that library must remain GPL'd. But things that use that library do not have to be.
:) I synopsize terribly! Thanks for the digest version!

-capt Jack