ladislav-zezula / CascLib

An open-source implementation of library for reading CASC storages from Blizzard games since 2014
MIT License
423 stars 121 forks source link

List Files / Index #30

Closed jnovack closed 8 years ago

jnovack commented 8 years ago

I'm a little confused here, please bear with me.

Or perhaps I'm misunderstanding it fully.

My use case: I'm on OSX. I would like to extract files from Heroes of the Storm. The current way I have to do this is open the files in a Windows partition, use CascView, and get the files needed. Then do all my magic on OSX (I'm using Kanma's CASCExtractor).

The part where I'm confused, is I understand that CASCExtractor may not have a function for listing files (as it's not your program), however, where is the function that can list files (the index?)?

CascView.exe doesn't seem to have the source, but it HAS be listing an index or at least iterating through all files. A new function in CASCExtractor can easily be written to support that via CascLib. I'm just not versed enough in CPP to do so. Your MPQ examples on the site were useful enough for me to use, but I'm struggling with the CASC functions.

You mention that Heroes CASCs hold the file names, my goal would be to update Kanma's CASCExtractor to read that if I can figure out how to find the function in CascLib. :/

ladislav-zezula commented 8 years ago

Why do I need a list file to extract files?

Because some storage types don't contain file names (e.g. WoW)

How did you generate the list file (example, WoW file in repo)?

Someone sent it to me. Also, for WoW, it could be partially generated from the DBC files, which have known names. Most of the files (spells, music, items) have pre-defined names, so you can use that fact to create a file list.

Is there a function for listing the files in the containers?

CascFindFirstFile/CascFindNextFile/CascFindClose

How does CascView.exe do the listing of the files, that CascLib can not? (or is the feature not documented)

Using the above. CascView is merely a GUI for CascLib, there is no black magic in the code that goes beyond CascLib capabilities.

jnovack commented 8 years ago

Thank you, I appreciate the time you took getting back to a newbie.