Misplacement of installed binaries

Hi, Using Cabal-1.4 and cabal-install head, installing cabal-install puts the binary at: "C:\Documents and Settings\Administrator\Application Data\cabal\bin" That seems like a bad choice of location for installed program files on Windows. Application Data is not for putting binaries into. It is installing programs, and they should go in C:\Program Files\Haskell\bin, as they did with Cabal-1.2. Is there a reason for changing the install location on Windows? Thanks Neil

On Fri, 2008-06-13 at 19:14 +0100, Neil Mitchell wrote:
Hi,
Using Cabal-1.4 and cabal-install head, installing cabal-install puts the binary at:
"C:\Documents and Settings\Administrator\Application Data\cabal\bin"
That seems like a bad choice of location for installed program files on Windows. Application Data is not for putting binaries into.
So if Application Data is not a sensible place, what is the standard location that users have write access to that is suitable for installing programs?
It is installing programs, and they should go in C:\Program Files\Haskell\bin, as they did with Cabal-1.2.
If you do a global install that is where they go. What has changed is that cabal-install defaults to per-user installs. At the moment for per-user installs we put everything under the cabal dir. Admittedly this makes rather more sense on unix than on windows since more people have admin access on windows and $HOME/.cabal is a reasonable place to put things on unix.
Is there a reason for changing the install location on Windows?
So we didn't deliberately change it as such. The location for global installs has not changed, it's just that cabal-install does user installs by default. You can do global ones with the --global flag or a setting in the config file. So if there's a more sensible layout for unprivileged per-user installs then we should of course do that. If you think unprivileged per-user installs are just a bad idea on windows then say so and we can switch to doing global installs by default on windows. Perhaps it's only me who does not have write access to the Program Files directory on any windows machine. Duncan

Hi
If you think unprivileged per-user installs are just a bad idea on windows then say so and we can switch to doing global installs by default on windows. Perhaps it's only me who does not have write access to the Program Files directory on any windows machine.
I suspect that most people should be doing global installs, and that local installs should be a secondary option. Not having write access to Program Files is an issue though, which I think Vista may make worse, by restricting privilaged operations from more people. Ideally, you want to do a local install on Windows if you can't create a folder in C:\Program Files, and a global install if you can. Is that too crazy for a piece of logic? It's certainly less predictable... Thanks Neil

On Sat, 2008-06-14 at 10:26 +0100, Neil Mitchell wrote:
Hi
If you think unprivileged per-user installs are just a bad idea on windows then say so and we can switch to doing global installs by default on windows. Perhaps it's only me who does not have write access to the Program Files directory on any windows machine.
I suspect that most people should be doing global installs, and that local installs should be a secondary option. Not having write access to Program Files is an issue though, which I think Vista may make worse, by restricting privilaged operations from more people.
So is that a vote in favour of doing global installs by default on windows or not? Does anyone know what happens when you try to do a global install on Vista? I only have access to Win2k3 (as non-admin).
Ideally, you want to do a local install on Windows if you can't create a folder in C:\Program Files, and a global install if you can. Is that too crazy for a piece of logic? It's certainly less predictable...
We don't actually have any reliable portable way of checking this as far as I know. Thing like this have been suggested before, eg checking at configure time that we have write permission on the directories we intend to install into. One might hope that getPermissions :: FilePath -> IO Permissions would do the trick but I hear that this does not tell us what we want. If anyone knows how we could do this check then please say. So for the case that we do not have write permission for Program Files and we do have to do a local install, what directory would you suggest we use? Duncan

Hi
I suspect that most people should be doing global installs, and that local installs should be a secondary option. Not having write access
So is that a vote in favour of doing global installs by default on windows or not? Does anyone know what happens when you try to do a global install on Vista? I only have access to Win2k3 (as non-admin).
A vote in favour of global installs if possible. On Vista you will probably get an incredibly annoying alert from the OS, although I think most real developers will turn that feature off in the first 5 minutes.
So for the case that we do not have write permission for Program Files and we do have to do a local install, what directory would you suggest we use?
No idea. I guess there are arguments both ways, so I'd stick with how it is currently. However, the GHC and Hugs installers should probably both add these extra locations to the %PATH% environment variable. Thanks Neil

Hi
This problem just bit me quite severely. Imagine the scenario:
You install haddock using runhaskell method.
You upgrade haddock, and install it using cabal install.
Both binaries get placed in different places, and depending on your
PATH, you either end up running the old one or the new one. The
difference is subtle, and not good! This is highly unusual for Windows
behaviour.
Therefore I ammend my vote to always install as global, if that fails,
give a message to the user suggesting they might try a local install.
Otherwise these issues will crop up more and more. Anyway, typing
"install" kind of gives the impression to a Windows user that admin
access will be required, so I don't think its too bad.
Thanks
Neil
On 6/15/08, Neil Mitchell
Hi
I suspect that most people should be doing global installs, and that local installs should be a secondary option. Not having write access
So is that a vote in favour of doing global installs by default on windows or not? Does anyone know what happens when you try to do a global install on Vista? I only have access to Win2k3 (as non-admin).
A vote in favour of global installs if possible. On Vista you will probably get an incredibly annoying alert from the OS, although I think most real developers will turn that feature off in the first 5 minutes.
So for the case that we do not have write permission for Program Files and we do have to do a local install, what directory would you suggest we use?
No idea.
I guess there are arguments both ways, so I'd stick with how it is currently. However, the GHC and Hugs installers should probably both add these extra locations to the %PATH% environment variable.
Thanks
Neil

On Sun, 2008-06-15 at 21:10 +0100, Neil Mitchell wrote:
I suspect that most people should be doing global installs, and that local installs should be a secondary option. Not having write access
So is that a vote in favour of doing global installs by default on windows or not? Does anyone know what happens when you try to do a global install on Vista? I only have access to Win2k3 (as non-admin).
A vote in favour of global installs if possible. On Vista you will probably get an incredibly annoying alert from the OS, although I think most real developers will turn that feature off in the first 5 minutes.
Done.
So for the case that we do not have write permission for Program Files and we do have to do a local install, what directory would you suggest we use?
No idea.
I guess there are arguments both ways, so I'd stick with how it is currently.
Ok. Duncan
participants (2)
-
Duncan Coutts
-
Neil Mitchell