|
From: ZJ <zj...@ya...> - 2012-12-20 08:14:59
|
Henk-Jan van Tuyl <hjgtuyl@...> writes:
>
> On Wed, 06 Jun 2012 23:14:20 +0200, Henk-Jan van Tuyl
> <hjgtuyl@...>
> wrote:
>
> > The following session seems to indicate that the setup of wxcore cannot
> > handle a space in the pathname of the directory where packages are
> > installed. I don't know how to change the location of this directory; any
> > suggestions how to get wxcore installed? (System: Windows XP)
> >
> >> cabal install wx --global
> > Resolving dependencies...
> > [1 of 1] Compiling Main (
> > C:\DOCUME~1\User\LOCALS~1\Temp\wxcore-0.90.0.1-2708\wxcore-
0.90.0.1\Setup.hs,
> > C:\DOCUME~1\User\LOCALS~1\Temp\wxcore-0.90.0.1-2708\wxcore-
0.90.0.1\dist\setup\Main.o
> > )
> > Linking
> > C:\DOCUME~1\User\LOCALS~1\Temp\wxcore-0.90.0.1-2708\wxcore-
0.90.0.1\dist\setup\setup.exe
> > ...
> > Configuring wxcore-0.90.0.1...
> > Generating class type definitions from .h files
> > generating: src/haskell/Graphics/UI/WXCore/WxcClassTypes.hs
> > reading class definitions:
> > parsing: C:\Program/include/wxc.h
> > wxdirect: C:\Program/include/wxc.h: openFile: does not exist (No such
> > file
> > or directory)
> > Generating class info definitions
> > generating: src/haskell/Graphics/UI/WXCore/WxcClassInfo.hs
> > reading class definitions:
> > parsing: C:\Program/include/wxc.h
> > wxdirect: C:\Program/include/wxc.h: openFile: does not exist (No such
> > file
> > or directory)
> > Generating class method definitions from .h files
> > parsing: Files\Haskell\wxc-0.90.0.3\ghc-7.4.1\include/wxc.h
> > wxdirect: Files\Haskell\wxc-0.90.0.3\ghc-7.4.1\include/wxc.h: openFile:
> > does not exist (No such file or directory)
>
> I have found a solution; I changed wxcore-0.90.0.1\setup.hs (added double
> quotes before and after filenames):
> - line 57 changed to:
> let wxcoreIncludeFile = "\"" ++ wxcDirectory </> "include/wxc.h\""
> - inserted after line 57:
> let wxcDirectory = "\"" ++ wxcDirectory ++ "\""
>
> This solution should be tested on other platforms.
>
> Regards,
> Henk-Jan van Tuyl
>
In case anyone wonders, I stumbled along the same road as Henk.
I modified my Setup.hs inside the downloaded wxcore tar/zip file to this:
putStrLn "Generating class type definitions from .h files"
system $ "wxdirect -t --wxc " ++ "\"" ++ wxcDirectory ++ "\"" ++ " -o " ++
"\"" ++ wxcoreDirectory ++ "\"" ++ " " ++ "\"" ++ wxcoreIncludeFile ++ "\""
putStrLn "Generating class info definitions"
system $ "wxdirect -i --wxc " ++ "\"" ++ wxcDirectory ++ "\"" ++ " -o " ++
"\"" ++ wxcoreDirectory ++ "\"" ++ " " ++ "\"" ++ wxcoreIncludeFile ++ "\""
putStrLn "Generating class method definitions from .h files"
system $ "wxdirect -c --wxc " ++ "\"" ++ wxcDirectory ++ "\"" ++ " -o " ++
"\"" ++ wxcoreDirectory ++ "\"" ++ " " ++ "\"" ++ wxcoreIncludeFile ++ "\""
I'm a total Haskell noob, so I couldn't figure out how to append the " marks to
the variable without causing further problems (as what Henk attempted).
hope this helps anyone out there :)
|