Programing commercial software (for dummies)

Hi there,
I’ve been reading the posts about changing the liscence and everything. Basically, I’m
a commercial
software devellopper, on my own, and I must not send out my source code or I’d quickly be
out of
business! (Even though my business hasn’t started yet! :wink:

I was wondering if it was possible to give us some suggestions (for dummies) on how to
proceed to
make software commercially available. Using SDL and if possible making some contrasts on
using a
commercial liscence (maybe for another API for example) and using BSD, GPL, LGPL.

What I would like to have is a bunch of examples… I’m good at reading legal stuff,
but english is not
my first language and lots of important stuff slips out of my concentration. (I’m sure
some others on
this list will like to see some “stories of succes” using SDL!)

Or maybe this has already been documented somewhere, in which case, just provide the
URL, if not,
I’m thinking on making such page, possibly a general page, comparing commercial liscences
versus
public liscences.

Thanks for your help,

xm

What I understand (might be wrong) from other free
libraries. You only have to keep the source codes of
the libraries available, but not your own program.
Either ship your program with the source codes or make
it available for download.

Phuoc Can HUA

— xm at ca.inter.net wrote:> Hi there,

I’ve been reading the posts about changing the
liscence and everything. Basically, I’m
a commercial
software devellopper, on my own, and I must not send
out my source code or I’d quickly be
out of
business! (Even though my business hasn’t started
yet! :wink:

=====
/_/_/_/_/_/_
www.huaonline.com
My Homepage is my Castle

Find local movie times and trailers on Yahoo! Movies.

from what ive gathered if you link staticly to sdl (ie compile sdl into your
exe) you have to make your code open sourced.

if you dynamicly link to sdl (via dll, so etc) you dont have to make your
code open sourced.

the reason for this is simple…

if i have a game written in sdl, and i want to modify sdl to do something or
to update it, the license is there to garauntee that i would be able to.

so…if you staticly link, i would require the games source code to be able
to update/modify sdl.

if you dynamicly link, i can just drop in a new dll/so/whatever and things
should be happy.

make sense?

The gist of this i’ve heard from emails posted by sam latinga on multiple
occaisions so for my atleast its a first hand source (:> ----- Original Message -----

From: phuoccanhua@yahoo.com.au (Phuoc Can Hua)
To:
Sent: Wednesday, August 11, 2004 8:48 PM
Subject: Re: [SDL] Programing commercial software (for dummies)

What I understand (might be wrong) from other free
libraries. You only have to keep the source codes of
the libraries available, but not your own program.
Either ship your program with the source codes or make
it available for download.

Phuoc Can HUA

— xm at ca.inter.net wrote:

Hi there,
I’ve been reading the posts about changing the
liscence and everything. Basically, I’m
a commercial
software devellopper, on my own, and I must not send
out my source code or I’d quickly be
out of
business! (Even though my business hasn’t started
yet! :wink:

=====
/_/_/_/_/_/_
www.huaonline.com
My Homepage is my Castle

Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

from what ive gathered if you link staticly to sdl (ie compile sdl into your
exe) you have to make your code open sourced.

Or provide libraries to which one can re-statically-link your app
against new libraries (like SDL).

> so...if you staticly link, i would require the games source code to be able > to update/modify sdl.

Or… again, see above. :^)

Quoting the GNU Library General Punlic License (LGPL), version 2, June 1991
(from my copy of the SDL_mixer library sources, if you have to know)…

"5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a “work that uses the Library”. Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.

“However, linking a “work that uses the Library” with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a “work that uses the
library”. The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.”

IANAL, but I believe what section 5 is saying is that your application
(a game that uses SDL, for example) is not affected by the LGPL if you
simply link to it. e.g., if “supergame.exe” uses “libsdl.dll”, the LGPL
doesn’t affect Super Game in any way.

However, if you create a statically-linked “supergame.exe” that includes the
SDL library inside, your game becomes covered by the LGPL, which is probably
not what you want if you’re not interested in releasing Super Game as
Free / Open Source software. :^)

But as it says, section 6 covers this:

"6. As an exception to the Sections above, you may also compile or
link a “work that uses the Library” with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer’s own use and reverse
engineering for debugging such modifications.

… "Also, you must do one of these things:

“a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable “work that
uses the Library”, as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)”

[6b through 6d are just other means to provide the materials
specified in 6a…]

So, again, to try and interpret… If you produce an executable that
includes the library (say, by statically linking to it… your
"supergame.exe" contains libSDL right inside, rather than loading it
as a “.dll” at runtime), you must provide:

  • The source code to the library. (Okay, easily done… just make
    the SDL library source available.)

  • Provide the object code AND/OR the source code to your executable
    (the “work that uses the Library”), so people can re-link to a
    modified version of the library. (Say SDL 1.3 fixes a horrendous bug.
    Users of “supergame.exe” should be able to use SDL 1.3, even though
    you released it with SDL 1.2. If you didn’t dynamically link against
    SDL, this means the users need to relink themselves to produce a
    new statically-linked version of “supergame.exe”)

Notice it says “object code and/or source code.” If you don’t want your
game’s source out there, just provide the compiled object version.
(You already are, in a sense, by providing an EXE that statically-links
against libSDL. It’s just that the average user would never do anything
with the “.o” object files, unless they decided to take advantage of the
freedom that section 6 of the LGPL is giving them.)

WHEW!

So, your choices when using SDL and other LGPL’d libraries in your app:

  • Dynamically-link against the LGPL’d library

  • Statically-link, but also provide object files,
    so users can re-link against newer versions of the LGPL’d library

  • Statically-link, but also rovide source code,
    so users can re-link against newer versions of the LGPL’d library

When in doubt, though, read the license… consult a lawyer.
I’m still at that lazy/naiive state where I don’t have a lawyer,
but still produce and deliver software for the public (my GPL’d open source).

If I were releasing games that were not OSS, I would probably want a lawyer
handy, REGARDLESS as to whether I was using LGPL’d libraries like SDL,
or non-Open-Source libraries with commercial licenses…

Whew Anyway. Just wanted to correct that bit, and quote the LGPL a little.
Sorry for the noise. Has this been dealt with sufficiently in the FAQs?
In the future, it’d be nice to just throw URLs at people.

-bill!
bill at newbreedsoftware.com "Avoid missing ball for high score"
http://www.newbreedsoftware.com/
New Breed SoftwareOn Wed, Aug 11, 2004 at 10:04:17PM -0700, Alan Wolfe wrote:

Hi there,
I’ve been reading the posts about changing the liscence and
everything. Basically, I’m a commercial software devellopper, on my
own, and I must not send out my source code or I’d quickly be out of
business! (Even though my business hasn’t started yet! :wink:

Not necessarily. See Trolltech (Qt) and Aladdin Enterprises (Ghostscript),
for example. :slight_smile:

I was wondering if it was possible to give us some suggestions (for
dummies) on how to proceed to make software commercially available.
Using SDL and if possible making some contrasts on using a
commercial liscence (maybe for another API for example) and using
BSD, GPL, LGPL.

I haven’t read the LGPL in enough detail to see how ‘nicely’ an LGPL library
works with some other proprietary library, but based on the post I just
made in another part of this thread (quoting parts of LGPL sections 5 and 6,
and trying to explain them in even plainer language), it should be fine.

As I explained there, you may license your software in any way, provided
that if you create a ‘derivative work’ (e.g., an EXE statically-linked
with an LGPL library), you must provide either source or object code,
so that users may link against different versions of the library.
(Either an upgraded version, or their own derivative work based on the
original LGPL’d library!)

If you dynamically link (simply “use” the LGPL’d library, but not
create a ‘derivative work’), the LGPL doesn’t affect you at all.

Note: IANAL, and have not studied LGPL in any great detail.
Also, I’ve only created GPL’d software using LGPL’d libraries, and
typically they are dynamically linked anyway, so I don’t have
first-hand experience in non-free-software development using LGPL’d libs.

> I'm good at reading legal stuff, but english is not my first > language and lots of important stuff slips out of my concentration.

What language(s) do you understand more easily? The Free Software
Foundation probably has links to the LGPL license translated into your
language! :^)

Good luck! And once again… whew! Enough typing for me tonight!

-bill!On Wed, Aug 11, 2004 at 10:54:02PM +0000, xm at ca.inter.net wrote:

If I’m using some DLL’s which are not compiled by
myself can I package (zip) them with my software (with
all information about the source), or I have to tell
the users to download them from the official site?

— Bill Kendrick wrote:> On Wed, Aug 11, 2004 at 10:04:17PM -0700, Alan Wolfe wrote:

from what ive gathered if you link staticly to sdl
(ie compile sdl into your
exe) you have to make your code open sourced.

Or provide libraries to which one can
re-statically-link your app
against new libraries (like SDL).

> so...if you staticly link, i would require the games source code to be able > to update/modify sdl.

Or… again, see above. :^)

