From: Matthew Mondor Date: Fri, 27 Jun 2014 01:50:35 +0000 (+0000) Subject: Initial import, building instructions. OSX documentation to be filled in. X-Git-Url: http://git.pulsar-zone.net/?a=commitdiff_plain;h=b3e5e650cd7359e98c7dd761744fbcd25729abf1;p=mmondor.git Initial import, building instructions. OSX documentation to be filled in. --- diff --git a/mmsoftware/mystic_ships/client/BUILDING b/mmsoftware/mystic_ships/client/BUILDING new file mode 100644 index 0000000..6f6c32b --- /dev/null +++ b/mmsoftware/mystic_ships/client/BUILDING @@ -0,0 +1,103 @@ +$Id: BUILDING,v 1.1 2014/06/27 01:50:35 mmondor Exp $ + + +NetBSD +====== + +On NetBSD, make sure that you have the following packages installed: + +gmake +SDL-1.2 and smpeg-0.4 +SDL_net-1.2 +SDL_image-1.2 +SDL_gfx-2.0 +SDL_mixer-1.2 and libogg-1.3, libvorbis-1.3 +chrpath + +You'll also need the compiler base sets installed. + +If you are using a big endian architecture, modify GNUMakefile +appropriately. + +Go to the client/ directory, modify src/conf.h as necessary, then +run "gmake". + +On NetBSD the RPATH (shown on libraries and executables using +"objdump -p"), are important, as well as LD_LIBRARY_PATH. This +means that if you intend to package the resulting build, you might +want to include all library dependencies (shown using "ldd"), and +make sure to fix the RPATH on both the executable and libraries +(using "chrpath -r") and set LD_LIBRARY_PATH in a startup script. +Also important to include are the following dynamically loaded +libraries, despite not being shown by "ldd": libvorbis, libogg, +libXrender. Unfortunately, libSDL includes hardcoded paths to +where it should dlopen(3) libvorbis/libogg. This can be fixed +using a hex editor, or "vim -b" on libSDL.so. + + +Linux +===== + +On Linux, many distributions provide separate development packages +which provide the headerfiles, and which depend on the library +packages. Those are often suffixed using -dev. On Debian-derived +distributions, for instance, make sure that you have the following +packages installed: + +make (GNU make) +gawk (GNU awk) +gcc +binutils +libsdl-gfx1.2-dev +libsdl-image1.2-dev +libsdl-mixer1.2-dev +libsdl-net1.2-dev +libsdl1.2-dev +zlib1g-dev +libvorbis-dev +chrpath + +If you are using a big endian architecture, modify GNUMakefile +appropriately. + +Go to the client/ directory, modify src/conf.h as necessary, then +run "make". + +On Linux usually ELF RPATH is not used, but LD_LIBRARY_PATH is. +You might still want to verify using "objdump -p" on libraries and +the executable, and as necessary fix the RPATH using "chrpath -r". +It also seems that some libraries which SDL loads dynamically on +NetBSD are instead dynamically linked at compile time with SDL, +such as libvorbis and libogg. If you want to produce a distribuable +archive, use "ldd" on the executable to determine which libraries +to include, then create a startup script setting LD_LIBRARY_PATH +and launching the main executable. Note that it's important not +to include the libdl library, which could result in segfaulting/crashing +executables on other Linux systems. + + +OSX +=== + + +WINDOWS +======= + +On Windows, to build tms-client you'll need to install cygwin as +well as the cygwin-mingw cross-compiler. This system has advantages +over using MSVC, like that no extra base C runtime libraries are +needed to execute the resulting executable, that GCC does not suffer +from some MSVC issues (like not supporting large static strings) +and that a more standard build environment is provided. + +This however also means that you'll need mingw-built versions of +SDL, SDL_gfx, SDL_image, SDL_mixer, SDL_net, libvorbis, libogg and +libz. The tms-client GNUmakefile script expects those to have been +installed under the /usr/local prefix by default. + +Go to the client/ directory, modify src/conf.h as necessary, then +run "make". + +If distributing the client, make sure to also include the library +dependencies (listed above) in the same directory as the executable. +