--- debug/org.eclipse.cdt.debug.application/scripts/cdtdebug.sh.orig 2017-06-18 14:05:04.584935592 +0100 +++ debug/org.eclipse.cdt.debug.application/scripts/cdtdebug.sh 2017-06-18 14:12:18.867312248 +0100 @@ -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 macOS, the application layout is a bit different (Eclipse.app) @@ -90,9 +100,20 @@ PLUGIN_DIR="$ECLIPSE_HOME/plugins" OSGI_JAR=`find "$PLUGIN_DIR" -maxdepth 1 -name 'org.eclipse.osgi_*.jar' -not -name '*source*' -exec basename {} \; | tail -1` +DROPLET_NOARCH="$(cd $ECLIPSE_HOME/../../share/eclipse/droplets && pwd)" +DROPLET_ARCHFUL="$ECLIPSE_HOME/droplets" + +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*'` + + # 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 \ - -vmargs -Dosgi.jar=$OSGI_JAR -Declipse.home="$ECLIPSE_HOME" + -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 -Declipse.home="$ECLIPSE_HOME" \ + -Dlaunchbar.core=$LAUNCHBAR_CORE_JAR -Dlaunchbar.ui=$LAUNCHBAR_UI_JAR -Dui.views.log=$UI_VIEWS_LOG_JAR -Dtm.terminal.control=$TERM_CONTROL_JAR