1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

OP-1928 - Fix copy to Docs and Utilites, cleanup previous build directory, DMG generation using create-dmg

This commit is contained in:
a*morale 2015-06-26 01:57:41 +02:00 committed by LibrePilot Packager
parent a69723ff74
commit d66d581f18
5 changed files with 30 additions and 6 deletions

BIN
package/osx/background.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

View File

@ -8,6 +8,11 @@ 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"
APPLICATION_NAME="OpenPilot GCS.app"
VOL_NAME="OpenPilot GCS"
# cleanup previous build
rm -rf "${SRC_DIR}"
rm -rf "${OUT_FILE}"
# copy base dmg structure
cp -r "${ROOT_DIR}/package/osx/dmg/" "${SRC_DIR}"
@ -15,14 +20,33 @@ 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"
mkdir "${SRC_DIR}/Docs/"
mkdir "${SRC_DIR}/Utilities/"
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"
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}"
"${ROOT_DIR}/package/osx/create-dmg/create-dmg" \
--volname "${VOL_NAME}" \
--volicon "${ROOT_DIR}/package/osx/VolumeIcon.icns" \
--background "${ROOT_DIR}/package/osx/background.png" \
--window-size 600 500 \
--icon-size 60 \
--icon "Getting Started.webloc" 100 380 \
--hide-extension "Getting Started.webloc" \
--icon "Docs" 250 380 \
--icon "WHATSNEW.txt" 400 380 \
--icon "Utilities" 500 380 \
--icon "${APPLICATION_NAME}" 150 215 \
--hide-extension "${APPLICATION_NAME}" \
--app-drop-link 450 215 \
--no-internet-enable \
"${OUT_FILE}" \
"${SRC_DIR}"