Problem with ZIP Ressource Loader on linux

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Problem with ZIP Ressource Loader on linux

      Dear all,

      I don't know if I should post here, but anyway, let's go.

      As I don't have any access to windows and because I really want to learn by recopying some of what I've read, plus port it to Linux, I'm in the process of rewriting the game engine bit by bit. Actually, as a first game, I'm heading towards Tetris, so first I 'm just rewriting what I'll need.

      I have rewrote and port the ResCache part of the engine, along with the ZipFile Class and Loader. Now I'm trying to load my "Assets.zip" directory, in order to check that it works properly. However, it seems that the signatures that I get for the different structures, like TZipDirHeader for example, are completely different from what is hard coded in the structures. Worse, I've tried 2 different ways for generating the Asset.zip, and it seems that they provide different signatures.

      Anyone has any idea? That would be really nice :)

      Best

      DerickThePoney

      The post was edited 1 time, last by DerickThePoney ().

    • RE: Problem with ZIP Ressource Loader on linux

      Dear all,

      I found the solution to my problem. Turns out unsigned long on my computer are 8 bytes long, so changing dword to unsigned int did the trick. Stupid me... I know I should have noticed that the signatures I got were too long...
    • I am also having an issue with matching the signatures.

      I also am using a x64 machine that needed to alter the typedefs for dword sizes, but I am still not matching sigs.

      May I ask how I should be compressing/archiving my files? I used the tar cmd line tool on Mac OSX to get a zip file, but I understand the OP uses linux and the authors are using Windows. I do not think tar structures the zip file correctly to be used with zlib.

      I spent some time looking around for an answer but thus far have come up empty. I wanted to check in to see if anyone here has found a solution. :)

      Thanks!
    • I figured out my issue, and it is quite embarrassing...

      After exhausting all of tar's capabilities of different compression algorithms, I downloaded the source of zlib and created a command line tool to compress my files that way-- promptly archiving those manually compressed files with tar and still no matching signatures.

      Frustrated, I go back to the book and reread the section on Zlib... and zip....... ZIP. ZIP!

      So I ran quickly archived my resources with zip and stuffed it with the binary and..... it works. Sometimes rest cannot be stressed enough.

      I just thought I'd share my silliness!
    • Sorry to revive an old thread, but I'm experiencing this exact issue. I'm on Win 8.1, VS 2013, engine lib + game exe both build, but fail when checking

      if (dh.sig != TZipDirHeader::SIGNATURE)

      I've tried multiple different zip files and the sig is always 1541, but the TZipDirHeader::SIGNATURE is 101010256, anyone have any tips?



      FIXED: forgot a data member in the TZipDirHeader struct

      The post was edited 1 time, last by deanmarsinelli ().