Sphere Linux HOWTO To compile the sphere engine under linux you need several other libraries. (okay, a lot of other libraries) Where I show filenames below, they are the ones I installed. If newer versions are available, you should probably install those instead. You need: a C++ compiler, such as g++ corona - http://corona.sf.net/ audiere - http://audiere.sf.net/ spidermonkey - http://www.mozilla.org/js/spidermonkey/ or the spidermonkey.tar.gz found at the files page at http://sf.net/projects/sphere/ SDL - http://www.libsdl.org/ libmng - http://www.libmng.com/ libpng - http://www.libpng.org/ scons - http://www.scons.org/ zlib (compression library, http://www.gzip.org/zlib/) Optionally, you can also get: libvorbis - http://www.vorbis.com libjpeg - http://www.ijg.org/ or ftp://ftp.uu.net/graphics/jpeg/ To also install wxeditor, you will need: wxwidgets (formally wxwindows) - http://www.wxwidgets.org/ (Once you've got the engine compiling and working compiling wxeditor shouldn't be too difficult, just install wxwidgets and type "scons") ----------------------------------------------------------- Gentoo Linux: The following section is for gentoo linux users, mainly how to install libraries using portage... ----------------------------------------------------------- Gentoo users can install SDL, libpng, libmng and scons using portage... (They can also optionally install zlib, libjpeg, and libvorbis using portage aswell...) (Note that gentoo users still have to follow the "Everyone else" section for SpiderMonkey, audiere and corona...) Before you merge these, you should make sure you have the following USE flags set (just to make sure) in your make.conf: ogg vorbis mp3 mng png jpeg sdl Then run the following commands: For SDL: emerge libsdl For libpng: emerge libpng For libmng: emerge libmng For scons: emerge scons And optionally: For zlib: emerge zlib For libjpeg: emerge libjpeg For libvorbis: emerge libvorbis Also, when it comes to running the engine, if you use the aRts sound server, you can use the aRts dsp wrapper as follows to route the dsp output to aRts: artsdsp -m ./engine ----------------------------------------------------------- Everyone else: The following install commands are based on using rpm on mandrake linux. (But should work on suse linux and redhat linux...) ----------------------------------------------------------- To install SDL: You need the SDL development library RPM, and so you do something like: rpm -i libSDL1.2-devel-1.2.5-5mdk ----------------------------------------------------------- To install libmng: You download the libmng.rpm file, and so you do something like: rpm -i libmng1-devel-1.0.3-2mdk ----------------------------------------------------------- To install SCons: You'll need the scons RPM, and then you can do something like: rpm -i scons-0.13-1.noarch.rpm If you prefer using the tar.gz version, installing it looks like: gunzip scons-0.13-1.tar.gz tar -xf scons-0.13-1.tar cd scons-0.13-1 python setup.py install ----------------------------------------------------------- To install SpiderMonkey: You download the SpiderMonkey.tar.gz file, and you do something like: gunzip SpiderMonkey-1.5.0.tar.gz tar -xf SpiderMonkey-1.5.0.tar cd SpiderMonkey-1.5.0 ./configure make make install ----------------------------------------------------------- To install corona: You download the corona.tar.gz file, and so you do something like: gunzip corona-1.0.0.tar.gz tar -xf corona-1.0.0.tar cd corona-1.0.0 ./configure make make install The next step may just be me... but you need to make sure the lib is properly installed, so: cd src cd .libs cp libcorona-1.0.0.so /lib # or cp libcorona-1.0.0.so /usr/lib This is just a check you can do, feel free to skip it, but I like to make sure corona supports png, so you do: cd .. cd .. # we should be back in corona-1.0.0 now cd examples/formats ./formats If it says png is supported? Good news, if not, sphere pretty much wont run. Then run ldconfig to update your library path details. su ldconfig ----------------------------------------------------------- To install audiere: You download the audiere.tar.gz file, and you do something like: gunzip audiere-1.9.2.gz tar -xf audiere-1.9.2.tar cd audiere-1.9.2 ./configure make make install The next step may just be me... but you need to make sure the lib is properly installed, so: cd src cd .libs cp libaudiere-1.9.2.so /lib # or cp libaudiere-1.9.2.so /usr/lib Then run ldconfig to update your library path details. su ldconfig ----------------------------------------------------------- If all goes well, you now should be able to move onto installing sphere. Getting the source Using your favorite CVS client, download the sphere module from CVS. Instructions are at . They should be either: cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/sphere login cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/sphere co sphere Or: export CVS_RSH=ssh cvs -z3 -d:ext:developername@cvs.sourceforge.net:/cvsroot/sphere co sphere Once you've done that, goto into the top level sphere directory and run scons cd sphere scons You should get the first few lines looking like: [brian@localhost sphere]$ scons scons: Reading SConscript files ... Using compiler: linux Found sdl-config: /usr/bin/sdl-config Using subsystem: unix Not that if it doesn't say "Using compiler: linux" you'll have to use "scons compiler=linux" rather than just "scons" Hopefully, if all goes well, you'll be able to open the engine. cd sphere cd build cd linux ./engine If you feel I missed something out, please let me know. -- Flik.