3 # the following environment variables must be set
4 : ${ROOT_DIR?} ${BUILD_DIR?} ${PACKAGE_LBL?} ${PACKAGE_DIR?} ${PACKAGE_NAME?} ${PACKAGE_SEP?}
7 APP_PATH
="${BUILD_DIR}/${GCS_SMALL_NAME}_release/${GCS_BIG_NAME}.app"
8 OUT_FILE
="${PACKAGE_DIR}/../${PACKAGE_NAME}${PACKAGE_SEP}${PACKAGE_LBL}${PACKAGE_SEP}osx.dmg"
10 SRC_DIR
="${PACKAGE_DIR}/src"
11 APPLICATION_NAME
="${GCS_BIG_NAME}.app"
12 VOL_NAME
="${GCS_BIG_NAME}"
13 # cleanup previous build
17 # copy base dmg structure
18 cp -r "${ROOT_DIR}/package/osx/dmg/" "${SRC_DIR}"
19 sed -i '' s
/@URL@
/$
(echo ${WIKI_URL_ROOT} |
sed -e 's/\\/\\\\/g' -e 's/\//\\\//g' -e 's/&/\\\&/g')/ "${SRC_DIR}/Getting Started.webloc"
22 cp -a "${APP_PATH}" "${SRC_DIR}"
24 mkdir
"${SRC_DIR}/Docs/"
25 mkdir
"${SRC_DIR}/Utilities/"
27 cp "${BUILD_DIR}/uavobject-synthetics/matlab/OPLogConvert.m" "${SRC_DIR}/Utilities/"
28 cp "${ROOT_DIR}/WHATSNEW.txt" "${SRC_DIR}"
29 cp "${ROOT_DIR}/README.md" "${SRC_DIR}/Docs/README.txt"
30 cp "${ROOT_DIR}/MILESTONES.txt" "${SRC_DIR}/Docs/"
31 cp "${ROOT_DIR}/LICENSE.txt" "${SRC_DIR}/Docs/"
32 cp "${ROOT_DIR}/GPLv3.txt" "${SRC_DIR}/Docs/"
34 "${ROOT_DIR}/package/osx/libraries" \
35 "${SRC_DIR}/${APPLICATION_NAME}" ||
exit 1
37 "${ROOT_DIR}/package/osx/create-dmg/create-dmg" \
38 --volname "${VOL_NAME}" \
39 --volicon "${ROOT_DIR}/package/osx/VolumeIcon.icns" \
40 --background "${ROOT_DIR}/package/osx/background.png" \
41 --window-size 600 500 \
43 --icon "Getting Started.webloc" 110 380 \
44 --hide-extension "Getting Started.webloc" \
45 --icon "Docs" 250 380 \
46 --icon "WHATSNEW.txt" 400 380 \
47 --icon "Utilities" 500 380 \
48 --icon "${APPLICATION_NAME}" 150 215 \
49 --hide-extension "${APPLICATION_NAME}" \
50 --app-drop-link 450 215 \
51 --no-internet-enable \