-
Notifications
You must be signed in to change notification settings - Fork 14
/
create_dmg.sh
executable file
·39 lines (32 loc) · 749 Bytes
/
create_dmg.sh
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
32
33
34
35
36
37
38
39
#!/bin/bash
VERSION="2.0"
NAME="Geany"
ICONNAME="Geany.icns"
VOLNAME="${NAME} ${VERSION}"
DMGNAME="geany-${VERSION}_osx.dmg"
APPNAME="${NAME}.app"
TMPDIR="tmp-out"
FILE_TYPE=`file Geany.app/Contents/MacOS/geany`
if [[ "$FILE_TYPE" == *"arm64"* ]]; then
DMGNAME="geany-${VERSION}_osx_arm64.dmg"
fi
mkdir "$TMPDIR"
cp -R "$APPNAME" "$TMPDIR"
test -f "$DMGNAME" && rm "$DMGNAME"
create-dmg \
--volname "$VOLNAME" \
--volicon "$ICONNAME" \
--window-pos 200 120 \
--window-size 700 350 \
--icon-size 128 \
--icon $APPNAME 180 150 \
--hide-extension "$APPNAME" \
--app-drop-link 520 150 \
--format UDBZ \
"$DMGNAME" \
"$TMPDIR"
rm -rf "${TMPDIR}"
if [ -n "$SIGN_CERTIFICATE" ]
then
codesign -s "$SIGN_CERTIFICATE" --options runtime "$DMGNAME"
fi