Rémy Mouëza | 20 Apr 2011 23:13
Picon

Compiling WxHaskell: ghc-pkg problem with wxcore on Windows XP.

  I can't manage to install wxHaskell's wxcore package under Windows 
despite being seemingly able to compile it.

I am using the Haskell Platform 2010.2.0.0 (with ghc 6.12.3) on Windows 
XP, wxWidgets 2.8 with unicode support and msys with a setup as 
described on the following blog:
http://blog.johantibell.com/2011/01/setting-up-haskell-development.html

with a small alteration, the haskell platform being installed in 
C:\haskell-platform rather than "C:\Program Files\Haskell Platform"
to get to compile wxWidgets.

WxWidgets itself has been successfully compiled with the following 
configuration:

     $ ./configure --prefix=/c/haskell-platform/2010.2.0.0/mingw/ \
                   --enable-optimise   \
                   --enable-unicode    \
                   --enable-monolithic \
                   --enable-shared     \
                   --enable-threads    \

I have install wxdirect successfully using "cabal install --global 
wxdirect". I am using a "--global" install setup because while I 
searched for solutions it seemed to be the recommended way of installing 
wxHaskell.

Then when I try to build wxcore, using the following command (I got the 
include and lib dirs using "wx-config --cxxflags --libs"):

(Continue reading)

Rémy Mouëza | 26 Apr 2011 07:08
Picon

Re: Compiling WxHaskell: ghc-pkg problem with wxcore on Windows XP.

  Thanks for the help,

It seems that it is the root of the problem.
"mount" list some mount point among which I can find "c:" but no 
"c:/msys/c" directory exist.
I then tried to create a "c" directory and the "mount" command to create 
a "physical" location at the root of my path but it did not work any 
better.

However, I managed to install wxHaskell by doing the following:
- 1) copying the wxWidget include directory 
"/c/haskell-platform/2010.2.0.0/mingw/include/wx-2.8" in the mingw 
include directory,  "/c/haskell-platform/2010.2.0.0/mingw/include",  
(and done as well with 
/c/haskell-platform/2010.2.0.0/mingw/lib/wx/include/msw-unicode-release-2.8) 
so as not to have to pass any --extra-include-dirs to cabal,
- 2) launch cabal install wx --ghc-pkg-options="-v2 --force"

If my memories are correct even with 1), ghc-pkg complained about the 
directories not existing; when using the "--force" option as in 2), it 
manages to properly install the packages.
It turns out my set up required some --jedi skills :-)

On 04/25/2011 08:12 PM, Howard B. Golden wrote:
> Hi Rémy,
>
> This is just a guess because I use cygwin with Windows but not msys:
>
> On cygwin the way to access a drive is /cygdrive/c/...
>
(Continue reading)

Howard B. Golden | 25 Apr 2011 20:12
Picon
Favicon
Gravatar

Re: Compiling WxHaskell: ghc-pkg problem with wxcore on Windows XP.

Hi Rémy,

This is just a guess because I use cygwin with Windows but not msys:

On cygwin the way to access a drive is /cygdrive/c/...

Does /c exist by itself as a directory on msys? If not, you may need to use a prefix similar to the way cygwin
requires /cygdrive.

Hope this helps.

Cheers,

Howard
Northridge, California, USA

--- On Wed, 4/20/11, Rémy Mouëza <remy.moueza@...> wrote:

> From: Rémy Mouëza <remy.moueza@...>
> Subject: [wxhaskell-users] Compiling WxHaskell: ghc-pkg problem with wxcore on Windows XP.
> To: wxhaskell-users@...
> Date: Wednesday, April 20, 2011, 2:13 PM
>   I can't manage to install
> wxHaskell's wxcore package under Windows 
> despite being seemingly able to compile it.
> 
> I am using the Haskell Platform 2010.2.0.0 (with ghc
> 6.12.3) on Windows 
> XP, wxWidgets 2.8 with unicode support and msys with a
> setup as 
(Continue reading)

Henning Thielemann | 28 Apr 2011 15:15
Picon

VSlider that supports swapped order of bounds

I wanted to have a vertical slider with small numbers at the bottom and
large numbers at the top. To this end I implemented a variant of
'vslider' that automatically inverses its direction, if the bottom value
is smaller than the top value. You may like to replace the current
'vslider' implementation by this one (and the hslider accordingly).

wxSL_INVERSE :: Int
wxSL_INVERSE = 0x1000

vslider ::
   WX.Window a -> Bool -> Int -> Int ->
   [WX.Prop (WX.Slider ())] -> IO (WX.Slider ())
vslider parentW showLabels top bottom props =
   let (minV, maxV, dirFlags) =
          if top<bottom
            then (top, bottom, 0)
            else (bottom, top, wxSL_INVERSE)
   in  WX.sliderEx parentW minV maxV
          (WXCore.wxVERTICAL .+. dirFlags -- .+. wxSL_LEFT .+.
wxSL_AUTOTICKS
            .+. (if showLabels then WXCore.wxSL_LABELS else 0))
          props

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
(Continue reading)

Henning Thielemann | 28 Apr 2011 15:20
Picon

List Box triggering an event on deconstruction

I noticed that WX.singleListBox triggers a 'select' event when I quit
the program. This has two bad consequences: The event handler may access
other widgets that are already deconstructed (segmentation fault) and
the (get listBox selection) returns (-1) what is an invalid value in my
application. Is this a bug or a feature?

http://code.haskell.org/alsa/gui/src/program.hs

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd

Gmane