WxHaskell/Windows: Difference between revisions
m (→wxWidgets 3.0 and wxHaskell >= 0.92: Added directory info to config.gcc) |
m (Reverted edits by Henk-Jan van Tuyl (talk) to last revision by Apfelmus) |
||
Line 1: | Line 1: | ||
== wxWidgets | == wxWidgets 2.9 and wxHaskell 0.90.x == | ||
{|border=1 style="border-collapse: collapse;" | {|border=1 style="border-collapse: collapse;" | ||
Line 77: | Line 6: | ||
! wxWidgets | ! wxWidgets | ||
|- | |- | ||
|| | || 7 || 2011.2.0.1 || 2.9.3 | ||
|- | |- | ||
|} | |} | ||
Line 85: | Line 12: | ||
Prerequisites: | Prerequisites: | ||
* | * [http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer MinGW] 5.1.6 and [http://downloads.sourceforge.net/mingw/MSYS-1.0.11.exe MSYS] 0.1.11 (these are the latest versions at the time of writing). You must select the C++ compiler option when installing MinGW. | ||
Environment variables: | Environment variables: | ||
* GHC_VERSION: 7. | * CABAL_DIR: C:\Users\XXX\AppData\Roaming\cabal | ||
* WXC_VERSION: 0. | * GHC_VERSION: 7.0.3 (for our convenience) | ||
* WXWIN: C:\wxWidgets- | * WXC_VERSION: 0.90.0.2 | ||
* WXWIN: C:\wxWidgets-2.9.3 | |||
* WXCFG: gcc_dll\mswu | * WXCFG: gcc_dll\mswu | ||
* PATH: (add these) %WXWIN%\lib\gcc_dll;%WXWIN%;% | * PATH: (add these) %WXWIN%\lib\gcc_dll;%WXWIN%;%CABAL_DIR%\wxc-%WXC_VERSION%\%GHC_VERSION% | ||
Steps: | Steps: | ||
<ol> | <ol> | ||
<li> Download [http://wxwidgets.org/downloads wxWidgets 2.9.3 source] | |||
<li> Extract to C:\wxWidgets-2.9.3 | |||
<li> [http://wiki.wxwidgets.org/Compiling_wxWidgets_with_MinGW Build wxWidgets-2.9.3] | |||
<br>I (who?) compiled it as follows: edit <tt>wxwidgets-src-dir\build\msw\config.gcc</tt> so that the following values are set: | |||
<li> Download [http://wxwidgets.org/downloads wxWidgets | |||
<li> Extract to C:\wxWidgets- | |||
<li> [http://wiki.wxwidgets.org/Compiling_wxWidgets_with_MinGW Build wxWidgets- | |||
<br> | |||
<pre> | <pre> | ||
SHARED ?= 1 | SHARED ?= 1 | ||
Line 118: | Line 37: | ||
<pre> | <pre> | ||
cd wxwidgets-src-dir\build\msw | cd wxwidgets-src-dir\build\msw | ||
mingw32-make -f makefile.gcc | mingw32-make -f makefile.gcc | ||
</pre> | </pre> | ||
<li> Download [https://sourceforge.net/projects/wxhaskell/files/wx-config-win/ wx-config.exe] (a new version for wxWidgets > | <li> Download [https://sourceforge.net/projects/wxhaskell/files/wx-config-win/ wx-config.exe] (a new version for wxWidgets > 2.9) and copy it somewhere into your path, for instance via | ||
<pre> | <pre> | ||
cp wx-config.exe %CABAL_DIR%\bin | |||
</pre> | </pre> | ||
<li> | <li> Install the wxHaskell libraries | ||
<pre> | <pre> | ||
cabal install wxdirect | cabal install wxdirect | ||
cabal install wxc | cabal install wxc | ||
Line 156: | Line 50: | ||
cabal install wx | cabal install wx | ||
</pre> | </pre> | ||
</ol> | </ol> | ||
== wxWidgets 2.8 and wxHaskell 0.13.x == | == wxWidgets 2.8 and wxHaskell 0.13.x == | ||
Line 201: | Line 61: | ||
* <code>cabal install wx</code> | * <code>cabal install wx</code> | ||
Note that the best way to refer to WxWidgets in your PATH is probably to use the WXWIN variable that you set, eg. <code>%WXWIN% | Note that the best way to refer to WxWidgets in your PATH is probably to use the WXWIN variable that you set, eg. <code>%WXWIN%/lib/gcc_dll</code> | ||
The guide has been tested with the following configurations. Others may work too: | The guide has been tested with the following configurations. Others may work too: | ||
Line 214: | Line 74: | ||
|| 7 || 2011.2.0.1 || 2.8.12 | || 7 || 2011.2.0.1 || 2.8.12 | ||
|} | |} | ||
=== Troubleshooting installation with cabal === | === Troubleshooting installation with cabal === | ||
Line 242: | Line 91: | ||
Finally call <code>cabal install wx</code>. | Finally call <code>cabal install wx</code>. | ||
== See also == | == See also == |
Revision as of 11:56, 26 August 2015
wxWidgets 2.9 and wxHaskell 0.90.x
Windows | Haskell Platform | wxWidgets |
---|---|---|
7 | 2011.2.0.1 | 2.9.3 |
Prerequisites:
- MinGW 5.1.6 and MSYS 0.1.11 (these are the latest versions at the time of writing). You must select the C++ compiler option when installing MinGW.
Environment variables:
- CABAL_DIR: C:\Users\XXX\AppData\Roaming\cabal
- GHC_VERSION: 7.0.3 (for our convenience)
- WXC_VERSION: 0.90.0.2
- WXWIN: C:\wxWidgets-2.9.3
- WXCFG: gcc_dll\mswu
- PATH: (add these) %WXWIN%\lib\gcc_dll;%WXWIN%;%CABAL_DIR%\wxc-%WXC_VERSION%\%GHC_VERSION%
Steps:
- Download wxWidgets 2.9.3 source
- Extract to C:\wxWidgets-2.9.3
- Build wxWidgets-2.9.3
I (who?) compiled it as follows: edit wxwidgets-src-dir\build\msw\config.gcc so that the following values are set:SHARED ?= 1 BUILD ?= release
Then (in cmd.exe, not bash):
cd wxwidgets-src-dir\build\msw mingw32-make -f makefile.gcc
- Download wx-config.exe (a new version for wxWidgets > 2.9) and copy it somewhere into your path, for instance via
cp wx-config.exe %CABAL_DIR%\bin
- Install the wxHaskell libraries
cabal install wxdirect cabal install wxc cabal install wxcore cabal install wx
wxWidgets 2.8 and wxHaskell 0.13.x
Follow SkyTreeBird's guide. It which walks you through the basic steps
- wx-config
- wxPack
- setting up environment variables
cabal install wx
Note that the best way to refer to WxWidgets in your PATH is probably to use the WXWIN variable that you set, eg. %WXWIN%/lib/gcc_dll
The guide has been tested with the following configurations. Others may work too:
Windows | Haskell Platform | wxWidgets |
---|---|---|
XP | 2010.2.0.0 | 2.8.10 |
7 | 2011.2.0.1 | 2.8.12 |
Troubleshooting installation with cabal
These remarks refer to wx-0.13.2 and Haskell Platform 2011.4.0.0 on Windows 7.
Cabal package wx depends on wxcore which depends on wxdirect. By default cabal installs on a per user base, thus wxdirect.exe will be installed to c:\Users\<YOUR NAME>\AppData\Roaming\cabal\bin\
. This folder must be in your PATH
for cabal install wxcore
to succeed.
Package wxcore-0.13.2 does not work well with wx-config revision 21 2006-10-19 (downloaded from here on Feb 2nd 2012). If cabal install wxcore
fails with an output containing "Usage: wx-config [options]" try this:
cabal unpack wxcore
cd wxcore-0.13.2
- edit
Setup.hs
and comment out/remove the line containing"wx-config" ["--version"]
runhaskell.exe Setup.hs configure --user
runhaskell.exe Setup.hs build
runhaskell.exe Setup.hs install
Finally call cabal install wx
.