Code Monkey home page Code Monkey logo

mpqextractor's People

Contributors

adynathos avatar bradc6 avatar iamcal avatar kanma avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mpqextractor's Issues

Unable to compile

Hi,

When compiling MPQExtractor following your instructions, I'm greeted with

Linking CXX shared library ../bin/libstorm.so
/usr/bin/ld: cannot find -lbz2
collect2: ld returned 1 exit status
make[2]: *** [bin/libstorm.so.8.10.0] Error 1
make[1]: *** [StormLib/CMakeFiles/storm.dir/all] Error 2
make: *** [all] Error 2

Here are the steps I followed :

$ cd ~/local/etc
$ git clone git://github.com/Kanma/MPQExtractor.git
$ cd MPQExtractor
$ git submodule init && git submodule update
$ mkdir ./build && cd ./build
$ cmake ~/local/etc/MPQExtractor
$ make

Maybe it's a missing package on my side, but I installed libzip2 through apt-get to no avail.

There's no releases

Hi, I'm looking at maybe packaging this if it can extract MPQ files from Warcraft 3, since I'm trying to fix a package that used to automate GDI responses in order to wrap the installation of Warcraft 3 in a script.

But without releases, I'll basically have to improvise on the version. Please make a release.

Extracted listfiles are binary (was: Ubuntu issue)

Hi Kanma,

I wanted to test MPQExtractor in view to explore CoreData.mpq from Diablo 3.

I've been able to build the binary on Ubuntu following your README.
Unfortunately, when I run "./bin/MPQExtractor -l list.txt CoreData.mpq", list.txt is binary...

Would you have any idea why ?

Thanks,

Lxir

How can I patch Warcraft 3 with this?

First of all, thank you so much! This is a great tool! So far the best I've tried when handling MPQ archives.

My use case is that I would like to use the original Warcraft 3 RoC CD, one of the free official patches, and free and open source tools, in order to install and patch Warcraft 3 RoC. The end goal of this exercise is to fix a package for Gentoo I made a couple years ago.

So here is my procedure so far:

  1. Locate a viable Warcraft 3 RoC CD. For posterity, I'm using the Polish release and it has a sha256 of e5369553b4e9752eed239aeeecef2ca7133c42e6eb66fe7a32ff60a9b9f428d9 once when it's dumped to a separate ISO9660 file. The inserted CD gets a different checksum for some reason, and trying to dump the thing with dd yields 4 sectors less than the ISO header claims the disc should have. Probably some SecuROM/TAO codgery at work here.
    For the sake of continuity, let's refer to this image later with the file path /var/tmp/war3roc-pl.iso.
  2. Run the following commands inside an empty directory workspace, to extract files that interest us:
