[Fwd: Re: Adding an option to cabal-install]

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Thu Dec 20 17:46:01 EST 2007


On Thu, 2007-12-20 at 22:23 +0000, jim burton wrote:
> -------- Forwarded Message --------
> [snip]
> > 
> > You're quite right, that would be much neater. I've no experience with
> > Windows programming though, so I'd welcome any input. Google suggests
> > [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet
> > Settings] is the key we want and I suppose I need System.Win32.Registry,
> > hKEY_CURRENT_USER and regCreateKey? 
> > 
> > What is the normal/best way of switching on OS?
> > 
> You can ignore that one, I think it's OPTIONS cpp and #ifdef WIN32. But
> is it possible to do the same thing in the .cabal file, so windows users
> don't need `unix' and vice versa?

Use configurations in the .cabal file:

if os(windows)
  build-depends: Win32
  cpp-options: -DWIN32

Duncan



More information about the cabal-devel mailing list