Bug: Cabal + Windows + extensions on executables

Hi With Hoogle, I have as one of the lines: Executable: index.cgi Main-Is: Web.hs Other-Modules: HTML Hs-Source-Dirs: src, src/Web This generates a file called index.cgi However, I don't think that install realises this... D:\sources\hoogle>runhaskell Setup install Installing: C:\Program Files\Haskell\Hoogle-3.0\ghc-6.4.2 & C:\Program Files\Has kell\bin Hoogle-3.0... *** Exception: dist\build\index.cgi\index.cgi.exe: copyFile: does not exist (No such file or directory) Windows XP, GHC 6.4.2, Cabal from darcs Thanks Neil

On Tue, 2006-11-07 at 18:12 +0000, Neil Mitchell wrote:
Hi
With Hoogle, I have as one of the lines:
Executable: index.cgi Main-Is: Web.hs Other-Modules: HTML Hs-Source-Dirs: src, src/Web
This generates a file called index.cgi
However, I don't think that install realises this...
D:\sources\hoogle>runhaskell Setup install Installing: C:\Program Files\Haskell\Hoogle-3.0\ghc-6.4.2 & C:\Program Files\Has kell\bin Hoogle-3.0... *** Exception: dist\build\index.cgi\index.cgi.exe: copyFile: does not exist (No such file or directory)
Hmm, that's tricky. How do you propose that we solve it? Currently we specify a name without the extension. On windows of course most executables have a .exe extension so we automatically append that. We don't want people to have to say: executable: foo.exe since then it's not portable to non-windows. So how can we infer that no extra .exe extension is required? Is it reasonable to guess that if it already has one '.' in the name that we shouldn't add a .exe extension? Duncan

Hi
Hmm, that's tricky. How do you propose that we solve it?
Currently we specify a name without the extension. On windows of course most executables have a .exe extension so we automatically append that.
We don't want people to have to say: executable: foo.exe
since then it's not portable to non-windows. So how can we infer that no extra .exe extension is required? Is it reasonable to guess that if it already has one '.' in the name that we shouldn't add a .exe extension?
Yes, I think thats the logic GHC seems to use, so you need logic that matches GHC. I think in this case I'd rather the generated executable from GHC was index.cgi.exe on Windows and just index.cgi on Linux - but I'm not sure how to get that going. Thanks Neil
participants (2)
-
Duncan Coutts
-
Neil Mitchell