blob: 7797259d029a7670e452e390ed874e84dad3b6d7 (
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
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:
@echo ""
@echo "Creating directories in app bundle"
@echo ""
mkdir -p $(MAC_APP_DIR)/Contents/{MacOS,Resources}
mkdir -p $(MAC_APP_DIR)/Contents/MacOS/{lib,share}
mkdir -p $(MAC_APP_LIB_DIR)
@echo ""
@echo "Copying install prefix into app bundle"
@echo ""
@if [[ "$(prefix)" == /Library* ]] || [[ "$(prefix)" == /usr* ]]; then \
echo "WARNING: cannot merge system prefix $(prefix)"; \
else \
echo "cp -pR $(prefix)/* $(MAC_APP_DIR)/Contents/MacOS/"; \
cp -pR $(prefix)/* $(MAC_APP_DIR)/Contents/MacOS/; \
fi
@echo ""
@echo "Copying MonoDevelop into app bundle"
@echo ""
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/
# copy monodevelop.pc and monodevelop-core-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
#launch scripts
@echo ""
@echo "Copying launch scripts into app bundle"
@echo ""
cp monodevelop $(MACOS)/monodevelop
cp mono-version-check $(MACOS)/mono-version-check
cp mdtool $(MACOS)/mdtool
# Mono stubs to make the process name and bundle location correct
rm -rf "$(MACOS)/bin"
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"
# Remove addins that don't work on OSX
@echo ""
@echo "Removing unsupported addins"
@echo ""
rm -rf $(ADDINS)/GnomePlatform* \
$(ADDINS)/WindowsPlatform*
# remove stuff we don't need
@echo ""
@echo "Removing unneeded files"
@echo ""
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/bin/addins-setup.config \
$(MACOS)/lib/monodevelop/AddIns/MonoDevelop.TextTemplating/Mono.TextTemplating.Tests*
# add extras known to work on Mac, if they exist
@echo ""
@echo "Copying supported extras into app bundle"
@echo ""
@for ADDIN in MonoDevelop.Database; 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
@echo ""
@echo "Copying binary artifacts into app bundle"
@echo ""
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/
cp -r MDMonitor.app $(MACOS)
# update revision in updateinfo
@echo ""
@echo "Updating build information"
@echo ""
echo "a3140c14-ef90-4019-ae6c-9d93804d6611 $$(cat release-info)" > "$(MACOS)/updateinfo"
echo "Release ID: $$(cat release-info)" > "$(MACOS)/lib/monodevelop/bin/buildinfo"
@cat ../bin/buildinfo >> "$(MACOS)/lib/monodevelop/bin/buildinfo"
# 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 -r9uyq MonoDevelop.app.zip MonoDevelop.app
update-png:
/Applications/Inkscape.app/Contents/Resources/script --without-gui --export-png=`pwd`/dmg-bg.png `pwd`/dmg-bg.svg
.PHONY: MonoDevelop.app
|