Home > Uncategorized > Packaging for distribution – Common sense

Packaging for distribution – Common sense

Most projects have multiple release packages whenever a new version comes out. Depending on the project, there are usually two, a binary (one for each platform) and a source distribution. Some projects don’t distribute binaries at all.

What really got to me a few days ago was the MinGW project. This is a project that is intended to be used exclusively on Windows. Yet, the developers deprecated the installer (these are standard for most Windows applications), and instead asked users to download 17 packages by hand (something that is a little much even on Linux).

Even worse, some of the packages were compressed not with zip, gzip, or bz2. They chose to use lzma, one of the least common and supported compression formats on Windows. Why would a developer pick the hardest format for a given operating system when packaging specifically for that system?

I try to avoid exotic archive formats like 7z (ironically, these use LZMA compression), but the compression offered by them is so incredible that I decided to post one publicly for the first time. Why? It reduced my 119 MB MinGW distribution to 14.5 MB, and MinGW is intended for use on Windows, so most people will be able to easily read the package with 7-Zip.

If I was packaging source code that could be used on Linux, I wouldn’t use 7z, since it’s harder to deal with on Linux. In my opinion, a zip file or tarball would be the most appropriate means of packaging.

Here’s my personal table for package format selection:

ironically

Type of package Target platform Package Format
Binary Win32 Installer (msi or exe), normal package (zip, 7z, tarball (gz or bz2))
Binary Linux Binaries are rarely distributed unless offered in a package repository or something similar.  Popular applications should be made available for major distributions.
Source Win32 zip, 7z, tarball (gz or bz2)
Source Linux tarball (gz or bz2)
Source Multi-platform zip or tarball (gz or bz2)
Categories: Uncategorized Tags:
  1. No comments yet.
  1. No trackbacks yet.