mkdir -p Movies Maps/Scenario redist/miles
isoinfo -i /var/tmp/war3roc-pl.iso -x '/WAR3.MPQ;1' > war3.mpq
isoinfo -i /var/tmp/war3roc-pl.iso -x '/SETUP.MPQ;1' > setup.mpq
isoinfo -i /var/tmp/war3roc-pl.iso -x '/MOVIES/HUMANED.MPQ;1' > Movies/HumanEd.mpq
isoinfo -i /var/tmp/war3roc-pl.iso -x '/MOVIES/HUMANOP.MPQ;1' > Movies/HumanOp.mpq
isoinfo -i /var/tmp/war3roc-pl.iso -x '/MOVIES/NIGHTELFED.MPQ;1' > Movies/NightElfEd.mpq
isoinfo -i /var/tmp/war3roc-pl.iso -x '/MOVIES/ORCED.MPQ;1' > Movies/OrcEd.mpq
isoinfo -i /var/tmp/war3roc-pl.iso -x '/MOVIES/UNDEADED.MPQ;1' > Movies/UndeadEd.mpq
isoinfo -i /var/tmp/war3roc-pl.iso -x '/MOVIES/TUTORIALIN.MPQ;1' > Movies/TutorialIn.mpq
isoinfo -i /var/tmp/war3roc-pl.iso -x '/MOVIES/TUTORIALOP.MPQ;1' > Movies/TutorialOp.mpq
MPQExtractor -e 'File00000060.exe' -o . setup.mpq
mv File00000060.exe 'Warcraft III.exe'
MPQExtractor -e 'File00000061.exe' -o . setup.mpq
mv File00000061.exe 'World Editor.exe'
MPQExtractor -e 'File00000062.exe' -o . setup.mpq
mv File00000062.exe War3.exe
MPQExtractor -e 'File00000063.exe' -o . setup.mpq
mv File00000063.exe WorldEdit.exe
MPQExtractor -e 'File00000064.exe' -o . setup.mpq
mv File00000064.exe Mss32.dll
MPQExtractor -e 'File00000065.exe' -o . setup.mpq
mv File00000065.exe ijl15.dll
MPQExtractor -e 'File00000066.exe' -o . setup.mpq
mv File00000066.exe Game.dll
MPQExtractor -e 'File00000067.exe' -o . setup.mpq
mv File00000067.exe Storm.dll
MPQExtractor -e 'File00000069.w3x' -o . setup.mpq
mv File00000069.w3x Maps/(10)DustwallowKeys.w3m
MPQExtractor -e 'File00000070.w3x' -o . setup.mpq
mv File00000070.w3x Maps/(12)DivideAndConquer.w3m
MPQExtractor -e 'File00000071.w3x' -o . setup.mpq
mv File00000071.w3x Maps/(12)IceCrown.w3m
MPQExtractor -e 'File00000072.w3x' -o . setup.mpq
mv File00000072.w3x Maps/(2)BootyBay.w3m
MPQExtractor -e 'File00000073.w3x' -o . setup.mpq
mv File00000073.w3x Maps/(2)Harrow.w3m
MPQExtractor -e 'File00000074.w3x' -o . setup.mpq
mv File00000074.w3x Maps/(2)HillsOfGlory.w3m
MPQExtractor -e 'File00000075.w3x' -o . setup.mpq
mv File00000075.w3x Maps/(2)OgreMound.w3m
MPQExtractor -e 'File00000076.w3x' -o . setup.mpq
mv File00000076.w3x Maps/(2)PlunderIsle.w3m
MPQExtractor -e 'File00000077.w3x' -o . setup.mpq
mv File00000077.w3x Maps/(3)Forestwalk.w3m
MPQExtractor -e 'File00000078.w3x' -o . setup.mpq
mv File00000078.w3x Maps/(3)IsleOfDread.w3m
MPQExtractor -e 'File00000079.w3x' -o . setup.mpq
mv File00000079.w3x Maps/(3)Nighthaven.w3m
MPQExtractor -e 'File00000080.w3x' -o . setup.mpq
mv File00000080.w3x Maps/(4)Adrenaline.w3m
MPQExtractor -e 'File00000081.w3x' -o . setup.mpq
mv File00000081.w3x Maps/(4)Borderlands.w3m
MPQExtractor -e 'File00000082.w3x' -o . setup.mpq
mv File00000082.w3x Maps/(4)Deadwaterdrop.w3m
MPQExtractor -e 'File00000083.w3x' -o . setup.mpq
mv File00000083.w3x Maps/(4)DragonMountain.w3m
MPQExtractor -e 'File00000084.w3x' -o . setup.mpq
mv File00000084.w3x Maps/(4)Duskwood.w3m
MPQExtractor -e 'File00000085.w3x' -o . setup.mpq
mv File00000085.w3x Maps/(4)Frostsabre.w3m
MPQExtractor -e 'File00000086.w3x' -o . setup.mpq
mv File00000086.w3x Maps/(4)HarvestMoon.w3m
MPQExtractor -e 'File00000087.w3x' -o . setup.mpq
mv File00000087.w3x Maps/(4)Legends.w3m
MPQExtractor -e 'File00000088.w3x' -o . setup.mpq
mv File00000088.w3x Maps/(4)LostTemple.w3m
MPQExtractor -e 'File00000089.w3x' -o . setup.mpq
mv File00000089.w3x Maps/(4)MysticIsles.w3m
MPQExtractor -e 'File00000090.w3x' -o . setup.mpq
mv File00000090.w3x Maps/(4)TranquilPaths.w3m
MPQExtractor -e 'File00000091.w3x' -o . setup.mpq
mv File00000091.w3x Maps/(5)TheGlaive.w3m
MPQExtractor -e 'File00000092.w3x' -o . setup.mpq
mv File00000092.w3x Maps/(6)DarkForest.w3m
MPQExtractor -e 'File00000093.w3x' -o . setup.mpq
mv File00000093.w3x Maps/(6)DragonFire.w3m
MPQExtractor -e 'File00000094.w3x' -o . setup.mpq
mv File00000094.w3x Maps/(6)DrywaterGulch.w3m
MPQExtractor -e 'File00000095.w3x' -o . setup.mpq
mv File00000095.w3x Maps/(6)GnollWood.w3m
MPQExtractor -e 'File00000096.w3x' -o . setup.mpq
mv File00000096.w3x Maps/(6)Moonglade.w3m
MPQExtractor -e 'File00000097.w3x' -o . setup.mpq
mv File00000097.w3x Maps/(6)ScorchedBasin.w3m
MPQExtractor -e 'File00000098.w3x' -o . setup.mpq
mv File00000098.w3x Maps/(6)Stromguarde.w3m
MPQExtractor -e 'File00000099.w3x' -o . setup.mpq
mv File00000099.w3x Maps/(6)SwampOfSorrows.w3m
MPQExtractor -e 'File00000100.w3x' -o . setup.mpq
mv File00000100.w3x Maps/(6)TimbermawHold.w3m
MPQExtractor -e 'File00000101.w3x' -o . setup.mpq
mv File00000101.w3x Maps/(8)Battleground.w3m
MPQExtractor -e 'File00000102.w3x' -o . setup.mpq
mv File00000102.w3x Maps/(8)BlastedLands.w3m
MPQExtractor -e 'File00000103.w3x' -o . setup.mpq
mv File00000103.w3x Maps/(8)BloodvenomFalls.w3m
MPQExtractor -e 'File00000104.w3x' -o . setup.mpq
mv File00000104.w3x Maps/(8)GardenOfWar.w3m
MPQExtractor -e 'File00000105.w3x' -o . setup.mpq
mv File00000105.w3x Maps/(8)GolemsInTheMist.w3m
MPQExtractor -e 'File00000106.w3x' -o . setup.mpq
mv File00000106.w3x Maps/(8)PetrifiedForest.w3m
MPQExtractor -e 'File00000107.w3x' -o . setup.mpq
mv File00000107.w3x Maps/(8)Plaguelands.w3m
MPQExtractor -e 'File00000108.w3x' -o . setup.mpq
mv File00000108.w3x Maps/(8)PlainsOfSnow.w3m
MPQExtractor -e 'File00000109.w3x' -o . setup.mpq
mv File00000109.w3x Maps/(8)TheCrucible.w3m
MPQExtractor -e 'File00000110.w3x' -o . setup.mpq
mv File00000110.w3x Maps/(9)Riverrun.w3m
MPQExtractor -e 'File00000111.w3x' -o . setup.mpq
mv File00000111.w3x Maps/Scenario/(1)TheDeathSheep.w3m
MPQExtractor -e 'File00000112.w3x' -o . setup.mpq
mv File00000112.w3x Maps/Scenario/(4)WarChasers.w3m
MPQExtractor -e 'File00000113.exe' -o . setup.mpq
mv File00000113.exe redist/miles/Mp3dec.asi
MPQExtractor -e 'File00000114.exe' -o . setup.mpq
mv File00000114.exe redist/miles/Mssdolby.m3d
MPQExtractor -e 'File00000115.exe' -o . setup.mpq
mv File00000115.exe redist/miles/Msseax2.m3d
MPQExtractor -e 'File00000116.exe' -o . setup.mpq
mv File00000116.exe redist/miles/Mssfast.m3d
MPQExtractor -e 'File00000117.exe' -o . setup.mpq
mv File00000117.exe redist/miles/Reverb3.flt
  1. Get the patch. Unfortunately at the moment it's offline because I uploaded a crack for WC3 RoC 1.0 to archive.org and it had false positives with 4-5 noname security companies that virustotal.com includes in their scanner matrix. For what it's worth this is a Polish 1.26a patch that should be still easily available.

