Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Compiling offzip source?

Featured Replies

  • Author
  • Localization

Acewell, posted Wed Jan 13, 2016 5:44 am (10806)


Hi, what is the easiest way for a non programmer to compile the source for offzip?
I have CodeBlocks installed. What specific dependencies are needed?

I want to add one of these to sign_ext.c so i can extract gr2 models from SWTOR tor archives with the correct extension.
Code:
    {  4, "\x47\x41\x57\x42", "gr2" }, // swtor model files
Code:
    {  4, "GAWB", "gr2" }, // swtor model files


Any help is appreciated! :)
  • Author
  • Localization

aluigi, posted Wed Jan 13, 2016 4:04 pm (10809)


It's very simple, you need just a gcc installation working on Windows like Mingw or, probably better, tdm-gcc.
Then from the command-line:
Code:
gcc -s -O2 -o offzip.exe offzip.c zopfli\*.c -lz

That's all :)
  • Author
  • Localization

Acewell, posted Wed Jan 13, 2016 5:31 pm (10814)


Thanks, but its not quite that simple, this is the first time i've even attempted to compile an exe
I downloaded and installed the package in the first link you posted
the MinGW Installation Manager presented me with a bunch of options for installing various things that i have no idea what they do.
I had to move the source files into the C:\MinGW\bin folder or else gcc could not be found and now i keep getting a zlib.h error that terminates the whole thing.

edit
I can't get a compiler set up so i just hex edited offzip.exe to include my new entry by overwriting an existing one.
i would rather not have to do this though


edit2
I downloaded and installed the package from the second link you posted
moved the source files to C:\TDM-GCC-32
opened the MingGW command prompt and pasted the line you have above
still getting a zlib.h error that terminates the compiling.


edit3
i downloaded zlib-1.2.8 from zlib.net and placed zlib.h and zconf.h in C:\TDM-GCC-32\include
now i'm getting a "cannot find -lz" error and don't know what this means :x


edit4
i think i'm getting closer, i downloaded libz-1.2.7-1-mingw32-dev.tar.lzma from here
http://sourceforge.net/projects/mingw/f ... b-1.2.7-1/
and placed the files in the C:\TDM-GCC-32\include and C:\TDM-GCC-32\lib folders
i can compile the offzip source into an exe but when i run it an error comes up and says
i need libz-1.dll so i download libz-1.2.7-1-mingw32-dll-1.tar.lzma from here
http://sourceforge.net/projects/mingw/f ... b-1.2.7-1/
and now i can run offzip and it works, but it shouldn't need this dll
i know this can't be right but i just don't know exactly what files i need to compile it the way it was meant to :(
  • Author
  • Localization

Acewell, posted Thu Jan 14, 2016 3:40 pm (10821)


Alright i finally got everything to compile and work without needing the zlib-1.dll
i just removed the libz.dll.a from the lib folder. :)


This is what i did to compile offzip source
I installed tdm-gcc-5.1.0-3.exe
and added the files to the installation from this zip

move the files from include folder to include folder and files from lib folder to lib folder in C:\TDM-GCC-32
copy offzip.c, sign_ext.c and the zopfli folder to C:\TDM-GCC-32
then start the MinGW command prompt and paste the line that aluigi posted earlier and run it
voila! Now you have a new offzip.exe with your changes in C:\TDM-GCC-32

:D


i would have deleted this post and used the one above for this but i can't delete this one for some reason.

libz-1.2.7-1-mingw32-dev.zip

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.