Personal tools

WxHaskell/Install

From HaskellWiki

< WxHaskell(Difference between revisions)
Jump to: navigation, search
(redirect)
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
== Overview ==
+
#REDIRECT [[WxHaskell/Building]]
 
This page describes how to get a working wxHaskell installation on various platforms. The latest release (version 0.10.3) was on 2008-03-23.
 
 
The installation process has become increasingly stable and simple, but some of the information on this page could become outdated. Current development on wxHaskell takes place in the darcs repository at http://darcs.haskell.org/wxhaskell .
 
 
== Getting wxWidgets ==
 
 
wxHaskell 0.10.x does not yet support wxWidgets 2.8 (although the current darcs version does). Generally, the recommended version to use is 2.6.4 [2.6.3 on Debian/Ubuntu Linux] as it's what the binaries are compiled against.
 
 
* Windows:
 
** Binary - you can skip this phase. you should just install wxHaskell. Because wxHaskell's dll statically links wxWidgets library.
 
* MacOS X
 
** Tiger - do '''not''' use the wxMac 2.5 that comes pre-installed, unless you really want to compile from source and to report back on how everything works out.
 
** Leopard - the darcs version of wxhaskell now (2008-04-25) supports wxWidgets 2.8. We don't know if the one that ships with Leopard works yet. Want to give it a try? Otherwise, we do know that it runs with a self compiled wxMac.
 
