diff --git a/package/osx/OpenPilot.dmg b/package/osx/OpenPilot.dmg deleted file mode 100644 index d53bf09b5..000000000 Binary files a/package/osx/OpenPilot.dmg and /dev/null differ diff --git a/package/osx/dmg/.VolumeIcon.icns b/package/osx/dmg/.VolumeIcon.icns new file mode 100644 index 000000000..e4eff9371 Binary files /dev/null and b/package/osx/dmg/.VolumeIcon.icns differ diff --git a/package/osx/dmg/.background.jpg b/package/osx/dmg/.background.jpg new file mode 100644 index 000000000..28ea57730 Binary files /dev/null and b/package/osx/dmg/.background.jpg differ diff --git a/package/osx/dmg/Applications b/package/osx/dmg/Applications new file mode 100644 index 000000000..8ae5b97de Binary files /dev/null and b/package/osx/dmg/Applications differ diff --git a/package/osx/dmg/Getting Started.webloc b/package/osx/dmg/Getting Started.webloc new file mode 100644 index 000000000..330e929d0 --- /dev/null +++ b/package/osx/dmg/Getting Started.webloc @@ -0,0 +1,8 @@ + + + + + URL + http://wiki.openpilot.org/display/Doc/Getting+Started+Guide + + diff --git a/package/osx/package b/package/osx/package index 87cfea241..22e4f343b 100755 --- a/package/osx/package +++ b/package/osx/package @@ -5,57 +5,24 @@ # more variables APP_PATH="${BUILD_DIR}/openpilotgcs_release/bin/OpenPilot GCS.app" -TEMP_FILE="${PACKAGE_DIR}/OpenPilot-temp.dmg" OUT_FILE="${PACKAGE_DIR}/../${PACKAGE_NAME}${PACKAGE_SEP}${PACKAGE_LBL}${PACKAGE_SEP}osx.dmg" -VOL_NAME="OpenPilot" -# prepare the stage -rm -f "${TEMP_FILE}" -rm -f "${OUT_FILE}" +SRC_DIR="${PACKAGE_DIR}/src" -# if an OpenPilot volume is already mounted, unmount it -if [ -f "/Volumes/${VOL_NAME}" ] -then -echo "Unmount existing /Volumes/${VOL_NAME}" -hdiutil unmount "/Volumes/${VOL_NAME}" -fi - -hdiutil convert "${ROOT_DIR}/package/osx/OpenPilot.dmg" \ - -format UDRW -o "${TEMP_FILE}" -device=$(hdiutil attach "${TEMP_FILE}" | \ - egrep '^/dev/' | sed 1q | awk '{print $1}') - -#Just in case something is still mounted as ${VOL_NAME}, check the correct mount point -mountvolume=$(hdiutil info | egrep "^${device}"| egrep "${VOL_NAME}" | sed 's/.*Volumes\///;s/*//' | sed 1q) - -echo "Image mounted as /Volumes/${mountvolume}" - -if [ ! -d "/Volumes/${mountvolume}/OpenPilot GCS.app" ] -then - echo "Cannot find a valid image at /Volumes/${mountvolume}" - exit 1 -fi +# copy base dmg structure +cp -r "${ROOT_DIR}/package/osx/dmg/" "${SRC_DIR}" # packaging goes here -cp -a "${APP_PATH}" "/Volumes/${mountvolume}" +cp -a "${APP_PATH}" "${SRC_DIR}" -cp "${BUILD_DIR}/uavobject-synthetics/matlab/OPLogConvert.m" "/Volumes/${mountvolume}/Utilities" -cp "${ROOT_DIR}/WHATSNEW.txt" "/Volumes/${mountvolume}" -cp "${ROOT_DIR}/README.txt" "/Volumes/${mountvolume}/Docs" -cp "${ROOT_DIR}/MILESTONES.txt" "/Volumes/${mountvolume}/Docs" -cp "${ROOT_DIR}/LICENSE.txt" "/Volumes/${mountvolume}/Docs" -cp "${ROOT_DIR}/GPLv3.txt" "/Volumes/${mountvolume}/Docs" +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" \ - "/Volumes/${mountvolume}/OpenPilot GCS.app" || exit 1 + "${SRC_DIR}/OpenPilot GCS.app" || exit 1 -hdiutil detach ${device} - -min=`hdiutil resize ${TEMP_FILE} | awk \{print\ \$\1\}` -echo "Resizing dmg to ${min}" - -hdiutil resize -sectors ${min} ${TEMP_FILE} -hdiutil convert "${TEMP_FILE}" -format UDZO -o "${OUT_FILE}" - -# cleanup -rm "${TEMP_FILE}" +hdiutil create "${OUT_FILE}" -srcfolder "${SRC_DIR}" -volname "${PACKAGE_NAME}${PACKAGE_SEP}${PACKAGE_LBL}"