SDL linking, multiplateforme and setup issue

Hello everyone

I’ve done a game
http://ysagoon.com/snakeme
which is using SDL.
The windows port uses an installer and I give the DLL with.
My question is for the linux and MacOS port :
how do I give the extension (MacOS) and shared library (Linux) in a nice
easy to use distribution package.
Should I use a RPM on Linux ? My program uses SDL_Mixer.
Should I, to avoid conflict of version, link everything statically ?
is it possible on MacOS ?

Thanks a lot

Stephane

Hi Stephane,

Please be aware that (from my understanding) linking statically with any
library that is covered by the LGPL means that you must provide your
source code to the public [I like working for nothing, obviously. I mean, who needs money? :)]

Wierd, I know - a major P.I.T.A. etc etc - but this is the current state
of affairs.
I use static linking on Windows with MS libraries - but with LGPL stuff
WATCH OUT!

A user has to be able to rebuild the LGPL library and then rebuild the
executable to use it.

Tom Gilbert
http://www.AlteredWorlds.com

Stephane Magnenat wrote:> Should I, to avoid conflict of version, link everything statically ?

is it possible on MacOS ?

Thanks a lot

Stephane

Hello,

Thanks for thins,

A big prt of the game will probably be given in LGPL itself (the UI), in
fact if I decide it is enough clean to do this :slight_smile:
Can I dynamically link to SDL on Linux and MacOS BUT provided the DLL (or
.so) with source in teh same dir of the application on Linux ?
And does someone have any idea how to do this in MacOS ?

Thanks

Stephane> Hi Stephane,

Please be aware that (from my understanding) linking statically with any
library that is covered by the LGPL means that you must provide your
source code to the public [I like working for nothing, obviously. I mean, who needs money? :)]

Wierd, I know - a major P.I.T.A. etc etc - but this is the current state
of affairs.
I use static linking on Windows with MS libraries - but with LGPL stuff
WATCH OUT!

A user has to be able to rebuild the LGPL library and then rebuild the
executable to use it.

Tom Gilbert
http://www.AlteredWorlds.com

Stephane Magnenat wrote:

Should I, to avoid conflict of version, link everything statically ?
is it possible on MacOS ?

Thanks a lot

Stephane

Hello everyone

I’ve done a game
http://ysagoon.com/snakeme
which is using SDL.
The windows port uses an installer and I give the DLL with.
My question is for the linux and MacOS port :
how do I give the extension (MacOS) and shared library (Linux) in a nice
easy to use distribution package.
Should I use a RPM on Linux ? My program uses SDL_Mixer.
Should I, to avoid conflict of version, link everything statically ?
is it possible on MacOS ?

On Linux you can dynamically link with SDL, and deliver your own
version of the SDL shared object file libSDL-1.1.so.0 in your main
game directory.

Then you make the file in /usr/local/bin a script which executes your
game, and does something like this:

export LD_LIBRARY_PATH="$MAIN_GAME_DIRECTORY"
$MAIN_GAME_DIRECTORY/game

The LD_LIBRARY_PATH tells the Linux dynamic linker to look there for
shared objects, as well as the usual system places. Windows
effectively has LD_LIBRARY_PATH always set to contain the same
directory as every executable - Linux plays things a bit safer and
more controlled.

The same thing works with SDL_Mixer.

This is acceptable, but not ideal. The ideal would be to have both a
DEB and an RPM with dependencies on appropriately packaged versions of
SDL. I know that Debian has an official package of it now.

FrancisOn Tue, 8 Aug 2000 23:05:07 +0200, you wrote:

Francis Irving <francis.irving at creaturelabs.com> schrieb am 09 Aug 2000:

Then you make the file in /usr/local/bin a script which executes your
game, and does something like this:

export LD_LIBRARY_PATH="$MAIN_GAME_DIRECTORY"
$MAIN_GAME_DIRECTORY/game

The LD_LIBRARY_PATH tells the Linux dynamic linker to look there for
shared objects, as well as the usual system places. Windows
effectively has LD_LIBRARY_PATH always set to contain the same
directory as every executable - Linux plays things a bit safer and
more controlled.

LD_LIBRARY_PATH might already be set by the user to contain some non-standard (or absent from /etc/ld.so.conf) directories.

So it’s better to do
LD_LIBRARY_PATH="$MAIN_GAME_DIRECTORY:$LD_LIBRARY_PATH"

  • Andreas–
    Check out my 3D lightcycle game: http://www.gltron.org
    More than 60’000 Downloads of the latest version (0.59)

Hello,

Thanks you a lot :slight_smile:

The problem with packages is that if I providers latest debian and redhat
version (.deb, .rpm) of SDL, and that thoses packages update the system and
the user needed a previous version of SDL, some app won’t work ?

Is it possible to place the script in the user’s directory ?
and ask him to launch the game liek this ?

Stephane> Francis Irving <francis.irving at creaturelabs.com> schrieb am 09 Aug 2000:

Then you make the file in /usr/local/bin a script which executes your
game, and does something like this:

export LD_LIBRARY_PATH="$MAIN_GAME_DIRECTORY"
$MAIN_GAME_DIRECTORY/game

The LD_LIBRARY_PATH tells the Linux dynamic linker to look there for
shared objects, as well as the usual system places. Windows
effectively has LD_LIBRARY_PATH always set to contain the same
directory as every executable - Linux plays things a bit safer and
more controlled.

LD_LIBRARY_PATH might already be set by the user to contain some non-standard (or absent from /etc/ld.so.conf) directories.

So it’s better to do
LD_LIBRARY_PATH="$MAIN_GAME_DIRECTORY:$LD_LIBRARY_PATH"

  • Andreas

    Check out my 3D lightcycle game: http://www.gltron.org
    More than 60’000 Downloads of the latest version (0.59)