mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
OP-1928 OSX package from scratch
Took the appropriate stuff out of the old OpenPilot.dmg and the create a dmg with it.
This commit is contained in:
parent
e48c673724
commit
518f1b25f1
Binary file not shown.
BIN
package/osx/dmg/.VolumeIcon.icns
Normal file
BIN
package/osx/dmg/.VolumeIcon.icns
Normal file
Binary file not shown.
BIN
package/osx/dmg/.background.jpg
Normal file
BIN
package/osx/dmg/.background.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 68 KiB |
BIN
package/osx/dmg/Applications
Normal file
BIN
package/osx/dmg/Applications
Normal file
Binary file not shown.
8
package/osx/dmg/Getting Started.webloc
Normal file
8
package/osx/dmg/Getting Started.webloc
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>URL</key>
|
||||
<string>http://wiki.openpilot.org/display/Doc/Getting+Started+Guide</string>
|
||||
</dict>
|
||||
</plist>
|
@ -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}"
|
||||
|
Loading…
Reference in New Issue
Block a user