Skip to content

Commit d4c0d18

Browse files
author
timlinux
committed
Updated post build scripts for mac (Tims Version) so that python libs all have proper relative references into bundle for the lib deps.
git-svn-id: http://svn.osgeo.org/qgis/trunk@8559 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 540b820 commit d4c0d18

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

mac/1-release-extra.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Copy supportibng libraries (except Qt) to openModeller bundle
33
# and make search paths for them relative to bundle
44

5+
56
APP_PREFIX=/Applications/qgis0.11.0.app
67
BUNDLE_DIR=${APP_PREFIX}/Contents/MacOS
78
DEPS_BASE=/usr/local/qgis_universal_deps
@@ -30,6 +31,7 @@ install_name_tool -change ${LIB_DIR}/libgdal.1.dylib \
3031
install_name_tool -change ${LIB_DIR}/libproj.dylib \
3132
@executable_path/lib/libproj.dylib \
3233
${BUNDLE_DIR}/qgis
34+
3335
set +x
3436

3537
LIBS="lib/libqgis_core.dylib \
@@ -107,6 +109,43 @@ do
107109
#echo "----------------------------------"
108110
done
109111

112+
# Python libs need some special care
113+
LIBS="share/qgis/python/qgis/core.so
114+
share/qgis/python/qgis/gui.so
115+
lib/libqgispython.dylib"
116+
for LIB in $LIBS
117+
do
118+
install_name_tool -id @executable_path/${LIB} ${BUNDLE_DIR}/${LIB}
119+
# for debugging only
120+
for LIBPATH in `otool -L ${BUNDLE_DIR}/${LIB} \
121+
| sed 's/(\([a-zA-Z0-9\., ]*\))//g' \
122+
| grep $LIB_DIR \
123+
| grep -v framework` #frameworks (in particular qt frameworks) get
124+
#dealt with in another script
125+
do
126+
#echo "------------"
127+
#echo $LIBPATH
128+
#echo "------------"
129+
BASELIB=`basename "$LIBPATH"`
130+
#echo $BASELIB
131+
install_name_tool -change ${LIBPATH} @executable_path/lib/${BASELIB} ${BUNDLE_DIR}/${LIB}
132+
done
133+
# Change the search path for qgis libs in python libs
134+
135+
CORELIBPATH=/`otool -L ${BUNDLE_DIR}/${LIB} |grep -o "\b[/A-Za-z0-9]*libqgis_core.[0-9.]*.dylib\b"`
136+
CORELIB=`echo "${CORELIBPATH}" | grep -o "libqgis_core.[0-9.]*.dylib"`
137+
install_name_tool -change ${CORELIBPATH} @executable_path/lib/${CORELIB} ${BUNDLE_DIR}/${LIB}
138+
GUILIBPATH=/`otool -L ${BUNDLE_DIR}/${LIB} |grep -o "\b[/A-Za-z0-9]*libqgis_gui.[0-9.]*.dylib\b"`
139+
GUILIB=`echo "${CORELIBPATH}" | grep -o "libqgis_gui.[0-9.]*.dylib"`
140+
install_name_tool -change ${GUILIBPATH} @executable_path/lib/${GUILIB} ${BUNDLE_DIR}/${LIB}
141+
echo $LIB
142+
#otool -L ${BUNDLE_DIR}/lib/qgis/${LIB}
143+
#echo "----------------------------------"
144+
done
145+
146+
147+
/Users/timlinux/dev/cpp/qgis/build/src/core/libqgis_core.0.11.dylib
148+
110149
#
111150
# Strip binaries - disable for debugging
112151
#

mac/2-release-extra-qt.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ FILES="qgis
7070
lib/qgis/libwmsprovider.so
7171
lib/qgis/libgpsimporterplugin.so
7272
lib/qgis/libevis.so
73-
lib/qgis/libquickprintplugin.so"
73+
lib/qgis/libquickprintplugin.so
74+
share/qgis/python/qgis/core.so
75+
share/qgis/python/qgis/gui.so
76+
lib/libqgispython.dylib"
7477
for FILE in ${FILES}
7578
do
7679
for FRAMEWORK in QtCore QtGui QtNetwork QtSql QtSvg QtXml

0 commit comments

Comments
 (0)