Jump to content

ReCAB Post Script for HFSLIP


CirothUngol

Recommended Posts

First of all, please allow me to thank all of those who've contributed to TommyP's excellent and indispensible project. I haven't used HFSLIP in years and only recently came back to try and update my XP install before the looming end-of-service. After grabbing all of the XP updates (Thanx Mim0, love your site!) and running the latest HFSLIP (with all bells and whistles included), the ISO image was just over 700MiB.

Uh Oh.

Seeing that there was a need to try and squeeze every last byte out of the SOURCESS folder in an attempt to keep it's size from exceeding that of a CD-R, I wrote a HFSlip Post Script called ReCAB that will recursively search for all .CAB files (based upon their file extension) and attempt to decrease their file size by extracting the contents and recompressing with both LZX and MSZIP (CompressionMemory=21) as well as Compress=OFF.

If the .CAB contains multiple files then each internal file is compressed using LZX and MSZIP, and CompressionType is changed in the .DDF file as needed before recompressing. Experience has shown that Compress=OFF does more harm than good on multi-file .CABs, so that option was removed. Since MAKECAB.EXE 'flattens' all archives, ReCAB will try to automatically skip any that contain folders. Since EXPAND doesn't generate folders, ReCAB will try to use 7ZA for all extractions. If 7ZA.EXE cannot be located, then EXPAND is used instead.

If ran from HFSLIP it will only search the SOURCESS folder, but if ran outside of HFSLIP it searches the current directory-tree by default. There are a few user-selectable options (including a LogFile) which are described at the beginning of the script.

By running ReCAB on my freshly HFSlipped virgin WinXPsp0 install with full CD contents and all updates/options (SP3, Security/HotFixes, WMP11, DX9c, Flash, WinUpdates... the works.) I was able to shave off over 7MiB. At a mere 1% it's not much, but it did bring my ISO size down from 702MiB to 695MiB, and as MS releases the final fixes for WinXP it might help to keep down the size of the CD image generated by HFSlip. Incidently, ReCAB fared slightly better against the original install CD, saving just over 8MiB. Nice

Now the bad news... this comes at a rather steep price. It's exceedingly slow. It'll triple the time HFSlip takes to complete. ReCAB by itself takes over a hour to process everything in the SOURCESS folder on my 2.4Ghz Quad Core 2. Ouch. Leaving the default variable SKIPFILE=driver.cab will save you about 10-15 minutes (and if you have it on max compression the DRIVER.CAB generated by HFSlip is already as small as it's gonna get).

While all attempts have been made in an effort to assure that ReCAB is bug-free, I've only tested it using VirtualBox and my curently-running aforementioned system. So far so good, ReCAB doesn't seem to do any damage.

...however, your milage may vary. Caveat Emptor. ^_^

Please try it out and inform me of any glaring errors or obvious ommissions. It's also open for modification, if you so choose.

HFSLIP_POST_ReCab.zip

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...