
Esa Ilari Vuokko wrote:
Hi,
I decided to try to build a cabal -> wix converter, cabal2wix, to make it easier to generate Windows installers for cabal-packages. My main target is ghc-compiled libraries. There are few issues I've ran into and I'd appreciate any comments on them.
I'll try to publish the darcs repo somewhere if there's interest.
Some of the issues are gray, as I don't understand all the details myself, and reading Cabal's code isn't very enlightening.
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-config... 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. 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). Cheers, Simon