Mercurial > hg > sonic-annotator
annotate deploy_mac.sh @ 0:581b1b150a4d
* copy to sonic-annotator
author | Chris Cannam |
---|---|
date | Thu, 11 Dec 2008 10:22:33 +0000 |
parents | |
children |
rev | line source |
---|---|
Chris@0 | 1 #!/bin/bash |
Chris@0 | 2 |
Chris@0 | 3 # this script should be executed from the directory that contains the app directory (application bundle) |
Chris@0 | 4 # it copies the required 3rd party libraries into the application bundle and corrects the library install names and references |
Chris@0 | 5 |
Chris@0 | 6 TARGETPATH="sonic-annotator.app/Contents/Frameworks/" |
Chris@0 | 7 |
Chris@0 | 8 mkdir "$TARGETPATH" |
Chris@0 | 9 |
Chris@0 | 10 QTPREFIX=/Library/Frameworks/ |
Chris@0 | 11 QTFWKS="QtXml QtCore QtNetwork" |
Chris@0 | 12 |
Chris@0 | 13 # copy the dynamic libraries into the app bundle |
Chris@0 | 14 |
Chris@0 | 15 for FWK in $QTFWKS; do |
Chris@0 | 16 cp ${QTPREFIX}${FWK}.framework/Versions/4/${FWK} "${TARGETPATH}" |
Chris@0 | 17 done |
Chris@0 | 18 |
Chris@0 | 19 # change the id's of the dylibs |
Chris@0 | 20 for FWK in $QTFWKS; do |
Chris@0 | 21 install_name_tool -id @executable_path/../Frameworks/${FWK} "$TARGETPATH/$FWK" |
Chris@0 | 22 done |
Chris@0 | 23 |
Chris@0 | 24 # tell the linker to look for dylibs in the app bundle |
Chris@0 | 25 for FWK in $QTFWKS; do |
Chris@0 | 26 install_name_tool -change ${FWK}.framework/Versions/4/${FWK} @executable_path/../Frameworks/${FWK} "sonic-annotator.app/Contents/MacOS/sonic-annotator" |
Chris@0 | 27 done |
Chris@0 | 28 |
Chris@0 | 29 # correct dependencies between QT dylibs |
Chris@0 | 30 for FWK in $QTFWKS; do |
Chris@0 | 31 case $FWK in QtCore) continue;; esac |
Chris@0 | 32 install_name_tool -change QtCore.framework/Versions/4/QtCore @executable_path/../Frameworks/QtCore "$TARGETPATH/${FWK}" |
Chris@0 | 33 done |
Chris@0 | 34 |