replace existing files with saveBytes(), also look into deployJava.js (issue #650)

This commit is contained in:
benfry
2011-06-21 01:23:49 +00:00
parent 47ae658028
commit c159f0eb04
6 changed files with 53 additions and 18 deletions

View File

@@ -783,17 +783,22 @@ public class JavaBuild {
sketch.hasCodeFolder() ||
javaLibraryPath.length() != 0;
File skeletonFolder = mode.getContentFile("applet");
// Copy the loading gif to the applet
String LOADING_IMAGE = "loading.gif";
// Check if the user already has their own loader image
File loadingImage = new File(sketch.getFolder(), LOADING_IMAGE);
if (!loadingImage.exists()) {
// File skeletonFolder = new File(Base.getContentFile("lib"), "export");
File skeletonFolder = mode.getContentFile("applet");
loadingImage = new File(skeletonFolder, LOADING_IMAGE);
}
Base.copyFile(loadingImage, new File(appletFolder, LOADING_IMAGE));
// not a good idea after all
// File deployFile = new File(skeletonFolder, "deployJava.js");
// Base.copyFile(deployFile, new File(appletFolder, "deployJava.js"));
// Create new .jar file
FileOutputStream zipOutputFile =
new FileOutputStream(new File(appletFolder, sketch.getName() + ".jar"));