Developing cabal2wix - building Windows installers automatically

Esa Ilari Vuokko eivuokko at gmail.com
Wed Aug 8 05:18:04 EDT 2007


Simon Marlow wrote:
> Esa Ilari Vuokko wrote:

>> Issue 1:
>>  Cabal puts (at least) docs under Program Files\Common Files - this
>> separates docs from other parts of the program by logical placing,
>
> Not quite true: for an executable, on Windows, docs currently go by
> default into $prefix\Haskell\$pkgid. See:
>
>http://www.haskell.org/ghc/docs/latest/html/Cabal/builders.html#setup-configure-paths

Yes.  I should have said library docs.

> For a library, data files go in C:\Program Files\Common Files\$pkgid.
> There's a very good reason for this: a library cannot discover its
> installation location like an executable can, because it could be linked
> in to an executable anywhere on the system.  Hence if a library needs
> access to auxiliary data files, they better be in a fixed place in the
> filesystem.  A library with data files cannot be fully relocatable at
> install-time.

This might be some unix trick, but in Windows you can at least
 * Use resource strings
 * Use registry

And indeed, if that's the purpose, Common Files is pretty much the right
directory.  But, this is mainly for *widespread* libraries.  In general
it is much better that the application does the installing of library's
data files and then tells library where they are.

I don't really care, I think.  Libraries that are not prepared for
relocation are not ready for publishing in Windows, IMHO.

> However, we do need to change where docs go (they don't have to go in
> $datadir, and they can be relocated at install-time).

Assuming docs are haddock generated, aren't they actually pretty
much fixed because of links?

Best regards,
Esa



More information about the cabal-devel mailing list