Updated various readme's

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-03-06 22:08:30 +00:00
parent 034891ed2b
commit 7cf9a3037f
4 changed files with 140 additions and 166 deletions

View File

@@ -8,7 +8,7 @@ that you know your way around a command line and that you know how to
get things from various CVS repositories as needed.
1. "MachoPython" 2.2 is required. There is a disk image with an
1. "MacPython-OSX" 2.3 is required. There is a disk image with an
installer package in the wxPython Sourceforge download area, in
this group:
@@ -16,34 +16,12 @@ get things from various CVS repositories as needed.
If, for some reason you need to build your own Python, get the
source from www.python.org and follow the instructions in the
Mac/OSX/README file to build and install Python.app and the
Python.framework.
If you build your own Python then you may want to make a symlink or
two in /usr/local/bin so that this version of Python can be found
from the command line. For example:
cd /usr/local/bin
sudo ln -s /Library/Frameworks/Python.framework/Versions/2.2/bin/python2.2 python2.2
sudo ln -s python2.2 python
Also, if you create a /usr/local/bin/pythonw script like the
following then you can run Python GUI apps (like wxPython apps)
directly from the command line:
#!/bin/sh
exec /Applications/Python.app/Contents/MacOS/python $@
Be sure to give this script execute permissions:
sudo chmod +x /usr/local/bin/pythonw
If you would like to make a MachoPython installer from what you
built then you may want to look at the scripts I use to do it
located in wxPython/distrib/mac/buildPython in CVS.
Mac/OSX/README file to build and install the Python.framework and
Python tools.
One last thing, make sure that /usr/local/bin is in your PATH
environment variable.
environment variable since that is where the new python and pythonw
commands will be located.
2. In a wxWindows CVS tree make a build directory. (You can also use
@@ -66,7 +44,7 @@ get things from various CVS repositories as needed.
5. Build and install wxPython.
cd ../wxPython
python setup.py IN_CVS_TREE=1 build install
python setup.py build install
6. Test. Just navigate in the Finder to the demo directory and double
click demo.py, or simple.py, or whatever you want to run. Or from

View File

@@ -1,23 +1,27 @@
Building wxPython on Unix or Unix-like Systems
----------------------------------------------
The basic steps for building wxPython for Unix or Unix-like systems
are:
NOTE: You should probably look at the ../ README.1st.txt file for
directions for how to build wxPython the "new way." This files
describes the "old way" to build on unix-like systems. The difference
is very simple: The new way uses a private copy of wxGTK while the
old way uses either an existing wxGTK that may be installed and used
by other apps, or you can build a wxGTK that will be accissible by
other apps.
1. Compile and/or install glib and gtk+
2. Compile and/or install wxGTK
3. Compile and install wxPython
We'll go into more detail of each of these steps below, but first a
few bits of background information on tools.
NOTE 2: I use a tool called SWIG (http://www.swig.org) to help
generate the C++ sources used in the wxPython extension module.
However you don't need to have SWIG unless you want to modify the *.i
files. I've made several modifications to and older version of SWIG
that are specific to wxPython's needs and so the modified sources are
included in the wx CVS at .../wxPython/wxSWIG. But because of the
size and since most people won't need it my SWIG is not included in
the wxPythonSrc tarball. You'll need to get it from CVS or a CVS
snapshot.
I use a tool called SWIG (http://www.swig.org) to help generate the
C++ sources used in the wxPython extension module. However you don't
need to have SWIG unless you want to modify the *.i files. I've made
several modifications to SWIG specific to wxPython's needs and so the
modified sources are included in the wx CVS at .../wxPython/wxSWIG.
If you need to modify the *.i files for wxPython then change to this
directory and run:
If you need to modify the *.i files for wxPython then you will need to
build wxswig. Change to the .../wxPython/wxSWIG directory and run:
configure
make
@@ -46,29 +50,13 @@ A. First of all, check and see if you've already got glib/gtk+ on your
gtk-config --version
If you have version 1.2.5 or better then you're all set. You can
skip to step #2.
If you have version 1.2.7 or better then you're all set. Otherwise
either get the pacakges for your unix distribution and install them
or get the sources from www.gtk.org and build and install them.
B. If your system has a binary package mechanism, (RPMs, debs,
whatever...) check and see if binaries for glib abd gtk+ are
available. Be sure to get the runtime library package as well as
the development package, if they are separate. Install them with
your package tool, and skip to step #2.
C. If all else fails, you can get the source code for glib and gtk+ at
http://www.gtk.org/. Fetch the latest of each in the 1.2.x
series. Compile and install each of them like this:
gzip -d [package].tar.gz | tar xvf -
cd [package]
./configure
make
make install
The last step will probably have to be done as root. Also, if your
system needs anything done to update the dynamic loader for shared
libraries, (such as running ldconfig on Linux) then do it after
each library is installed.
The best version to get is the latest 1.2.x release as the
wxWindows support for GTK 2.x is still beta-level. (Most tings
work great though, and it looks real nice.)
@@ -77,23 +65,33 @@ C. If all else fails, you can get the source code for glib and gtk+ at
A. You can find the sources and RPMs for wxGTK at
http://wxwindows.org/, just follow the download links from the
nevigation panel. You can also check out a current snapshot of the
sources from the CVS server. (Some information about annonymous
CVS access is at http://wxwindows.org/cvs.htm.) The advantage of
using CVS is that you can easily update as soon as the developers
check in new sources or fixes. The advantage of using a released
version is that it usually has had more thorough testing done. You
can decide which method is best for you.
navigation panel.
Source code for wxGTK is now included with the wxPythonSrc tarball,
and is the recommended way to get released wxGTK source code if you
plan on building both.
You can also check out a current snapshot of the sources from the
CVS server. (Some information about annonymous CVS access is at
http://wxwindows.org/cvs.htm.) The advantage of using CVS is that
you can easily update as soon as the developers check in new
sources or fixes. The advantage of using a released version is
that it usually has had more thorough testing done. You can decide
which method is best for you.
B. You'll usually want to use a version of wxGTK that has the same
version number as the wxPython sources you are using. (Another
advantage of using CVS is that you'll get both at the same time.)
advantage of using wxPythonSrc or CVS is that you'll get both at
the same time.)
C. If using the RPMs be sure to get both the wxGTK and wxGTK-devel
RPMs (at a minimum) and then install them as root.
rpm -Uhv wxGTK-2.2.2-0.i386.rpm wxGTK-devel-2.2.2-0.i386.rpm
D. If using the sources (either from the tarball or from CVS) then
configure it like this:
@@ -118,6 +116,10 @@ D. If using the sources (either from the tarball or from CVS) then
special debugging code in wxWindows by defining the __WXDEBUG__
macro. You'll get some extra asserts, failure logging, etc.
If you are using GTK 2.x then you'll want to add --enable-gtk2 and
probably also --enable-unicode.
E. Now just compile and install. You need to use GNU make, so if your
system has something else get GNU make and build and install it and
use it instead of your system's default make command.
@@ -129,6 +131,7 @@ E. Now just compile and install. You need to use GNU make, so if your
system needs anything done to update the dynamic loader for shared
libraries, (such as running ldconfig on Linux) then do it now.
F. You can test your build by changing to one of the directories under
build/samples or build/demos, running make and then running the
executable that is built.
@@ -140,33 +143,24 @@ F. You can test your build by changing to one of the directories under
A. You have the same options (and same advantages/disadvantages) for
getting the wxPython source, either a released snapshot or from
CVS. The released version file is named wxPython-[version].tar.gz
CVS. The released version file is named wxPythonSrc-[version].tar.gz
and is available at http://wxpython.org/download.php. If you want
to use CVS you'll find wxPython in the wxWindows CVS tree (see
above) in the wxWindows/wxPython directory.
B. As mentioned previouslly, wxPython is built with the standard
Python Distutils tool. If you are using Python 2.0 or later you
are all set, otherwise you need to download and install Distutils
1.0 from http://www.python.org/sigs/distutils-sig/.
B. wxPython is built with the standard Python Distutils tool and
currently includes it's own snapshot of the latest version of
distutils which can also be used with previous versions of Python
On Unix systems Distutils figures out what commands and flags to
use for the compiler and linker by looking in the Makefile that was
used to build Python itself. Most of the time this works okay. If
it doesn't, there doesn't seem to be a way to override the values
that Distutils uses without hacking either Distutils itself, or
Python's Makefile. (Complain to the distutils-sig about this
please.) For example, on a Solaris system I had to edit
/usr/local/lib/python1.5/config/Makefile and replace
LDSHARED=ld -G
with
LDSHARED=gcc -G
This particular problem has been fixed in Python 1.6 and beyond,
but there may be similar issues on other platforms.
Python's Makefile. (NOTE: This has been changed with the
distutilsincluded with Python 2.3 but I havn't yet looked into how
best to utilize this in wxPython...)
While we're on the subject of how Python was built... Since
wxPython is a C++ extension some platforms and/or compilers will
@@ -188,13 +182,14 @@ B. As mentioned previouslly, wxPython is built with the standard
make install
I recently built Python 2.1.3 and Python 2.2.1 on Solaris and did
not have to resort to this workaround so apparently thigns are
not have to resort to this workaround so apparently things are
getting better there. I will leave this note here though in case
there are similar issues elsewhere. However I did run into a
Python build issue that affects the wxPython build when attempting
to use SunCC instead of GNU gcc. See the note below titled
"Building with non-GNU compilers" if you are interested.
C. Change to the root wxPython directory and look at the setup.py
file. This is the script that configures and defines all the
information that Distutils needs to build wxPython. There are some
@@ -221,17 +216,7 @@ C. Change to the root wxPython directory and look at the setup.py
will be executed to regenerate the wrapper C++
and shadow python files.
IN_CVS_TREE If you are using the CVS version of the
wxWindows and wxPython sources, or a combined
source archive from the CVS snapshots or the
distributed wxPythonSrc-*.tar.gz then you will
need to set this flag to non-zero. This is
needed because some source files from the
wxWindows tree are copied to be under the
wxPython tree in order to keep Distutils happy.
With this flag set then setup.py will
automatically keep these copied sources up to
date if the original version is ever updated.
etc.
D. To build and install wxPython you simply need to execute the
@@ -241,15 +226,25 @@ D. To build and install wxPython you simply need to execute the
site-packages directory you may need to be root to run the install
command.
python setup.py build
python setup.py install
python setup.py build install
If you need to change any of the build flags that can also be done
on the setup.py command line, like this:
python setup.py BUILD_GLCANVAS=0 build install
If you are using GTK 2.x then you'll want to add these flags:
python setup.py WXPORT=gtk2 UNICODE=1 build install
E. At this point you should be able to change into the wxPython/demo
directory and run the demo:
python demo.py
F. If you would like to make a test build that doesn't overwrite the
F. If you would like to make a test build that doesn't overwrite any
installed version of wxPython you can do so with this command
instead of the install command above:
@@ -332,5 +327,7 @@ before running configure, like this in bash:
After making and installing Python with this configuration you should
be able to build wxPython as described in the steps above.
-----------------
robin@alldunn.com

View File

@@ -3,58 +3,34 @@ wxPython README
Welcome to the wonderful world of wxPython!
Once you have installed the wxPython extension module, you can try it
out by going to the [install dir]\wxPython\demo directory and typing:
So where do you go from here? The bes thing to do is to run the demo
and use its source code to help you learn how to use wxPython. Most
of the classes available are demonstrated there, and you can view the
sources directly in the demo so it is designed to help you learn. If
you are on Windows or OS X then you can run the demo just by double
clicking it's icon. If you are on Linux/Unix then change to the
directory containing the demo and type:
python demo.py
There are also some other sample files there for you to play with and
learn from.
There are also some sample mini applications available for you to run
and to play with as a learning exercise.
If you selected to install the documentation then point your browser
to [install dir]\wxPython\docs\index.htm and you will then be looking
at the docs for wxWindows. For the most part you can use the C++ docs
as most classes and methods are used identically. Where there are
differences they are documented with a "wxPython Note."
The next thing you should do is join the wxPython-users maillist where
you can interact with a community of other users and developers who
are willing to help you learn, answer questions and solve problems.
To join the mail list just send an email message to the following
address from the account you want to receive the mail messages from
the list:
On Win32 systems the binary self-installer creates a program group on
the Start Menu that contains a link to running the demo and a link to
the help file. To help you save disk space I'm now using Microsoft's
HTML Help format. If your system doesn't know what to do with the help
file, you can install the HTML Help Viewer as part of IE 4+, NT
Service Pack 4+, or the HTML Workshop at
wxPython-users-subscribe@lists.wxwindows.org
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/html/hwMicrosoftHTMLHelpDownloads.asp
For some features, the latest common controls library from microsoft
is required. You can get this by installing IE 5.0 or Office 2000.
You can also get it independently from here:
http://download.microsoft.com/download/platformsdk/Comctl32/5.80.2614.3600/W9XNT4/EN-US/50comupd.exe
Windows 95 users may also need the WinSock 2.0 and OpenGL libraries.
These can be found at these sites:
http://www.microsoft.com/windows95/downloads/contents/wuadmintools/s_wunetworkingtools/w95sockets2/default.asp
http://www.opengl.org/Downloads/Downloads.html
Getting Help
------------
Since wxPython is a blending of multiple technologies, help comes from
multiple sources. See the http://wxPython.org/ for details on various
sources of help, but probably the best source is the wxPython-users
mail list. You can view the archive or subscribe by going to
http://lists.wxwindows.org/mailman/listinfo/wxpython-users
Or you can send mail directly to the list using this address:
wxpython-users@lists.wxwindows.org
There is also a good set of class reference documentation available
for wxPython, but currently it is geared for the C++ user. This may
be a little daunting at first, but with a little practice you'll
easily be able to "translate" from the C++ shown there to Python. Not
all classes documented are available in Python, but most of the GUI
related classes are.
Other Info
@@ -62,17 +38,21 @@ Other Info
Please also see the following files in this directory:
CHANGES.txt Information about new features, fixes, etc. in
each release.
CHANGES.txt Information about new features, fixes,
etc. in each release.
BUILD.unix.txt Instructions for building wxPython on various
Unix-like platforms.
../README.1st.txt Instructions for building wxGTK and
wxPython on Unix-like platforms the
"new way."
BUILD.win32.txt Instructions for building wxPython on Windows.
BUILD.unix.txt Instructions for building wxPython on
various Unix-like platforms the "old way."
BUILD.osx.txt Instructions for building wxPython on Mac OS X.
BUILD.win32.txt Instructions for building wxPython on Windows.
licence/* Text of the wxWindows license.
BUILD.osx.txt Instructions for building wxPython on Mac OS X.
licence/* Text of the wxWindows license.

View File

@@ -14,13 +14,13 @@ archive. If you wish to use the released wxGTK binary as has been
done in the past then you can still follow the old build directions in
wxPython/BUILD.unix.txt. If you are building for Windows or Mac OS X
then you should look at wxPython/BUILD.win32.txt or
wxPython/BUILD.osx.txt respectivly. In all these cases you should use
the IN_CVS_TREE=1 flag since this archive is really just a modified
CVS snapshot.
wxPython/BUILD.osx.txt respectivly.
If, on the other hand, you would like to build Linux/Unix binaries
with a private copy of wxGTK like what I am now distributing then
you'll want to follow the instructions in this file.
you'll want to follow the instructions in this file. (You should
probably still read wxPython/BUILD.unix.txt though since there are
other details there that you may need to be aware of.
Clear as mud? Good. Let's get started.
@@ -58,18 +58,24 @@ Clear as mud? Good. Let's get started.
--with-libjpeg=builtin \
--with-libpng=builtin \
--with-libtiff=builtin \
--with-zlib=builtin
--with-zlib=builtin \
If you would like to use GTK 2.x and unicode, then add the
following flags. Please note that this is still beta-level
quality, but does look and work quite nice for the most part:
--enable-gtk2 \
--enable-unicode \
3. Build and install wxGTK. (You may need to be root for the last
step, depending on where your WXPREF is.)
make
cd ../locale
make allmo
cd ../build
make install
4. Build and install wxPython. If you want to use a different version
of Python than is found by default on the PATH then specify the
whole pathname in these steps. The version of Python that runs
@@ -79,10 +85,23 @@ Clear as mud? Good. Let's get started.
cd ../wxPython
python setup.py \
IN_CVS_TREE=1 WX_CONFIG=$WXPREF/bin/wx-config \
WX_CONFIG=$WXPREF/bin/wx-config \
build install
5. That's all!
If you are using GTK 2.x and unicode then do it this way instead:
python setup.py \
WX_CONFIG=$WXPREF/bin/wx-config \
WXPORT=gtk2 UNICODE=1 \
build install
If you get errors about wxGLCanvas or being unable to find libGLU
or something like that then you can add BUILD_GLCANVAS=0 to the
setup.py command line to disable the building of the glcanvas
module.
5. That's all, except for the having fun part!
--
Robin Dunn