netradiant-custom/install-dylibs.sh
divverent 64eee327a3 OSX: make the app bundle run without fink installed, by copying all required libraries into the install directory
git-svn-id: svn://svn.icculus.org/netradiant/trunk@203 61c419a2-8eb2-4b30-bcec-8cead039b335
2009-03-04 08:51:00 +00:00

23 lines
590 B
Bash

#!/bin/sh
set -ex
: ${OTOOL:=otool}
: ${CP:=cp}
: ${INSTALLDIR:=.}
finkgetdeps()
{
otool -L "$1" | grep /sw/lib | while read -r LIB STUFF; do
[ -f "$INSTALLDIR/${LIB##*/}" ] && continue
cp -vL "$LIB" "$INSTALLDIR"
finkgetdeps "$INSTALLDIR/${LIB##*/}"
done
}
finkgetdeps "$INSTALLDIR/radiant.ppc"
echo Warning: this only works if only ONE version of gtk-2.0 and pango is installed
cp -vL /sw/lib/gtk-2.0/*/loaders/libpixbufloader-bmp.so "$INSTALLDIR/"
cp -vL /sw/lib/pango/*/modules/pango-basic-fc.so "$INSTALLDIR/"
cp -vL /sw/lib/pango/*/modules/pango-basic-x.so "$INSTALLDIR/"