]> git.saurik.com Git - wxWidgets.git/blame - wxPython/distrib/README.1st.txt
Some little tweaks for debugging
[wxWidgets.git] / wxPython / distrib / README.1st.txt
CommitLineData
1e4a197e
RD
1README for wxPythonSrc-*.tar.gz
2-------------------------------
3
4Prior to version 2.3.3 of wxPython I had always made my Linux/Unix
5binaries based on the released binary of wxGTK and wxGTK-gl. This
6imposed a few restrictions and so starting with 2.3.3 I have decided
7to do a combined binary that inlcudes wxGTK as well as wxPython. This
8allows me a bit more flexibility and is consistent with how the
9Windows and Mac OS X binaries are built.
10
11If you are reading this file then you are probably interested in
12building your own copy of wxPython from the sources contained in this
13archive. If you wish to use the released wxGTK binary as has been
14done in the past then you can still follow the old build directions in
15wxPython/BUILD.unix.txt. If you are building for Windows or Mac OS X
16then you should look at wxPython/BUILD.win32.txt or
17wxPython/BUILD.osx.txt respectivly.
18
19If, on the other hand, you would like to build Linux/Unix binaries
20with a private copy of wxGTK like what I am now distributing then
21you'll want to follow the instructions in this file. (You should
22probably still read wxPython/BUILD.unix.txt though since there are
23other details there that you may need to be aware of.
24
25Clear as mud? Good. Let's get started.
26
27
281. 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
372. Make a build directory and configure wxGTK.
38
1fded56b 39 cd wxPythonSrc-2.4.0 # or whatever the top-level dir is
1e4a197e
RD
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
8b9a4190
RD
53 SOLARIS NOTE: The --enable-rpath option may cause problems when
54 using wxGTK on Solaris when compiling wxPython in step 4 below.
55 The woraround is to not use --enable-rpath flag for configure, but
56 in that case all wxPython applications must have the
57 LD_LIBRARY_PATH set to include $WXPREF/lib, or you can use the
58 'crle' program to modify the runtime linking environment. If this
59 is the only installation of wxGTK on the system then you can use a
60 system library path for WXPREF and not have to worry about it at
61 all.
62
63 If you want to use the image and zlib libraries included with
1e4a197e
RD
64 wxWindows instead of those already installed on your system, (for
65 example, to reduce dependencies on 3rd party libraries) then you
66 can add these flags to the configure command:
67
68 --with-libjpeg=builtin \
69 --with-libpng=builtin \
70 --with-libtiff=builtin \
71 --with-zlib=builtin \
72
73 If you would like to use GTK 2.x and unicode, then add the
8b9a4190
RD
74 following flags. Please note that this is still considered beta,
75 but does look and work quite nice for the most part:
1e4a197e
RD
76
77 --enable-gtk2 \
78 --enable-unicode \
79
80
813. Build and install wxGTK. (You may need to be root for the last
82 step, depending on where your WXPREF is.)
83
84 make
1e4a197e
RD
85 make install
86
87
884. Build and install wxPython. If you want to use a different version
89 of Python than is found by default on the PATH then specify the
90 whole pathname in these steps. The version of Python that runs
91 setup.py is the version wxPython will be built and installed for.
92 (You will need to be root for the install step unless your Python
93 is not in a system location.)
94
95 cd ../wxPython
96 python setup.py \
97 WX_CONFIG=$WXPREF/bin/wx-config \
98 build install
99
100 If you are using GTK 2.x and unicode then do it this way instead:
101
102 python setup.py \
103 WX_CONFIG=$WXPREF/bin/wx-config \
104 WXPORT=gtk2 UNICODE=1 \
105 build install
106
107 If you get errors about wxGLCanvas or being unable to find libGLU
108 or something like that then you can add BUILD_GLCANVAS=0 to the
109 setup.py command line to disable the building of the glcanvas
110 module.
111
8b9a4190 112 If you would like to install to some place besides the Python
1e4a197e
RD
113 site-packages directory (such as to your home directory) then you
114 can add "--root=<path>" after the "install" command. To use
115 wxPython like this you'll need to ensure that the directory
1fded56b 116 containing wxPython is contained in the PYTHONPATH environment
1e4a197e
RD
117 variable.
118
119
1fded56b
RD
1205. If you havn't already, get a new copy of the demo and documentation
121 to go with the wxPython you just built and installed. See
122 http://wxpython.org/download.php#documentation
123
124
1256. Change to the demo directory and run it like this:
126
127 python demo.py
128
8b9a4190
RD
129 SOLARIS NOTE: If you get unresolved symbol errors when importing
130 wxPython and you are running on Solaris and building with gcc, then
131 you may be able to work around the problem by uncommenting a bit of
132 code in setup.py and building again. Look for 'SunOS' in setup.py
133 and uncomment the block containing it. The problem is that Sun's ld
134 does not automatically add libgcc to the link step.
1fded56b
RD
135
1367. That's all, except for the having fun part!
137
138
1e4a197e
RD
139
140--
141Robin Dunn
142Software Craftsman
143http://wxPython.org Java give you jitters? Relax with wxPython!
144