fix launcher error, also core.jar location difference between osx and

linux/windows
This commit is contained in:
benfry
2008-10-15 11:59:17 +00:00
parent 4099670f49
commit 68b22d96ea
4 changed files with 27 additions and 7 deletions

View File

@@ -173,6 +173,8 @@ public class Base {
platformClass = Class.forName("processing.app.macosx.Platform");
} else if (Base.isWindows()) {
platformClass = Class.forName("processing.app.windows.Platform");
} else if (Base.isLinux()) {
platformClass = Class.forName("processing.app.linux.Platform");
}
platform = (Platform) platformClass.newInstance();
} catch (Exception e) {

View File

@@ -1697,7 +1697,9 @@ public class Sketch {
}
}
File bagelJar = Base.getContentFile("core.jar");
File bagelJar = Base.isMacOS() ?
Base.getContentFile("core.jar") :
Base.getContentFile("lib/core.jar");
if (separateJar) {
Base.copyFile(bagelJar, new File(appletFolder, "core.jar"));
archives.append(",core.jar");
@@ -2134,8 +2136,9 @@ public class Sketch {
/// add core.jar to the jar destination folder
//System.out.println(jarFolder);
File bagelJar = Base.getContentFile("core.jar");
File bagelJar = Base.isMacOS() ?
Base.getContentFile("core.jar") :
Base.getContentFile("lib/core.jar");
Base.copyFile(bagelJar, new File(jarFolder, "core.jar"));
jarListVector.add("core.jar");

View File

@@ -70,7 +70,7 @@ public class Platform extends processing.app.Platform {
Process p = Runtime.getRuntime().exec(new String[] { "gnome-open" });
/*int result =*/ p.waitFor();
// Not installed will throw an IOException (JDK 1.4.2, Ubuntu 7.04)
Preferences.set("launcher.linux", "gnome-open");
Preferences.set("launcher", "gnome-open");
return true;
} catch (Exception e) { }
@@ -78,7 +78,7 @@ public class Platform extends processing.app.Platform {
try {
Process p = Runtime.getRuntime().exec(new String[] { "kde-open" });
/*int result =*/ p.waitFor();
Preferences.set("launcher.linux", "kde-open");
Preferences.set("launcher", "kde-open");
return true;
} catch (Exception e) { }
@@ -87,6 +87,18 @@ public class Platform extends processing.app.Platform {
public void openFolder(File file) throws Exception {
if (openFolderAvailable()) {
String lunch = Preferences.get("launcher");
try {
String[] params = new String[] { lunch, file.getAbsolutePath() };
//processing.core.PApplet.println(params);
Process p = Runtime.getRuntime().exec(params);
/*int result =*/ //p.waitFor();
} catch (Exception e) {
e.printStackTrace();
}
} else {
System.out.println("not available");
}
}
}

View File

@@ -7,7 +7,7 @@ releases will be super crusty.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ABOUT REV 0149 - 14 October 2008
ABOUT REV 0149 - 15 October 2008
Very large number of bug fixes and changes. All renderers that use
PGraphics will need to be updated for this release. That means you'll
@@ -159,6 +159,9 @@ Also many, many updates to the examples and reference in this release.
+ "IllegalMonitorStateException: current thread not owner" with delay()
http://dev.processing.org/bugs/show_bug.cgi?id=894
+ Fix "Show Sketch Folder" on Linux, and prevent launcher error whenever
exporting a sketch on Linux. (Regression since ~0140)
+ Make parseFloat() with String[] array return NaN for missing values
http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Syntax;action=display;num=1220880375