At this point I'm left scratching my head because Warcraft 3 patches are self-extracting MPQ files with a PE32 stub. Here are the contents:

  • (attributes)
  • (listfile)
  • (signature)
  • BNUpdate.exe
  • Patch_War3.mpq - over 600 files
  • Patch_War3_Low.mpq
  • Patch_War3_Med.mpq - same content as Patch_War3_Low.mpq, but 3x smaller
  • mpqs.lst - lists only Patch_War3.mpq
  • patch.txt - it's just a changelog
  • prepatch.lst - some kind of internal command list

As we can see, inside the patch file there's more MPQ files and from studying the contents it appears that not all of them are even used.

Prepatch.lst reads:

extract BNUpdate.exe
extract Patch.txt
execute BNUpdate

At this point I'm not sure which way I should continue. Obviously Patch_War3.mpq contains the files I want to use, but some of them are not useful in patching War3.mpq. Like for instance:

  • all map and scenario files
  • all exe and dll files

How should I go about this if I want to continue using MPQExtractor?

.wav files fail to extract properly

Whenever the extractor extracts anything .wav is seems to mangle the file (file corruption?). I can barley hear the actual sound file, while the rest is simply loud high pitch static.

I am using Mac OSX 10.8.2 x64

Thanks

Build Error on Mac Studio w/ M1 Ultra

user@Mac-Studio build % cmake --build . 
[  0%] Building C object StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/rsa/rsa_verify_simple.c.o
/MPQExtractor/StormLib/src/libtomcrypt/src/pk/rsa/rsa_verify_simple.c:58:12: error: call to undeclared function 'LibTomMalloc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  tmpbuf = XMALLOC(siglen);
           ^
/MPQExtractor/StormLib/src/libtomcrypt/src/pk/rsa/../../headers/tomcrypt_custom.h:27:18: note: expanded from macro 'XMALLOC'
#define XMALLOC  LibTomMalloc
                 ^
/MPQExtractor/StormLib/src/libtomcrypt/src/pk/rsa/rsa_verify_simple.c:58:10: warning: incompatible integer to pointer conversion assigning to 'unsigned char *' from 'int' [-Wint-conversion]
  tmpbuf = XMALLOC(siglen);
         ^ ~~~~~~~~~~~~~~~
/MPQExtractor/StormLib/src/libtomcrypt/src/pk/rsa/rsa_verify_simple.c:66:6: error: call to undeclared function 'LibTomFree'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     XFREE(tmpbuf);
     ^
/MPQExtractor/StormLib/src/libtomcrypt/src/pk/rsa/../../headers/tomcrypt_custom.h:45:18: note: expanded from macro 'XFREE'
#define XFREE    LibTomFree
                 ^
/MPQExtractor/StormLib/src/libtomcrypt/src/pk/rsa/rsa_verify_simple.c:72:6: error: call to undeclared function 'LibTomFree'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     XFREE(tmpbuf);
     ^
/MPQExtractor/StormLib/src/libtomcrypt/src/pk/rsa/../../headers/tomcrypt_custom.h:45:18: note: expanded from macro 'XFREE'
#define XFREE    LibTomFree
                 ^
/MPQExtractor/StormLib/src/libtomcrypt/src/pk/rsa/rsa_verify_simple.c:83:3: error: call to undeclared function 'LibTomFree'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  XFREE(tmpbuf);
  ^
/MPQExtractor/StormLib/src/libtomcrypt/src/pk/rsa/../../headers/tomcrypt_custom.h:45:18: note: expanded from macro 'XFREE'
#define XFREE    LibTomFree
                 ^
1 warning and 4 errors generated.
make[2]: *** [StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/rsa/rsa_verify_simple.c.o] Error 1
make[1]: *** [StormLib/CMakeFiles/storm.dir/all] Error 2
make: *** [all] Error 2

Add an overwrite function?

Could you add an overwrite function? So it overwrites files if there are multiple times the same file in different directories and we don't use the "full path" option.

I tried without the -f option and it just said "failed to extract"

Build Error on ARM

I am trying to build this on Raspbian on a Pi 2, getting this error:

