22w34a SINGLEPLAYER + LAN WORLDS! ;> (repl zip fix)
This commit is contained in:
parent
8a769d464f
commit
ec7bd010da
Binary file not shown.
Binary file not shown.
6
zip-generator/repl_worker_bootstrap.js
Normal file
6
zip-generator/repl_worker_bootstrap.js
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
"use strict";
|
||||||
|
onmessage = function(o) {
|
||||||
|
var eaglercraftServerOpts = o.data;
|
||||||
|
${classes_server}
|
||||||
|
main();
|
||||||
|
};
|
|
@ -100,12 +100,23 @@ public class ZipGenerator {
|
||||||
zOut = new ZipOutputStream(new FileOutputStream(new File("stable-download/stable-download_repl.zip")));
|
zOut = new ZipOutputStream(new FileOutputStream(new File("stable-download/stable-download_repl.zip")));
|
||||||
zOut.setLevel(9);
|
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"));
|
zipFolder(zOut, "java", new File("stable-download/java"));
|
||||||
|
|
||||||
zOut.putNextEntry(new ZipEntry("web/classes.js"));
|
zOut.putNextEntry(new ZipEntry("web/classes.js"));
|
||||||
IOUtils.write(classesJs + "\n" + classesWebRTCJs, zOut, "UTF-8");
|
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"));
|
zOut.putNextEntry(new ZipEntry("web/index.html"));
|
||||||
IOUtils.write(FileUtils.readFileToByteArray(new File("zip-generator/repl_index.html")), zOut);
|
IOUtils.write(FileUtils.readFileToByteArray(new File("zip-generator/repl_index.html")), zOut);
|
||||||
|
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user