Update OSX doc
authorMatthew Mondor <mmondor@pulsar-zone.net>
Mon, 30 Jun 2014 02:23:32 +0000 (02:23 +0000)
committerMatthew Mondor <mmondor@pulsar-zone.net>
Mon, 30 Jun 2014 02:23:32 +0000 (02:23 +0000)
mmsoftware/mystic_ships/client/BUILDING

index f5efa1e..b1f9381 100644 (file)
@@ -1,4 +1,4 @@
-$Id: BUILDING,v 1.4 2014/06/30 02:20:40 mmondor Exp $
+$Id: BUILDING,v 1.5 2014/06/30 02:23:32 mmondor Exp $
 
 
 NetBSD
@@ -96,29 +96,14 @@ 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.
+are absolute in the MACH-O executables.  However, similarily to
+the more usual LD_LIBRARY_PATH, the DYLD_LIBRARY_PATH environment
+variable can be set to tell Darwin where to look for those instead.
+Use the "otool -L" to verify the non-system dynamic dependencies
+of the executable, then copy those library dependencies.  Make sure
+to also include libz, libvorbis, libvorbisfile, libogg, as libz is
+explicitely used by tms-client, and as the latter ones are dynamically
+loaded at runtime by SDL_mixer.
 
 Create a small script setting the DYLD_LIBRARY_PATH environment
 variable to the current directory and launching the tms-client