mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
OP-1103 Fixes packaging issues for OSX. Using this version I had no problem to run GCS on 10.9 Mavericks
This commit is contained in:
parent
c0f6d9d7bc
commit
d99727306c
@ -3,9 +3,9 @@
|
|||||||
APP="${1?}"
|
APP="${1?}"
|
||||||
PLUGINS="${APP}/Contents/Plugins"
|
PLUGINS="${APP}/Contents/Plugins"
|
||||||
OP_PLUGINS="${APP}/Contents/Plugins/OpenPilot"
|
OP_PLUGINS="${APP}/Contents/Plugins/OpenPilot"
|
||||||
QT_LIBS="QtDeclarative QtXmlPatterns QtGui QtTest QtCore QtSvg QtSql QtOpenGL QtNetwork QtXml QtDBus QtScript phonon"
|
QT_LIBS="QtDeclarative QtXmlPatterns QtGui QtTest QtCore QtSvg QtSql QtOpenGL QtNetwork QtXml QtScript"
|
||||||
QT_DIR=$(otool -L "${APP}/Contents/MacOS/OpenPilot GCS" | sed -n -e 's/\/QtCore\.framework.*//p' | sed -n -E 's:^.::p')
|
QT_DIR=$(otool -L "${APP}/Contents/MacOS/OpenPilot GCS" | sed -n -e 's/\/QtCore\.framework.*//p' | sed -n -E 's:^.::p')
|
||||||
QT_EXTRA="accessible/libqtaccessiblewidgets.dylib bearer/libqgenericbearer.dylib codecs/libqcncodecs.dylib codecs/libqjpcodecs.dylib codecs/libqkrcodecs.dylib codecs/libqtwcodecs.dylib graphicssystems/libqtracegraphicssystem.dylib imageformats/libqgif.dylib imageformats/libqico.dylib imageformats/libqjpeg.dylib imageformats/libqmng.dylib imageformats/libqtiff.dylib imageformats/libqsvg.dylib qmltooling/libqmldbg_inspector.dylib qmltooling/libqmldbg_tcp.dylib graphicssystems/libqglgraphicssystem.dylib sqldrivers/libqsqlodbc.dylib sqldrivers/libqsqlpsql.dylib sqldrivers/libqsqlite.dylib imageformats/libqtga.dylib iconengines/libqsvgicon.dylib"
|
QT_EXTRA="accessible/libqtaccessiblewidgets.dylib bearer/libqgenericbearer.dylib imageformats/libqgif.dylib imageformats/libqico.dylib imageformats/libqjpeg.dylib imageformats/libqmng.dylib imageformats/libqtiff.dylib imageformats/libqsvg.dylib qmltooling/libqmldbg_tcp.dylib sqldrivers/libqsqlodbc.dylib sqldrivers/libqsqlpsql.dylib sqldrivers/libqsqlite.dylib imageformats/libqtga.dylib iconengines/libqsvgicon.dylib"
|
||||||
|
|
||||||
OSG_EXTRA="libosgViewer.90.dylib"
|
OSG_EXTRA="libosgViewer.90.dylib"
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ fi
|
|||||||
echo "Qt library directory is \"${QT_DIR}\""
|
echo "Qt library directory is \"${QT_DIR}\""
|
||||||
|
|
||||||
echo "Running macdeployqt"
|
echo "Running macdeployqt"
|
||||||
macdeployqt "${APP}"
|
macdeployqt "${APP}" -no-strip
|
||||||
|
|
||||||
echo "Processing Qt libraries in ${APP}"
|
echo "Processing Qt libraries in ${APP}"
|
||||||
for f in "${PLUGINS}/"*.dylib "${OP_PLUGINS}/"*.dylib
|
for f in "${PLUGINS}/"*.dylib "${OP_PLUGINS}/"*.dylib
|
||||||
@ -33,56 +33,56 @@ do
|
|||||||
[ ! -L "${f}" ] && for g in $QT_LIBS
|
[ ! -L "${f}" ] && for g in $QT_LIBS
|
||||||
do
|
do
|
||||||
install_name_tool -change \
|
install_name_tool -change \
|
||||||
"${QT_DIR}${g}.framework/Versions/4/${g}" \
|
"${QT_DIR}${g}.framework/Versions/5/${g}" \
|
||||||
@executable_path/../Frameworks/${g}.framework/Versions/4/${g} \
|
@executable_path/../Frameworks/${g}.framework/Versions/5/${g} \
|
||||||
"${f}"
|
"${f}"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Copying other libraries that were missed"
|
#echo "Copying other libraries that were missed"
|
||||||
# should be redundant but some libs missed by main app and macdeployqt
|
# should be redundant but some libs missed by main app and macdeployqt
|
||||||
for f in ${QT_LIBS}
|
#for f in ${QT_LIBS}
|
||||||
do
|
#do
|
||||||
echo "Copying ${f}"
|
#echo "Copying ${f}"
|
||||||
cp -a "${QT_FRAMEWORKS}/${f}.framework" "${APP}/Contents/Frameworks/"
|
#cp -a "${QT_FRAMEWORKS}/${f}.framework" "${APP}/Contents/Frameworks/"
|
||||||
|
|
||||||
echo "Changing package identification of ${f}"
|
#echo "Changing package identification of ${f}"
|
||||||
install_name_tool -id \
|
#install_name_tool -id \
|
||||||
@executable_path/../Frameworks/${f}.framework/Versions/4/${f} \
|
#@executable_path/../Frameworks/${f}.framework/Versions/5/${f} \
|
||||||
"${APP}/Contents/Frameworks/${f}.framework/Versions/4/${f}"
|
#"${APP}/Contents/Frameworks/${f}.framework/Versions/5/${f}"
|
||||||
|
|
||||||
rm "${APP}/Contents/Frameworks/${f}.framework/${f}"
|
#rm "${APP}/Contents/Frameworks/${f}.framework/${f}"
|
||||||
|
|
||||||
echo "Changing package linkages"
|
#echo "Changing package linkages"
|
||||||
for g in $QT_LIBS
|
#for g in $QT_LIBS
|
||||||
do
|
#do
|
||||||
install_name_tool -change \
|
#install_name_tool -change \
|
||||||
"${QT_DIR}${g}.framework/Versions/4/${g}" \
|
#"${QT_DIR}${g}.framework/Versions/5/${g}" \
|
||||||
@executable_path/../Frameworks/${g}.framework/Versions/4/${g} \
|
#@executable_path/../Frameworks/${g}.framework/Versions/5/${g} \
|
||||||
"${APP}/Contents/Frameworks/${f}.framework/Versions/4/${f}"
|
#"${APP}/Contents/Frameworks/${f}.framework/Versions/5/${f}"
|
||||||
done
|
#done
|
||||||
done
|
#done
|
||||||
|
|
||||||
for f in ${QT_EXTRA}
|
#for f in ${QT_EXTRA}
|
||||||
do
|
#do
|
||||||
echo "Copying package ${f}"
|
#echo "Copying package ${f}"
|
||||||
d=$(dirname ${f})
|
#d=$(dirname ${f})
|
||||||
[ ! -d "${APP}/Contents/Plugins/${d}" ] && mkdir "${APP}/Contents/Plugins/${d}"
|
#[ ! -d "${APP}/Contents/Plugins/${d}" ] && mkdir "${APP}/Contents/Plugins/${d}"
|
||||||
cp "${QT_PLUGINS}/${f}" "${APP}/Contents/Plugins/${f}"
|
#cp "${QT_PLUGINS}/${f}" "${APP}/Contents/Plugins/${f}"
|
||||||
echo "Changing package identification of ${f}"
|
#echo "Changing package identification of ${f}"
|
||||||
install_name_tool -id \
|
#install_name_tool -id \
|
||||||
@executable_path/../Plugins/${f} \
|
#@executable_path/../Plugins/${f} \
|
||||||
"${PLUGINS}/${f}"
|
#"${PLUGINS}/${f}"
|
||||||
|
|
||||||
echo "Changing package linkages"
|
#echo "Changing package linkages"
|
||||||
for g in $QT_LIBS
|
#for g in $QT_LIBS
|
||||||
do
|
#do
|
||||||
install_name_tool -change \
|
#install_name_tool -change \
|
||||||
"${QT_DIR}${g}.framework/Versions/4/${g}" \
|
#"${QT_DIR}${g}.framework/Versions/5/${g}" \
|
||||||
@executable_path/../Frameworks/${g}.framework/Versions/4/${g} \
|
#@executable_path/../Frameworks/${g}.framework/Versions/5/${g} \
|
||||||
"${APP}/Contents/Plugins/${f}"
|
#"${APP}/Contents/Plugins/${f}"
|
||||||
done
|
#done
|
||||||
done
|
#done
|
||||||
|
|
||||||
echo "Copying SDL"
|
echo "Copying SDL"
|
||||||
cp -a "/Library/Frameworks/SDL.framework" "${APP}/Contents/Frameworks/"
|
cp -a "/Library/Frameworks/SDL.framework" "${APP}/Contents/Frameworks/"
|
||||||
|
Loading…
Reference in New Issue
Block a user