Lyle Kopnicky | 2 Sep 2009 09:14

Need Cygwin to install wxHaskell?

Hi folks,


I'm trying to build a program using GHC that links statically to wxHaskell, so it can be easily distributed as a single file. Therefore I don't want any dependencies on Cygwin. I'm using Windows Vista 32-bit.

I was able to download wxWidgets 2.8 and build it using Visual C++ 2008 Express Edition. But I don't know what to do next. I get this error from cabal:

PS C:\wxWidgets-2.8.10> cabal install wx
Resolving dependencies...
warning:
 Unable to find wxWidgets configuration (wx-config).

checking system:
error:
 Unable to find the 'wx-config' program: wx-config
 Maybe you forgot to run 'make install' on wxWidgets?
 Otherwise, add the install directory of wx-config to your path.

 Or maybe you are trying to compile with Microsoft Visual C++?
 If so, you can specify that on the command line:
 For example: ./configure --with-msc

cabal.exe: Error: some packages failed to install:
wx-0.11.1.2 depends on wxcore-0.11.1.2 which failed to install.
wxcore-0.11.1.2 failed during the configure step. The exception was:
exit: ExitFailure 2

I don't see a program called wx-config, but I do see wx-config.in. I tried "nmake install" (Microsoft make) but nothing happened. It seems to me that running the configure script requires bash.

Is it not possible to install wxHaskell without Cygwin after all?

Thanks,
Lyle
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Eric Y. Kow | 2 Sep 2009 13:36
Picon
Gravatar

Re: Need Cygwin to install wxHaskell?

Hi Lyle,

On Wed, Sep 02, 2009 at 00:14:08 -0700, Lyle Kopnicky wrote:
> Is it not possible to install wxHaskell without Cygwin after all?

How about using the Windows binaries?

Meanwhile Brian has done some work attempting to improve the
cabalisation of the wxcore package - http://github.com/bsl/wxcore

Maybe that will work better?

--

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Eric Y. Kow | 2 Sep 2009 20:47
Picon
Gravatar

wxHaskell recabalised

Hi everybody,

For those of you not following wxhaskell-devel: Brian Lewis has been
doing which could make installing wxHaskell from source (and
consequently install wxHaskell-based applications) a lot easier.

He has cleaned up our build infrastructure, replacing our configure
script, makefile and trivial Cabal wrapper with a 100% Cabal based
solution.  This includes our wxc layer now specified through the
'c-sources' field in the cabal file.

It seems to work for me and Brian.  Could somebody else try it out,
maybe somebody on Windows?  Here's the procedure.

1. Install wxWidgets if you have not done so already.

   I never managed to use wxHaskell with the wxWidgets that comes with
   MacOS X Leopard.  On the other hand, building one for source works a
   lot better.  (don't forget --enable-unicode).  I had a similar
   experience with Ubuntu Linux too.

2. Update your PATH so that the wx-config from your wxWidgets is in it

3. Download Brian Lewis's work and install it

   git clone git://github.com/bsl/wxdirect.git
   git clone git://github.com/bsl/wxcore.git
   darcs get http://code.haskell.org/wxhaskell
   cd wxdirect; cabal install; cd ..
   cd wxcore; cabal install; cd ..
   cd wxhaskell/wx; cabal install

4. Now try building a sample application and test it.

It would also be great if some wxHaskell developers could comment!  If
this works out it means we get much easier wxHaskell installation. :-)

--

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Lyle Kopnicky | 2 Sep 2009 17:10

Re: Need Cygwin to install wxHaskell?

Hi Eric,

On Wed, Sep 2, 2009 at 4:36 AM, Eric Y. Kow <eric.kow-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi Lyle,

On Wed, Sep 02, 2009 at 00:14:08 -0700, Lyle Kopnicky wrote:
> Is it not possible to install wxHaskell without Cygwin after all?

How about using the Windows binaries?

The only binaries I see at http://www.wxwidgets.org/downloads/ are for Debian and Ubuntu. Everything else is source.

Meanwhile Brian has done some work attempting to improve the
cabalisation of the wxcore package - http://github.com/bsl/wxcore

It looks like that still tries to read "wx-config", which I don't know how to generate.

Thanks,
Lyle
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Eric Y. Kow | 2 Sep 2009 22:45
Picon
Gravatar

Re: Need Cygwin to install wxHaskell?

> > On Wed, Sep 02, 2009 at 00:14:08 -0700, Lyle Kopnicky wrote:
> > > Is it not possible to install wxHaskell without Cygwin after all?
> >
> > How about using the Windows binaries?

