WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Cataclysm Beta (https://www.wowinterface.com/forums/forumdisplay.php?f=82)
-   -   Extract "wow-update-12759.mpq"... meh! (https://www.wowinterface.com/forums/showthread.php?t=34469)

dubcat 08-19-10 06:50 PM

Quote:

Originally Posted by Ladik (Post 202998)
In case you are unable to extract a patched file, please, send me an e-mail to zezula-at-volny-dot-cz. Please, don't forget to include:
- The name of the primary MPQ
- List of patches you entered
- Full name of the extracted file

I ran this
Code:

MPQEditor.exe /patch "locale-enGB.MPQ" "wow-update-12694.MPQ" "wow-update-12759.MPQ"
And tried to extract the DBFilesClient folder, but it crashes on WorldMapContinent.dbc

Adys 08-19-10 07:41 PM

For those interested, now that Ladik has released MPQEdit with patch support. Here is a Python library to read PatchFiles (PTCH).

http://www.pastethat.com/9pGwm

Released under BSD.

Seerah 08-19-10 10:17 PM

Sorry, guys, but I had to remove the link. You know our rules! :)

DesertDwarf 08-19-10 11:17 PM

Quote:

Originally Posted by Seerah (Post 203046)
Sorry, guys, but I had to remove the link. You know our rules!

For those who don't know, see rule #8 on this post.

Vlad 08-19-10 11:32 PM

Adys, I think Jerome is a cool name. ;)

Could you post a really short sample?

Adys 08-20-10 12:07 AM

Quote:

Originally Posted by Vladinator (Post 203058)
Adys, I think Jerome is a cool name. ;)

Could you post a really short sample?

patchFile = open("wow-12345-patch/testfile.lua") # patch file
oldFile = open("old/testfile.lua")
f = PatchFile(patchFile)

print f.apply(oldFile.read())

oldFile.close()

Bluspacecow 08-20-10 12:52 AM

Quote:

Originally Posted by DesertDwarf (Post 203056)
For those who don't know, see rule #8 on this post.

I really don't see how it violates it

MPQ editor is an external program , not an addon.

Vlad 08-20-10 01:45 AM

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.

Adys 08-20-10 01:52 AM

Quote:

Originally Posted by Vladinator (Post 203062)
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.

I'm looking into it. If it's just an error, you can pass validate=False to apply()

Ladik 08-20-10 02:14 AM

Quote:

Originally Posted by Seerah (Post 203046)
Sorry, guys, but I had to remove the link. You know our rules! :)

Ah, my apologies then. I thought that MPQ Editor doesn't fall into category of "addons" :)

For all others who e-mailed me: Thanks for bug reports, I'll fix them problems today, and hopefully a more stable version should be ready this evening.

silkfire 08-20-10 02:45 AM

Who is Jerome?

Borlox 08-20-10 05:14 AM

Edit: Found the error, the right base files are in enUS\patch-enUS.mpq, not in locale-enUS.mpq :rolleyes:

Quote:

Originally Posted by Adys (Post 203063)
I'm looking into it. If it's just an error, you can pass validate=False to apply()

I extracted the files and tried the python script with validate=False, but that gives me another error message:
Code:

>python patch.py data\locale-enUS\Interface\FrameXML\ActionButton.lua Data\update-12694\Interface\FrameXML\ActionButton.lua Data\patched-12694\Interface\FrameXML\ActionButton.lua

Traceback (most recent call last):
  File "patch.py", line 186, in <module>
    r = m.apply(old.read(), validate=False)
  File "patch.py", line 153, in apply
    nb, ob = ord(new[cursor + i]), ord(old[oldCursor + i])
IndexError: string index out of range

I couldn't get any file in FrameXML patched...

"MpqEditor.exe enUs\locale-enUS.mpq wow-update-12694.mpq" opens the file without any error message, but it's empty.
The same happens when both update mpqs are used.

Thanks for all the work you've done! I'm really looking forward to a working version :)

Adys 08-20-10 06:18 AM

Quote:

Originally Posted by silkfire (Post 203066)
Who is Jerome?

That would be me. Hi!

Thanks for the reports guys. Below is an updated PTCH parser:
http://dpaste.com/231608/

Also here is my blizpatch.py in case anyone wants it. Mind you you'll need to change imports to make it work.

http://dpaste.com/231609/

Ladik 08-20-10 06:28 AM

A new BETA build of MPQ Editor, available on my website, should be now able to handle all patches properly. I fixed several bugs there. Please, let me know if you find a file that you are unable to extract, or it doesn't look well after extracting.

This version should be far more stable that the one I published yesterday late in the night (note for myself: Never ever release anything when it's close to midnight).

As usually, there is new BETA version of StormLib available, which also contains algorithms for uncompressing and applying Blizzard patches.

Note: The original download link for the experimental version is longer valid.

Crowley 08-20-10 07:32 AM

Quote:

Originally Posted by Ladik (Post 203077)
A new BETA build of MPQ Editor, available on my website, should be now able to handle all patches properly. I fixed several bugs there. Please, let me know if you find a file that you are unable to extract, or it doesn't look well after extracting.

Works fine for me.

Thanks a lot, Ladik and Adys, your work is much appreciated.

Seerah 08-20-10 08:56 AM

Quote:

Originally Posted by Bluspacecow (Post 203061)
I really don't see how it violates it

MPQ editor is an external program , not an addon.

Even more reason to remove the link.

Quokka 08-20-10 09:00 AM

Extracted the files.
But for some odd reason there are alot 1kb .blp files
and some larger that can't be converted to .png

Don't know if this is a bug, or just the patched data

Borlox 08-20-10 10:41 AM

Is there a way to open a patch archive for multiple mpqs?
I'm trying to hack support for the wow-update-*.mpqs into the WoWModelViewer. My first idea was to open all the patch archives for each mpq, but that doesn't work, as they may be opened just one time.

Does anybody have a better idea, or is anyone already working on this?

silkfire 08-20-10 10:54 AM

Quote:

Originally Posted by Quokka (Post 203091)
Extracted the files.
But for some odd reason there are alot 1kb .blp files
and some larger that can't be converted to .png

Don't know if this is a bug, or just the patched data

Name some of the files you're referencing.

silkfire 08-20-10 10:54 AM

Quote:

Originally Posted by Borlox (Post 203109)
Is there a way to open a patch archive for multiple mpqs?
I'm trying to hack support for the wow-update-*.mpqs into the WoWModelViewer. My first idea was to open all the patch archives for each mpq, but that doesn't work, as they may be opened just one time.

Does anybody have a better idea, or is anyone already working on this?

No need, all models are viewable at least for me.


All times are GMT -6. The time now is 02:43 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI