Makecab tweakage

Questions about Update Pack making? Ask here.
Post Reply
Vid0
Posts: 41
Joined: Thu Apr 14, 2005 6:24 am
Location: Lithuania

Makecab tweakage

Post by Vid0 » Thu Apr 14, 2005 6:30 am

What point is to use MS Cabinet Maker (Version 5.1.2600.2180) to compress Drivers.cab (and mmssetup.cab) when MS Cabinet Tool (Version 5.1.2600.0) does the same job faster and makes CAB file smaller at the same time?

Original size: 366,144,432 bytes in 4768 files

MS Cabinet Maker - Version 5.1.2600.2180
Drivers.cab - 81,251,391 bytes

MS Cabinet Tool - Version 5.1.2600.0
Drivers.cab - 79,933,653 bytes
( Command Line: cabarc -m LZX:21 n Drivers.cab * )

User avatar
RyanVM
Site Admin
Posts: 5189
Joined: Tue Nov 23, 2004 6:03 pm
Location: Pennsylvania
Contact:

Post by RyanVM » Thu Apr 14, 2005 6:37 am

What, me ignoring your email wasn't a hint enough? Try setting the Folder Size Threshold to 5000000 and see what the size is. Yes, I made a slight tradeoff in compression ratio in favor of MUCH faster extraction from the CAB during text mode setup. And since you're talking about a roughly 1MB difference in size, is it really worth getting your panties in a wad over?
Get up to $200 off on hosting from the same people who host this website!
http://www.ryanvm.net/forum/viewtopic.php?t=2357

Vid0
Posts: 41
Joined: Thu Apr 14, 2005 6:24 am
Location: Lithuania

Post by Vid0 » Thu Apr 14, 2005 6:41 am

And the worst thing about compression implemented in 1.2.1 is the fact that Drivers.cab (and mmssetup.cab) are produced binary different after each run. This is because __integrate.exe resets date & time of every file it process. This way I get 16 binary incompatible CAB files for my Windows XP 8in1 CD. Guess what about squeezing them to a single CD? And this is waste of time! About 2 hours after each update of RVMUpdatePack. This is because I must delete all Drivers.cab (and mmssetup.cab) in each directory and replace them by manually created ones.

User avatar
RyanVM
Site Admin
Posts: 5189
Joined: Tue Nov 23, 2004 6:03 pm
Location: Pennsylvania
Contact:

Post by RyanVM » Thu Apr 14, 2005 10:21 am

Funny enough, that issue is the reason I include a different version of makecab in the update pack. The older version from the CAB SDK (circa 1997) doesn't have that date resetting issue.

Thanks for reminding me that I need to have __integrate.exe use that version of makecab in the future, however. I was going to do that for 1.2.1 but forgot.

Vid0
Posts: 41
Joined: Thu Apr 14, 2005 6:24 am
Location: Lithuania

Post by Vid0 » Thu Apr 14, 2005 10:51 am

Yah, I found some discussion about slow decompression problem here:
http://www.msfn.org/board/index.php?showtopic=27465

Now I’m downloading MS Windows Installer SDK V2.0. Maybe I'll find some help there.

Vid0
Posts: 41
Joined: Thu Apr 14, 2005 6:24 am
Location: Lithuania

Post by Vid0 » Thu Apr 14, 2005 1:40 pm

1. First of all: CD has limited amount of space and each saved Mb is very useful, especially for me, coz I’m trying to squeeze 8 versions of Windows with all updates and other useful things into a single 700Mb CD. Now I left only with 30Mb of free space and still Bâshrat the Sneaky's DriverPacks are not fully integrated.

Original size: 366,144,432 bytes in 4768 files

RVMUpdatePack 1.2.1 method ('dir /b Drivers' , FolderSizeThreshold=5000000)
Drivers.cab - 81,251,391 bytes

Sorted file list packing method ('dir /b /o-en Drivers' , FolderSizeThreshold=2500000)
Drivers.cab - 78,886,709 bytes

Sorted file list packing method ('dir /b /o-en Drivers' , FolderSizeThreshold=5000000)
Drivers.cab - 77,471,349 bytes