Linking CXX shared library ../bin/libstorm.so
/usr/bin/ld: cannot find -lbz2
collect2: ld returned 1 exit status
StormLib/CMakeFiles/storm.dir/build.make:5235: recipe for target 'bin/libstorm.so.9.0.0' failed
make[2]: *** [bin/libstorm.so.9.0.0] Error 1
CMakeFiles/Makefile2:110: recipe for target 'StormLib/CMakeFiles/storm.dir/all' failed
make[1]: *** [StormLib/CMakeFiles/storm.dir/all] Error 2
Makefile:113: recipe for target 'all' failed
make: *** [all] Error 2

Any ideas on the -lbz2? Seems something is missing bzip2 perhaps but I am not sure what.

Extract files without listfile

I am in the need of a feature to extract all files in a MPQ missing the listfile. My plan with the files is to index hashes to cross reference with resources uploaded on hiveworkshop.com to create automated attributions to authors of uploaded resources.
I imagine this working in multiple ways:

  1. Extract all files with sequential number naming
  2. Extract file by number (this exists in other MPQ tools) which requires a way to list all files by number (and other MPQ metadata)

Either way is fine with me.

Failed to extract

I noticed this code hasn't been touched in quite a while, but I'm trying to extract some content from some MPQ fils and the tool is reporting a failure:

./MPQExtractor -e Character\BloodElf\Male\BloodElfMale0004-00.anim -o ~/Desktop/out /Users/bitson/Applications/World\ of\ Warcraft/Data/model.MPQ
Opening '/Users/bitson/Applications/World of Warcraft/Data/model.MPQ'...

Extracting files...

Failed to extract the file 'CharacterBloodElfMaleBloodElfMale0004-00.anim' in /Users/bitson/Desktop/out/CharacterBloodElfMaleBloodElfMale0004-00.anim

I'm able to list the contents of the MPQ but not extract the data.

Can't extract nor list files

Hello,

This seems to be a cool tool, but after installing it, when I try to use it it doesn't work.
The output says "Opening ''... and stops there.

The files I am trying to extract are w3m and w3x files, maps from Warcraft III. (not necessary Reforged)
I tried with ubuntu 18 and 20.

Thanks if you can help !

Failed to extract list of files

Hey, just ran into this repo while researching StarCraft/BroodWar tools on linux, compiled fine, but when running ./MPQExtractor -l brood.txt BroodWar.mpq (where BroodWar.mpq is INSTALL.EXE copied from the install disk for cd-less play) I get:

Opening 'BroodWar.mpq'...
Failed to extract the list of files

How to apply warcraft 3 mpq patches

Hi,

Your tool looks just awesome ! However, I'm trying to use it to extract some files from warcraft 3 mpqs and find difficulties knowing how to properly apply patches.

What I would like to do is to extract all files from both roc and tft separately.

There are some explanations about the 4 mpq files that I found here : http://world-editor-tutorials.thehelper.net/cat_usersubmit.php?view=42787. Maybe your understand better than me what those briefs descriptions mean (the difference between War3Patch.mpq and war3local.mpq).

Here are the commands I tried :

MPQExtractor -s "*" -f war3.mpq
MPQExtractor -s "*" -p War3Patch.mpq --prefix base -f war3.mpq

It seems to work (no error, I get a list generated). But I store the output in files and compute a diff between the two of them, I get this kind of non-sense (making me guess something has gone wrong) :

>   - 0000711.xxx
>   - 0000712.xxx
>   - 0000713.xxx
>   - 0000714.xxx

If you can suggest me a command from your tool that would help me understand what is going on and how to use those patches it would be much appreciated :)

Missing information for installation

It also requires these libs to compile:
sudo apt-get install libbz2-dev zlib1g-dev

PS: too bad it doesn't compress to MPQ as well, it's useful for linux users not to use a window GUI program but I didn't realize it was only an extractor lol

Hashes instead of minimap names

I did try to extract map images from the first version of WoW (1.12.1). But instead of clear title of files I have just hashes (338cbccd624193b9ef38100a0bf806d3.blp and so on). I found some listfiles, but they did not help.
Is it possible transform this hash-names to clear names like map_45_56.blp?

Or may be need another listifle.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.