From b46de4c372ec26f98e05e3bfda958bf3eed24927 Mon Sep 17 00:00:00 2001 From: Jonathan Feinberg Date: Tue, 15 Dec 2015 22:03:59 -0500 Subject: [PATCH 1/2] Make it possible to run PDE in Eclipse on Windows, or on any platform where the path may have URL-encoded characters in it. --- app/src/processing/app/Platform.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/processing/app/Platform.java b/app/src/processing/app/Platform.java index f492daad7..1303f948e 100644 --- a/app/src/processing/app/Platform.java +++ b/app/src/processing/app/Platform.java @@ -286,13 +286,13 @@ public class Platform { String decodedPath = PApplet.urlDecode(path); if (decodedPath.contains("/app/bin")) { // This means we're in Eclipse + final File build = new File(decodedPath, "../../build").getAbsoluteFile(); if (Platform.isMacOS()) { - processingRoot = - new File(path, "../../build/macosx/work/Processing.app/Contents/Java"); + processingRoot = new File(build, "macosx/work/Processing.app/Contents/Java"); } else if (Platform.isWindows()) { - processingRoot = new File(path, "../../build/windows/work"); + processingRoot = new File(build, "windows/work"); } else if (Platform.isLinux()) { - processingRoot = new File(path, "../../build/linux/work"); + processingRoot = new File(build, "linux/work"); } } else { // The .jar file will be in the lib folder From cba0e4558ec7e0c30f8cc9b76a95543553d15499 Mon Sep 17 00:00:00 2001 From: Jonathan Feinberg Date: Tue, 15 Dec 2015 22:58:44 -0500 Subject: [PATCH 2/2] Fix a bug that makes Processing fail during startup when the user's home directory has non-ASCII characters. --- app/src/processing/app/Platform.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/processing/app/Platform.java b/app/src/processing/app/Platform.java index 1303f948e..b08f62bd0 100644 --- a/app/src/processing/app/Platform.java +++ b/app/src/processing/app/Platform.java @@ -311,7 +311,8 @@ public class Platform { System.err.println("Could not find lib folder via " + jarFolder.getAbsolutePath() + ", switching to user.dir"); - processingRoot = new File(System.getProperty("user.dir")); + final String userDir = System.getProperty("user.dir"); + processingRoot = new File(PApplet.urlDecode(userDir)); } } }