Sorted file list packing method ('dir /b /o-en Drivers' , No FolderSizeThreshold)
Drivers.cab - 77,480,531 bytes

Sorting list of files before packing (at the same FolderSizeThreshold level and unpacking speed) lets to save a lot of space on the CD indeed. I’ll try to research more on this.

2. To avoid of creating setup.rpt and setup.inf I’ll suggest adding the following lines to your driver.ddf:
.Set RptFileName=NUL
.Set InfFileName=NUL

3. MS Cabinet Maker - Version 5.1.2600.2180 mistakenly uses file creation time instead of last modification time by default. Is it a bug or a feature?
Last edited by Vid0 on Thu Apr 14, 2005 2:26 pm, edited 1 time in total.

User avatar
RyanVM
Site Admin
Posts: 5189
Joined: Tue Nov 23, 2004 6:03 pm
Location: Pennsylvania
Contact:

Post by RyanVM » Thu Apr 14, 2005 2:04 pm

3.) I just told you in my last reply that it was a bug with the newer versions of makecab that the original CAB SDK version didn't have.

As for the rest, I'll look into it.
Get up to $200 off on hosting from the same people who host this website!
http://www.ryanvm.net/forum/viewtopic.php?t=2357

User avatar
RyanVM
Site Admin
Posts: 5189
Joined: Tue Nov 23, 2004 6:03 pm
Location: Pennsylvania
Contact:

Post by RyanVM » Thu Apr 14, 2005 3:12 pm

I have to say that the sorted list stuff is VERY intriguing. That's a very nice find. I guess I have something to play with tonight :P

But yeah, to reiterate the point I made earlier, if you use the CAB SDK version of Makecab (the one that comes in the Full pack), you shouldn't have any issues with file dates and therefore problems making the CD image.
Get up to $200 off on hosting from the same people who host this website!
http://www.ryanvm.net/forum/viewtopic.php?t=2357

Vid0
Posts: 41
Joined: Thu Apr 14, 2005 6:24 am
Location: Lithuania

Post by Vid0 » Thu Apr 14, 2005 3:25 pm

RyanVM wrote:... if you use the CAB SDK version of Makecab (the one that comes in the Full pack), you shouldn't have any issues with file dates and therefore problems making the CD image.
Yah, older version works OK indeed. I found bugfree Cabinet Maker - Version 5.00.2134.1 on Windows2000 SP4 machine. Problem has been solved, thanks. :P

Vid0
Posts: 41
Joined: Thu Apr 14, 2005 6:24 am
Location: Lithuania

Post by Vid0 » Thu Apr 14, 2005 4:32 pm

RyanVM wrote:I have to say that the sorted list stuff is VERY intriguing.
Yes, indeed. I've tried different file sorting on a little bit smaller archive (mmssetup.cab). And found, that default (dir /b) order produces 911,098 bytes CAB, sorted (dir /b /oen) - 910,588 bytes, and manually reordered version (as follows) produces 908,936 bytes CAB. The last version saves one cluster (2kb) on CD :P :

mmssetup\msgslang.dll
mmssetup\msmsgs.exe
mmssetup\msgsc.dll
mmssetup\xpmsgr.chm
mmssetup\newalert.wav
mmssetup\newemail.wav
mmssetup\type.wav
mmssetup\online.wav
mmssetup\logowin.gif
mmssetup\lvback.gif

Now i'll imagine if someone would tweak drivers.cab file order to a perfect one - how many clusters would be saved! :twisted:

User avatar
RyanVM
Site Admin
Posts: 5189
Joined: Tue Nov 23, 2004 6:03 pm
Location: Pennsylvania
Contact:

Post by RyanVM » Thu Apr 14, 2005 5:47 pm

VERY intriguing. Well, this thread has definitely been useful so far. It a) reminded me of something I meant to do anyway :P and b) showed how to shave a few more MB off. Thanks for the help!

And feel free to keep posting your results as you find them.
Get up to $200 off on hosting from the same people who host this website!
http://www.ryanvm.net/forum/viewtopic.php?t=2357

Post Reply