diff --git a/epkcompiler/CompilePackage.jar b/epkcompiler/CompilePackage.jar new file mode 100644 index 0000000..f38365c Binary files /dev/null and b/epkcompiler/CompilePackage.jar differ diff --git a/epkcompiler/readme.txt b/epkcompiler/readme.txt new file mode 100644 index 0000000..02f572c --- /dev/null +++ b/epkcompiler/readme.txt @@ -0,0 +1,7 @@ +Use this tool like this: + +java -jar CompilePackage.jar + +To recompile the assets.epk file found in /javascript, make your changes to the game's resources in /lwjgl-rundir/resources and then run this command within this /epkcompiler directory: + +java -jar CompilePackage.jar "../lwjgl-rundir/resources" "../javascript/assets.epk" \ No newline at end of file diff --git a/epkcompiler/src/CompilePackage.java b/epkcompiler/src/CompilePackage.java index 35ddb37..2944ce1 100644 --- a/epkcompiler/src/CompilePackage.java +++ b/epkcompiler/src/CompilePackage.java @@ -18,6 +18,10 @@ public class CompilePackage { private static ArrayList files = new ArrayList(); public static void main(String[] args) throws IOException, NoSuchAlgorithmException { + if(args.length != 2) { + System.out.print("Usage: java -jar CompilePackage.jar "); + return; + } File root = new File(args[0]); listDirectory(root); ByteArrayOutputStream osb = new ByteArrayOutputStream(); @@ -47,7 +51,7 @@ public class CompilePackage { os.writeUTF(" end"); os.flush(); os.close(); - FileOutputStream out = new FileOutputStream(new File("out.epk")); + FileOutputStream out = new FileOutputStream(new File(args[1])); out.write(osb.toByteArray()); out.close(); }