diff --git a/stable-download/stable-download.zip b/stable-download/stable-download.zip index 6c8c4d5..0412a69 100644 Binary files a/stable-download/stable-download.zip and b/stable-download/stable-download.zip differ diff --git a/stable-download/stable-download_repl.zip b/stable-download/stable-download_repl.zip index 390a6a2..a781a45 100644 Binary files a/stable-download/stable-download_repl.zip and b/stable-download/stable-download_repl.zip differ diff --git a/zip-generator/repl_worker_bootstrap.js b/zip-generator/repl_worker_bootstrap.js new file mode 100644 index 0000000..4e5494a --- /dev/null +++ b/zip-generator/repl_worker_bootstrap.js @@ -0,0 +1,6 @@ +"use strict"; +onmessage = function(o) { +var eaglercraftServerOpts = o.data; +${classes_server} +main(); +}; \ No newline at end of file diff --git a/zip-generator/src/main/java/net/lax1dude/eaglercraft/zip_generator/ZipGenerator.java b/zip-generator/src/main/java/net/lax1dude/eaglercraft/zip_generator/ZipGenerator.java index dde426e..da32b6d 100644 --- a/zip-generator/src/main/java/net/lax1dude/eaglercraft/zip_generator/ZipGenerator.java +++ b/zip-generator/src/main/java/net/lax1dude/eaglercraft/zip_generator/ZipGenerator.java @@ -100,12 +100,23 @@ public class ZipGenerator { zOut = new ZipOutputStream(new FileOutputStream(new File("stable-download/stable-download_repl.zip"))); zOut.setLevel(9); - zipFolder(zOut, "web", new File("stable-download/web"), "web/classes.js", "web/eagswebrtc.js", "web/index.html"); + zipFolder(zOut, "web", new File("stable-download/web"), "web/classes.js", "web/classes_server.js", + "web/worker_bootstrap.js", "web/eagswebrtc.js", "web/index.html", "web/classes.js.map", + "web/classes_server.js.map"); + zipFolder(zOut, "java", new File("stable-download/java")); zOut.putNextEntry(new ZipEntry("web/classes.js")); IOUtils.write(classesJs + "\n" + classesWebRTCJs, zOut, "UTF-8"); + if(classesServerJs.startsWith("\"use strict\";")) { + classesServerJs = classesServerJs.substring(13).trim(); + } + + zOut.putNextEntry(new ZipEntry("web/worker_bootstrap.js")); + IOUtils.write(FileUtils.readFileToString(new File("zip-generator/repl_worker_bootstrap.js"), "UTF-8") + .replace("${classes_server}", classesServerJs), zOut, "UTF-8"); + zOut.putNextEntry(new ZipEntry("web/index.html")); IOUtils.write(FileUtils.readFileToByteArray(new File("zip-generator/repl_index.html")), zOut); diff --git a/zip-generator/zipGenerator.jar b/zip-generator/zipGenerator.jar index 3173f4e..8766e3b 100644 Binary files a/zip-generator/zipGenerator.jar and b/zip-generator/zipGenerator.jar differ