-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate-dmg.sh
More file actions
executable file
·31 lines (26 loc) · 959 Bytes
/
generate-dmg.sh
File metadata and controls
executable file
·31 lines (26 loc) · 959 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
set -ex
cd "$(dirname "$(readlink -f "$0")")"
DARWIN_APP_NAME="goTApaper.app"
BUNDLE_DIR="./bin/bundle"
VERSION="$1"
ARCH="$2"
DMG_FILE="./bin/goTApaper-${VERSION}-${ARCH}.dmg"
test -d "$BUNDLE_DIR" && rm -rf "$BUNDLE_DIR"
test -f "$DMG_FILE" && rm "$DMG_FILE"
mkdir -p "$BUNDLE_DIR" && \
cp -r -f ./contrib/${DARWIN_APP_NAME} "${BUNDLE_DIR}" && \
cp -f "./bin/goTApaper-${VERSION}-darwin-${ARCH}" "${BUNDLE_DIR}/${DARWIN_APP_NAME}/Contents/MacOS/goTApaper" && \
create-dmg \
--volname "goTApaper" \
--volicon "./contrib/goTApaper.app/Contents/Resources/goTApaper.icns" \
--background "./contrib/dmg-installer-background.png" \
--window-pos 200 120 \
--window-size 1024 560 \
--icon-size 110 \
--icon "${DARWIN_APP_NAME}" 346 270 \
--hide-extension "${DARWIN_APP_NAME}" \
--app-drop-link 686 270 \
--hdiutil-verbose \
"${DMG_FILE}" \
"${BUNDLE_DIR}/goTApaper.app"