Quoting the GNU Library General Punlic License
(LGPL), version 2, June 1991
(from my copy of the SDL_mixer library sources, if
you have to know)…

"5. A program that contains no derivative of any
portion of the
Library, but is designed to work with the Library
by being compiled or
linked with it, is called a “work that uses the
Library”. Such a
work, in isolation, is not a derivative work of
the Library, and
therefore falls outside the scope of this License.

“However, linking a “work that uses the Library"
with the Library
creates an executable that is a derivative of the
Library (because it
contains portions of the Library), rather than a
"work that uses the
library”. The executable is therefore covered by
this License.
Section 6 states terms for distribution of such
executables.”

IANAL, but I believe what section 5 is saying is
that your application
(a game that uses SDL, for example) is not affected
by the LGPL if you
simply link to it. e.g., if “supergame.exe” uses
"libsdl.dll", the LGPL
doesn’t affect Super Game in any way.

However, if you create a statically-linked
"supergame.exe" that includes the
SDL library inside, your game becomes covered by the
LGPL, which is probably
not what you want if you’re not interested in
releasing Super Game as
Free / Open Source software. :^)

But as it says, section 6 covers this:

"6. As an exception to the Sections above, you may
also compile or
link a “work that uses the Library” with the
Library to produce a
work containing portions of the Library, and
distribute that work
under terms of your choice, provided that the
terms permit
modification of the work for the customer’s own
use and reverse
engineering for debugging such modifications.

