2011-05-20 17:50:50 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
2011-05-22 01:43:13 +03:00
|
|
|
# the following environment variables must be set
|
2015-01-04 12:44:58 +13:00
|
|
|
: ${ROOT_DIR?} ${BUILD_DIR?} ${PACKAGE_LBL?} ${PACKAGE_DIR?} ${PACKAGE_NAME?} ${PACKAGE_SEP?}
|
2011-05-22 01:43:13 +03:00
|
|
|
|
|
|
|
# more variables
|
2013-03-30 17:33:38 +02:00
|
|
|
APP_PATH="${BUILD_DIR}/openpilotgcs_release/bin/OpenPilot GCS.app"
|
2012-12-12 20:26:11 +02:00
|
|
|
OUT_FILE="${PACKAGE_DIR}/../${PACKAGE_NAME}${PACKAGE_SEP}${PACKAGE_LBL}${PACKAGE_SEP}osx.dmg"
|
2011-05-22 01:43:13 +03:00
|
|
|
|
2015-06-25 12:54:30 +01:00
|
|
|
SRC_DIR="${PACKAGE_DIR}/src"
|
2011-05-22 01:43:13 +03:00
|
|
|
|
2015-06-25 12:54:30 +01:00
|
|
|
# copy base dmg structure
|
|
|
|
cp -r "${ROOT_DIR}/package/osx/dmg/" "${SRC_DIR}"
|
2014-01-09 20:05:14 +01:00
|
|
|
|
2011-05-20 17:50:50 -05:00
|
|
|
# packaging goes here
|
2015-06-25 12:54:30 +01:00
|
|
|
cp -a "${APP_PATH}" "${SRC_DIR}"
|
2014-01-09 20:05:14 +01:00
|
|
|
|
2015-06-25 12:54:30 +01:00
|
|
|
cp "${BUILD_DIR}/uavobject-synthetics/matlab/OPLogConvert.m" "${SRC_DIR}/Utilities"
|
|
|
|
cp "${ROOT_DIR}/WHATSNEW.txt" "${SRC_DIR}"
|
|
|
|
cp "${ROOT_DIR}/README.txt" "${SRC_DIR}/Docs"
|
|
|
|
cp "${ROOT_DIR}/MILESTONES.txt" "${SRC_DIR}/Docs"
|
|
|
|
cp "${ROOT_DIR}/LICENSE.txt" "${SRC_DIR}/Docs"
|
|
|
|
cp "${ROOT_DIR}/GPLv3.txt" "${SRC_DIR}/Docs"
|
2011-08-04 15:25:11 -05:00
|
|
|
|
2011-05-28 03:14:51 +03:00
|
|
|
"${ROOT_DIR}/package/osx/libraries" \
|
2015-06-25 12:54:30 +01:00
|
|
|
"${SRC_DIR}/OpenPilot GCS.app" || exit 1
|
2011-05-20 17:50:50 -05:00
|
|
|
|
2015-06-25 12:54:30 +01:00
|
|
|
hdiutil create "${OUT_FILE}" -srcfolder "${SRC_DIR}" -volname "${PACKAGE_NAME}${PACKAGE_SEP}${PACKAGE_LBL}"
|