diff options
author | Michael Hutchinson <mhutchinson@novell.com> | 2011-02-16 08:10:13 +0300 |
---|---|---|
committer | Michael Hutchinson <mhutchinson@novell.com> | 2011-02-16 08:10:13 +0300 |
commit | e3212873c27ebcc8fbd89c9651812ff2ea1c5b4d (patch) | |
tree | 3d927746abf24bd455e2307762032acf3f41e238 /main/build | |
parent | 931f9dc5e65f96d8e0d295bf24e654a5becd82ba (diff) |
[Mac] Merge entire install prefix into app bundle
This allows us to use a newer Mono.Addins than is installed on
the system.
Note that the entire prefix is merged into the app bundle. Previous
changes allow MD to automatically pick up everything installed in
the prefix at configure time and build time, and with "make run".
Launch scripts now pick up the prefix within the app bundle.
Diffstat (limited to 'main/build')
-rw-r--r-- | main/build/MacOSX/Makefile.am | 69 | ||||
-rwxr-xr-x | main/build/MacOSX/mdtool | 7 | ||||
-rwxr-xr-x | main/build/MacOSX/monodevelop | 6 |
3 files changed, 65 insertions, 17 deletions
diff --git a/main/build/MacOSX/Makefile.am b/main/build/MacOSX/Makefile.am index ae8c859ac8..4083c35ab5 100644 --- a/main/build/MacOSX/Makefile.am +++ b/main/build/MacOSX/Makefile.am @@ -21,39 +21,74 @@ clean-local: 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/ - 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 + +# 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* \ $(ADDINS)/MonoDevelop.Gettext/* # 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* \ @@ -62,6 +97,10 @@ MonoDevelop.app: $(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.IPhone MonoDevelop.MonoMac MonoDevelop.Database MonoDevelop.MonoDroid; do \ (ls $(EXTRAS)/$${ADDIN}/build/* > /dev/null 2>&1 && \ echo "Copying $${ADDIN}" && \ @@ -71,6 +110,10 @@ MonoDevelop.app: 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/ @@ -78,17 +121,15 @@ MonoDevelop.app: cp -r MDMonitor.app $(MACOS) -# 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" - # 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" + @cat ../bin/buildinfo >> "$(MACOS)/lib/monodevelop/bin/buildinfo" # touch the directory so that update dependencies work touch MonoDevelop.app diff --git a/main/build/MacOSX/mdtool b/main/build/MacOSX/mdtool index 7f6fe40a62..387d2b4b7f 100755 --- a/main/build/MacOSX/mdtool +++ b/main/build/MacOSX/mdtool @@ -16,8 +16,11 @@ DIR=$(cd "$(dirname "$0")"; pwd) EXE_PATH="$DIR/lib/monodevelop/bin/mdrun.exe" -PKG_CONFIG_PATH="$DIR/lib/pkgconfig:$PKG_CONFIG_PATH" -export PKG_CONFIG_PATH +#use stuff bundled into the app bundle +export MONO_GAC_PREFIX="$DIR:$MONO_GAC_PREFIX" +export PATH="$DIR/bin:$PATH" +export DYLD_FALLBACK_LIBRARY_PATH="$DIR/lib:$DYLD_FALLBACK_LIBRARY_PATH" +export PKG_CONFIG_PATH="$DIR/lib/pkgconfig:$DIR/share/pkgconfig:$PKG_CONFIG_PATH" # The Mono "External" folder allows users (such as MonoDroid) to install # things without worrying that they'll be removed next time mono is upgraded diff --git a/main/build/MacOSX/monodevelop b/main/build/MacOSX/monodevelop index 62f68e176f..cb5101c887 100755 --- a/main/build/MacOSX/monodevelop +++ b/main/build/MacOSX/monodevelop @@ -17,7 +17,11 @@ DIR=$(cd "$(dirname "$0")"; pwd) # $0 should contain the full path from the root i.e. /Applications/<folder>.app/Contents/MacOS/<script> EXE_PATH="$DIR/lib/monodevelop/bin/MonoDevelop.exe" -export PKG_CONFIG_PATH="$DIR/lib/pkgconfig:$PKG_CONFIG_PATH" +#use stuff bundled into the app bundle +export MONO_GAC_PREFIX="$DIR:$MONO_GAC_PREFIX" +export PATH="$DIR/bin:$PATH" +export DYLD_FALLBACK_LIBRARY_PATH="$DIR/lib:$DYLD_FALLBACK_LIBRARY_PATH" +export PKG_CONFIG_PATH="$DIR/lib/pkgconfig:$DIR/share/pkgconfig:$PKG_CONFIG_PATH" #mono version check if ! "$DIR/mono-version-check" MonoDevelop 2 6 7 ; then exit 1; fi |