SDL License

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
Jaxerhaxer
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 14
Joined: Fri Sep 04, 2009 7:39 pm

SDL License

Post 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.
andrew
Chaos Rift Regular
Chaos Rift Regular
Posts: 121
Joined: Mon Dec 08, 2008 2:12 pm

Re: SDL License

Post 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.
Last edited by andrew on Sat Sep 19, 2009 6:41 pm, edited 1 time in total.
User avatar
Moosader
Game Developer
Game Developer
Posts: 1081
Joined: Wed May 07, 2008 12:29 am
Current Project: Find out at: http://www.youtube.com/coderrach
Favorite Gaming Platforms: PC, NES, SNES, PS2, PS1, DS, PSP, X360, WII
Programming Language of Choice: C++
Location: Kansas City
Contact:

Re: SDL License

Post by Moosader »

User avatar
RyanPridgeon
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 447
Joined: Sun Sep 21, 2008 1:34 pm
Current Project: "Triangle"
Favorite Gaming Platforms: PC
Programming Language of Choice: C/C++
Location: UK
Contact:

Re: SDL License

Post by RyanPridgeon »

Does that mean we can sell SDL games as long as SDL is linked as a DLL?
Ryan Pridgeon
C, C++, C#, Java, ActionScript 3, HaXe, PHP, VB.Net, Pascal
Music | Blog
andrew
Chaos Rift Regular
Chaos Rift Regular
Posts: 121
Joined: Mon Dec 08, 2008 2:12 pm

Re: SDL License

Post 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/
User avatar
RyanPridgeon
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 447
Joined: Sun Sep 21, 2008 1:34 pm
Current Project: "Triangle"
Favorite Gaming Platforms: PC
Programming Language of Choice: C/C++
Location: UK
Contact:

Re: SDL License

Post by RyanPridgeon »

Awesome.

I'll never finish a game good enough though >.<
Ryan Pridgeon
C, C++, C#, Java, ActionScript 3, HaXe, PHP, VB.Net, Pascal
Music | Blog
User avatar
captjack
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 50
Joined: Fri Sep 18, 2009 4:23 pm
Current Project: engine framework
Favorite Gaming Platforms: PC, XBox 360, PS3
Programming Language of Choice: C, C++
Location: Northern Virginia

Re: SDL License

Post 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.)
User avatar
MarauderIIC
Respected Programmer
Respected Programmer
Posts: 3406
Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA

Re: SDL License

Post 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.
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
User avatar
captjack
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 50
Joined: Fri Sep 18, 2009 4:23 pm
Current Project: engine framework
Favorite Gaming Platforms: PC, XBox 360, PS3
Programming Language of Choice: C, C++
Location: Northern Virginia

Re: SDL License

Post 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
Post Reply