blob: 21ec490d37da5f745945c9eaaf5700ed93ac5550 (
plain)
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
BUNDLE_VERSION=$(VERSION)
MAC_APP_DIR=MonoDevelop.app
MACOS=$(MAC_APP_DIR)/Contents/MacOS
MAC_APP_LIB_DIR=$(MACOS)/lib/monodevelop
ADDINS=$(MACOS)/lib/monodevelop/AddIns
EXTRAS=$(top_srcdir)/../extras
ARTIFACTS=$(top_srcdir)/../../artifacts
CLEANFILES = MonoDevelop.dmg MonoDevelop.app
#DISTCLEANFILES =
EXTRA_DIST = dmg-bg.png DS_Store Info.plist.in make-dmg-bundle.sh mdtool monodevelop
all: MonoDevelop.app
MonoDevelop.dmg: MonoDevelop.app
./make-dmg-bundle.sh
clean-local:
rm -rf MonoDevelop.app
rm -f MonoDevelop.dmg
rm -f MonoDevelop.app.zip
MonoDevelop.app:
mkdir -p $(MAC_APP_DIR)/Contents/{MacOS,Resources}
mkdir -p $(MAC_APP_DIR)/Contents/MacOS/{lib,share}
mkdir -p $(MAC_APP_LIB_DIR)
cp -pR ../AddIns $(MAC_APP_LIB_DIR)
cp -pR ../data $(MAC_APP_LIB_DIR)
cp -pR ../bin $(MAC_APP_LIB_DIR)
cp -pR ../locale $(MAC_APP_DIR)/Contents/MacOS/share
mkdir -p $(MAC_APP_DIR)/Contents/MacOS/share/monodevelop
cp ../../COPYING $(MAC_APP_DIR)/Contents/MacOS/share/monodevelop/COPYING.LGPL2.1
sed -e "s/@BUNDLE_VERSION@/$(BUNDLE_VERSION)/" -e "s/@ASSEMBLY_VERSION@/$(ASSEMBLY_VERSION)/" Info.plist.in > $(MAC_APP_DIR)/Contents/Info.plist
cp ../../theme-icons/Mac/*.icns $(MAC_APP_DIR)/Contents/Resources/
cp monodevelop $(MACOS)/monodevelop
cp mono-version-check $(MACOS)/mono-version-check
cp mdtool $(MACOS)/mdtool
# copy monodevelop.pc and mono-addins.pc to Contents/MacOS/lib/pkgconfig
mkdir -p $(MACOS)/lib/pkgconfig
cp ../../*.pc $(MACOS)/lib/pkgconfig
# Copy main/monodevelop.xml to MonoDevelop.app/Contents/MacOS/share/mime/packages
mkdir -p $(MACOS)/share/{applications,mime,icons,locale,man}
mkdir -p $(MACOS)/share/mime/packages
cp ../../monodevelop.xml $(MACOS)/share/mime/packages
cp ../../monodevelop.desktop $(MACOS)/share/applications
# Remove addins that don't work on OSX
rm -rf $(ADDINS)/GnomePlatform* \
$(ADDINS)/WindowsPlatform* \
$(ADDINS)/MonoDevelop.Gettext/*
# remove stuff we don't need
rm -rf $(MACOS)/lib/monodevelop/bin/UnitTests.dll* \
$(MACOS)/lib/monodevelop/bin/TestResult.xml \
$(MACOS)/lib/monodevelop/bin/addin-db* \
$(MACOS)/lib/monodevelop/bin/local \
$(MACOS)/lib/monodevelop/bin/repository-cache* \
$(MACOS)/lib/monodevelop/AddIns/MonoDevelop.TextTemplating/Mono.TextTemplating.Tests*
# add extras known to work on Mac, if they exist
for ADDIN in MonoDevelop.IPhone MonoDevelop.MonoMac MonoDevelop.Database MonoDevelop.MonoDroid; do \
(ls $(EXTRAS)/$${ADDIN}/build/* > /dev/null 2>&1 && \
echo "Copying $${ADDIN}" && \
mkdir -p $(MAC_APP_LIB_DIR)/AddIns/$${ADDIN} && \
cp -pR $(EXTRAS)/$${ADDIN}/build/* $(MAC_APP_LIB_DIR)/AddIns/$${ADDIN}/ ) \
|| (echo "Skipping $${ADDIN}" && echo "$${ADDIN}" >> missing-stuff) ; \
done
# add the binary artifacts if they exist
mkdir -p $(MACOS)/lib/{moonlight,pkgconfig}
mkdir -p $(MACOS)/MonoDoc.app/
test ! -d $(ARTIFACTS)/MoonSDK || cp -pR $(ARTIFACTS)/MoonSDK/* $(MACOS)/lib/moonlight/
test ! -d $(ARTIFACTS)/MonoDoc.app || cp -pR $(ARTIFACTS)/MonoDoc.app/* $(MACOS)/MonoDoc.app/
# Mono stubs to make the process name and bundle location correct
mkdir -p "$(MACOS)/bin"
ln -s /Library/Frameworks/Mono.framework/Versions/Current/bin/mono "$(MACOS)/bin/monodevelop"
ln -s /Library/Frameworks/Mono.framework/Versions/Current/bin/mono "$(MACOS)/bin/mdtool"
# update revision in updateinfo
echo "a3140c14-ef90-4019-ae6c-9d93804d6611 $$(cat release-info)" > "$(MACOS)/updateinfo"
# touch the directory so that update dependencies work
touch MonoDevelop.app
@echo ""
@echo "MONODEVELOP RELEASE: $$(cat release-info)"
@echo "$$(cat ../../vcrevision)"
@if test -f missing-stuff; then echo ""; echo "Missing stuff:"; cat missing-stuff; fi
@echo ""
@rm -f missing-stuff
MonoDevelop.app.zip: MonoDevelop.app
zip -r9uq MonoDevelop.app.zip MonoDevelop.app
.PHONY: MonoDevelop.app
|