mirror of
https://github.com/codestation/mhtools
synced 2025-03-15 22:27:02 +00:00
Added option to specify output patchfile
This commit is contained in:
parent
322cf28838
commit
c04918cffe
3 changed files with 5 additions and 3 deletions
2
README
2
README
|
@ -37,4 +37,4 @@ To only generate a index.bin (necessary to decrypt/encrypt), e.g.:
|
|||
java -jar mhtrans.jar --gen-index /home/user/data.bin
|
||||
|
||||
To create a patchfile, e.g.:
|
||||
java -jar mhtrans.jar --create-patch 0017.bin.enc 2813.bin.enc 2814.bin.enc
|
||||
java -jar mhtrans.jar --create-patch 0017.bin.enc 2813.bin.enc 2814.bin.enc MHP3RD_DATA.BIN
|
||||
|
|
|
@ -103,7 +103,7 @@ public class Mhtrans {
|
|||
System.err.println(" java -jar mhtrans.jar --reb-enc <path to project folder> <encoder number>");
|
||||
System.err.println(" java -jar mhtrans.jar --gen-index <data.bin>");
|
||||
System.err.println(" java -jar mhtrans.jar --dec-all <data.bin> <path to output folder>");
|
||||
System.err.println(" java -jar mhtrans.jar --create-patch <xxxx.bin.enc> [ ... <xxxx.bin.enc>]");
|
||||
System.err.println(" java -jar mhtrans.jar --create-patch <xxxx.bin.enc> [ ... <xxxx.bin.enc>] <output_file>");
|
||||
System.exit(1);
|
||||
} else {
|
||||
if (args[0].equals("--extract")) {
|
||||
|
|
|
@ -17,8 +17,10 @@ public class PatchBuilder extends DecryptTable {
|
|||
public void create(String[] args) {
|
||||
List<String> list = new ArrayList<String>(Arrays.asList(args));
|
||||
list.remove(0);
|
||||
String outfile = list.get(list.size()-1);
|
||||
list.remove(list.size()-1);
|
||||
try {
|
||||
RandomAccessFile out = new RandomAccessFile("MHP3RD_DATA.BIN", "rw");
|
||||
RandomAccessFile out = new RandomAccessFile(outfile, "rw");
|
||||
int table_size = (list.size() + 1) * 4 * 2;
|
||||
System.out.println("Table size: " + table_size + " bytes");
|
||||
if(table_size % 16 > 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue