In Windows, the directory is the application bundle

Raymond Chen

Aaargh! wonders why Windows doesn’t just steal the concept of bundles from Apple and package up each application with all its libraries and everything else it needs into a single directory. This is such a great idea, it’s been around since the early 1990’s. It’s just that Windows didn’t give it a cute named like bundle. It just gave it the boring name directory. In other words, it’s a victim of bad marketing. Maybe we should have given it a cute name like… elfgrass. The first directory searched by the LoadLibrary function is the directory containing the application. If you put all your supporting libraries in the same directory as your EXE, and if you access non-library data via paths relative to your application directory, then then you have successfully packaged up your application with all its libraries and everything else it needs into a single directory. Congratulations, you pre-invented the bundle. Indeed, Microsoft’s guidance for over a decade has been to discourage copying files into the System32 directory. If this facility has been around for nearly twenty years, why do people still copy files into the System32 directory? Probably inertia. “We’ve always installed that way, and we’re not changing it because we don’t know what would stop working.” There may be some people concerned about disk space. “We have a bunch of applications which share some common libraries, and by putting the common libraries in a shared location (instead of in the application directory), we avoid wasting the user’s disk space.” Which raises the troublesome question: Is disk space still an issue nowadays? Some people would say that no, disk space is no longer an issue. Hard drives are hundreds of gigabytes in size. Increasing the size of each application by a few dozen megabytes is just noise. Other people would say that yes, disk space is still an issue. (Note how many people got excited when Snow Leopard took up less disk space.) Solid-state hard drives are still limited in size, and even for people with large hard drives, you see them freaking out about the disk space used by things like Windows Update, volume snapshot services, and System Restore. (Nevermind that at least for volume snapshots and System Restore, the disk space is automatically released when disk space starts to run low. It’s like getting upset that the disk cache uses so much of your memory even though the computer is not under any memory pressure.)

Bonus reading: Disk space and Windows 7.


Discussion is closed.

Feedback usabilla icon