… "Also, you must do one of these things:

“a) Accompany the work with the complete
corresponding
machine-readable source code for the Library
including whatever
changes were used in the work (which must be
distributed under
Sections 1 and 2 above); and, if the work is an
executable linked
with the Library, with the complete
machine-readable “work that
uses the Library”, as object code and/or source
code, so that the
user can modify the Library and then relink to
produce a modified
executable containing the modified Library. (It
is understood
that the user who changes the contents of
definitions files in the
Library will not necessarily be able to recompile
the application
to use the modified definitions.)”

[6b through 6d are just other means to provide the
materials
specified in 6a…]

So, again, to try and interpret… If you produce
an executable that
includes the library (say, by statically linking to
it… your
"supergame.exe" contains libSDL right inside, rather
than loading it
as a “.dll” at runtime), you must provide:

  • The source code to the library. (Okay, easily
    done… just make
    the SDL library source available.)

  • Provide the object code AND/OR the source code
    to your executable
    (the “work that uses the Library”), so people
    can re-link to a
    modified version of the library. (Say SDL 1.3
    fixes a horrendous bug.
    Users of “supergame.exe” should be able to use
    SDL 1.3, even though
    you released it with SDL 1.2. If you didn’t
    dynamically link against
    SDL, this means the users need to relink
    themselves to produce a
    new statically-linked version of
    "supergame.exe")

Notice it says “object code and/or source code.” If
you don’t want your
game’s source out there, just provide the compiled
object version.
(You already are, in a sense, by providing an EXE
that statically-links
against libSDL. It’s just that the average user
would never do anything
with the “.o” object files, unless they decided to
take advantage of the
freedom that section 6 of the LGPL is giving them.)

WHEW!

So, your choices when using SDL and other LGPL’d
libraries in your app:

  • Dynamically-link against the LGPL’d library

  • Statically-link, but also provide object files,
    so users can re-link against newer versions of
    the LGPL’d library

  • Statically-link, but also rovide source code,
    so users can re-link against newer versions of
    the LGPL’d library

When in doubt, though, read the license… consult a
lawyer.
I’m still at that lazy/naiive state where I don’t
have a lawyer,
but still produce and deliver software for the
public (my GPL’d open source).

If I were releasing games that were not OSS, I would
probably want a lawyer
handy, REGARDLESS as to whether I was using LGPL’d
libraries like SDL,
or non-Open-Source libraries with commercial
licenses…

Whew Anyway. Just wanted to correct that bit,
and quote the LGPL a little.
Sorry for the noise. Has this been dealt with
sufficiently in the FAQs?
In the future, it’d be nice to just throw URLs at
people.

-bill!
bill at newbreedsoftware.com "Avoid missing
ball for high score"
http://www.newbreedsoftware.com/
New Breed Software


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

=====
/_/_/_/_/_/_
www.huaonline.com
My Homepage is my Castle

Find local movie times and trailers on Yahoo! Movies.

You may package it.

LGPL Section 1:

  1. You may copy and distribute verbatim copies of the Library’s
    complete source code as you receive it, in any medium, provided that
    you conspicuously and appropriately publish on each copy an
    appropriate copyright notice and disclaimer of warranty; keep intact
    all the notices that refer to this License and to the absence of any
    warranty; and distribute a copy of this License along with the
    Library.

