-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
53 lines (46 loc) · 1.46 KB
/
Makefile
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
dist: zips dmgs
zips: clean-zips
for BUNDLE in *.bundle ; do \
BASENAME=$$(basename "$${BUNDLE}" .bundle) ; \
zip -r -9 "$${BASENAME}.zip" "$${BUNDLE}" ; \
done
dmgs: download-create-dmg clean-dmgs
set -ex ; \
for BUNDLE in *.bundle ; do \
rm -Rf .dmg ;\
mkdir .dmg ; \
cp -a "$${BUNDLE}" .dmg ; \
ln -s /Library/"Keyboard Layouts" .dmg ; \
BASENAME=$$(basename "$${BUNDLE}" .bundle) ; \
(cd .create-dmg && ./create-dmg \
--volicon "$$(find "../$${BUNDLE}" -name "*.icns")" \
--volname "$${BASENAME}" \
--background "../etc/dmg_background.png" \
--window-size 600 400 \
--icon-size 100 \
--icon "$${BUNDLE}" 120 220 \
--hide-extension "$${BUNDLE}" \
--icon "Keyboard Layouts" 480 220 \
../"$${BASENAME}.dmg" \
../.dmg/ ; \
) ; \
rm -rf .dmg ; \
done
download-create-dmg:
set -ex ; \
mkdir -p .create-dmg/support ; \
touch .create-dmg/.this-is-the-create-dmg-repo ; \
for FILE in create-dmg support/template.applescript support/eula-resources-template.xml; do \
if [ ! -f .create-dmg/$${FILE} ] ; then \
curl https://raw.githubusercontent.com/create-dmg/create-dmg/v1.2.1/$${FILE} --output .create-dmg/$${FILE} ; \
fi ; \
done ; \
chmod +x .create-dmg/create-dmg
clean-dmgs:
rm -f *.dmg
clean-zips:
rm -f *.zip
clean-create-dmg:
rm -rf .create-dmg
clean: clean-dmgs clean-zips clean-create-dmg
rm -rf .dmg