mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-29 16:50:11 +02:00
* Updated OSX build scripts.
This commit is contained in:
@@ -9,6 +9,12 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z $QTVERSION ]
|
||||
then
|
||||
echo QTVERSION must be set
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd Contents
|
||||
|
||||
QTLIBS=`ls Frameworks | cut -d. -f1`
|
||||
@@ -16,19 +22,26 @@ LIBS=`cd MacOS && ls -fR1 | grep dylib`
|
||||
################################################################################
|
||||
|
||||
|
||||
function import_lib
|
||||
{
|
||||
echo "L \`$1'"
|
||||
cp -R -L $1 MacOS/`basename $1`
|
||||
chmod u+rw MacOS/`basename $1`
|
||||
deplib_change MacOS/`basename $1`
|
||||
}
|
||||
|
||||
function deposx_change
|
||||
{
|
||||
echo "D \`$1'"
|
||||
echo $QTDIR
|
||||
|
||||
|
||||
for y in $QTLIBS
|
||||
do
|
||||
install_name_tool -change $QTDIR/lib/$y.framework/Versions/4/$y \
|
||||
@executable_path/../Frameworks/$y.framework/Versions/4/$y \
|
||||
"$1"
|
||||
|
||||
install_name_tool -change $QTDIR/Cellar/qt/4.6.2/lib/$y.framework/Versions/4/$y \
|
||||
install_name_tool -change /usr/local/Cellar/qt/$QTVERSION/lib/$y.framework/Versions/4/$y \
|
||||
@executable_path/../Frameworks/$y.framework/Versions/4/$y \
|
||||
"$1"
|
||||
done
|
||||
@@ -40,6 +53,23 @@ function deposx_change
|
||||
"$1"
|
||||
done
|
||||
}
|
||||
|
||||
function deplib_change
|
||||
{
|
||||
install_name_tool -change /usr/local/lib/liblastfm.0.dylib @executable_path/liblastfm.0.dylib $1
|
||||
install_name_tool -change libqjson.0.dylib @executable_path/libqjson.0.dylib $1
|
||||
install_name_tool -change libechonest.0.1.0.dylib @executable_path/libechonest.0.1.0.dylib $1
|
||||
install_name_tool -change /usr/local/lib/libechonest.0.1.0.dylib @executable_path/libechonest.0.1.0.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/gloox/1.0/lib/libgloox.8.dylib @executable_path/libgloox.8.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/taglib/1.6.3/lib/libtag.1.dylib @executable_path/libtag.1.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/libogg/1.2.0/lib/libogg.0.dylib @executable_path/libogg.0.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/libvorbis/1.3.1/lib/libvorbis.0.dylib @executable_path/libvorbis.0.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/libvorbis/1.3.1/lib/libvorbisfile.3.dylib @executable_path/libvorbisfile.3.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/mad/0.15.1b/lib/libmad.0.dylib @executable_path/libmad.0.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/flac/1.2.1/lib/libFLAC++.6.dylib @executable_path/libFLAC++.6.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/flac/1.2.1/lib/libFLAC.8.dylib @executable_path/libFLAC.8.dylib $1
|
||||
}
|
||||
|
||||
################################################################################
|
||||
|
||||
|
||||
@@ -48,19 +78,25 @@ find MacOS -type f -a -perm -100 | while read x
|
||||
do
|
||||
echo $x
|
||||
y=$(file "$x" | grep 'Mach-O')
|
||||
test -n "$y" && deposx_change "$x"
|
||||
|
||||
install_name_tool -change liblastfm.0.dylib @executable_path/liblastfm.0.dylib $x
|
||||
install_name_tool -change /usr/local/Cellar/gloox/1.0/lib/libgloox.8.dylib @executable_path/libgloox.8.dylib $x
|
||||
install_name_tool -change /usr/local/lib/libgloox.8.dylib @executable_path/libgloox.8.dylib $x
|
||||
install_name_tool -change /usr/local/Cellar/taglib/1.6/lib/libtag.1.dylib @executable_path/libtag.1.dylib $x
|
||||
install_name_tool -change /usr/local/Cellar/libogg/1.2.0/lib/libogg.0.dylib @executable_path/libogg.0.dylib $x
|
||||
install_name_tool -change /usr/local/Cellar/libvorbis/1.3.1/lib/libvorbisfile.3.dylib @executable_path/libvorbisfile.3.dylib $x
|
||||
install_name_tool -change /usr/local/Cellar/mad/0.15.1b/lib/libmad.0.dylib @executable_path/libmad.0.dylib $x
|
||||
deposx_change "$x"
|
||||
deplib_change "$x"
|
||||
done
|
||||
|
||||
deposx_change MacOS/libqjson.0.7.1.dylib
|
||||
import_lib /usr/local/Cellar/qjson/0.7.1/lib/libqjson.0.dylib
|
||||
import_lib /usr/local/lib/liblastfm.0.dylib
|
||||
import_lib /usr/local/Cellar/gloox/1.0/lib/libgloox.8.dylib
|
||||
import_lib /usr/local/Cellar/taglib/1.6.3/lib/libtag.1.dylib
|
||||
import_lib /usr/local/Cellar/libogg/1.2.0/lib/libogg.0.dylib
|
||||
import_lib /usr/local/Cellar/libvorbis/1.3.1/lib/libvorbis.0.dylib
|
||||
import_lib /usr/local/Cellar/libvorbis/1.3.1/lib/libvorbisfile.3.dylib
|
||||
import_lib /usr/local/Cellar/mad/0.15.1b/lib/libmad.0.dylib
|
||||
import_lib /usr/local/Cellar/flac/1.2.1/lib/libFLAC++.6.dylib
|
||||
import_lib /usr/local/Cellar/flac/1.2.1/lib/libFLAC.8.dylib
|
||||
import_lib /usr/local/lib/libechonest.0.1.0.dylib
|
||||
|
||||
deposx_change MacOS/libqjson.0.dylib
|
||||
deposx_change MacOS/liblastfm.0.dylib
|
||||
deposx_change MacOS/libechonest.0.1.0.dylib
|
||||
|
||||
# now Qt
|
||||
for x in $QTLIBS
|
||||
|
Reference in New Issue
Block a user