And from Section 2:

In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

So, as I understand it, simply including the Library (assuming you
follow all of the other rules, like ‘conspicuous copyright notice and
disclaimer of warranty’) doesn’t cause the LGPL to affect the other
work you’re distributing along with it.

-bill!On Thu, Aug 12, 2004 at 04:44:11PM +1000, Phuoc Can Hua wrote:

If I’m using some DLL’s which are not compiled by
myself can I package (zip) them with my software (with
all information about the source), or I have to tell
the users to download them from the official site?

from what ive gathered if you link staticly to sdl (ie compile sdl into your
exe) you have to make your code open sourced.

Or provide libraries to which one can re-statically-link your app
against new libraries (like SDL).

> so...if you staticly link, i would require the games source code to be able > to update/modify sdl.

Or… again, see above. :^)

Quoting the GNU Library General Punlic License (LGPL), version 2, June 1991
(from my copy of the SDL_mixer library sources, if you have to know)…

"5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a “work that uses the Library”. Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.

“However, linking a “work that uses the Library” with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a “work that uses the
library”. The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.”

IANAL, but I believe what section 5 is saying is that your application
(a game that uses SDL, for example) is not affected by the LGPL if you
simply link to it. e.g., if “supergame.exe” uses “libsdl.dll”, the LGPL
doesn’t affect Super Game in any way.

However, if you create a statically-linked “supergame.exe” that includes the
SDL library inside, your game becomes covered by the LGPL, which is probably
not what you want if you’re not interested in releasing Super Game as
Free / Open Source software. :^)

But as it says, section 6 covers this:

"6. As an exception to the Sections above, you may also compile or
link a “work that uses the Library” with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer’s own use and reverse
engineering for debugging such modifications.

… "Also, you must do one of these things:

“a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable “work that
uses the Library”, as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)”

[6b through 6d are just other means to provide the materials
specified in 6a…]

So, again, to try and interpret… If you produce an executable that
includes the library (say, by statically linking to it… your
"supergame.exe" contains libSDL right inside, rather than loading it
as a “.dll” at runtime), you must provide:

  • The source code to the library. (Okay, easily done… just make
    the SDL library source available.)

  • Provide the object code AND/OR the source code to your executable
    (the “work that uses the Library”), so people can re-link to a
    modified version of the library. (Say SDL 1.3 fixes a horrendous bug.
    Users of “supergame.exe” should be able to use SDL 1.3, even though
    you released it with SDL 1.2. If you didn’t dynamically link against
    SDL, this means the users need to relink themselves to produce a
    new statically-linked version of “supergame.exe”)

Notice it says “object code and/or source code.” If you don’t want your
game’s source out there, just provide the compiled object version.
(You already are, in a sense, by providing an EXE that statically-links
against libSDL. It’s just that the average user would never do anything
with the “.o” object files, unless they decided to take advantage of the
freedom that section 6 of the LGPL is giving them.)

WHEW!

So, your choices when using SDL and other LGPL’d libraries in your app:

  • Dynamically-link against the LGPL’d library

  • Statically-link, but also provide object files,
    so users can re-link against newer versions of the LGPL’d library

  • Statically-link, but also rovide source code,
    so users can re-link against newer versions of the LGPL’d library

When in doubt, though, read the license… consult a lawyer.
I’m still at that lazy/naiive state where I don’t have a lawyer,
but still produce and deliver software for the public (my GPL’d open source).

If I were releasing games that were not OSS, I would probably want a lawyer
handy, REGARDLESS as to whether I was using LGPL’d libraries like SDL,
or non-Open-Source libraries with commercial licenses…

Whew Anyway. Just wanted to correct that bit, and quote the LGPL a little.
Sorry for the noise. Has this been dealt with sufficiently in the FAQs?
In the future, it’d be nice to just throw URLs at people.

It would sure be nice if you were to take you email and add it to the
FAQ at
http://www.libsdl.org/cgi/docwiki.cgi/FAQ_20Frequently_20Asked_20Questions

Bob PendletonOn Thu, 2004-08-12 at 01:22, Bill Kendrick wrote:

On Wed, Aug 11, 2004 at 10:04:17PM -0700, Alan Wolfe wrote:

-bill!
bill at newbreedsoftware.com "Avoid missing ball for high score"
http://www.newbreedsoftware.com/
New Breed Software


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

±-------------------------------------+

I’m a bit short on time. Someone else can feel free to add it,
you have my permission. :^) (And this way, any inaccuracies will hopefully
get corrected by other Wiki readers ;^) )

We might want a “Legal” or “Licensing” section of the FAQ, and put it there.

