Skip to content

Commit

Permalink
Updated post build scripts for mac (Tims Version) so that python libs…
Browse files Browse the repository at this point in the history
… all have proper relative references into bundle for the lib deps.

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8559 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed May 31, 2008
1 parent 03de5e0 commit ced16d6
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
39 changes: 39 additions & 0 deletions mac/1-release-extra.sh
Expand Up @@ -2,6 +2,7 @@
# Copy supportibng libraries (except Qt) to openModeller bundle
# and make search paths for them relative to bundle


APP_PREFIX=/Applications/qgis0.11.0.app
BUNDLE_DIR=${APP_PREFIX}/Contents/MacOS
DEPS_BASE=/usr/local/qgis_universal_deps
Expand Down Expand Up @@ -30,6 +31,7 @@ install_name_tool -change ${LIB_DIR}/libgdal.1.dylib \
install_name_tool -change ${LIB_DIR}/libproj.dylib \
@executable_path/lib/libproj.dylib \
${BUNDLE_DIR}/qgis

set +x

LIBS="lib/libqgis_core.dylib \
Expand Down Expand Up @@ -107,6 +109,43 @@ do
#echo "----------------------------------"
done

# Python libs need some special care
LIBS="share/qgis/python/qgis/core.so
share/qgis/python/qgis/gui.so
lib/libqgispython.dylib"
for LIB in $LIBS
do
install_name_tool -id @executable_path/${LIB} ${BUNDLE_DIR}/${LIB}
# for debugging only
for LIBPATH in `otool -L ${BUNDLE_DIR}/${LIB} \
| sed 's/(\([a-zA-Z0-9\., ]*\))//g' \
| grep $LIB_DIR \
| grep -v framework` #frameworks (in particular qt frameworks) get
#dealt with in another script
do
#echo "------------"
#echo $LIBPATH
#echo "------------"
BASELIB=`basename "$LIBPATH"`
#echo $BASELIB
install_name_tool -change ${LIBPATH} @executable_path/lib/${BASELIB} ${BUNDLE_DIR}/${LIB}
done
# Change the search path for qgis libs in python libs

CORELIBPATH=/`otool -L ${BUNDLE_DIR}/${LIB} |grep -o "\b[/A-Za-z0-9]*libqgis_core.[0-9.]*.dylib\b"`
CORELIB=`echo "${CORELIBPATH}" | grep -o "libqgis_core.[0-9.]*.dylib"`
install_name_tool -change ${CORELIBPATH} @executable_path/lib/${CORELIB} ${BUNDLE_DIR}/${LIB}
GUILIBPATH=/`otool -L ${BUNDLE_DIR}/${LIB} |grep -o "\b[/A-Za-z0-9]*libqgis_gui.[0-9.]*.dylib\b"`
GUILIB=`echo "${CORELIBPATH}" | grep -o "libqgis_gui.[0-9.]*.dylib"`
install_name_tool -change ${GUILIBPATH} @executable_path/lib/${GUILIB} ${BUNDLE_DIR}/${LIB}
echo $LIB
#otool -L ${BUNDLE_DIR}/lib/qgis/${LIB}
#echo "----------------------------------"
done


/Users/timlinux/dev/cpp/qgis/build/src/core/libqgis_core.0.11.dylib

#
# Strip binaries - disable for debugging
#
Expand Down
5 changes: 4 additions & 1 deletion mac/2-release-extra-qt.sh
Expand Up @@ -70,7 +70,10 @@ FILES="qgis
lib/qgis/libwmsprovider.so
lib/qgis/libgpsimporterplugin.so
lib/qgis/libevis.so
lib/qgis/libquickprintplugin.so"
lib/qgis/libquickprintplugin.so
share/qgis/python/qgis/core.so
share/qgis/python/qgis/gui.so
lib/libqgispython.dylib"
for FILE in ${FILES}
do
for FRAMEWORK in QtCore QtGui QtNetwork QtSql QtSvg QtXml
Expand Down

0 comments on commit ced16d6

Please sign in to comment.