-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile.macos
54 lines (48 loc) · 1.19 KB
/
Makefile.macos
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
54
MV=/bin/mv
RM=/bin/rm
MKDIR=/bin/mkdir
DITTO=/usr/bin/ditto
PLUTIL=/usr/bin/plutil
HDIUTIL=/usr/bin/hdiutil
PLATYPUS=/usr/local/bin/platypus
WHERE=mac
APP=$(WHERE)/Onyx.app
APPCON=$(APP)/Contents
APPOBJ=$(APPCON)/MacOS
.PHONY: default clean
# This Makefile requires Makefile.generic to have already run, since it
# just packages that binary.
Onyx.dmg: onyx clean
$(MKDIR) -p $(WHERE)
$(PLATYPUS) -a Onyx \
-I com.floodgap.onyx \
-i '' \
-c mac-onyx-inst \
-o "Progress Bar" \
-p /bin/sh \
-V 0.9.2.1 \
-u "Cameron Kaiser" \
-y $(APP)
#
# Manually fix the bundle so that everything is in the same
# places as prior versions for backwards compatibility. This means
# using a custom Info.plist and moving a few things around.
#
$(MV) $(APPOBJ)/Onyx $(APPOBJ)/onyx-inst
$(DITTO) Info.plist $(APPCON)
$(PLUTIL) -convert binary1 $(APPCON)/Info.plist
$(DITTO) onyx $(APP)/Contents/MacOS
#
# Build disk image.
#
$(DITTO) "Mac Read Me.rtf" $(WHERE)
$(HDIUTIL) create -sectors 6000 \
-fs HFS+ -fsargs "-c c=64,a=16,e=16" \
-volname "Overbite Onyx for macOS" \
-srcfolder $(WHERE) \
-format UDBZ \
Onyx.dmg
onyx:
$(MAKE) -f Makefile.generic
clean:
$(RM) -rf $(WHERE) Onyx.dmg