-bill!On Thu, Aug 12, 2004 at 09:09:21AM -0500, Bob Pendleton wrote:

It would sure be nice if you were to take you email and add it to the
FAQ at
http://www.libsdl.org/cgi/docwiki.cgi/FAQ_20Frequently_20Asked_20Questions

We might want a “Legal” or “Licensing” section of the
FAQ, and put it there.

May I suggest a guide, since most of us will not only use SDL but SDL plus other libraries
(for example
OpenSSL, OpenGL, maybe some 3D libraries, etc).

So that guide should first speak about the Legal way to use SDL with your application that
may or may
not be commercial. And then, it should speak about combining different libraries with
this one.

My2c,

Simon

      				> We might want a "Legal" or "Licensing" section of the 

FAQ, and put it there.

Go for it. Create the entry in the FAQ. I’m pretty sure people will fill
it in.

	Bob PendletonOn Thu, 2004-08-12 at 09:06, xm at ca.inter.net wrote:

May I suggest a guide, since most of us will not only use SDL but SDL plus other libraries
(for example
OpenSSL, OpenGL, maybe some 3D libraries, etc).

So that guide should first speak about the Legal way to use SDL with your application that
may or may
not be commercial. And then, it should speak about combining different libraries with
this one.

My2c,

Simon


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

±-------------------------------------+

I’m using libraries (Kyra) built on top of SDL. If I
attach all the copyright infomation of Kyra do I still
need to worry about SDL?
I had to re-compile SDL on my environment to get it
work. Do I still have to provide all SDL source codes?

Just in case I do anything wrong, am I already a
criminal and have to confront with layer or I’ll get a
warning first. Has anyone made those experiences?

Btw, thank you for all people contributing to this
discussion. I know, there are sites where I can read
about those infomation. But without all your help I
don’t really understand what they mean.

thanks
Phuoc Can HUA

— Bill Kendrick wrote:> On Thu, Aug 12, 2004 at 04:44:11PM +1000, Phuoc Can Hua wrote:

If I’m using some DLL’s which are not compiled by
myself can I package (zip) them with my software
(with
all information about the source), or I have to
tell
the users to download them from the official site?

You may package it.

LGPL Section 1:

  1. You may copy and distribute verbatim copies of
    the Library’s
    complete source code as you receive it, in any
    medium, provided that
    you conspicuously and appropriately publish on
    each copy an
    appropriate copyright notice and disclaimer of
    warranty; keep intact
    all the notices that refer to this License and to
    the absence of any
    warranty; and distribute a copy of this License
    along with the
    Library.

And from Section 2:

In addition, mere aggregation of another work not
based on the Library
with the Library (or with a work based on the
Library) on a volume of
a storage or distribution medium does not bring
the other work under
the scope of this License.

So, as I understand it, simply including the Library
(assuming you
follow all of the other rules, like ‘conspicuous
copyright notice and
disclaimer of warranty’) doesn’t cause the LGPL to
affect the other
work you’re distributing along with it.

-bill!

=====
/_/_/_/_/_/_
www.huaonline.com
My Homepage is my Castle

Find local movie times and trailers on Yahoo! Movies.

I’m using libraries (Kyra) built on top of SDL.

‘On top’ as in, Kyra is a derivative work based on SDL (e.g., they
took the LGPL SDL lib and made changed it), or simply that it depends on SDL?
(like SDL_mixer depends on SDL)?

If I attach all the copyright infomation of Kyra do I still
need to worry about SDL?

If the former, then Kyra’s copyright info and license (presumably LGPL)
should be fine.

If the latter, you do need to ‘worry’ about SDL, as well as Kyra.

Err… assuming you’re distributing all of these things with your app.

If your app simply depends on them, and isn’t a ‘derivative work’
(as in, a statically-linked executable), you should be fine.

I had to re-compile SDL on my environment to get it
work. Do I still have to provide all SDL source codes?

“Re-compile?” Did you change anything in the SDL source?
If not, then simply providing the plain SDL source should be fine.

If so, then you need to provide your changes to anyone to whom you’re
distributing the altered SDL libs.

Good luck!

-bill!On Fri, Aug 13, 2004 at 09:29:24AM +1000, Phuoc Can Hua wrote:

‘On top’ as in, Kyra is a derivative work based on SDL (e.g., they
took the LGPL SDL lib and made changed it), or simply that it depends on SDL?
(like SDL_mixer depends on SDL)?

FWIW, I just googled ‘Kyra’, and it’s a sprite library written “on top
of SDL”, which says to me it simply REQUIRES SDL to run.

–Scott