mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Remove Windows 98 Fallback and allow debugging without modify the source
Currently there is a specific branch to "fallback" for WIndows 98, this does not seem to have any relevance today. Also currently one needs to modify and recompile the source to enable debugging, this is replaced by a system property that can be set.
This commit is contained in:
parent
7f86b4a76c
commit
e15dd019f9
1 changed files with 7 additions and 12 deletions
|
@ -36,6 +36,8 @@ import org.eclipse.core.runtime.Platform;
|
||||||
*/
|
*/
|
||||||
public class ProcessFactory {
|
public class ProcessFactory {
|
||||||
|
|
||||||
|
private static final boolean DEBUG = Boolean.getBoolean("org.eclipse.cdt.utils.spawner.debug"); //$NON-NLS-1$
|
||||||
|
|
||||||
static private ProcessFactory instance;
|
static private ProcessFactory instance;
|
||||||
private boolean hasSpawner;
|
private boolean hasSpawner;
|
||||||
private Runtime runtime;
|
private Runtime runtime;
|
||||||
|
@ -255,9 +257,9 @@ public class ProcessFactory {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Process start() throws IOException {
|
public Process start() throws IOException {
|
||||||
// Uncomment the next line, set a breakpoint in the last line of debug() method,
|
if (DEBUG) {
|
||||||
// when the breakpoint is triggered, inspect the sb variable to see detailed info on what is being launched.
|
debug();
|
||||||
// debug();
|
}
|
||||||
Process p;
|
Process p;
|
||||||
if (hasSpawner) {
|
if (hasSpawner) {
|
||||||
if (use_pty) {
|
if (use_pty) {
|
||||||
|
@ -285,17 +287,10 @@ public class ProcessFactory {
|
||||||
}
|
}
|
||||||
|
|
||||||
private ProcessFactory() {
|
private ProcessFactory() {
|
||||||
hasSpawner = false;
|
|
||||||
String OS = System.getProperty("os.name").toLowerCase(); //$NON-NLS-1$
|
|
||||||
runtime = Runtime.getRuntime();
|
runtime = Runtime.getRuntime();
|
||||||
try {
|
try {
|
||||||
// Spawner does not work for Windows 98 fallback
|
System.loadLibrary("spawner"); //$NON-NLS-1$
|
||||||
if (OS != null && OS.equals("windows 98")) { //$NON-NLS-1$
|
hasSpawner = true;
|
||||||
hasSpawner = false;
|
|
||||||
} else {
|
|
||||||
System.loadLibrary("spawner"); //$NON-NLS-1$
|
|
||||||
hasSpawner = true;
|
|
||||||
}
|
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} catch (UnsatisfiedLinkError e) {
|
} catch (UnsatisfiedLinkError e) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue