176ddf9
--- ./debug/org.eclipse.cdt.debug.application/scripts/cdtdebug.sh.orig	2014-10-06 15:52:36.978351369 +0100
176ddf9
+++ ./debug/org.eclipse.cdt.debug.application/scripts/cdtdebug.sh	2014-10-06 16:32:49.816501768 +0100
176ddf9
@@ -71,26 +71,31 @@
176ddf9
 done
176ddf9
 
176ddf9
 # Make sure local directory exists and has contents initialized
176ddf9
-if [ ! -d "$HOME/cdtdebugger" ]; then
176ddf9
-  /bin/sh "$SCRIPT_DIR/install.sh" || exit
176ddf9
+if [ $0 -nt "$HOME/fcdtdebugger" ]; then
43d9a9f
+rm -rf $HOME/fcdtdebugger >/dev/null
43d9a9f
+mkdir -p $HOME/fcdtdebugger
43d9a9f
+cp config.ini $HOME/fcdtdebugger
43d9a9f
+cp dev.properties $HOME/fcdtdebugger
48ea26a
 fi
176ddf9
 
176ddf9
 # Calculate platform-specific jar file names
176ddf9
-ECLIPSE_HOME=$(cd "$SCRIPT_DIR/../../.." && pwd)  # install.sh will modify this line.  DO NOT REMOVE THE FOLLOWING MARKER: @#@#
176ddf9
+ECLIPSE_HOME="@ECLIPSE_HOME@"
176ddf9
 PLUGIN_DIR="$ECLIPSE_HOME/plugins"
176ddf9
+CDT_PLUGIN_DIR="@CDT_DROPINS@"
176ddf9
 
176ddf9
 OSGI_JAR=`find "$PLUGIN_DIR" -maxdepth 1 -name 'org.eclipse.osgi_*.jar' -not -name '*source*' -printf "%f\n" | head -1`
176ddf9
-SWT_JAR=`find "$PLUGIN_DIR" -maxdepth 1 -name 'org.eclipse.swt.*.jar' -not -name '*source*' -printf "%f\n" | head -1`
176ddf9
+SWT_JAR=`find "$PLUGIN_DIR" -maxdepth 1 -name 'org.eclipse.swt.*' -not -name '*source*' -printf "%f\n" | head -1`
48ea26a
 SWT_PLUGIN=`echo $SWT_JAR | sed -e "s/_[0-9]*\..*.jar//"`
176ddf9
 FS_JAR=`find "$PLUGIN_DIR" -maxdepth 1 -name 'org.eclipse.core.filesystem.*.jar' -not -name '*source*' -printf "%f\n" | grep -v java7 | head -1`
48ea26a
 FS_PLUGIN=`echo $FS_JAR | sed -e "s/_[0-9]*\..*.jar//"`
176ddf9
-LINUX_JAR=`find "$PLUGIN_DIR" -maxdepth 1 -name 'org.eclipse.cdt.core.linux.*.jar' -not -name '*source*' -printf "%f\n" | head -1`
176ddf9
+LINUX_JAR=`find "$CDT_PLUGIN_DIR" -maxdepth 1 -name 'org.eclipse.cdt.core.linux.*.jar' -not -name '*source*' -printf "%f\n" | head -1`
48ea26a
 LINUX_PLUGIN=`echo $LINUX_JAR | sed -e "s/_[0-9]*\..*.jar//"`
43d9a9f
 
176ddf9
 # Run eclipse with the Stand-alone Debugger product specified
176ddf9
 "$ECLIPSE_HOME/eclipse" -clean -product org.eclipse.cdt.debug.application.product \
176ddf9
-                        -data "$HOME/workspace-cdtdebug" -configuration file\:"$HOME/cdtdebugger" \
176ddf9
-                        -dev file\:"$HOME/cdtdebugger/dev.properties" $options \
176ddf9
+                        -application org.eclipse.cdt.debug.application.app \
176ddf9
+                        -data "$HOME/workspace-fcdtdebug" -configuration file\:"$HOME/fcdtdebugger" \
176ddf9
+                        -dev file\:"$HOME/fcdtdebugger/dev.properties" $options \
176ddf9
                         -vmargs -Dosgi.jar=$OSGI_JAR -Dswt.plugin=$SWT_PLUGIN -Dfs.plugin=$FS_PLUGIN \
176ddf9
                         -Dlinux.plugin=$LINUX_PLUGIN -Declipse.home="$ECLIPSE_HOME"
176ddf9
 
176ddf9
--- ./debug/org.eclipse.cdt.debug.application/scripts/install.sh.orig	2014-10-06 16:24:44.634312348 +0100
176ddf9
+++ ./debug/org.eclipse.cdt.debug.application/scripts/install.sh	2014-10-06 16:26:59.737416197 +0100
176ddf9
@@ -15,29 +15,4 @@
176ddf9
 
176ddf9
 SCRIPT_DIR=`dirname $0`
176ddf9
 
176ddf9
-if [ ! -f "$SCRIPT_DIR/../../../eclipse" ]; then
176ddf9
-  echo "$0: error: eclipse executable not found in expected location"
176ddf9
-  echo " "
176ddf9
-  echo "This can occur if you are running this script from your local .eclipse directory"
176ddf9
-  echo "which would mean you are running a shared instance of the Eclipse platform for"
176ddf9
-  echo "your distro and have installed the Stand-alone Debugger from an eclipse.org"
176ddf9
-  echo "download repo.  Downloading the Stand-alone Debugger feature on top of a distro"
176ddf9
-  echo "version of Eclipse Debugger is not supported.  If you are using a distro version"
176ddf9
-  echo "of the Eclipse platform, you should not use this script.  Instead, install the"
176ddf9
-  echo "corresponding Eclipse CDT package for your distro (e.g. eclipse-cdt package)"
176ddf9
-  echo "which will install the Stand-alone Debugger for you."
176ddf9
-  exit 1
176ddf9
-fi
176ddf9
-
176ddf9
-if [ ! -d "$HOME/cdtdebugger" ]; then
176ddf9
-  mkdir -p "$HOME/cdtdebugger"
176ddf9
-fi
176ddf9
-cp "$SCRIPT_DIR/config.ini" "$HOME/cdtdebugger"
176ddf9
-cp "$SCRIPT_DIR/dev.properties" "$HOME/cdtdebugger"
176ddf9
-cp "$SCRIPT_DIR/cdtdebug.sh" "$HOME/cdtdebugger"
176ddf9
-chmod +x "$HOME/cdtdebugger/cdtdebug.sh"
176ddf9
-
176ddf9
-ECLIPSE_HOME=$(cd "$SCRIPT_DIR/../../.." && pwd)
176ddf9
-# Replace the entire line with tag @#@# by the actual location of the eclipse installation
176ddf9
-sed -i -e "s,^.*@#@#.*$,ECLIPSE_HOME=$ECLIPSE_HOME," "$HOME/cdtdebugger/cdtdebug.sh"
176ddf9
-echo "Installation complete"
176ddf9
+echo "Installation already done"