blob: d0a71d7be7e7f60e20c26ae1be04ba9fc84afbd7 (
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
|
MAC_APP_DIR=MonoDevelop.app
APP_NAME=MonoDevelop
MACOS=$(MAC_APP_DIR)/Contents/MacOS
LIB_DIR=$(MAC_APP_DIR)/Contents/Resources/lib
MAC_APP_LIB_DIR=$(LIB_DIR)/monodevelop
ADDINS=$(MAC_APP_LIB_DIR)/AddIns
EXTRAS=$(top_srcdir)/../extras
ARTIFACTS=$(top_srcdir)/../../artifacts
MD_CONFIGURE=$(top_srcdir)/../scripts/configure.sh
#SDK_PATH=$(shell xcrun --sdk macosx10.8 --show-sdk-path)
PACKAGE_UPDATE_ID=$(shell $(MD_CONFIGURE) get-releaseid)
BUNDLE_VERSION=$(shell $(MD_CONFIGURE) get-version)
CLEANFILES = render.exe
#DISTCLEANFILES =
EXTRA_DIST = dmg-bg.png DS_Store Info.plist.in make-dmg-bundle.sh render.cs
all: monostub
render.exe: render.cs
gmcs -r:System.Drawing render.cs
dmg: render.exe app
./make-dmg-bundle.sh
monostub: monostub.m $(MONOSTUB_EXTRA_SOURCES)
gcc -Wall -mmacosx-version-min=10.10 -m32 -o $@ $^ -framework AppKit
# gcc -Wall -mmacosx-version-min=10.10 -m32 -o $@ $^ -framework AppKit -isysroot $(SDK_PATH)
cp monostub ../bin/MonoDevelop
clean-local:
rm -rf MonoDevelop.app
rm -f MonoDevelop*.dmg
app: monostub
@echo ""
@echo "Creating directories in app bundle"
@echo ""
mkdir -p $(MAC_APP_DIR)/Contents/{MacOS,Resources}
mkdir -p $(MAC_APP_DIR)/Contents/MacOS/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 ../../external/fsharpbinding/bin/mac-linux/Debug $(MAC_APP_LIB_DIR)/AddIns/fsharpbinding
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)/" -e "s/@APP_NAME@/$(APP_NAME)/" -e "s|@RELEASE_ID@|$(PACKAGE_UPDATE_ID)|" 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/Resources/lib/pkgconfig
mkdir -p $(LIB_DIR)/pkgconfig
cp ../../*.pc $(LIB_DIR)/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
# Native launch scripts
@echo ""
@echo "Copying launch scripts into app bundle"
@echo ""
cp monostub $(MACOS)/MonoDevelop
cp monostub $(MACOS)/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 $(MAC_APP_LIB_DIR)/bin/UnitTests.dll* \
$(MAC_APP_LIB_DIR)/bin/TestResult.xml \
$(MAC_APP_LIB_DIR)/bin/addin-db* \
$(MAC_APP_LIB_DIR)/bin/local \
$(MAC_APP_LIB_DIR)/bin/repository-cache* \
$(MAC_APP_LIB_DIR)/bin/addins-setup.config \
$(MAC_APP_LIB_DIR)/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 $(LIB_DIR)/pkgconfig
mkdir -p $(MACOS)/MonoDoc.app/
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 ""
$(MD_CONFIGURE) gen-buildinfo "$(MAC_APP_LIB_DIR)/bin"
# touch the directory so that update dependencies work
touch MonoDevelop.app
@echo ""
@cat "$(MAC_APP_LIB_DIR)/bin/buildinfo"
@if test -f missing-stuff; then echo ""; echo "Missing stuff:"; cat missing-stuff; fi
@echo ""
@rm -f missing-stuff
.PHONY: app dmg
|