]> git.saurik.com Git - wxWidgets.git/blob - wxPython/distrib/README.1st.txt
use child->Destroy() instead of delete child in DestroyChildren()
[wxWidgets.git] / wxPython / distrib / README.1st.txt
1 README for wxPythonSrc-*.tar.gz
2 -------------------------------
3
4 Prior to version 2.3.3 of wxPython I had always made my Linux/Unix
5 binaries based on the released binary of wxGTK and wxGTK-gl. This
6 imposed a few restrictions and so starting with 2.3.3 I have decided
7 to do a combined binary that inlcudes wxGTK as well as wxPython. This
8 allows me a bit more flexibility and is consistent with how the
9 Windows and Mac OS X binaries are built.
10
11 If you are reading this file then you are probably interested in
12 building your own copy of wxPython from the sources contained in this
13 archive. If you wish to use the released wxGTK binary as has been
14 done in the past then you can still follow the old build directions in
15 wxPython/BUILD.unix.txt. If you are building for Windows or Mac OS X
16 then you should look at wxPython/BUILD.win32.txt or
17 wxPython/BUILD.osx.txt respectivly.
18
19 If, on the other hand, you would like to build Linux/Unix binaries
20 with a private copy of wxGTK like what I am now distributing then
21 you'll want to follow the instructions in this file. (You should
22 probably still read wxPython/BUILD.unix.txt though since there are
23 other details there that you may need to be aware of.
24
25 Clear as mud? Good. Let's get started.
26
27
28 1. We'll be making a private copy of wxGTK so it doesn't conflict with
29 one used by wxGTK C++ apps that expect to have the default binary
30 installed from RPM or whatever. I put it in /usr/lib/wxPython, but
31 you can use whatever you like. I'll just set a variable to our wx
32 prefix to reference later:
33
34 export WXPREF=/usr/lib/wxPython
35
36
37 2. Make a build directory and configure wxGTK.
38
39 cd wxPythonSrc-2.4.0 # or whatever the top-level dir is
40 mkdir build
41 cd build
42 ../configure --with-gtk \
43 --prefix=$WXPREF \
44 --enable-rpath=$WXPREF/lib \
45 --with-opengl \
46 --enable-geometry \
47 --enable-optimise \
48 --enable-debug_flag \
49
50 You may want to use --enable-debug instead of --enable-optimise if
51 you need to run though a debugger and want full debugging symbols.
52
53 if you want to use the image and zlib libraries included with
54 wxWindows instead of those already installed on your system, (for
55 example, to reduce dependencies on 3rd party libraries) then you
56 can add these flags to the configure command:
57
58 --with-libjpeg=builtin \
59 --with-libpng=builtin \
60 --with-libtiff=builtin \
61 --with-zlib=builtin \
62
63 If you would like to use GTK 2.x and unicode, then add the
64 following flags. Please note that this is still beta-level
65 quality, but does look and work quite nice for the most part:
66
67 --enable-gtk2 \
68 --enable-unicode \
69
70
71 3. Build and install wxGTK. (You may need to be root for the last
72 step, depending on where your WXPREF is.)
73
74 make
75 make install
76
77
78 4. Build and install wxPython. If you want to use a different version
79 of Python than is found by default on the PATH then specify the
80 whole pathname in these steps. The version of Python that runs
81 setup.py is the version wxPython will be built and installed for.
82 (You will need to be root for the install step unless your Python
83 is not in a system location.)
84
85 cd ../wxPython
86 python setup.py \
87 WX_CONFIG=$WXPREF/bin/wx-config \
88 build install
89
90 If you are using GTK 2.x and unicode then do it this way instead:
91
92 python setup.py \
93 WX_CONFIG=$WXPREF/bin/wx-config \
94 WXPORT=gtk2 UNICODE=1 \
95 build install
96
97 If you get errors about wxGLCanvas or being unable to find libGLU
98 or something like that then you can add BUILD_GLCANVAS=0 to the
99 setup.py command line to disable the building of the glcanvas
100 module.
101
102 If you would like to install to someplace besides the Python
103 site-packages directory (such as to your home directory) then you
104 can add "--root=<path>" after the "install" command. To use
105 wxPython like this you'll need to ensure that the directory
106 containing wxPython is contained in the PYTHONPATH environment
107 variable.
108
109
110 5. If you havn't already, get a new copy of the demo and documentation
111 to go with the wxPython you just built and installed. See
112 http://wxpython.org/download.php#documentation
113
114
115 6. Change to the demo directory and run it like this:
116
117 python demo.py
118
119
120 7. That's all, except for the having fun part!
121
122
123
124 --
125 Robin Dunn
126 Software Craftsman
127 http://wxPython.org Java give you jitters? Relax with wxPython!
128