Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLluis Sanchez <lluis@novell.com>2007-12-04 13:49:22 +0300
committerLluis Sanchez <lluis@novell.com>2007-12-04 13:49:22 +0300
commit0aa95ab0ad2750a62ca248d0154b9b9f80f11de8 (patch)
tree1de0d12270990af00b94d77e7a54eac89bc36122 /main/monodevelop.in
parent7195f4926b21b46ad8e4ce1976603ffc63b49729 (diff)
Directory reorganization
svn path=/branches/monodevelop/reorg/; revision=90637
Diffstat (limited to 'main/monodevelop.in')
-rwxr-xr-xmain/monodevelop.in101
1 files changed, 101 insertions, 0 deletions
diff --git a/main/monodevelop.in b/main/monodevelop.in
new file mode 100755
index 0000000000..f54c24eed8
--- /dev/null
+++ b/main/monodevelop.in
@@ -0,0 +1,101 @@
+#!/bin/bash
+
+reWrite() {
+ ret=""
+ WD=`pwd`
+ for arg in $*
+ do
+ if [ -f ./$arg ]
+ then
+ ret="$ret $WD/$arg"
+ else
+ ret="$ret $arg"
+ fi
+ done
+
+ echo "$ret"
+}
+
+
+#(NOTE: any changes to this block should be kept in sync with the one in configure.in)
+MOZFILE="libgtkembedmoz.so"
+find_libgtkembedmoz ()
+{
+ MOZDIR=$MOZILLA_FIVE_HOME
+ if test -e "$MOZDIR/$MOZFILE"; then echo $MOZDIR; return; fi
+
+ MOZDIR=$(grep -h GRE_PATH= /etc/gre.d/*.conf 2>/dev/null | cut -d '"' -f 2 -d = | head -n 1) #"
+ if test -e "$MOZDIR/$MOZFILE"; then echo $MOZDIR; return; fi
+
+ mozilla_script=$(which mozilla 2> /dev/null)
+ firefox_script=$(which firefox 2> /dev/null)
+
+ for runtime_script in "$firefox_script $mozilla_script"; do
+ MOZDIR=$(grep "MOZ_DIST_LIB=" $runtime_script 2> /dev/null | cut -d '"' -f 2 | cut -d '=' -f 2)
+ if test -e "$MOZDIR/$MOZFILE"; then echo $MOZDIR; return; fi
+ MOZDIR=$(grep "MOZILLA_FIVE_HOME=" $runtime_script 2> /dev/null | cut -d '"' -f 2 | cut -d '=' -f 2)
+ if test -e "$MOZDIR/$MOZFILE"; then echo $MOZDIR; return; fi
+ MOZDIR=$(grep "MOZILLA_LIBDIR=" $runtime_script 2> /dev/null | cut -d '"' -f 2 | cut -d '=' -f 2)
+ if test -e "$MOZDIR/$MOZFILE"; then echo $MOZDIR; return; fi
+ MOZDIR=$(grep "moz_libdir=" $runtime_script 2> /dev/null | cut -d '"' -f 2 | cut -d '=' -f 2)
+ if test -e "$MOZDIR/$MOZFILE"; then echo $MOZDIR; return; fi
+ done
+}
+
+if test -e "@MOZILLA_HOME@/$MOZFILE"; then
+ MOZILLA_HOME=@MOZILLA_HOME@
+else
+ MOZILLA_HOME=`find_libgtkembedmoz`
+ if test ! -e "$MOZILLA_HOME/$MOZFILE"; then
+ MOZILLA_HOME=
+ echo "WARNING: Cannot find Mozilla directory containing $MOZFILE. Some Addins may not be able to function. Please set MOZILLA_FIVE_HOME to your Mozilla directory."
+ fi
+fi
+
+MD_BIN_PATH=@prefix@/lib/monodevelop/bin
+
+if [ -n $LD_LIBRARY_PATH ]; then
+ export LD_LIBRARY_PATH=$MOZILLA_HOME:$LD_LIBRARY_PATH
+else
+ export LD_LIBRARY_PATH=$MOZILLA_HOME
+fi
+
+### SYNCH BLOCK: any changes to this block should be kept in sync with the one in Makefile.am
+MD_PKG_CONFIG_PATH=@gtksharp_prefix@/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
+
+export MOZILLA_FIVE_HOME=$MOZILLA_HOME
+
+ARGS=`reWrite "$@"`
+set -- $ARGS
+
+cd $MD_BIN_PATH
+
+case x$1 in
+ x--profile)
+ shift
+ exec -a "monodevelop" @RUNTIME@ --profile ./MonoDevelop.exe $@
+ exit 0
+ ;;
+ x--debug)
+ shift
+ export MONODEVELOP_DISPATCH_DEBUG=yes
+ exec -a "monodevelop" @RUNTIME@ --debug ./MonoDevelop.exe $@
+ exit 0
+ ;;
+ x--trace)
+ shift
+ exec -a "monodevelop" @RUNTIME@ --trace ./MonoDevelop.exe $@
+ exit 0;
+ ;;
+esac
+
+exec -a "monodevelop" @RUNTIME@ ./MonoDevelop.exe $@
+