Blob Blame History Raw
--- debug/org.eclipse.cdt.debug.application/scripts/cdtdebug.sh.orig	2016-11-28 00:02:54.000000000 +0000
+++ debug/org.eclipse.cdt.debug.application/scripts/cdtdebug.sh	2017-01-24 13:38:38.428205883 +0000
@@ -74,12 +74,22 @@
 done
 
 # Make sure local directory exists and has contents initialized
-if [ ! -d "$HOME/cdtdebugger" ]; then
-  /bin/sh "$SCRIPT_DIR/install.sh" || exit
+configdir=fcdtdebugger
+workspace=workspace-fcdtdebug
+os=$( ( . /etc/os-release ; echo $ID ) )
+if [ "$os" = "rhel" -o "$os" = "centos" ] ; then
+  configdir=rhcdtdebugger
+  workspace=workspace-rhcdtdebug
+fi
+if [ $0 -nt "$HOME/$configdir" ]; then
+  rm -rf $HOME/$configdir >/dev/null
+  mkdir -p $HOME/$configdir
+  cp config.ini $HOME/$configdir
+  cp dev.properties $HOME/$configdir
 fi
 
 # Calculate platform-specific jar file names
-ECLIPSE_HOME=$(cd "$SCRIPT_DIR/../../.." && pwd)  # install.sh will modify this line.  DO NOT REMOVE THE FOLLOWING MARKER: @#@#
+ECLIPSE_HOME=$(dirname $(readlink -f $(which eclipse)))
 ECLIPSE_EXEC="$ECLIPSE_HOME/eclipse"
 
 # On Mac OS X, the application layout is a bit different (Eclipse.app)
@@ -88,18 +98,30 @@
 esac
 
 PLUGIN_DIR="$ECLIPSE_HOME/plugins"
+DROPLET_NOARCH="$(cd $ECLIPSE_HOME/../../share/eclipse/droplets && pwd)"
+DROPLET_ARCHFUL="$ECLIPSE_HOME/droplets"
 OSGI_JAR=`find "$PLUGIN_DIR" -maxdepth 1 -name 'org.eclipse.osgi_*.jar' -not -name '*source*' -exec basename {} \; | tail -1`
-SWT_JAR=`find "$PLUGIN_DIR" -maxdepth 1 -name 'org.eclipse.swt.*.jar' -not -name '*source*' -exec basename {} \; | tail -1`
+LIBHOVER_JAR=`find $DROPLET_NOARCH -maxdepth 5 -name 'org.eclipse.linuxtools.cdt.libhover_*.jar' -not -name '*source*'`
+LIBHOVER_LIB_DOCS_JAR=`find $DROPLET_NOARCH -maxdepth 5 -name 'org.eclipse.linuxtools.cdt.libhover.library.docs_*.jar' -not -name '*source*'`
+LIBHOVER_GLIBC_JAR=`find $DROPLET_NOARCH -maxdepth 5 -name 'org.eclipse.linuxtools.cdt.libhover.glibc_*.jar' -not -name '*source*'`
+LAUNCHBAR_CORE_JAR=`find $DROPLET_NOARCH -maxdepth 5 -name 'org.eclipse.launchbar.core_*.jar' -not -name '*source*'`
+LAUNCHBAR_UI_JAR=`find $DROPLET_NOARCH -maxdepth 5 -name 'org.eclipse.launchbar.ui_*.jar' -not -name '*source*'`
+TERM_CONTROL_JAR=`find $DROPLET_NOARCH -maxdepth 5 -name 'org.eclipse.tm.terminal.control_*.jar' -not -name '*source*'`
+UI_VIEWS_LOG_JAR=`find $DROPLET_NOARCH -maxdepth 5 -name 'org.eclipse.ui.views.log_*.jar' -not -name '*source*'`
+SWT_JAR=`find "$PLUGIN_DIR" -maxdepth 1 -name 'org.eclipse.swt.*' -not -name '*source*' -exec basename {} \; | tail -1`
 SWT_PLUGIN=`echo $SWT_JAR | sed -e "s/_[0-9]*\..*.jar//"`
-FS_JAR=`find "$PLUGIN_DIR" -maxdepth 1 -name 'org.eclipse.core.filesystem.*.jar' -not -name '*source*' -exec basename {} \; | grep -v java7 | tail -1`
+FS_JAR=`find "$PLUGIN_DIR" -maxdepth 1 -name 'org.eclipse.core.filesystem.*' -not -name '*source*' -exec basename {} \; | grep -v java7 | tail -1`
 FS_PLUGIN=`echo $FS_JAR | sed -e "s/_[0-9]*\..*.jar//"`
-LINUX_JAR=`find "$PLUGIN_DIR" -maxdepth 1 -name 'org.eclipse.cdt.core.linux.*.jar' -not -name '*source*' -exec basename {} \; | tail -1`
+LINUX_JAR=`find $DROPLET_ARCHFUL -maxdepth 5 -name 'org.eclipse.cdt.core.linux.*.jar' -not -name '*source*' -exec basename {} \; | tail -1`
 LINUX_PLUGIN=`echo $LINUX_JAR | sed -e "s/_[0-9]*\..*.jar//"`
 
 # Run eclipse with the Stand-alone Debugger product specified
 "$ECLIPSE_EXEC" -clean -product org.eclipse.cdt.debug.application.product \
-                        -data "$HOME/workspace-cdtdebug" -configuration file\:"$HOME/cdtdebugger" \
-                        -dev file\:"$HOME/cdtdebugger/dev.properties" $options \
+                        -application org.eclipse.cdt.debug.application.app \
+                        -data "$HOME/$workspace" -configuration file\:"$HOME/$configdir" \
+                        -dev file\:"$HOME/$configdir/dev.properties" $options \
                         -vmargs -Dosgi.jar=$OSGI_JAR -Dswt.plugin=$SWT_PLUGIN -Dfs.plugin=$FS_PLUGIN \
+                        -Dlaunchbar.core=$LAUNCHBAR_CORE_JAR -Dlaunchbar.ui=$LAUNCHBAR_UI_JAR -Dui.views.log=$UI_VIEWS_LOG_JAR -Dterm.control=$TERM_CONTROL_JAR \
+                        -Dlibhover=$LIBHOVER_JAR -Dlibhover.lib.docs=$LIBHOVER_LIB_DOCS_JAR -Dlibhover.glibc=$LIBHOVER_GLIBC_JAR \
                         -Dlinux.plugin=$LINUX_PLUGIN -Declipse.home="$ECLIPSE_HOME"