Hmm... see
 - http://biolpc22.york.ac.uk/pub/2.8.9/install-msw-2.8.9.txt
 - http://www.haskell.org/haskellwiki/WxHaskell/Windows

> It looks like that still tries to read "wx-config", which I don't know how
> to generate.

That's part of wxWidgets.  Once you've got wxWidgets installed, you
should be able to see a wx-config in its bin dir somewhere.

--

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Anthony Cowley | 3 Sep 2009 00:20
Favicon

ShowFullScreen support?

Hello,

Is there a way to style a frame so that a wxHaskell application on Mac
OS X runs full screen? I've tried setting the style to 31, which hides
the usual window chrome, but haven't been able to get something whose
client area actually covers the screen.

Thanks,
Anthony

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Lyle Kopnicky | 3 Sep 2009 08:38

Re: wxHaskell recabalised

Oh, I finally figured it out! I had to type:


PS C:\Users\Lyle\devel\haskell\wxcore> $env:WXCFG = "vc_lib\mswd"

And then I was able to run cabal install without the previous error. Why mswd and not msw, I have no idea. When I run wx-config without parameters, it tells me WXCFG should point to the "relative path of build.cfg". Relative to what, who knows? So I had to try things until I figured it out.

So, it built a bunch of classes, but then it started spewing out a bunch of errors. It couldn't find things:

[23 of 23] Compiling Graphics.UI.WXCore ( src\haskell\Graphics\UI\WXCore.hs, dist\build\Graphics\UI\WXCore.o )

In file included from src\cpp\apppath.cpp:1:0:

src\include\wrapper.h:20:19:  wx/wx.h: No such file or directory

<sigh> So close...

It spit out a bunch of "no such file or directory" errors, then started varying them:

In file included from src\cpp\apppath.cpp:1:0:

src\include\wrapper.h:77:0:
     error: expected initializer before '*' token

src\include\wrapper.h:96:0:
     error: `wxString' has not been declared

src\include\wrapper.h:96:0:
     error: ISO C++ forbids declaration of `src' with no type

src\include\wrapper.h:107:0:
     error: expected class-name before '{' token

...

src\include\wrapper.h:388:0:
     error: class `ELJServer' does not have any field named `wxTCPServer'
src/include/wrapper.h: At global scope:

src\include\wrapper.h:398:0:
     error: expected class-name before '{' token

src\include\wrapper.h:404:0:
     error: ISO C++ forbids declaration of `wxConnectionBase' with no type

src\include\wrapper.h:404:0:
     error: `wxConnectionBase' declared as a `virtual' field

src\include\wrapper.h:404:0:  error: expected `;' before '*' token
src/include/wrapper.h: In constructor `ELJClient::ELJClient(void*, void*)':

And so on...

- Lyle
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Lyle Kopnicky | 3 Sep 2009 07:49

Re: wxHaskell recabalised

Eric,

Thanks to a pointer someone gave me, I found wx-config at:

http://wxconfig.googlepages.com/

I followed your instructions, but I assumed that we should run the git lines if we have git, and darcs if we're using darcs. Do I need both git and darcs? I just have darcs installed. I had no problem building wxdirect:

PS C:\Users\Lyle\devel\haskell\wxhaskell\wxdirect> cabal install
Resolving dependencies...
Configuring wxdirect-0.11.1.3...
Preprocessing executables for wxdirect-0.11.1.3...
Building wxdirect-0.11.1.3...
[ 1 of 14] Compiling MultiSet         ( src\MultiSet.hs, dist\build\wxdirect\wxdirect-tmp\MultiSet.o )
[ 2 of 14] Compiling HaskellNames     ( src\HaskellNames.hs, dist\build\wxdirect\wxdirect-tmp\HaskellNames.o )
[ 3 of 14] Compiling Types            ( src\Types.hs, dist\build\wxdirect\wxdirect-tmp\Types.o )
[ 4 of 14] Compiling CompileSTC       ( src\CompileSTC.hs, dist\build\wxdirect\wxdirect-tmp\CompileSTC.o )
[ 5 of 14] Compiling ParseEiffel      ( src\ParseEiffel.hs, dist\build\wxdirect\wxdirect-tmp\ParseEiffel.o )
[ 6 of 14] Compiling CompileDefs      ( src\CompileDefs.hs, dist\build\wxdirect\wxdirect-tmp\CompileDefs.o )
[ 7 of 14] Compiling ParseC           ( src\ParseC.hs, dist\build\wxdirect\wxdirect-tmp\ParseC.o )
[ 8 of 14] Compiling Classes          ( src\Classes.hs, dist\build\wxdirect\wxdirect-tmp\Classes.o )
[ 9 of 14] Compiling CompileClassInfo ( src\CompileClassInfo.hs, dist\build\wxdirect\wxdirect-tmp\CompileClassInfo.o )
[10 of 14] Compiling DeriveTypes      ( src\DeriveTypes.hs, dist\build\wxdirect\wxdirect-tmp\DeriveTypes.o )
[11 of 14] Compiling CompileClassTypes ( src\CompileClassTypes.hs, dist\build\wxdirect\wxdirect-tmp\CompileClassTypes.o
)
[12 of 14] Compiling CompileHeader    ( src\CompileHeader.hs, dist\build\wxdirect\wxdirect-tmp\CompileHeader.o )
[13 of 14] Compiling CompileClasses   ( src\CompileClasses.hs, dist\build\wxdirect\wxdirect-tmp\CompileClasses.o )
[14 of 14] Compiling Main             ( src\Main.hs, dist\build\wxdirect\wxdirect-tmp\Main.o )
Linking dist\build\wxdirect\wxdirect.exe ...
Installing executable(s) in C:\Program Files\Haskell\bin

But I had trouble building wxcore:

PS C:\Users\Lyle\devel\haskell\wxhaskell\wxdirect> cd ..
PS C:\Users\Lyle\devel\haskell\wxhaskell> cd wxcore
PS C:\Users\Lyle\devel\haskell\wxhaskell\wxcore> cabal install
Resolving dependencies...
Configuring wxcore-0.11.1.3...
Preprocessing library wxcore-0.11.1.3...
cabal.exe: can't find source for Graphics.UI.WXCore.WxcClassTypes in src,
dist\build\autogen
cabal.exe: Error: some packages failed to install:
wxcore-0.11.1.3 failed during the building phase. The exception was:
exit: ExitFailure 1

Do I need git?

Thanks,
Lyle

On Wed, Sep 2, 2009 at 11:47 AM, Eric Y. Kow <eric.kow-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi everybody,

For those of you not following wxhaskell-devel: Brian Lewis has been
doing which could make installing wxHaskell from source (and
consequently install wxHaskell-based applications) a lot easier.

He has cleaned up our build infrastructure, replacing our configure
script, makefile and trivial Cabal wrapper with a 100% Cabal based
solution.  This includes our wxc layer now specified through the
'c-sources' field in the cabal file.

It seems to work for me and Brian.  Could somebody else try it out,
maybe somebody on Windows?  Here's the procedure.

1. Install wxWidgets if you have not done so already.

  I never managed to use wxHaskell with the wxWidgets that comes with
  MacOS X Leopard.  On the other hand, building one for source works a
  lot better.  (don't forget --enable-unicode).  I had a similar
  experience with Ubuntu Linux too.

2. Update your PATH so that the wx-config from your wxWidgets is in it

3. Download Brian Lewis's work and install it

  git clone git://github.com/bsl/wxdirect.git
  git clone git://github.com/bsl/wxcore.git
  darcs get http://code.haskell.org/wxhaskell
  cd wxdirect; cabal install; cd ..
  cd wxcore; cabal install; cd ..
  cd wxhaskell/wx; cabal install

4. Now try building a sample application and test it.

It would also be great if some wxHaskell developers could comment!  If
this works out it means we get much easier wxHaskell installation. :-)

--
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
wxhaskell-users mailing list
wxhaskell-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Lyle Kopnicky | 3 Sep 2009 08:25

Re: wxHaskell recabalised

Sorry folks, I realized I mixed something up in the last one. I set WXCFG instead of WXWIN. When I set WXWIN, it stops complaining about WXWIN, and starts complaining about WXCFG:


Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll\mswud)
to specify which configuration exactly you want to use.
setup.exe: readProcess: wx-config "--libs" "--cppflags" (exit 1): failed
cabal.exe: Error: some packages failed to install:
wxcore-0.11.1.3 failed during the configure step. The exception was:
exit: ExitFailure 1
PS C:\Users\Lyle\devel\haskell\wxcore>

I tried setting WXCFG to vc_dll\msw, but that doesn't help. I also tried setting it to "build\msw", or putting the full path in front. I still get that error. I can't figure out what kind of value it wants.

Any ideas?

Thanks,
Lyle
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Lyle Kopnicky | 3 Sep 2009 08:18

Re: wxHaskell recabalised

Hmm... I installed git, and cloned the repositories as requested. Now I can cd to wxdirect and cabal install it, no problem. Then I cd to the wxcore git repository, and cabal install, and it complains that it can't find my wxWidgets installation, to use the --prefix flag or set WXWIN. I tried cabal install with the --prefix flag, but that didn't work either. So I set WXWIN and tried again. No good. Output is below.

I'm using Vista 32-bit, PowerShell V2.

PS C:\Users\Lyle\devel\haskell\wxcore> $env:WXCFG = "C:\wxWidgets-2.8.10"
PS C:\Users\Lyle\devel\haskell\wxcore> cabal install
Resolving dependencies...
generating: src/haskell/Graphics/UI/WXCore/WxcClassTypes.hs
reading class definitions:
parsing: src/include/wxc.h
parsing: src/include/wxc_types.h
parsing: src/include/wxc_glue.h
parsing: src/include/db.h
parsing: src/include/dragimage.h
parsing: src/include/graphicscontext.h
parsing: src/include/glcanvas.h
parsing: src/include/sound.h
parsing: src/include/managed.h
parsing: src/include/mediactrl.h
parsing: src/include/previewframe.h
parsing: src/include/printout.h
parsing: src/include/textstream.h
parsing: src/include/stc.h
parsing: src/include/stc_gen.h
generated 539 class definitions.
ok.
generating: src/haskell/Graphics/UI/WXCore/WxcClassInfo.hs
reading class definitions:
parsing: src/include/wxc.h
parsing: src/include/wxc_types.h
parsing: src/include/wxc_glue.h
parsing: src/include/db.h
parsing: src/include/dragimage.h
parsing: src/include/graphicscontext.h
parsing: src/include/glcanvas.h
parsing: src/include/sound.h
parsing: src/include/managed.h
parsing: src/include/mediactrl.h
parsing: src/include/previewframe.h
parsing: src/include/printout.h
parsing: src/include/textstream.h
parsing: src/include/stc.h
parsing: src/include/stc_gen.h
generated 381 class info definitions
ok.
parsing: src/include/wxc.h
parsing: src/include/wxc_types.h
parsing: src/include/wxc_glue.h
parsing: src/include/db.h
parsing: src/include/dragimage.h
parsing: src/include/graphicscontext.h
parsing: src/include/glcanvas.h
parsing: src/include/sound.h
parsing: src/include/managed.h
parsing: src/include/mediactrl.h
parsing: src/include/previewframe.h
parsing: src/include/printout.h
parsing: src/include/textstream.h
parsing: src/include/stc.h
parsing: src/include/stc_gen.h
ignore: parse error : //WXCOLORREF wxColour_GetPixel( TSelf(wxColour) _obj );
generating: src/haskell/Graphics/UI/WXCore/WxcClassesAL.hs
reading class definitions:
parsing: src/include/wxc.h
parsing: src/include/wxc_types.h
parsing: src/include/wxc_glue.h
parsing: src/include/db.h
parsing: src/include/dragimage.h
parsing: src/include/graphicscontext.h
parsing: src/include/glcanvas.h
parsing: src/include/sound.h
parsing: src/include/managed.h
parsing: src/include/mediactrl.h
parsing: src/include/previewframe.h
parsing: src/include/printout.h
parsing: src/include/textstream.h
parsing: src/include/stc.h
parsing: src/include/stc_gen.h
generated 1565 methods for 121 classes.
generating: src/haskell/Graphics/UI/WXCore/WxcClassesMZ.hs
generated 2184 methods for 123 classes.
generating: src/haskell/Graphics/UI/WXCore/WxcClasses.hs
generated 3749 total methods for 244 total classes.
ok.
parsing: src/eiffel/wxc_defs.e
parsing: src/eiffel/wx_defs.e
parsing: src/eiffel/stc.e
generating: src/haskell/Graphics/UI/WXCore/WxcDefs.hs
generated 2439 constant definitions
ok.

Please use the --prefix flag (as in wx-config --prefix=C:\wxWidgets)
or set the environment variable WXWIN (as in WXWIN=C:\wxWidgets)
to specify where is your installation of wxWidgets.
setup.exe: readProcess: wx-config "--libs" "--cppflags" (exit 1): failed
cabal.exe: Error: some packages failed to install:
wxcore-0.11.1.3 failed during the configure step. The exception was:
exit: ExitFailure 1
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

Gmane