Thread Tools Display Modes
08-20-10, 12:16 PM   #1
Ladik
A Fallenroot Satyr
 
Ladik's Avatar
Join Date: Aug 2010
Posts: 23
Originally Posted by Borlox View Post
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?
Is MPQ support in WoWModelViewer based on StormLib ?
__________________
Ladik's MPQ Editor
 
08-20-10, 12:21 PM   #2
Borlox
A Deviate Faerie Dragon
 
Borlox's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2007
Posts: 13
Originally Posted by Ladik View Post
Is MPQ support in WoWModelViewer based on StormLib ?
Yep.
As far as I understand the code all archives are opened at the beginning. To open a file the code goes through all of them and tries to open the file, storing the content and returning if successful.

Last edited by Borlox : 08-20-10 at 12:22 PM. Reason: Wrong quote -.-
 
08-20-10, 12:55 PM   #3
Ladik
A Fallenroot Satyr
 
Ladik's Avatar
Join Date: Aug 2010
Posts: 23
Originally Posted by Borlox View Post
Yep.
As far as I understand the code all archives are opened at the beginning. To open a file the code goes through all of them and tries to open the file, storing the content and returning if successful.
I'll change it so when an MPQ is open for read only, it can be open multiple times.
Edit: it should be possible - MPQs are open with FILE_SHARE_READ, and GENERIC_READ if MPQ_OPEN_READ_ONLY is specified in SFileOpenArchive.
__________________
Ladik's MPQ Editor

Last edited by Ladik : 08-20-10 at 12:59 PM.
 
08-21-10, 06:22 AM   #4
Borlox
A Deviate Faerie Dragon
 
Borlox's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2007
Posts: 13
Originally Posted by Ladik View Post
I'll change it so when an MPQ is open for read only, it can be open multiple times.
Edit: it should be possible - MPQs are open with FILE_SHARE_READ, and GENERIC_READ if MPQ_OPEN_READ_ONLY is specified in SFileOpenArchive.
Here is a minimal test case.
Executed in Cataclysm\Data it always gives me
Failed to add patch archive for exp3: 32
Error code 32 is ERROR_SHARING_VIOLATION "The process cannot access the file because it is being used by another process."

All MPQs are opened with MPQ_OPEN_READ_ONLY.
 
08-21-10, 07:26 AM   #5
Ladik
A Fallenroot Satyr
 
Ladik's Avatar
Join Date: Aug 2010
Posts: 23
Ah, I see the problem now. Even if the base MPQs are open for read only, the patches are still opened for writing. It's a bug in StormLib, I'll fix that soon.

Also, I am going to change the patch interface a bit, I believe that it will be easier to use and more flexible. The point is that I remove SFileSetPatchPathPrefix, and the patch prefix will be parameter to SFileOpenPatchArchive instead. This will allow to have different patch prefix for each patch MPQ (perhaps this will be needed for future MPQs).

I believe it's better to do it now, when it's still early released (and BETA after all), than later, when loads of application will have to be recompiled.
__________________
Ladik's MPQ Editor
 
08-21-10, 07:28 AM   #6
Borlox
A Deviate Faerie Dragon
 
Borlox's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2007
Posts: 13
Originally Posted by Ladik View Post
Ah, I see the problem now. Even if the base MPQs are open for read only, the patches are still opened for writing. It's a bug in StormLib, I'll fix that soon.

Also, I am going to change the patch interface a bit, I believe that it will be easier to use and more flexible. The point is that I remove SFileSetPatchPathPrefix, and the patch prefix will be parameter to SFileOpenPatchArchive instead. This will allow to have different patch prefix for each patch MPQ (perhaps this will be needed for future MPQs).

I believe it's better to do it now, when it's still early released (and BETA after all), than later, when loads of application will have to be recompiled.
Great news
 
08-20-10, 02:50 PM   #7
silkfire
A Fallenroot Satyr
Join Date: Jun 2009
Posts: 20
Originally Posted by Ladik View Post
Is MPQ support in WoWModelViewer based on StormLib ?
Ladik every time you update the StormLib - chuanshing, wowmodelviewer's developer, updates the modelviewer so that it utilizes it.

Fresh update:
http://code.google.com/p/wowmodelvie...e/detail?r=368

http://code.google.com/p/wowmodelviewer/updates/list

Last edited by silkfire : 08-20-10 at 03:50 PM.
 
08-20-10, 03:16 PM   #8
Ladik
A Fallenroot Satyr
 
Ladik's Avatar
Join Date: Aug 2010
Posts: 23
Originally Posted by silkfire View Post
Ladik every tome you update the StormLib chuanshing, wowmodelviewer's developer updates the modelviewer to use it.
Ah right, he sends me e-mails from time to time. Hi, Chuanshing :-)
__________________
Ladik's MPQ Editor
 
 

WoWInterface » AddOns, Compilations, Macros » Cataclysm Beta » Extract "wow-update-12759.mpq"... meh!


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off