[Otakar Smrz] Cabal's `sdist` on Win32

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Wed Oct 25 14:02:29 EDT 2006


On Wed, 2006-10-25 at 09:48 -0700, Isaac Jones wrote:

> > I would suggest we ship zlib.dll on windows, and not use external tar or
> > gzip programs, but then of course we run into the problem that there's
> > nowhere to put the .dll that will work (unless someone can figure out
> > how to use isolated .dlls and manifests and all that).
> >
> > So perhaps including a recent tar prog (that understands -z) would be
> > the way forward. We'd need this for cabal-install in future, it's not
> > just sdist.
> 
> Do you mean just include it for windows?
> 
> Including tar with cabal seems a bit over the top... Is there a pure
> Haskell tar or gzip or zip?

Tar is easy to code, gzip is harder. Ian wrote some gunzip code in pure
Haskell but I don't think there is a pure gzip Haskell compressor
anywhere. I wrote some bindings to zlib, but then that needs the zlib C
library of course.

I don't think it's that over the top. If we intend to use .tar.gz as the
cabal-install distribution format then windows users need to be able to
decompress that. We could use some other format for which there is
already a decompressor bundled with windows, eg .cab format. However
generating that on non-windows machines is not easy. cabal-install is
already one binary we'd be distributing, it's not that hard to bundle
either zlib.dll or gzip.exe or tar.exe.

> We could just not compress things, I guess, if it's pretty common to
> have this older version of tar.

As Neil said, Windows users don't have tar/gzip at all.

Duncan



More information about the cabal-devel mailing list