From 3e60b4f50f0c088829895852e498012a8637236d Mon Sep 17 00:00:00 2001 From: codeanticode Date: Mon, 31 Oct 2011 22:11:34 +0000 Subject: [PATCH] Using new location of video library files in exported app --- .../video/src/processing/video/LibraryPath.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/java/libraries/video/src/processing/video/LibraryPath.java b/java/libraries/video/src/processing/video/LibraryPath.java index 15b013cf3..f166904de 100644 --- a/java/libraries/video/src/processing/video/LibraryPath.java +++ b/java/libraries/video/src/processing/video/LibraryPath.java @@ -39,6 +39,7 @@ class LibraryPath { int n0 = path.indexOf('/'); int n1 = -1; + /* if (Platform.isWindows()) { n1 = path.indexOf("/lib/video.jar"); // location of video.jar in // exported apps. @@ -52,9 +53,19 @@ class LibraryPath { } else if (Platform.isMac()) { // In Mac, getting the index of video.jar is enough in the case of sketches running from the PDE // as well as exported applications. - n1 = path.indexOf("video.jar"); - } else if (Platform.isLinux()) { + n1 = path.indexOf("video.jar"); + */ + + + if (Platform.isLinux()) { return ""; + } else { + n1 = path.indexOf("video.jar"); + if (Platform.isWindows()) { + // In Windows, path string starts with "jar file/C:/..." + // so the substring up to the first / is removed. + n0++; + } } if ((-1 < n0) && (-1 < n1)) {