Building wxWidgets for Jazz++
Jazz++ uses a non-stock build of the
wxWidgets library.
wxWidgets lets developers create applications for Win32, Mac OS X, GTK+, X11,
Motif, WinCE, and more using one codebase. This page describes how the Jazz++
version of wxWidgets was compiled for Windows, Linux, and the Mac. The Windows
build was generated using Visual Studio. Either Visual Studio .NET 2005 or
Visual Studio .NET 2008 can be used on Windows. The Linux install was tested
using Fedora 9 using GCC 4.3.0, Mandriva 2008.0 using GCC 4.2.2, and Debian 4.0
(i386 & amd64) using gcc-4.1.2. The Mac build was tested using Mac OS X 10.5.2
and GCC 4.0.1.
Building wxWidgets for Windows
I have used these instructions with Visual Studio .NET 2005 (VC8) and Visual
Studio .NET 2008 (VC9). I used VC8 in the following text, but simply
substitute the appropriate VC9 veriage to create a Visual Studio .NET 2008
build. I have both builds living side-by-side on my hard drive.
-
Download
wxMSW-2.8.10.zip from the wxWidgets web site.
-
Extract the zip file to C:\ExternalPackages. Extracting creates a
wxMSW-2.8.10 directory directly under C:\ExternalPackages.
-
Change the name of the top-level wxWidgets directory to
wxMSW-2.8.10-VC8 so other versions of wxWidgets can be built with
other compilers in parallel with this directory.
-
If you would like wxWidgets help files in compiled HTML format (*.chm),
download wxWidgets-2.8.10-CHM.zip from the wxWidgets web site, and
extract the zip file to C:\ExternalPackages\wxMSW-2.8.10-VC8. This
installs the compiled HTML help files for wxWidgets and tex2rtf.
-
If you would like wxWidgets help files in HTML format, download
wxWidgets-2.8.10-HTML.zip from the wxWidgets web site, and extract the
zip file to C:\ExternalPackages\wxMSW-2.8.10-VC8. This installs the
HTML help files for wxWidgets and tex2rtf.
-
Make the following changes to
C:\ExternalPackages\wxMSW-2.8.10-VC8\include\wx\msw\setup.h:
| Macro |
From |
To |
| WXWIN_COMPATIBILITY_2_6 |
1 |
0 |
| wxUSE_STL |
0 |
1 |
| wxUSE_STD_IOSTREAM |
0 |
1 |
| wxUSE_GLCANVAS |
0 |
1 |
| wxUSE_IOSTREAMH |
1 |
0 |
Jazz++ doesn't use OpenGL code at this point, but I use this wxWidgets build
for other projects.
-
Edit C:\ExternalPackages\wxMSW-2.8.10-VC8\include\wx\msw\wx.rc and
comment out the following line.
#include "wx/msw/wince/wince.rc"
-
Use Start | All Programs | Microsoft Visual Studio .NET 2005 |
Visual Studio .NET Tools | Visual Studio .NET 2005 Command Prompt to
start a console session.
-
Ensure that the command-line compiler and tools (including nmake)
are installed and ready to run.
-
Change directory to C:\ExternalPackages\wxMSW-2.8.10-VC8\build\msw.
-
Build the debug static version of the wxWidgets libraries by typing:
nmake BUILD=debug SHARED=0 USE_OPENGL=1 -f makefile.vc
-
Build the release static version of the wxWidgets libraries by typing:
nmake BUILD=release SHARED=0 USE_OPENGL=1 -f makefile.vc
- To conserve disk space, remove the build directories (vc_msw and
vc_mswd) under c:\ExternalPackages\wxMSW-2.8.10-VC8\build\msw.
-
Change directory to
C:\ExternalPackages\wxMSW-2.8.10-VC8\utils\tex2rtf\src.
-
Build the release static version of tex2rtf by typing:
nmake BUILD=release SHARED=0 -f makefile.vc
-
Create a directory for the tex2rtf binaries under the wxWidgets
distribution (c:\ExternalPackages\wxMSW-2.8.10-VC8\bin).
-
Move the tex2rtf binaries from
c:\ExternalPackages\wxMSW-2.8.10-VC8\utils\tex2rtf\src\vc_msw to
c:\ExternalPackages\wxMSW-2.8.10-VC8\bin.
-
To conserve disk space, remove the build directory (vc_msw) under
c:\ExternalPackages\wxMSW-2.8.10-VC8\utils\tex2rtf\src.
Building wxWidgets for Linux
-
Before we start the build process, set your PATH and
LD_LIBRARY_PATH environment variables so your shell will find the
non-stock wxWidgets binaries and libraries that we are about to create and
install. Adding the following lines in .bash_profile will do the
trick.
export PATH=/usr/local/wx-2.8.10/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/wx-2.8.10/lib:$LD_LIBRARY_PATH
After adding the above lines to your .bash_profile
file, it is necessary to reload your bash environment to make these changes
available. Use the following command to accomplish this.
source .bash_profile
- Create a directory under your home directory. I typically use
OutsideSource and change directory to that location.
cd
mkdir OutsideSource
cd OutsideSource
- Checkout the 2.8 branch of wxWidgets using the following command.
You must have a Subversion client loaded on your machine.
svn checkout http://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH wxWidgets-2.8
- Create two directories called WxBuildRelease and
WxBuildDebug in parallel with the wxWidgets-2.8 directory
and change directory to the WxBuildDebug directory.
mkdir WxBuildRelease WxBuildDebug
cd WxBuildDebug
- Run the wxWidgets supplied configure command with the following
configure options.
../wxWidgets-2.8/configure \
--prefix=/usr/local/wx-2.8.10 \
--disable-no_exceptions \
--disable-no_rtti \
--disable-compat26 \
--disable-unicode \
--with-regex=builtin \
--enable-std_iostreams \
--enable-std_string \
--enable-stl \
--with-gtk \
--enable-debug \
--enable-debug_gdb
The prefix option is used so that the resulting wxWidgets build
will be installed in a non-standard location to prevent conflicts with OS
installed versions and to make it easy to remove the installation.
- Run make using the following command. This will write a file
called BuildLog that may be useful if you run into trouble.
make 2>&1 | tee BuildLog
- If all goes well with the build, try to install wxWidgets as root.
su
make install
exit
- Now repeat with in the WxBuildRelease directory with the
following configure options and install the release version as root.
cd ../WxBuildRelease
../wxWidgets-2.8/configure \
--prefix=/usr/local/wx-2.8.10 \
--disable-no_exceptions \
--disable-no_rtti \
--disable-compat26 \
--disable-unicode \
--with-regex=builtin \
--enable-std_iostreams \
--enable-std_string \
--enable-stl \
--with-gtk
make 2>&1 | tee BuildLog
su
make install
exit
-
Install the release version of the wxWidgets build last to ensure this version
is the default configuration. If you installed the debug version last, simply
re-install the release version. You can run the following command to
determine the default configuration.
wx-config --list
Building wxWidgets for Mac OS X 10.5.2
- Create a directory under your home directory. I typically use
OutsideSource and change directory to that location.
cd
mkdir OutsideSource
cd OutsideSource
-
Download
wxMac-2.8.10.tar.gz from the wxWidgets web site and extract this
file under your OutsideSource directory.
- Create a directory called WxBuild-2.8.10 in parallel with the
wxMac-2.8.10 directory and change directory to that location.
mkdir WxBuild-2.8.10
cd WxBuild-2.8.10
- Run the wxWidgets supplied configure command with the following
configure options.
../wxMac-2.8.10/configure \
--prefix=$HOME/wx-2.8.10 \
--disable-no_exceptions \
--disable-no_rtti \
--disable-compat26 \
--disable-unicode \
--with-regex=builtin \
--enable-std_iostreams \
--enable-std_string \
--enable-stl \
--with-mac \
--enable-debug \
--enable-debug_gdb
The prefix option is used so that the resulting wxWidgets build
will be installed in a non-standard under the user's home directory to
prevent conflicts with OS installed versions.
- Run make using the following command. This will write a file
called BuildLog that may be useful if you run into trouble.
make 2>&1 | tee BuildLog
- If all goes well with the build, try to install wxWidgets.
make install
-
Make sure your PATH and LD_LIBRARY_PATH environment
variables are set to find the non-stock wxWidgets binaries and libraries
just created before building Jazz++. Adding the following lines in
.bash_profile will do the trick.
export PATH=/usr/local/wx-2.8.10/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/wx-2.8.10/lib:$LD_LIBRARY_PATH
After adding the above lines to your .bash_profile
file, it is necessary to reload your bash environment to make these
changes available. Use the following command to accomplish this.
source .bash_profile
This project is hosted by SourceForge. Special thanks for SourceForge and the OSDN.
|