-$Id: BUILDING,v 1.3 2014/06/29 23:56:13 mmondor Exp $
+$Id: BUILDING,v 1.4 2014/06/30 02:20:40 mmondor Exp $
NetBSD
Go to the client/ directory, modify src/conf.h as necessary, then
run "make".
-[...]
+On OSX, the paths to the libraries which were dynamically linked
+are absolute in the MACH-O executables. If you wish to distribute
+an easy to use archive, you should first use the command "otool -L
+./tms-client" to discover the dependencies and their locations.
+Copy tms-client, along with those libraries which are part of SDL
+and libz, to a common directory. Then use the "install_name_tool
+-change <fullpath> @executable_path/<libraryname>" command to fix
+those hardcoded fullpaths to executable_path-relative paths. For
+instance:
+
+tool -L tms-client | egrep -ie '/usr/local|/usr/lib/libz' | \
+ awk '{print $1}' | (while read l; do install_name_tool \
+ -change $l @executable_path/$(basename $l) ./tms-client; done)
+
+You'll also have to do the same in the various .dylib libraries.
+Also, on those .dylib, the IDs can also be changed:
+
+ls *.dylib | \
+ (while read l; do install_name_tool -id @executable_path/$l $l;\
+ done)
+
+Also ensure to copy the SDL-dynamically loaded libraries which are
+needed to this directory: libogg.0.dylib, libvorbis.0.dylib,
+libvorbisfile.3.dylib and libpng16.16.dylib for instance.
+
+Create a small script setting the DYLD_LIBRARY_PATH environment
+variable to the current directory and launching the tms-client
+binary (i.e. renamed to tms-client-bin).
WINDOWS