Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

fixing p7zip 4.65 to make .ZIP use DOS, not Unix, as host OS (Announce)

posted by Zyzzle, 27.07.2010, 03:40

>
> // inside \p7zip_4.65\CPP\7zip\Archive\Zip\ZipUpdate.cpp
> // line 33
> #if defined(_WIN32) || defined(DJGPP) // was only #ifdef _WIN32
> NFileHeader::NHostOS::kFAT;
> #else
> NFileHeader::NHostOS::kUnix;
> #endif
>

>
> First I built without that patch (using G++ 4.4.4, DJDEV 2.04). Then I
> patched it. I confirmed it works via "unzip -Zlv". So this hopefully fixes
> it for you (although other formats, e.g. Gzip, I didn't mess with, but
> PKZIP doesn't handle that does it??)
>
>
> fc /b old7za.exe 7za.exe
>
> Comparing files old7za.exe and 7ZA.EXE
> 0004C66B: 03 00
> 0004C679: 03 00
>

>
> No guarantees (and I highly doubt it) that it matches your binary's
> offsets. But just FYI! If you really want, I'll upload a p7zip 4.65 build
> for you (is -mtune=i686 -Os okay or what would you prefer??). I could also
> (weakly) try again for 9.13 is you want. I can do all that later tonight.
>
> But at the very least, this should let you (or someone) rebuild by
> themselves. Grab my
> 7zip465s.zip
> "stable" sources (still not on FreeDOS' iBiblio section, ugh, they never
> updated past 4.61 "beta").


The "extraction" problem only appears on PKWare's DOS versions of Pkunzip (2.04g and 2.50), and Win32 PKzipw 2.50. They both crap out on reading the 0x03 "UNIX" identifier in the header, and refuse to extract, saying "You need PKUNZIP Version 8.8 to extract". All other UNZIP utilities ignore the UNIX flag, and extract correctly. I should add that all the DOS versions of p7zip that I tried produced these "rogue" .ZIP headers -- even Michael Kostylev's 4.58 and 4.61.

The 4.65 I'm using is the one hosted at your site, Rugxulo! I think your patch posted above would work, but the 7ZA.EXE is UPX'd and decompressing it yields slightly different offsets than a fresh compile would! I would greatly appreciate if you'd upload the patched recompiled version. However, I think the -O2 and -mtunei686 flags bloat the compiled binary (mik's version of 4.61 is ~100k shorter in its UPX'd version than your build of 4.61. So, hopefully recompiling without those two flags will unbloat the generated binary somewhat! Thanks kindly for your help & troubleshooting expertise!

Incidently, the binary of mik's 4.61 hosted on your site 7za461mk.zip does not function AT ALL with -mx9 settings and using filters - give SIGSERV dump, but WILL work well with -mx7. This goes for any dictionary settings, so it seems to not be a memory problem, but a bug with how Kostylev implemented/built the filtering code into his compile.

 

Complete thread:

Back to the forum
Board view  Mix view
22632 Postings in 2109 Threads, 402 registered users, 399 users online (0 registered, 399 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum