diff options
author | Michael Hutchinson <mhutchinson@novell.com> | 2009-02-21 02:32:06 +0300 |
---|---|---|
committer | Michael Hutchinson <mhutchinson@novell.com> | 2009-02-21 02:32:06 +0300 |
commit | 00b402d51bb7a16636b7178cce9a254a27959fd9 (patch) | |
tree | 9c3a336ee1f3a40336363abfc6368495cd956e47 /main/build | |
parent | caf13dad86da56ab5acf5b56a228048c446fe196 (diff) |
2009-02-20 Michael Hutchinson <mhutchinson@novell.com>
* monodevelop:
* mdtool: Update launch scripts from the Linux ones.
* Makefile.am: Remove Mac-incompatible addins from MonoDevelop.app.
Add dependencies to the MonoDevelop.app target so it updates.
Add a MonoDevelop.app.zip target.
svn path=/trunk/monodevelop/; revision=127595
Diffstat (limited to 'main/build')
-rw-r--r-- | main/build/MacOSX/ChangeLog | 8 | ||||
-rw-r--r-- | main/build/MacOSX/Makefile.am | 24 | ||||
-rwxr-xr-x | main/build/MacOSX/mdtool | 91 | ||||
-rwxr-xr-x | main/build/MacOSX/monodevelop | 98 |
4 files changed, 121 insertions, 100 deletions
diff --git a/main/build/MacOSX/ChangeLog b/main/build/MacOSX/ChangeLog new file mode 100644 index 0000000000..2b1f1b1366 --- /dev/null +++ b/main/build/MacOSX/ChangeLog @@ -0,0 +1,8 @@ +2009-02-20 Michael Hutchinson <mhutchinson@novell.com> + + * monodevelop: + * mdtool: Update launch scripts from the Linux ones. + * Makefile.am: Remove Mac-incompatible addins from MonoDevelop.app. + Add dependencies to the MonoDevelop.app target so it updates. + Add a MonoDevelop.app.zip target. + diff --git a/main/build/MacOSX/Makefile.am b/main/build/MacOSX/Makefile.am index 8ea28dbe37..3e180087c8 100644 --- a/main/build/MacOSX/Makefile.am +++ b/main/build/MacOSX/Makefile.am @@ -10,14 +10,17 @@ CLEANFILES = MonoDevelop.dmg noinst_DATA = MonoDevelop.dmg EXTRA_DIST = COPYING dmg-bg.png DS_Store Info.plist.in INSTALL make-dmg-bundle.sh mdtool monodevelop +all: MonoDevelop.app.zip + MonoDevelop.dmg: MonoDevelop.app ./make-dmg-bundle.sh clean-local: rm -rf MonoDevelop.app rm -rf MonoDevelop.dmg + rm -f MonoDevelop.app.zip -MonoDevelop.app: +MonoDevelop.app: ../AddIns/* ../AddIns/*/* ../AddIns/*/*/* ../bin/* ../data/*/* ../locale/*/*/* mkdir -p $(MAC_APP_DIR)/Contents/{MacOS,Resources} mkdir -p $(MAC_APP_DIR)/Contents/MacOS/{lib,share} mkdir -p $(MAC_APP_LIB_DIR) @@ -25,12 +28,12 @@ MonoDevelop.app: cp -pR ../data $(MAC_APP_LIB_DIR) cp -pR ../bin $(MAC_APP_LIB_DIR) cp -pR ../locale $(MAC_APP_DIR)/Contents/MacOS/share - + 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/monodevelop.icns $(MAC_APP_DIR)/Contents/Resources cp monodevelop $(MACOS)/monodevelop 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 @@ -45,7 +48,18 @@ MonoDevelop.app: mkdir -p $(MACOS)/share/icons cp ../../theme-icons/Mac/png/* $(MACOS)/share/icons +# Remove addins that don't work on OSX + rm -rf $(ADDINS)/GnomePlatform* \ + $(ADDINS)/WindowsPlatform* \ + $(ADDINS)/MonoDevelop.GtkCore* \ + $(ADDINS)/MonoDevelop.Moonlight* \ + $(ADDINS)/VersionControl/MonoDevelop.VersionControl.Subversion* \ + $(ADDINS)/MonoDevelop.Gettext/* + +# touch the directory so that update dependencies work + touch MonoDevelop.app + -# Remove Gettext plugin (It's broken on OSX) - rm -rf $(ADDINS)/*Gettext* +MonoDevelop.app.zip: MonoDevelop.app + zip -r9uq MonoDevelop.app.zip MonoDevelop.app diff --git a/main/build/MacOSX/mdtool b/main/build/MacOSX/mdtool index aff59aafbf..44aa98bf41 100755 --- a/main/build/MacOSX/mdtool +++ b/main/build/MacOSX/mdtool @@ -1,71 +1,70 @@ #!/bin/sh # Author: Marc Christensen (mchristensen@novell.com) -OSX_VERSION=$(uname -r | cut -f1 -d.) -MONO=`which mono` +# Michael Hutchinson (mhutchinson@novell.com) -reWrite() { - ret="" - WD=`pwd` - for arg in "$@" - do - if [ -f "./$arg" ] - then - ret="$ret '$WD/$arg'" - else - ret="$ret '$arg'" - fi - done +# 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++ }} }'` - echo "$ret" -} - -MD_BIN_PATH=/tmp/install/lib/monodevelop/bin +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 -### 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 +PREFIX="$APP_PATH/Contents/MacOS" +export PREFIX -if [ -n $PKG_CONFIG_PATH ]; then - export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$MD_PKG_CONFIG_PATH +# Work around a bug in 'exec' in older versions of macosx +OSX_VERSION=$(uname -r | cut -f1 -d.) +if [ $OSX_VERSION -lt 9 ]; then # If OSX version is 10.4 + EXEC="" else - export PKG_CONFIG_PATH=$MD_PKG_CONFIG_PATH + EXEC="exec -a mdtool" fi -eval set -- `reWrite "$@"` +## END MAC-SPECIFIC SETUP ## +### Beyond this, all is from the Linux mdtool.in, except the exec -a tweak + +MD_FORCE_DEBUG=yes -ARGS= +ARGS="" -case x$1 in - x--profile) +for arg in $*; do +case x$arg in + x--profile*) + MONO_OPTIONS="$MONO_OPTIONS $arg" shift - ARGS=--profile - #exec -a "mdtool" $MONO --profile $MD_BIN_PATH/mdrun.exe "$@" - #exit 0 ;; - x--debug) - shift + x--debug*) export MONODEVELOP_DISPATCH_DEBUG=yes - ARGS=--debug - #exec -a "mdtool" $MONO --debug $MD_BIN_PATH/mdrun.exe "$@" - #exit 0 + unset MD_FORCE_DEBUG + MONO_OPTIONS="$MONO_OPTIONS $arg" + shift ;; - x--trace) + x--trace*) + MONO_OPTIONS="$MONO_OPTIONS $arg" shift - ARGS=--trace - #exec -a "mdtool" $MONO --trace $MD_BIN_PATH/mdrun.exe "$@" - #exit 0; ;; -esac + x--no-debug) + unset MD_FORCE_DEBUG + shift + ;; + *) + ARGS="$ARGS $arg" + shift + ;; +esac +done -if [ OSX_VERSION -lt 9 ]; then # OSX 10.4 or earlier - $MONO $ASSEMBLY "$@" -else # OSX 10.5 - exec -a $MONO $MD_BIN_PATH/mdrun.exe "$@" +if [ -z MD_FORCE_DEBUG ]; then + MONO_OPTIONS="$MONO_OPTIONS --debug" fi +if [ -n "$MONO_OPTIONS" ]; then + echo "** Running with Mono options: $MONO_OPTIONS **" +fi +exec_args=" mono $MONO_OPTIONS $PREFIX/lib/monodevelop/bin/mdrun.exe $ARGS" +$EXEC $exec_args diff --git a/main/build/MacOSX/monodevelop b/main/build/MacOSX/monodevelop index af100259e2..31fe3dafad 100755 --- a/main/build/MacOSX/monodevelop +++ b/main/build/MacOSX/monodevelop @@ -1,49 +1,17 @@ #!/bin/sh # Author: Marc Christensen (mchristensen@novell.com) +# Michael Hutchinson (mhutchinson@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 "$@"` +PREFIX="$APP_PATH/Contents/MacOS" +export PREFIX # Work around a bug in 'exec' in older versions of macosx OSX_VERSION=$(uname -r | cut -f1 -d.) @@ -53,26 +21,58 @@ else EXEC="exec -a monodevelop" fi -cd $MD_BIN_PATH +## END MAC-SPECIFIC SETUP ## +### Beyond this, all is from the Linux monodevelop.in, except the exec -a tweak + +MD_FORCE_DEBUG=yes +MD_REDIRECT_LOG="$HOME/.config/MonoDevelop/log" -case x$1 in - x--profile) +ARGS="" + +for arg in $*; do +case x$arg in + x--profile*) + MONO_OPTIONS="$MONO_OPTIONS $arg" shift - $EXEC $MONO --profile $ASSEMBLY "$@" - exit 0 ;; - x--debug) - shift + x--debug*) export MONODEVELOP_DISPATCH_DEBUG=yes - $EXEC $MONO --debug $ASSEMBLY "$@" - exit 0 + unset MD_FORCE_DEBUG + MONO_OPTIONS="$MONO_OPTIONS $arg" + shift ;; - x--trace) + x--trace*) + MONO_OPTIONS="$MONO_OPTIONS $arg" shift - $EXEC $MONO --trace $ASSEMBLY "$@" - exit 0; ;; -esac + x--no-log) + unset MD_REDIRECT_LOG + shift + ;; + x--no-debug) + unset MD_FORCE_DEBUG + shift + ;; + *) + ARGS="$ARGS $arg" + shift + ;; +esac +done -$EXEC $MONO $ASSEMBLY "$@" +if [ -n "$MONO_OPTIONS" ]; then + echo "** Running with Mono options: $MONO_OPTIONS **" +fi + +if [ -z MD_FORCE_DEBUG ]; then + MONO_OPTIONS="$MONO_OPTIONS --debug" +fi +exec_args="mono $MONO_OPTIONS $PREFIX/lib/monodevelop/bin/MonoDevelop.exe $ARGS" + +if [ -n "$MD_REDIRECT_LOG" ]; then + mkdir -p `dirname "$MD_REDIRECT_LOG"` + $EXEC $exec_args 2>&1 | tee "$MD_REDIRECT_LOG" +else + $EXEC $exec_args +fi |