diff options
author | Rusty Howell <rhowell@mono-cvs.ximian.com> | 2008-12-19 23:00:27 +0300 |
---|---|---|
committer | Rusty Howell <rhowell@mono-cvs.ximian.com> | 2008-12-19 23:00:27 +0300 |
commit | 359cc718524e5f9bdeaed998d556f5ee3fa48a33 (patch) | |
tree | 26feb6e98d46c5656d417dfc4f01ff71c72fbc8e | |
parent | cbb6595b6405bbca00c03ecaa0a424be6da8cbd3 (diff) |
* Added make app-dir target for MD
* Added resource files for OSX .app
* Still needs some refining.
svn path=/trunk/monodevelop/; revision=121884
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | main/ChangeLog | 5 | ||||
-rw-r--r-- | main/Makefile.am | 8 | ||||
-rw-r--r-- | main/build/MacOSX/Info.plist.in | 28 | ||||
-rwxr-xr-x | main/build/MacOSX/mdtool.in | 56 | ||||
-rw-r--r-- | main/build/MacOSX/monodevelop.icns | bin | 0 -> 246217 bytes | |||
-rwxr-xr-x | main/build/MacOSX/monodevelop.in | 70 | ||||
-rw-r--r-- | main/build/Makefile.am | 15 | ||||
-rw-r--r-- | main/configure.in | 5 |
9 files changed, 190 insertions, 0 deletions
@@ -45,3 +45,6 @@ test: check-addins: cd main && make check-addins + +app-dir: + cd main && make app-dir diff --git a/main/ChangeLog b/main/ChangeLog index 541e4d6489..5741d46de9 100644 --- a/main/ChangeLog +++ b/main/ChangeLog @@ -1,3 +1,8 @@ +2008-12-19 Rusty Howell <rhowell@novell.com> + + * Added 'make app-dir' as target to create OSX .app + * Added resources files for .app + 2008-12-02 Michael Hutchinson <mhutchinson@novell.com> * configure.in: Remove configure-generated AssemblyInfo.cs files. diff --git a/main/Makefile.am b/main/Makefile.am index 5c6f9a49af..7e9add0cdc 100644 --- a/main/Makefile.am +++ b/main/Makefile.am @@ -97,6 +97,14 @@ check-addins: test: cd tests/UnitTests && make test fixture=$(fixture) +app-dir: all + cd build && make app-dir +#mkdir -p $(MAC_APP_DIR)/Contents/{MacOS,Resources} +#mkdir -p $(MAC_APP_LIB_DIR) +#cp -a build/AddIns $(MAC_APP_LIB_DIR) +#cp -a build/data $(MAC_APP_LIB_DIR) +#cp -a build/bin $(MAC_APP_LIB_DIR) + # we can't use the variables that are conditionally defined EXTRA_DIST = $(bin_SCRIPTS) $(desktop_DATA) $(pixmap_DATA) \ monodevelop.xml $(pkgconfig_in_files) diff --git a/main/build/MacOSX/Info.plist.in b/main/build/MacOSX/Info.plist.in new file mode 100644 index 0000000000..213358b27e --- /dev/null +++ b/main/build/MacOSX/Info.plist.in @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>monodevelop</string> + <key>CFBundleIconFile</key> + <string>monodevelop.icns</string> + <key>CFBundleIdentifier</key> + <string>com.ximian.monodevelop</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>@VERSION@</string> + <key>CFBundleName</key> + <string>MonoDevelop</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleShortVersionString</key> + <string>@BUNDLE_VERSION@</string> + <key>CFBundleSignature</key> + <string>xmmd</string> + <key>CFBundleVersion</key> + <string>@BUNDLE_VERSION@</string> + <key>NSAppleScriptEnabled</key> + <string>NO</string> +</dict> +</plist> diff --git a/main/build/MacOSX/mdtool.in b/main/build/MacOSX/mdtool.in new file mode 100755 index 0000000000..569504621b --- /dev/null +++ b/main/build/MacOSX/mdtool.in @@ -0,0 +1,56 @@ +#!/bin/sh + +# Author: Marc Christensen (mchristensen@novell.com) + +reWrite() { + ret="" + WD=`pwd` + for arg in "$@" + do + if [ -f "./$arg" ] + then + ret="$ret '$WD/$arg'" + else + ret="$ret '$arg'" + fi + done + + echo "$ret" +} + +MD_BIN_PATH=/tmp/install/lib/monodevelop/bin + +### SYNCH BLOCK: any changes to this block should be kept in sync with the one in Makefile.include and monodevelop.in +MD_PKG_CONFIG_PATH=/tmp/build_deps/lib/pkgconfig/:/usr/lib/pkgconfig/:/usr/local/lib/pkgconfig/:/usr/share/pkgconfig/:/usr/local/share/pkgconfig/ +if test -d /usr/lib64; then MD_PKG_CONFIG_PATH=$MD_PKG_CONFIG_PATH:/usr/lib64/pkgconfig/:/usr/local/lib64/pkgconfig/; fi +### END BLOCK + +if [ -n $PKG_CONFIG_PATH ]; then + export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$MD_PKG_CONFIG_PATH +else + export PKG_CONFIG_PATH=$MD_PKG_CONFIG_PATH +fi + +eval set -- `reWrite "$@"` + +case x$1 in + x--profile) + shift + exec -a "mdtool" /tmp/build_deps/bin/mono --profile $MD_BIN_PATH/mdrun.exe "$@" + exit 0 + ;; + x--debug) + shift + export MONODEVELOP_DISPATCH_DEBUG=yes + exec -a "mdtool" /tmp/build_deps/bin/mono --debug $MD_BIN_PATH/mdrun.exe "$@" + exit 0 + ;; + x--trace) + shift + exec -a "mdtool" /tmp/build_deps/bin/mono --trace $MD_BIN_PATH/mdrun.exe "$@" + exit 0; + ;; +esac + +exec /tmp/build_deps/bin/mono $MD_BIN_PATH/mdrun.exe "$@" + diff --git a/main/build/MacOSX/monodevelop.icns b/main/build/MacOSX/monodevelop.icns Binary files differnew file mode 100644 index 0000000000..a2732d8eeb --- /dev/null +++ b/main/build/MacOSX/monodevelop.icns diff --git a/main/build/MacOSX/monodevelop.in b/main/build/MacOSX/monodevelop.in new file mode 100755 index 0000000000..dda420dff9 --- /dev/null +++ b/main/build/MacOSX/monodevelop.in @@ -0,0 +1,70 @@ +#!/bin/sh + +# Author: Marc Christensen (mchristensen@novell.com) + +# fetch the path relative to the launch point where this shell script exists. (taken from macpack) +# $0 should contain the full path from the root i.e. /Applications/<folder>.app/Contents/MacOS/<script> +APP_PATH=`echo $0 | awk '{split($0,patharr,"/"); idx=1; while(patharr[idx+3] != "") { if (patharr[idx] != "/") {printf("%s/", patharr[idx]); idx++ }} }'` + +ASSEMBLY=MonoDevelop.exe +MONO=`which mono` + +MONO_FRAMEWORK_PATH=/Library/Frameworks/Mono.framework/Versions/Current +export DYLD_FALLBACK_LIBRARY_PATH=$APP_PATH/Contents/MacOS/lib/monodevelop/bin:$MONO_FRAMEWORK_PATH/lib:/lib:/usr/lib + +MD_BIN_PATH="$APP_PATH/Contents/MacOS/lib/monodevelop/bin" +export MD_BIN_PATH + +reWrite() { + ret="" + WD=`pwd` + for arg in "$@" + do + if [ -f "./$arg" ] + then + ret="$ret '$WD/$arg'" + else + ret="$ret '$arg'" + fi + done + + echo "$ret" +} + + +### SYNCH BLOCK: any changes to this block should be kept in sync with the one in Makefile.include and mdtool.in +MD_PKG_CONFIG_PATH=$APP_PATH/Contents/MacOS/lib/pkgconfig:/tmp/build_deps/lib/pkgconfig/:/usr/lib/pkgconfig/:/usr/local/lib/pkgconfig/:/usr/share/pkgconfig/:/usr/local/share/pkgconfig/ +if test -d /usr/lib64; then MD_PKG_CONFIG_PATH=$MD_PKG_CONFIG_PATH:/usr/lib64/pkgconfig/:/usr/local/lib64/pkgconfig/; fi +### END BLOCK + +if [ -n $PKG_CONFIG_PATH ]; then + export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$MD_PKG_CONFIG_PATH +else + export PKG_CONFIG_PATH=$MD_PKG_CONFIG_PATH +fi + +eval set -- `reWrite "$@"` + +cd $MD_BIN_PATH + +case x$1 in + x--profile) + shift + exec -a "monodevelop" $MONO --profile $ASSEMBLY "$@" + exit 0 + ;; + x--debug) + shift + export MONODEVELOP_DISPATCH_DEBUG=yes + exec -a "monodevelop" $MONO --debug $ASSEMBLY "$@" + exit 0 + ;; + x--trace) + shift + exec -a "monodevelop" $MONO --trace $ASSEMBLY "$@" + exit 0; + ;; +esac + +exec -a "monodevelop" $MONO $ASSEMBLY "$@" + diff --git a/main/build/Makefile.am b/main/build/Makefile.am index ff29794d3d..f80a84f404 100644 --- a/main/build/Makefile.am +++ b/main/build/Makefile.am @@ -4,3 +4,18 @@ all: clean-local: rm -rf bin rm -rf AddIns + rm -rf MonoDevelop.app + +app-dir: + mkdir -p $(MAC_APP_DIR)/Contents/{MacOS,Resources} + mkdir -p $(MAC_APP_LIB_DIR) + cp -a AddIns $(MAC_APP_LIB_DIR) + cp -a data $(MAC_APP_LIB_DIR) + cp -a bin $(MAC_APP_LIB_DIR) + + + sed -e "s/@BUNDLE_VERSION@/$(BUNDLE_VERSION)/" MacOSX/Info.plist.in > $(MAC_APP_DIR)/Contents/Info.plist + cp MacOSX/monodevelop.icns $(MAC_APP_DIR)/Contents/Resources + cp MacOSX/monodevelop.in $(MAC_APP_DIR)/Contents/MacOS/monodevelop + cp MacOSX/mdtool.in $(MAC_APP_DIR)/Contents/MacOS/mdtool + diff --git a/main/configure.in b/main/configure.in index f2b7ef9f22..6f5f381730 100644 --- a/main/configure.in +++ b/main/configure.in @@ -198,6 +198,11 @@ fi AM_CONDITIONAL(ENABLE_MACPLATFORM, [test x$enable_macplatform = xyes]) +MAC_APP_DIR=MonoDevelop.app +MAC_APP_LIB_DIR=MonoDevelop.app/Contents/MacOS/lib/monodevelop +AC_SUBST(MAC_APP_DIR) +AC_SUBST(MAC_APP_LIB_DIR) + # Windows platform addin AC_ARG_ENABLE(windowsplatform, AC_HELP_STRING([--enable-windowsplatform], |