Zipping map files into a h5m file

Mods and development for mods. Including WoG & Equilibris (RU) subforums.
User avatar
Vitirr
Scout
Scout
Posts: 157
Joined: 06 Jan 2006
Contact:

Zipping map files into a h5m file

Unread postby Vitirr » 08 Jun 2007, 15:46

Hi all. I'm working on a java application that will modify H5 maps. The process is to unzip the map to a temp directory, modify the map.xdb file and zip it again to a .h5m file.

It is all working except the last part. When I zip the modified files into a new .h5m file programatically I can't get the map to open in the editor. However if that new created .h5m file is manually unzipped and zipped again, then I can open it in the editor and all the modifications are working.

As I said I'm using Java as programming language and the standar Zip API.

Here you can get one of those .h5m files generated by my program: Test Map

If you have any hint to make it work I would really appreciate it. Thanks in advance.

Neckie
Peasant
Peasant
Posts: 67
Joined: 05 Oct 2006
Location: Quebec, Canada

Unread postby Neckie » 08 Jun 2007, 19:38

I think your program zip the file in a .h5m file directly. However when you try to do that with winzip (for example) , the file doesn't load in the editor.

What you've got to do is to zip it in a .zip file and then modify the file extension to .h5m.

User avatar
Vitirr
Scout
Scout
Posts: 157
Joined: 06 Jan 2006
Contact:

Unread postby Vitirr » 09 Jun 2007, 12:31

Thanks for the tip but it didn't work. You were right that I was zipping directly into a .h5m file rather than into a zip file, but doing the second and renaming didn't change anything.

I'll have to make further investigations.

User avatar
Pitsu
Round Table Hero
Round Table Hero
Posts: 1830
Joined: 22 Nov 2005

Unread postby Pitsu » 09 Jun 2007, 17:23

The java application itself can read the files it writes, it is just H5Editor that cannot?

Can you post the script of output stream? Do you use any checksum or verification that the output is correct?
Avatar image credit: N Lüdimois

User avatar
Vitirr
Scout
Scout
Posts: 157
Joined: 06 Jan 2006
Contact:

Unread postby Vitirr » 10 Jun 2007, 12:20

Pitsu wrote:The java application itself can read the files it writes, it is just H5Editor that cannot?
Yes it can read them. Winrar can read them too.
Pitsu wrote:Can you post the script of output stream?Do you use any checksum or verification that the output is correct?
You mean the method I wrote to zip the file?
Pitsu wrote:Do you use any checksum or verification that the output is correct?
No, I haven't. However I doubt that it is wrong if winrar can read it.


Return to “Modcrafting Guild”

Who is online

Users browsing this forum: Bing [Bot] and 5 guests