]> git.saurik.com Git - wxWidgets.git/blame - wxPython/docs/INSTALL.html
apply complete transforms (scroll window PrepareDC was not functioning properly)
[wxWidgets.git] / wxPython / docs / INSTALL.html
CommitLineData
8eda5e35
RD
1<?xml version="1.0" encoding="iso-8859-1" ?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
974a50f1
RD
6<meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" />
7<title>Installing wxPython 2.7 from Source</title>
8<style type="text/css">
9
10/*
11:Author: David Goodger
12:Contact: goodger@users.sourceforge.net
13:Date: $Date$
14:Revision: $Revision$
15:Copyright: This stylesheet has been placed in the public domain.
16
17Default cascading style sheet for the HTML output of Docutils.
18
19See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
20customize this style sheet.
21*/
22
23/* used to remove borders from tables and images */
24.borderless, table.borderless td, table.borderless th {
25 border: 0 }
26
27table.borderless td, table.borderless th {
28 /* Override padding for "table.docutils td" with "! important".
29 The right padding separates the table cells. */
30 padding: 0 0.5em 0 0 ! important }
31
32.first {
33 /* Override more specific margin styles with "! important". */
34 margin-top: 0 ! important }
35
36.last, .with-subtitle {
37 margin-bottom: 0 ! important }
38
39.hidden {
40 display: none }
41
42a.toc-backref {
43 text-decoration: none ;
44 color: black }
45
46blockquote.epigraph {
47 margin: 2em 5em ; }
48
49dl.docutils dd {
50 margin-bottom: 0.5em }
51
52/* Uncomment (and remove this text!) to get bold-faced definition list terms
53dl.docutils dt {
54 font-weight: bold }
55*/
56
57div.abstract {
58 margin: 2em 5em }
59
60div.abstract p.topic-title {
61 font-weight: bold ;
62 text-align: center }
63
64div.admonition, div.attention, div.caution, div.danger, div.error,
65div.hint, div.important, div.note, div.tip, div.warning {
66 margin: 2em ;
67 border: medium outset ;
68 padding: 1em }
69
70div.admonition p.admonition-title, div.hint p.admonition-title,
71div.important p.admonition-title, div.note p.admonition-title,
72div.tip p.admonition-title {
73 font-weight: bold ;
74 font-family: sans-serif }
75
76div.attention p.admonition-title, div.caution p.admonition-title,
77div.danger p.admonition-title, div.error p.admonition-title,
78div.warning p.admonition-title {
79 color: red ;
80 font-weight: bold ;
81 font-family: sans-serif }
82
83/* Uncomment (and remove this text!) to get reduced vertical space in
84 compound paragraphs.
85div.compound .compound-first, div.compound .compound-middle {
86 margin-bottom: 0.5em }
87
88div.compound .compound-last, div.compound .compound-middle {
89 margin-top: 0.5em }
90*/
91
92div.dedication {
93 margin: 2em 5em ;
94 text-align: center ;
95 font-style: italic }
96
97div.dedication p.topic-title {
98 font-weight: bold ;
99 font-style: normal }
100
101div.figure {
102 margin-left: 2em ;
103 margin-right: 2em }
104
105div.footer, div.header {
106 clear: both;
107 font-size: smaller }
108
109div.line-block {
110 display: block ;
111 margin-top: 1em ;
112 margin-bottom: 1em }
113
114div.line-block div.line-block {
115 margin-top: 0 ;
116 margin-bottom: 0 ;
117 margin-left: 1.5em }
118
119div.sidebar {
120 margin-left: 1em ;
121 border: medium outset ;
122 padding: 1em ;
123 background-color: #ffffee ;
124 width: 40% ;
125 float: right ;
126 clear: right }
127
128div.sidebar p.rubric {
129 font-family: sans-serif ;
130 font-size: medium }
131
132div.system-messages {
133 margin: 5em }
134
135div.system-messages h1 {
136 color: red }
137
138div.system-message {
139 border: medium outset ;
140 padding: 1em }
141
142div.system-message p.system-message-title {
143 color: red ;
144 font-weight: bold }
145
146div.topic {
147 margin: 2em }
148
149h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
150h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
151 margin-top: 0.4em }
152
153h1.title {
154 text-align: center }
155
156h2.subtitle {
157 text-align: center }
158
159hr.docutils {
160 width: 75% }
161
162img.align-left {
163 clear: left }
164
165img.align-right {
166 clear: right }
167
168ol.simple, ul.simple {
169 margin-bottom: 1em }
170
171ol.arabic {
172 list-style: decimal }
173
174ol.loweralpha {
175 list-style: lower-alpha }
176
177ol.upperalpha {
178 list-style: upper-alpha }
179
180ol.lowerroman {
181 list-style: lower-roman }
182
183ol.upperroman {
184 list-style: upper-roman }
185
186p.attribution {
187 text-align: right ;
188 margin-left: 50% }
189
190p.caption {
191 font-style: italic }
192
193p.credits {
194 font-style: italic ;
195 font-size: smaller }
196
197p.label {
198 white-space: nowrap }
199
200p.rubric {
201 font-weight: bold ;
202 font-size: larger ;
203 color: maroon ;
204 text-align: center }
205
206p.sidebar-title {
207 font-family: sans-serif ;
208 font-weight: bold ;
209 font-size: larger }
210
211p.sidebar-subtitle {
212 font-family: sans-serif ;
213 font-weight: bold }
214
215p.topic-title {
216 font-weight: bold }
217
218pre.address {
219 margin-bottom: 0 ;
220 margin-top: 0 ;
221 font-family: serif ;
222 font-size: 100% }
223
224pre.literal-block, pre.doctest-block {
225 margin-left: 2em ;
226 margin-right: 2em ;
227 background-color: #eeeeee }
228
229span.classifier {
230 font-family: sans-serif ;
231 font-style: oblique }
232
233span.classifier-delimiter {
234 font-family: sans-serif ;
235 font-weight: bold }
236
237span.interpreted {
238 font-family: sans-serif }
239
240span.option {
241 white-space: nowrap }
242
243span.pre {
244 white-space: pre }
245
246span.problematic {
247 color: red }
248
249span.section-subtitle {
250 /* font-size relative to parent (h1..h6 element) */
251 font-size: 80% }
252
253table.citation {
254 border-left: solid 1px gray;
255 margin-left: 1px }
256
257table.docinfo {
258 margin: 2em 4em }
259
260table.docutils {
261 margin-top: 0.5em ;
262 margin-bottom: 0.5em }
263
264table.footnote {
265 border-left: solid 1px black;
266 margin-left: 1px }
267
268table.docutils td, table.docutils th,
269table.docinfo td, table.docinfo th {
270 padding-left: 0.5em ;
271 padding-right: 0.5em ;
272 vertical-align: top }
273
274table.docutils th.field-name, table.docinfo th.docinfo-name {
275 font-weight: bold ;
276 text-align: left ;
277 white-space: nowrap ;
278 padding-left: 0 }
279
280h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
281h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
282 font-size: 100% }
283
284tt.docutils {
285 background-color: #eeeeee }
286
287ul.auto-toc {
288 list-style-type: none }
289
290</style>
8eda5e35
RD
291</head>
292<body>
974a50f1
RD
293<div class="document" id="installing-wxpython-2-7-from-source">
294<h1 class="title">Installing wxPython 2.7 from Source</h1>
8eda5e35 295<p>This document will describe the few differences and additions to the
2e957aae
RD
296content in the <a class="reference" href="BUILD.html">BUILD</a> document for installing wxPython built from
297source. Please follow the intstructions both in this file and in
298<a class="reference" href="BUILD.html">BUILD</a> to perform this task. Where there is overlap the items
299described here will take precedence for doing installations.</p>
974a50f1
RD
300<div class="section">
301<h1><a id="installing-on-unix-like-systems-not-os-x" name="installing-on-unix-like-systems-not-os-x">Installing on Unix-like Systems (not OS X)</a></h1>
8eda5e35 302<ol class="arabic">
fc33e5e1 303<li><p class="first">When building wxWidgets you need to decide if you want it to be a
8eda5e35
RD
304private copy only accessed by wxPython, or if you would like it to
305be installed in a stanard location such as /usr. Or perhaps you
fc33e5e1 306already have a version of wxWidgets installed on your system (such
8eda5e35
RD
307as from an RPM) and you want wxPython to use that version too. If
308so then you'll want to ensure that the flags and options used to
309build the installed version are compatible with wxPython.</p>
310</li>
fc33e5e1 311<li><p class="first">If you do decide to build and install your own wxWidgets then there
8eda5e35
RD
312are a few tweaks to the configure flags described in BUILD.txt that
313you will probably want to make. Instead of --enable-debug use
314this configure flag:</p>
315<pre class="literal-block">
316--enable-optimize \
317</pre>
fc33e5e1 318<p>Normally I also use the following flag in order to have wxWidgets
8eda5e35
RD
319runtime assertions turned into Python exceptions where possible.
320It does add extra code to the build but probably not enough to
321worry about it. However if you want to get as lean a build as
322possible you can leave it out, but if your code does something bad
2e957aae
RD
323then instead of exceptions you'll likely get a crash:</p>
324<pre class="literal-block">
325--enable-debug_flag \
326</pre>
fc33e5e1 327<p>If you are building a private copy of wxWidgets (IOW, not installed
8eda5e35
RD
328in a standard library location) then it can be kind of a hassle to
329always have to set the LD_LIBRARY_PATH variable so wxPython can
fc33e5e1 330find the wxWidgets shared libraries. You can hard code the library
8eda5e35 331path into the binaries by using the rpath option when configuring
fc33e5e1 332wxWidgets. For example:</p>
8eda5e35 333<pre class="literal-block">
974a50f1 334--enable-rpath=/opt/wx/2.7/lib \
8eda5e35
RD
335</pre>
336<p>SOLARIS NOTE: The --enable-rpath option may cause problems when
337using wxGTK on Solaris when compiling wxPython as described below.
338The woraround is to not use --enable-rpath flag for configure, but
339in that case all wxPython applications <em>must</em> have the
340LD_LIBRARY_PATH set to include $WXPREF/lib, or you can use the
341'crle' program to modify the runtime linking environment. If this
342is the only installation of wxGTK on the system then you can use a
343system library path for prefix and not have to worry about it at
344all.</p>
345</li>
346<li><p class="first">Build and install wxGTK as described in BUILD.txt.</p>
347</li>
348<li><p class="first">In addition to building wxPython as described in BUILD.txt, you can
349install it to Python's site-packages dir, as well as some scripts
60b517c1
RD
350into the same bin dir used by Python by using this command, plus
351whatever WXPORT, UNICODE, etc. settings you used for the initial
352build step:</p>
8eda5e35 353<pre class="literal-block">
974a50f1 354python2.5 setup.py install
8eda5e35
RD
355</pre>
356<p>If you would like to install to some place besides the prefix where
357Python is installed, (such as to your home directory) then you can
358add &quot;--root=&lt;path&gt;&quot; after the &quot;install&quot; command. This will use
359&lt;path&gt; as the prefix and will install scripts to a bin subdir and
360the wxPython packages to a lib subdir. To use wxPython like this
361you'll need to ensure that the directory containing wxPython is
362contained in the PYTHONPATH environment variable.</p>
363</li>
364</ol>
365</div>
974a50f1
RD
366<div class="section">
367<h1><a id="installing-on-os-x" name="installing-on-os-x">Installing on OS X</a></h1>
8eda5e35
RD
368<p>Installing wxPython on OS X is nearly the same as the Unix
369instructions above, except for a few small, but important details:</p>
370<ol class="arabic simple">
371<li>The --enable-rpath configure option is not needed since the path to
fc33e5e1 372the wxWidgets dylibs will automatically be encoded into the
8eda5e35 373extension modules when they are built. If you end up moving the
fc33e5e1 374wxWidgets dynlibs to some other location (such as inside the .app
8eda5e35
RD
375bundle of your applicaiton for distribution to other users,) then
376you will need to set DYLD_LIBRARY_PATH to this location so the
377dylibs can be found at runtime.</li>
378<li>Depending on the version of OS X Python may be installed in
379different locations. On 10.2 (Jaguar) you need to download and
380install MacPython-OSX-2.3 from <a class="reference" href="http://www.python.org/">http://www.python.org/</a> and the
381Python Framework will then be installed in /Library/Frameworks. On
38210.3 (Panther) Apple supplies the Python Framework as part of the
383OS install, but it will be located in /System/Library/Frameworks
40efbdda
RD
384instead. However, on Panther the site-packages dir is sym-linked
385to /Library/Python/2.3 so the wxPython packages will end up there,
8eda5e35
RD
386although they will still be visible from site-packages. If you are
387building distributions of wxPython to be installed on other
388machines be careful to install to /Library/Python/2.3. To
389complicate things further, the Jaguar version, or a custom build
390you do yourself will end up in /Library/Frameworks even on
391Panther...</li>
60b517c1
RD
392<li>You need to use pythonw at the command line or the PythonLauncher
393app to run wxPython apps, otherwise the app will not be able to
394fully use the GUI display.</li>
8eda5e35
RD
395</ol>
396</div>
974a50f1
RD
397<div class="section">
398<h1><a id="installing-on-windows" name="installing-on-windows">Installing on Windows</a></h1>
8eda5e35 399<ol class="arabic">
fc33e5e1 400<li><p class="first">Build wxWidgets and wxPython as described in BUILD.txt. If you
8eda5e35
RD
401would rather have a version without the code that turns runtime
402assertions into Python exceptions, then use &quot;release&quot; instead of
fc33e5e1 403&quot;hybrid&quot; when building wxWidgets and add &quot;FINAL=1&quot; to the setup.py
8eda5e35
RD
404command line.</p>
405</li>
40efbdda
RD
406<li><p class="first">Install wxPython like this. Remember to add any additional flags
407you added for the build such as UNICODE or USE_SWIG:</p>
8eda5e35
RD
408<pre class="literal-block">
409python setup.py install
410</pre>
411</li>
fc33e5e1 412<li><p class="first">Copy the wxWidgets DLLs to the wx package directory so they can be
8eda5e35
RD
413found at runtime by the extension modules without requiring that
414they be installed on the PATH:</p>
415<pre class="literal-block">
974a50f1 416copy %WXWIN%\\lib\\vc_dll\\wx*h_*.dll c:\\Python25\\Lib\\site-packages\\wx
8eda5e35
RD
417</pre>
418</li>
419</ol>
420</div>
421</div>
8eda5e35
RD
422</body>
423</html>