From 7638e2b6e5c925847b7ad7413550aaf046321e55 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 21 Aug 2014 17:18:59 -0400 Subject: [PATCH] Kill program before debugging C++ so file upload doesn't fail Change-Id: Ibd4fdb6cbf491f20d66f36c4fb84753a1abbfd1e --- .../plugins/cpp/launching/DeployLaunchShortcut.java | 5 +++++ .../src/main/resources/cpp-zip/ant/build.xml | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/eclipse-plugins/edu.wpi.first.wpilib.plugins.cpp/src/main/java/edu/wpi/first/wpilib/plugins/cpp/launching/DeployLaunchShortcut.java b/eclipse-plugins/edu.wpi.first.wpilib.plugins.cpp/src/main/java/edu/wpi/first/wpilib/plugins/cpp/launching/DeployLaunchShortcut.java index 2aeed5c069..6062e02ad7 100644 --- a/eclipse-plugins/edu.wpi.first.wpilib.plugins.cpp/src/main/java/edu/wpi/first/wpilib/plugins/cpp/launching/DeployLaunchShortcut.java +++ b/eclipse-plugins/edu.wpi.first.wpilib.plugins.cpp/src/main/java/edu/wpi/first/wpilib/plugins/cpp/launching/DeployLaunchShortcut.java @@ -111,6 +111,11 @@ public class DeployLaunchShortcut implements ILaunchShortcut // Debug deploys are done with the Eclipse Remote System Explorer, // which lets it work with Eclipse's C++ debugger. + // Kill running program before using RSE as RSE can't + WPILibCPPPlugin.logInfo("Running ant file: " + activeProj.getLocation().toOSString() + File.separator + "build.xml"); + WPILibCPPPlugin.logInfo("Targets: kill-program, Mode: " + mode); + AntLauncher.runAntFile(new File (activeProj.getLocation().toOSString() + File.separator + "build.xml"), "kill-program", null, mode); + // TODO: figure out UI issues. that's why this is undocumented ILaunchConfigurationWorkingCopy config; try { diff --git a/eclipse-plugins/edu.wpi.first.wpilib.plugins.cpp/src/main/resources/cpp-zip/ant/build.xml b/eclipse-plugins/edu.wpi.first.wpilib.plugins.cpp/src/main/resources/cpp-zip/ant/build.xml index eb6f64efdd..68583c6534 100644 --- a/eclipse-plugins/edu.wpi.first.wpilib.plugins.cpp/src/main/resources/cpp-zip/ant/build.xml +++ b/eclipse-plugins/edu.wpi.first.wpilib.plugins.cpp/src/main/resources/cpp-zip/ant/build.xml @@ -48,6 +48,14 @@ trust="true" command="tail -F -s 0 -n 0 ${deploy.log.file}"/> + + + + [athena-deploy] Killing running program