* Linux - the wxWidgets that ships with your system (as long as it's the 2.6 one and not the 2.8 one) should work.
 
 
See [http://wxwidgets.org the wxWidgets site] for more details.
 
 
In addition, the following pages contain useful information on installing wxWidgets 2.6.4 (or, in some cases, wxWidgets 2.6.3) on various operating systems:
 
 
* [http://biolpc22.york.ac.uk/pub/2.6.4/install-msw-2.6.4.txt Installing wxWidgets 2.6.4 on Microsoft Windows 9x/ME, Windows NT, Windows 2000, Windows XP, and Windows CE]
 
* [http://biolpc22.york.ac.uk/pub/2.6.4/install-motif-2.6.4.txt Installing wxWidgets 2.6.3 on Motif]
 
* [http://biolpc22.york.ac.uk/pub/2.6.4/install-mac-2.6.4.txt Installing wxWidgets 2.6.4 on Mac OS X]
 
* [http://biolpc22.york.ac.uk/pub/2.6.4/install-gtk-2.6.4.txt Installing wxWidgets 2.6 on GTK+]
 
* [http://biolpc22.york.ac.uk/pub/2.6.4/install-x11-2.6.4.txt Installing wxWidgets 2.6.4 on X11]
 
* [http://biolpc22.york.ac.uk/pub/2.6.4/install-mgl-2.6.4.txt Installing wxWidgets on MGL]
 
* [http://biolpc22.york.ac.uk/pub/2.6.4/install-cocoa-2.6.4.txt Installing wxWidgets on wxCocoa] (wxCocoa is still a work in progress.)
 
* [http://biolpc22.york.ac.uk/pub/2.6.4/install-os2-2.6.4.txt Installing wxWidgets on IBM OS/2 Warp3 and Warp4] (This is an unstable development release and OS/2 is considered to be in beta.)
 
 
== Getting wxHaskell ==
 
 
Obtain wxHaskell sources from [http://wxhaskell.sourceforge.net/download.html Sourceforge].
 
 
'''OSX caveats''':
 
 
* The installation of wxWidgets provided with OSX Tiger will not work, as it does not have the wxThread symbols that wxHaskell does want to link against.
 
 
* Programs compiled with wxHaskell do not work by default: you need to run macosx-app on them to let Mac OS X understand that the binary needs Carbon to do its UI.
 
 
== Building and installing ==
 
 
=== Windows ===
 
 
==== GHC 6.8.3, wxWidgets 2.6.4, wxHaskell 0.10.3 (binary) ====
 
 
# Download the wxhaskell binary from [http://sourceforge.net/project/showfiles.php?group_id=73133&package_id=73173&release_id=586065 sourceforge]
 
# Unpack wxhaskell-*.zip. And double-click wxhaskell-*\bin\wxhaskell-register.bat.
 
# wxhaskell-register.bat install wxHaskell to your system.
 
 
==== Assumptions (a.k.a. what I have tested) ====
 
 
* GHC 6.4.2 (Jason Dagit reports success with GHC 6.5 as well).
 
 
* Cygwin installation. See [http://wxhaskell.sourceforge.net/building-cygwin.html | wxHaskell cygwin page] for detail, but broadly, you need Cygwin bash and install binaries.
 
 
* wxWidgets built/installed in a path with no spaces in it. Actually you can use a path with spaces but there are a few rules. For example, I had ghc installed to this location:<br/><tt>C:\Program Files\Visual Haskell</tt><br/>So this required me to use the following configure command:<br/><tt>./configure --libdir=C:/Progra~1/Visual~1</tt><br/>
 
The two important things here are: 1) You must use the forward slash
 
and 2) you cannot use spaces.
 
 
Next I found that I needed to add <tt>C:\Program Files\Visual Haskell</tt> to
 
my path so that the wxHaskell dlls could be located by windows.
 
 
* Environment variables:
 
** PATH should include MinGW and Cygwin binary directories. MinGW must come before Cygwin in PATH.
 
** WXHASKELL environment var points to wxHaskell install directory.
 
** WXWIN environment directory points to wxWidgets install directory.
 
 
For more detailed information, see [http://biolpc22.york.ac.uk/pub/2.6.4/install-msw-2.6.4.txt Installing wxWidgets 2.6.4 on Microsoft Windows 9x/ME, Windows NT, Windows 2000, Windows XP, and Windows CE].
 
 
=== Mac OSX ===
 
 
==== Mac (Intel and PowerPC), Tiger (10.4.11), GHC 6.8.2, wxWidgets 2.6.4, wxHaskell 0.10.3 (binary) ====
 
 
# Download and install wxWidgets for mac ([http://prdownloads.sourceforge.net/wxwindows/wxMac-2.6.4.tar.gz wxMac 2.6.4]) from http://www.wxwidgets.org/ (make sure you configure with <code>--enable-unicode</code>)
 
# Download the wxhaskell binary from [http://sourceforge.net/project/showfiles.php?group_id=73133&package_id=73173&release_id=586065 sourceforge]
 
# Open the dmg, double-click the .pkg file
 
 
For more detailed information, see [http://biolpc22.york.ac.uk/pub/2.6.4/install-mac-2.6.4.txt Installing wxWidgets 2.6.4 on Mac OS X] or [http://biolpc22.york.ac.uk/pub/2.6.4/install-cocoa-2.6.4.txt Installing wxWidgets on wxCocoa].
 
 
==== MacIntel, Tiger (10.4.11, XCode 2.5), GHC 6.8.2, wxWidgets 2.6.4, wxHaskell 0.10.2 (hackage) ====
 
 
built on 2008-02-16
 
# Download and install wxWidgets for mac ([http://prdownloads.sourceforge.net/wxwindows/wxMac-2.6.4.tar.gz wxMac 2.6.4]) from http://www.wxwidgets.org/
 
#* I changed into the wxMac topdirectory and used: <code>./configure --disable-monolithic --enable-display --enable-unicode --with-opengl --with-mac --without-odbc --enable-mediactrl && make && sudo make install</code>
 
#* <code>sudo mkdir -p /usr/local/wxhaskell/bin</code>
 
#* <code>sudo ln -s /usr/local/bin/wx-config /usr/local/wxhaskell/bin</code>
 
# <code>sudo cabal install wx-core</code>
 
# <code>cabal install wx</code>
 
* Enjoy. The TimeFlows and BoucingBalls examples still suffer from not having a correct default background color. This should not affect you too much: just explicitly set the background color.
 
** Note that you need to run <code>macosx-app</code> on the programs you have built before you can manipulate the windows that program puts up. This installation process puts it in <code>/usr/local/wxhaskell/bin/macosx-app</code>
 
 
* Does wxWidgets 2.8.0 work at all? [yes! in the darcs version of wxhaskell as of 2008-04-25]
 
 
Again, for more detailed information, see [http://biolpc22.york.ac.uk/pub/2.6.4/install-mac-2.6.4.txt Installing wxWidgets 2.6.4 on Mac OS X] or [http://biolpc22.york.ac.uk/pub/2.6.4/install-cocoa-2.6.4.txt Installing wxWidgets on wxCocoa].
 
 
=== Linux ===
 
 
==== Sources ====
 
 
Built wxGTK-2.6.4 from sources with the configuration:
 
 
<code>/usr/local/src/wxGTK-2.6.4/mybuild$ ../configure --enable-sound --enable-unicode</code>
 
 
Add <code>/usr/local/lib</code> to your <code>/etc/ld.so.conf</code> before running <code>sudo ldconfig</code> after installing wxGTK.
 
 
Build wxHaskell from the darcs repository, configured with <code>./configure --enable-split-objs -hcprof</code>, and follow the usual installation documentation from here on. The --enable-split-objs and -hcprof options are not mandatory, but they are nice to have
 
 
:''Note 2008-02-20: there was a bug that made --with-opengl necessary on some systems (depending on how wxWidgets was built), but it has been fixed''
 
 
For more detailed information, see [http://biolpc22.york.ac.uk/pub/2.6.4/install-motif-2.6.4.txt Installing wxWidgets 2.6.3 on Motif], [http://biolpc22.york.ac.uk/pub/2.6.4/install-gtk-2.6.4.txt Installing wxWidgets 2.6 on GTK+], or [http://biolpc22.york.ac.uk/pub/2.6.4/install-x11-2.6.4.txt Installing wxWidgets 2.6.4 on X11].
 
 
==== Debian and Ubuntu ====
 
 
===== Ghc 6.6 version =====
 
For Debian Linux systems:
 
 
# get wxWidgets 2.6
 
#* <code>aptitude install libwxgtk2.6-dev</code>
 
# obtain the wxhaskell-bin-debian-gtk2.6.3-ghc6.6-0.10.3.deb package from [http://sourceforge.net/project/showfiles.php?group_id=73133 sourceforge]
 
#* Install it with <code>dpkg -i</code>
 
 
You may need to add /usr/local/lib to your library search path. You can do that by making a file called /etc/ld.so.conf.d/usr_local.conf containing:
 
 
/usr/local/lib
 
 
after adding the file, run ldconfig.
 
 
===== Ghc 6.8 version =====
 
# get wxWidgets 2.6
 
#* <code>aptitude install libwxgtk2.6-dev</code>
 
# get ghc
 
#* <code>apt-get --target-release=unstable install ghc6</code>
 
# obtain the wxhaskell-bin-gtk2.6.3-ghc6.8.2-0.10.3.deb package from [http://sourceforge.net/project/showfiles.php?group_id=73133 sourceforge]
 
#* Install it with <code>dpkg -i</code>
 
 
==== [[Gentoo]] ====
 
 
wxHaskell is available in portage for x86, amd64, sparc and ppc
 
 
<code>ACCEPT_KEYWORDS="~x86" emerge wxhaskell</code>
 
 
(users of other arches should use their arch keywrods as appropriate)
 
 
==== Fedora Core 6 ====
 
 
There is no wxHaskell package to go with the ghc-6.6 packages. You
 
will have to compile it yourself. This a simple matter of:
 
 
* Installing wxGTK:
 
** <code>yum install wxGTK-devel</code>
 
* Getting the sources:
 
** <code>darcs get http://darcs.haskell.org/wxhaskell</code>
 
* Configuring, building and installing:
 
** <code>configure && make && make install && make wx && make wx-install</code>
 
 
== Troubleshooting ==
 
 
* See [[../Troubleshooting]]
 

Latest revision as of 09:05, 6 August 2008

  1. REDIRECT WxHaskell/Building