added a build of CompilePackage to the repository as a jar and a simple readme.txt to go with it with instructions
This commit is contained in:
parent
211e08ba7d
commit
8b98cd1101
BIN
epkcompiler/CompilePackage.jar
Normal file
BIN
epkcompiler/CompilePackage.jar
Normal file
Binary file not shown.
7
epkcompiler/readme.txt
Normal file
7
epkcompiler/readme.txt
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
Use this tool like this:
|
||||||
|
|
||||||
|
java -jar CompilePackage.jar <source directory> <output file>
|
||||||
|
|
||||||
|
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"
|
|
@ -18,6 +18,10 @@ public class CompilePackage {
|
||||||
private static ArrayList<File> files = new ArrayList();
|
private static ArrayList<File> files = new ArrayList();
|
||||||
|
|
||||||
public static void main(String[] args) throws IOException, NoSuchAlgorithmException {
|
public static void main(String[] args) throws IOException, NoSuchAlgorithmException {
|
||||||
|
if(args.length != 2) {
|
||||||
|
System.out.print("Usage: java -jar CompilePackage.jar <input directory> <output file>");
|
||||||
|
return;
|
||||||
|
}
|
||||||
File root = new File(args[0]);
|
File root = new File(args[0]);
|
||||||
listDirectory(root);
|
listDirectory(root);
|
||||||
ByteArrayOutputStream osb = new ByteArrayOutputStream();
|
ByteArrayOutputStream osb = new ByteArrayOutputStream();
|
||||||
|
@ -47,7 +51,7 @@ public class CompilePackage {
|
||||||
os.writeUTF(" end");
|
os.writeUTF(" end");
|
||||||
os.flush();
|
os.flush();
|
||||||
os.close();
|
os.close();
|
||||||
FileOutputStream out = new FileOutputStream(new File("out.epk"));
|
FileOutputStream out = new FileOutputStream(new File(args[1]));
|
||||||
out.write(osb.toByteArray());
|
out.write(osb.toByteArray());
|
||||||
out.close();
|
out.close();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user