[SDL] Installation of binary apps on linux
Ryan C. Gordon
icculus at icculus.org
Fri Dec 1 06:48:50 PST 2006
> - Obtain a compressed "clickable" installer that runs with almost any
> libc version.
>
> (loki installer + makeself?)
That's what I use. You'll probably have to do some tapdancing to make
sure you build with a glibc that works right everywhere, and link with
only what you need, etc. You might do well to just extract Google
Earth's installer and reuse the binaries from it...a LOT of time was
spent customizing and automating the build of those binaries, including
a gtk+2 installer that falls back to a statically linked gtk1 installer
if there are dependency issues.
I'm currently using a dedicated build box with Ubuntu 5.10/x86 to keep
glibc dependencies sane. Before that, I was building on Red Hat 6.0 (!),
but the NPTL issues finally forced me to something more modern. You're
probably good for a few years before big glibc changes or migration away
from ELF or some other crazy thing helpfully breaks your binary
again...which is much better than it was even five years ago, where you
either had two separate binaries, or lost ABI compatibility every six
months, or both.
It's a bit of a dark art, but once you get it working, it works
everywhere. Make sure you build SDL so it dynamically loads everything
it can (including Xlib, esound, arts, nas, etc). You can have an
extremely functional libSDL that only explicitly links against glibc and
makes good decisions at runtime. The dynamic X11 support needs you to
build SDL with gcc4.
> - Be able to add KDE / Gnome menu entry in the correct way.
>
> (no idea at all about this, I've seen that many distributions place the
> small xml file used to describe the menu entry in different places, also
> the format is slightly different in kde & gnome..., freedesktops may helps?)
http://portland.freedesktop.org/wiki/
There's a script there for installing desktop entries. I still think
this whole system is an unqualified mess, though.
> - Be sure that the game uses my libraries and not the ones provided on
> the user machine (to avoid compatibility issues).
>
> (export LD_LIBRARY_PATH=./mylibs:$LD_LIBRARY_PATH in the game startup
> script is enough?)
More or less. Here's the startup script from Postal 2, using some code
that Sam wrote for Loki to find the right location for "./mylibs".
(Attached.)
--ryan.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: postal2.sh
Url: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20061201/c0175690/attachment.ksh
More information about the SDL
mailing list