Developing cabal2wix - building Windows installers automatically

Esa Ilari Vuokko eivuokko at
Tue Aug 7 09:22:34 EDT 2007


Sorry for slow reply, I tried to get cabalw2wix to state where it
somehow works, so that I can distill the issues further.  Unfortunately,
that didn't help ;-)

On 8/6/07, Duncan Coutts <duncan.coutts at> wrote:
> On Mon, 2007-08-06 at 01:05 +0300, Esa Ilari Vuokko wrote:
> > Issue 2:
> >  setup copy --destdir=foo is confusing in Windows.  If my prefix is
> > c:\Program Files (like it is if I run configure without options),
> > the directory structure after copy is foo\Program Files - ie. unsuable
> > locally because drive letter is missing,
> It's not clear that's true, if you copy the files in foo\Program Files\
> to C:\Program Files\ and register the package with ghc-pkg then it
> should work fine.

Yeah, but unlike unix, information is lost, and some of it is system
dependent.  Hence setup copy dist feel so very wrong in Windows.

> >  and unusable at remote
> > locations, because Program Files is not localized.
> >  I'd like not to use all possible directory flags at configure time,
> > because it is impossible to know how different packages react to them.
> I'm not sure why you say that; what they mean does not vary between
> packages. I think setting the prefix and other directory flags should be
> fine.

If that's a rule for packages, I'll go with it.  There is no such guarantee
in Setup script.  It also forces me to duplicate Cabal's logic on directory

> Since you want a relocatable package you do want to set prefix as ".".
> As you said, some of the other bits are not relative to prefix on
> windows, like the docs. So that's a problem.

Yeah.  Annoyance really.

> > Suggestion: Make copy-hook unable to copy random files on their own,
> > this way there could be setup copy --list-links, which would be
> > nicer, IMHO.  As the list could also differentiate between different
> > types of files.  Profiling lib, shared libs (dev and end-user
> > installer in one.)
> I don't think it's a problem that cabal doesn't support this since it's
> easy to generate an install image by copying into a temp dir. This is
> the way most other build systems work (both unix and windows ones). All
> you'd be saving is one bunch of file copies which is really pretty
> cheap.

Space is not my concern at all in this.  It's the akwardness.  setup copy
clearly works because that's how unix files are typically organised.
It typically seems clunky from Windows perspective.

I'd also really like to know what each files does.  Are they executables,
libraries (and what kind!), interface file, etc.

> > Issue 3:
> >  Currently cabal2wix reads dist\setup-config to find out package and
> > compiler information.  This is pretty stupid, as LocalBuildInfo
> > structure might not be that stable, and cabal2wix can only guarantee

> You an do that by calling functions in the Simple build system.

Yes.  I use read instance provided for LocalBuildInfo.

It still will break if setup is built against cabal that has changed
structure AFAICT.

Best regards,

More information about the cabal-devel mailing list