@@ -975,27 +975,6 @@ protected boolean exportApplication(File destFolder,
975975 if (!jarFolder .exists ()) jarFolder .mkdirs ();
976976
977977
978- /*
979- /// on windows, copy the exe file
980-
981- if (exportPlatform == PConstants.WINDOWS) {
982- if (exportBits == 64) {
983- // We don't yet have a 64-bit launcher, so this is a workaround for now.
984- File batFile = new File(destFolder, sketch.getName() + ".bat");
985- PrintWriter writer = PApplet.createWriter(batFile);
986- writer.println("@echo off");
987- String javaPath = embedJava ? ".\\java\\bin\\java.exe" : "java";
988- writer.println(javaPath + " -Djna.nosys=true -Djava.ext.dirs=lib -Djava.library.path=lib " + sketch.getName());
989- writer.flush();
990- writer.close();
991- } else {
992- Base.copyFile(mode.getContentFile("application/template.exe"),
993- new File(destFolder, sketch.getName() + ".exe"));
994- }
995- }
996- */
997-
998-
999978 /// start copying all jar files
1000979
1001980 Vector <String > jarListVector = new Vector <String >();
@@ -1135,12 +1114,15 @@ protected boolean exportApplication(File destFolder,
11351114 // https://github.com/processing/processing/issues/2239
11361115 runOptions .add ("-Djna.nosys=true" );
11371116 // https://github.com/processing/processing/issues/4608
1138- if (exportPlatform == PConstants .MACOSX ) {
1139- runOptions .add ("-Djava.ext.dirs=$APP_ROOT/Contents/PlugIns/jdk" + PApplet .javaVersionName + ".jdk/Contents/Home/jre/lib/ext" );
1140- } else if (exportPlatform == PConstants .WINDOWS ) {
1141- runOptions .add ("-Djava.ext.dirs=%EXEDIR%/java/lib/ext" );
1142- } else if (exportPlatform == PConstants .LINUX ) {
1143- runOptions .add ("-Djava.ext.dirs=$APPDIR/java/lib/ext" );
1117+ if (embedJava ) {
1118+ // if people don't embed Java, it might be a mess, but what can we do
1119+ if (exportPlatform == PConstants .MACOSX ) {
1120+ runOptions .add ("-Djava.ext.dirs=$APP_ROOT/Contents/PlugIns/jdk" + PApplet .javaVersionName + ".jdk/Contents/Home/jre/lib/ext" );
1121+ } else if (exportPlatform == PConstants .WINDOWS ) {
1122+ runOptions .add ("-Djava.ext.dirs=%EXEDIR%/java/lib/ext" );
1123+ } else if (exportPlatform == PConstants .LINUX ) {
1124+ runOptions .add ("-Djava.ext.dirs=$APPDIR/java/lib/ext" );
1125+ }
11441126 }
11451127
11461128 // https://github.com/processing/processing/issues/2559
0 commit comments