1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-20 05:52:11 +01:00

29 lines
1008 B
Plaintext
Raw Normal View History

#!/bin/bash
# the following environment variables must be set
: ${ROOT_DIR?} ${BUILD_DIR?} ${PACKAGE_LBL?} ${PACKAGE_DIR?} ${PACKAGE_NAME?} ${PACKAGE_SEP?}
# more variables
APP_PATH="${BUILD_DIR}/openpilotgcs_release/bin/OpenPilot GCS.app"
OUT_FILE="${PACKAGE_DIR}/../${PACKAGE_NAME}${PACKAGE_SEP}${PACKAGE_LBL}${PACKAGE_SEP}osx.dmg"
SRC_DIR="${PACKAGE_DIR}/src"
# copy base dmg structure
cp -r "${ROOT_DIR}/package/osx/dmg/" "${SRC_DIR}"
# packaging goes here
cp -a "${APP_PATH}" "${SRC_DIR}"
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"
"${ROOT_DIR}/package/osx/libraries" \
"${SRC_DIR}/OpenPilot GCS.app" || exit 1
hdiutil create "${OUT_FILE}" -srcfolder "${SRC_DIR}" -volname "${PACKAGE_NAME}${PACKAGE_SEP}${PACKAGE_LBL}"