Archive: SOD utility


SOD utility
SOD stands for Size On Disk.

Next week sometime, because I can't work on it this weekend, I thought I would post a link to a small tool that compares the Size On Disk and the byte sizes of NSIS installations.

That is, if anyone is interested. It will be a fairly useless tool, although the code could be reused for any path.

I should probably upload the code someplace, so I can link to it?

What is the way to do that?


Thanks for sharing. Things like this can be posted on the NSIS wiki.


http://nsis.sourceforge.net/Get_size_on_disk

This checks for compression and sparse files. The size on disk is calculated from the result. As mentioned, pretty useless.

Building an installer it usually helps to get the size at compile time, "Required space". The code gets the size on disk at runtime. It's out of your hands, if a folder turns out to be compressed or partially compressed where you want to install.


http://nsis.sourceforge.net/mediawik...d3/SODTool.zip

A little late. Sorry.


Important Note on calling ${GetSizeOnDisk} at runtime:
In practice you will be unable to access the size on disk of compressed and sparse files "shortly after a reinstallation". If you call ${GetSizeOnDisk}, the returned size on disk of compressed and sparse files that have been overwritten is temporarily wrong.

The result corrects itself. You might find this interesting: if you halt the installer on your finish page after all files have been reinstalled, then wait thirty seconds, the size on disk is correct.

I don't know why. ${GetSizeOnDisk} does what it says on the tin. The tin is defective. There is a timelag when you overwrite compressed & sparse files. The system recalibrates the "compressed" sizes.


I'm finished with the hard parts.

http://nsis.sourceforge.net/mediawik...OD_II_tool.zip

One question however ...

Since the utility is open source and for a good cause, I wonder if someone would be willing to add a Windows 8 manifest. When I install Windows 8 myself, later this year, I will add the manifest, but I am hesitant about attempting it without having the platform test my handiwork. There may be other Windows 8 problems I have yet to discover also.

I don't want to impose. Maybe it wouldn't be such a good idea. Or maybe it's so foolproof I could do it on Windows 7?

What would be a good procedure?

PMs or responses welcome. Thanks.