fixing p7zip 4.65 to make .ZIP use DOS, not Unix, as host OS (Announce)
> Alright, I fixed my swap / memory error problems in 4.65 / 9.13 p7zip. The
> hint about CWSDPMI made me go check & I actually was running r5! A switch
> to r7 provided the fix, now I get all methods except -mx9 and md=64m to
> work in a 1 GB system. Of course I never run EMS memory, and the free XMS
> on this machine is ~850MB, and the files I was compressing were just under
> 100 MB total.
In other words, it should work but doesn't. Maybe DJGPP or p7zip is allocating extra RAM for just general use. I dunno. :-/
> Now another unrelated mystery comes up, only to be seen on the DOS compiles
> of p7zip. When creating a simple Deflate .ZIP file, the normal PKWARE
> PKUNZIP utility refuses to extract the .ZIP archives because they have been
> 'tagged' as created on a UNIX system (0x03 identifier the .ZIP file header,
> when it *should be* 0x00 for true DOS! Manually modifying the headers make
> them extract fine)
What version? That would be a bug on their end, IMHO. But obviously hacking every .ZIP created is less than ideal. And I guess suggesting you use a different unzipper (Info-Zip, djtar, Doszip, p7zip) is out too. However, I think BE has a good front-end to ZIP file viewing / hacking, if you're curious (even in DOS).
> So, the UNIX-y nature of the p7za compilations is somehow "embedded" in the
> ZIP files it creates. Is there any way short of a complete recompile to
> modify the 7za.exe binary to make it "know" that it is running on a true
> MS-DOS System? Somehow we must modify the HostOS flag in the binary, but
> WHERE is it located?
Impossible without exact same compiler setup or knowing intricately something which I don't (and GDB is a pain). So, long story short, yes, you'll probably have to recompile. Heck, I just did it (again) with p7zip 4.65, took approx. 12 mins. after making WATT-32 and using pre-built GNU pth 2.07 (/current/ only) on this lame P4 2.4 Ghz Celeron (128 MB RAM ftw!).
// 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").
Complete thread:
- cdrtools_from_Schily - david, 21.07.2010, 21:20 (Announce)
- cdrtools_from_Schily - Arjay, 21.07.2010, 21:59
- cdrtools_from_Schily - Rugxulo, 21.07.2010, 22:32
- cdrtools_from_Schily - Arjay, 21.07.2010, 23:13
- cdrtools_from_Schily - Rugxulo, 22.07.2010, 01:04
- cdrtools_from_Schily | NTLFN problem of 7-ZIP | 7-ZIP vs ZIP - DOS386, 23.07.2010, 07:19
- cdrtools_from_Schily | NTLFN problem of 7-ZIP | 7-ZIP vs ZIP - david, 23.07.2010, 21:10
- cdrtools_from_Schily | NTLFN problem of 7-ZIP | 7-ZIP vs ZIP - DOS386, 24.07.2010, 12:06
- cdrtools_from_Schily | NTLFN problem of 7-ZIP | 7-ZIP vs ZIP - david, 24.07.2010, 15:28
- cdrtools_from_Schily | NTLFN problem of 7-ZIP | 7-ZIP vs ZIP - DOS386, 24.07.2010, 15:34
- cdrtools_from_Schily | NTLFN problem of 7-ZIP | 7-ZIP vs ZIP - david, 24.07.2010, 15:28
- cdrtools_from_Schily | NTLFN problem of 7-ZIP | 7-ZIP vs ZIP - Rugxulo, 24.07.2010, 19:56
- cdrtools_from_Schily | NTLFN problem of 7-ZIP | 7-ZIP vs ZIP - Zyzzle, 24.07.2010, 22:51
- cdrtools_from_Schily | NTLFN problem of 7-ZIP | 7-ZIP vs ZIP - Rugxulo, 24.07.2010, 23:44
- cdrtools_from_Schily | NTLFN problem of 7-ZIP | 7-ZIP vs ZIP - DOS386, 25.07.2010, 06:33
- cdrtools_from_Schily | NTLFN problem of 7-ZIP | 7-ZIP vs ZIP - Zyzzle, 25.07.2010, 12:26
- fixing p7zip 4.65 to make .ZIP use DOS, not Unix, as host OS - Rugxulo, 27.07.2010, 01:59
- fixing p7zip 4.65 to make .ZIP use DOS, not Unix, as host OS - DOS386, 27.07.2010, 02:38
- fixing p7zip 4.65 to make .ZIP use DOS, not Unix, as host OS - Zyzzle, 27.07.2010, 03:40
- fixing p7zip 4.65 to make .ZIP use DOS, not Unix, as host OS - DOS386, 27.07.2010, 03:49
- fixing p7zip 4.65 to make .ZIP use DOS, not Unix, as host OS - Zyzzle, 27.07.2010, 07:23
- cdrtools_from_Schily | NTLFN problem of 7-ZIP | 7-ZIP vs ZIP - Arjay, 27.07.2010, 14:31
- fixing p7zip 4.65 to make .ZIP use DOS, not Unix, as host OS - Rugxulo, 27.07.2010, 01:59
- cdrtools_from_Schily | NTLFN problem of 7-ZIP | 7-ZIP vs ZIP - Zyzzle, 25.07.2010, 12:26
- cdrtools_from_Schily | NTLFN problem of 7-ZIP | 7-ZIP vs ZIP - DOS386, 25.07.2010, 06:33
- cdrtools_from_Schily | NTLFN problem of 7-ZIP | 7-ZIP vs ZIP - Rugxulo, 24.07.2010, 23:44
- cdrtools_from_Schily | NTLFN problem of 7-ZIP | 7-ZIP vs ZIP - david, 27.07.2010, 08:10
- cdrtools_from_Schily | NTLFN problem of 7-ZIP | 7-ZIP vs ZIP - david, 27.07.2010, 14:34
- cdrtools_from_Schily | NTLFN problem of 7-ZIP | 7-ZIP vs ZIP - Zyzzle, 24.07.2010, 22:51
- cdrtools_from_Schily | NTLFN problem of 7-ZIP | 7-ZIP vs ZIP - DOS386, 24.07.2010, 12:06
- cdrtools_from_Schily | NTLFN problem of 7-ZIP | 7-ZIP vs ZIP - david, 23.07.2010, 21:10
- cdrtools_from_Schily | NTLFN problem of 7-ZIP | 7-ZIP vs ZIP - DOS386, 23.07.2010, 07:19
- cdrtools_from_Schily - Rugxulo, 22.07.2010, 01:04
- cdrtools_from_Schily - david, 22.07.2010, 07:48
- cdrtools_from_Schily - Arjay, 21.07.2010, 23:13
- cdrtools_from_Schily - david, 22.07.2010, 07:52
- cdrtools_from_Schily - Arjay, 27.07.2010, 15:54
- p7zip p7zip p7zip ... - Rugxulo, 27.07.2010, 16:46
- p7zip p7zip p7zip ... - Arjay, 27.07.2010, 18:09
- p7zip p7zip p7zip ... - Rugxulo, 28.07.2010, 02:28
- p7zip p7zip p7zip ... - Arjay, 28.07.2010, 08:02
- p7zip pp7zipp ppp7zippp ... stupidity goes on - DOS386, 28.07.2010, 03:23
- p7zip pp7zipp ppp7zippp ... stupidity goes on - Arjay, 28.07.2010, 08:07
- .ARC compression format - Rugxulo, 28.07.2010, 21:27
- p7zip pp7zipp ppp7zippp ... stupidity goes on | UI21DEB used - DOS386, 29.07.2010, 05:56
- p7zip pp7zipp ppp7zippp ... stupidity goes on | UI21DEB used - DOS386, 29.07.2010, 05:58
- p7zip pp7zipp ppp7zippp ... stupidity goes on | UI21DEB used - DOS386, 29.07.2010, 06:05
- p7zip pp7zipp ppp7zippp ... stupidity goes on | UI21DEB used - Rugxulo, 29.07.2010, 08:37
- p7zip pp7zipp ppp7zippp ... stupidity goes on | UI21DEB used - DOS386, 31.07.2010, 07:53
- p7zip pp7zipp ppp7zippp ... stupidity goes on | UI21DEB used - DOS386, 29.07.2010, 06:05
- p7zip pp7zipp ppp7zippp ... stupidity goes on | UI21DEB used - Khusraw, 29.07.2010, 09:21
- p7zip pp7zipp ppp7zippp ... stupidity goes on | UI21DEB used - DOS386, 29.07.2010, 05:58
- p7zip pp7zipp ppp7zippp ... stupidity goes on - Arjay, 28.07.2010, 08:07
- p7zip p7zip p7zip ... - Rugxulo, 28.07.2010, 02:28
- p7zip p7zip p7zip ... - Zyzzle, 28.07.2010, 08:22
- p7zip p7zip p7zip ... - Rugxulo, 28.07.2010, 21:14
- p7zip p7zip p7zip ... - Arjay, 01.08.2010, 12:05
- p7zip p7zip p7zip ... - Rugxulo, 28.07.2010, 21:14
- p7zip p7zip p7zip ... - Arjay, 27.07.2010, 18:09
- p7zip p7zip p7zip ... - Rugxulo, 27.07.2010, 16:46
- cdrtools_from_Schily - Arjay, 27.07.2010, 15:54
- cdrtools_from_Schily - Rugxulo, 21.07.2010, 22:32
- cdrtools_from_Schily - Arjay, 21.07.2010, 21:59