1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

Added script that repackages the distributables into the .app file

This commit is contained in:
James Cotton 2011-05-21 11:08:00 -05:00
parent 9c96f9f4d5
commit dae6f15247
4 changed files with 51 additions and 0 deletions

View File

@ -7,4 +7,9 @@ gcs: uavobjects
ground_package: | gcs
package: release_ground release_flight
$(ROOT_DIR)/release/osx/package
release: | package
.PHONY: gcs ground_package

Binary file not shown.

44
release/osx/libraries Executable file
View File

@ -0,0 +1,44 @@
#!/bin/bash
APP=$1
PLUGINS=${APP}/Contents/PlugIns
OP_PLUGINS=${APP}/Contents/PlugIns/OpenPilot
QT_LIBS="QtGui QtCore QtSvg QtSql QtOpenGL QtNetwork QtXml QtDBus QtScript phonon"
echo $1
macdeployqt "${APP}"
for f in "${PLUGINS}/"*.dylib "${OP_PLUGINS}/"*.dylib
do
for g in $QT_LIBS
do
install_name_tool -change ${g}.framework/Versions/4/${g} @executable_path/../Frameworks/${g}.framework/Versions/4/${g} "${f}"
done
done
# should be redundant but some libs missed by main app and macdeployqt
for f in ${QT_LIBS} SDL
do
echo "Copying ${f}"
cp -r /Library/Frameworks/${f}.framework "${APP}/Contents/Frameworks/"
echo "Changing package identification of ${f}"
install_name_tool -id @executable_path/../Frameworks/${f}.framework/Versions/4/QtCore "${APP}/Contents/Frameworks/${f}.framework/Versions/4/${f}"
echo "Changing package linkages"
for g in $QT_LIBS
do
install_name_tool -change ${g}.framework/Versions/4/${g} @executable_path/../Frameworks/${g}.framework/Versions/4/${g} "${APP}/Contents/Frameworks/${f}.framework/Versions/4/${f}"
done
done
# deleting unnecessary files
echo "Deleting unnecessary files"
find "${APP}/Contents/Frameworks" -iname "current" -exec rm -rf \{\} \;
find "${APP}/Contents/Frameworks" -iname "4.0" -exec rm -rf \{\} \;
find "${APP}/Contents/Frameworks" -iname "*_debug*" -exec rm -rf \{\} \;

View File

@ -22,6 +22,8 @@ device=$(hdiutil attach ${TEMP_FILE} | \
cp -r "${APP_PATH}" "/Volumes/${VOL_NAME}"
cp -r "${FW_PATH}" "/Volumes/${VOL_NAME}/firmware"
${OP_BASE}/release/osx/libraries "/Volumes/${VOL_NAME}/OpenPilot GCS.app"
hdiutil detach ${device}
hdiutil convert ${TEMP_FILE} -format UDZO -o ${OUT_FILE}