If you try Adys' python script, append this at the end to actually use his library as a application:
Code:
if len(sys.argv) < 3:
print "Invalid arguments, run like this (filepaths can be relative):"
print "mpq.py \"originalfile\" \"patchfile\" \"savetofile\""
else:
if os.path.exists(sys.argv[1]) and os.path.exists(sys.argv[2]):
old = open(sys.argv[1], 'r');
new = open(sys.argv[2], 'r');
m = PatchFile(new)
r = m.apply(old.read())
#print r
w = open(sys.argv[3], 'w')
w.append(r)
w.close();
else:
print "Invalid arguments, run like this (filepaths can be relative):"
print "mpq.py \"originalfile\" \"patchfile\" \"savetofile\""
print "The files originalfile and patchfile must exist."
print "Remember to use quotes to encapsulate paths with spaces!"
It includes guidelines, basically takes in 3 arguments, the file, the patch and the output where to write the final file.
I think it's correct, tough I tried to patch ActionButton.lua from local-enUS.mpq with the wow-update-12694.mpq patch and getting MD5 errors.