From: Matthew Mondor Date: Mon, 30 Jun 2014 02:20:40 +0000 (+0000) Subject: More OSX notes X-Git-Url: http://git.pulsar-zone.net/?a=commitdiff_plain;h=e2095777100a7d5958f34b9e6be326d6fd13d78a;p=mmondor.git More OSX notes --- diff --git a/mmsoftware/mystic_ships/client/BUILDING b/mmsoftware/mystic_ships/client/BUILDING index 8e2ea78..f5efa1e 100644 --- a/mmsoftware/mystic_ships/client/BUILDING +++ b/mmsoftware/mystic_ships/client/BUILDING @@ -1,4 +1,4 @@ -$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 @@ -95,7 +95,34 @@ using the "brew list" command. 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 @executable_path/" 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