[Haskell-cafe] Re: Hackage on Linux
andrewcoppin at btinternet.com
Mon Aug 30 06:24:41 EDT 2010
>>> Regardless, you'd think Cabal could provide some way to make it "easy" to
>>> state where the files it needs actually are. Currently it does not.
>> Well, it uses ghc-pkg to record where the various libraries, etc. are.
>> Otherwise, it could be that none of the Cabal developers are really
>> that familiar with the "best practices" of developing Windows software
>> (and clobbering the registry whilst your at it).
> Note that Cabal is no better at tracking location of non-Haskell resources
> on Unix. (In fact, isn't that what started this topic?)
Indeed. Windows lacks a standard place for developer files.
>> By the way, is it possible to have a globally installed library in
>> Windows (for C, etc.) that can be used no matter which IDE or editor
>> you use? Or does each IDE manage all that on its own?
> DLLs can be put into C:\WINDOWS\SYSTEM32 or equivalent.
More correctly: DLLs can be put *anywhere you like*, so long as they are
registered in the Registry.
And yes, it's quite possible to install libraries system-wide. Take
DirectX, for example. Just about every Windows computer game installer
begins by testing whether DirectX is installed, what version, and
installing the version from the CD if newer (which it almost never is).
[Actually, the cheap games just run the installer whatever; fortunately,
the MS installer checks, sees it's already installed, and doesn't
reinstall it again.] The DirectX DLLs aren't installed in a standard
place; they're registered in the Registry, and that's how you find them.
It's all about the Registry.
> LIB files are
> less standard and I'm under the impression that every IDE uses its own
> notion of where to put them (and may not use the registry in a non-opaque way).
As best as I can tell, Windows has a standard way to locate *run-time*
resources (e.g., DLLs), but not for *compile-time* resources (header
files, LIB files, etc.) As I say, I think the intention is that once
you've built the thing, it should run on any Windows box - which means
it needs to be able to find stuff. But on the development box, you're
expected to do the legwork to tell it where stuff is (or rather, tell
the IDE which then manages stuff for you). Windows really is
GUI-oriented rather than CLI-oriented. Perhaps you've noticed...
More information about the Haskell-Cafe