
"Simon Marlow"
On 16 August 2004 19:20, Krasimir Angelov wrote:
There still exists some bugs in Cabal when it is used under Windows.
- The platform dependent places in the code are marked with #ifdef mingw32_TARGET_OS but this macro is never defined ever under Windows. You must add -Dmingw32_TARGET_OS to the command line while building setup.exe and also add -Dmingw32_TARGET_OS to options-ghc field in Setup.description.
I'll fix this. Isaac: is it ok for me to commit fixes to the repository?
Sure, though I'm just as happy to accept the output from "darcs send" and integrate the patches in myself. I'm not sure that the test suite works everywhere, so I like to run the test suite myself. It would be nice if the test suite were actually portable, though. I have a patch of Krasimir's that I was just trying to push, but I can't reach cvs.haskell.org at the moment. (snip)
- The package uses (getEnv "HOME") to get the path to home directory. The variable isn't present in plain Command prompt under Windows.
Agreed. I need to know the equivalent of $HOME for GHC too, so that GHC can keep a per-user package database.
(snip)
on my PC. The trouble here is that to do that I need to add shell32 to extra-libs field in package description. I don't have a way to preprocess Setup.description so I can't add shell32 conditionally. I would like to have a collection of functions like:
getCurrentDirectory
we already have that
getAppUserDataDirectory getHomeDirectory
Maybe - although the conventions still differ between Unix and Windows. On Unix, to store per-user data you would use <homedir>/.<app> whereas on Windows you use <homedir>/<app>. So I think the win32 library should provide access to getAppUserDataDirectory, and the app code still needs to be conditionally compiled.
For what it's worth, I've been collecting various path-related functions and dumping them here, with the hope of organizing them later: darcs get http://www.syntaxpolice.org/darcs_repos/OS.Path/ Thank you both for your work on this, let me know how I can help :) peace, isaac