annotate Mac/Demo/building.html @ 5817:48b94de85bf3 legacy-trunk

Extensive changes by AMK.
author Guido van Rossum <guido@python.org>
date Thu, 17 Jul 1997 16:29:42 +0000
parents 18149980ece9
children 5d1f337cee26
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1 <HTML>
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2 <HEAD>
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3 <TITLE>Building Mac Python from source</TITLE>
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4 </HEAD>
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5 <BODY>
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
6 <H1>Building Mac Python from source</H1>
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
7 <HR>
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
8
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
9 This document explains how to build MacPython from source. This is
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
10 necessary if you want to write extension modules for 68K Python, and
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
11 currently also probably the easiest way to build PPC extension
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
12 modules. Building Python is not something to be undertaken lightly,
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
13 the process is not very streamlined so you need a reasonable working
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
14 knowledge of the CodeWarrior development environment, a good net
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
15 connection and probably quite some time too. <p>
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
16
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
17 The information density in this file is high, so you should probably
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
18 print it and read it at your leasure. Most things are explained only
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
19 once (and probably in the wrong place:-). <p>
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
20
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
21 I am very interested in feedback on this document, contact me at <A
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
22 HREF="mailto:jack@cwi.nl">&lt;jack@cwi.nl&gt;</A> or send your
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
23 comments to the <A
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
24 HREF="http://www.python.org/sigs/pythonmac-sig/">Mac Python Special
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
25 Interest Group</A>.
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
26
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
27 <H2>What you need.</H2>
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
28
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
29 The following things you definitely need:
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
30
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
31 <UL>
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
32
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
33 <LI> You need a MacPython source distribution, of course. You can
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
34 obtain one from <A
5426
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
35 HREF="ftp://ftp.cwi.nl/pub/jack/python/mac">ftp://ftp.cwi.nl/pub/jack/python/mac</A>
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
36 or from the companion webpage at <A HREF="http://www.cwi.nl/~jack/macpython.html">
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
37 http://www.cwi.nl/~jack/macpython.html</A> (which has up-to-date links to the other
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
38 packages needed too)
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
39 and possibly also from the standard <A
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
40 HREF="ftp://ftp.python.org/pub/python/mac">python.org ftp
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
41 site</A>. Everything you need is also included in the standard Python
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
42 source distribution, but the organization is different. Look in
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
43 directory <code>Mac/mwerks/projects</code> for the project files and
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
44 related stuff.
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
45
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
46 <LI> You need MetroWerks CodeWarrior. The current distribution has
5426
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
47 been built with version 11 of CodeWarrior. Ordering information is
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
48 available on the <A HREF="http://www.metrowerks.com/">MetroWerks
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
49 homepage</A>. You might still be able to build Python with MPW or
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
50 Think/Symantec C but you are basically on your own.
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
51
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
52 <LI> You need GUSI, the Grand Unified Socket Interface, by Matthias
5426
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
53 Neeracher. The original CWGUSI is
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
54 obtainable from <A
4822
44e86dadec94 - CWGUSI has moved
Jack Jansen <jack.jansen@cwi.nl>
parents: 4526
diff changeset
55 HREF="ftp://sunsite.cnlab-switch.ch/software/platform/macos/src">
5663
18149980ece9 Updated for 1.5a2 distribution
Jack Jansen <jack.jansen@cwi.nl>
parents: 5426
diff changeset
56 ftp://sunsite.cnlab-switch.ch/software/platform/macos/src</A>.
18149980ece9 Updated for 1.5a2 distribution
Jack Jansen <jack.jansen@cwi.nl>
parents: 5426
diff changeset
57 At the moment Python is built with a rather hacked-up version of GUSI,
18149980ece9 Updated for 1.5a2 distribution
Jack Jansen <jack.jansen@cwi.nl>
parents: 5426
diff changeset
58 these modifications are available in folder <code>Python:Mac:GUSI-mods</code>.
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
59
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
60 </UL>
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
61
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
62 <A NAME="optional">The MacPython project files are configured to
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
63 include a plethora of optional modules</A>, and these modules need a
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
64 number extra packages. To use the project files as-is you have to
4119
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
65 download these packages too. PPC and CFM68K Python have all such modules as
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
66 dynamically loaded modules, so if you don't need a certain package it
4119
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
67 suffices to just refrain from builing the extension module. For static 68K
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
68 Python things are a bit more complicated: you have to edit the
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
69 interpreter project file to remove the reference to the module (and
4119
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
70 the libraries it uses), and edit the <code>Mac:mwerks:mwerks_nonshared_config.h</code>
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
71 file to remove the <code>USE_...</code> line. Here are the locations for the various things
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
72 you need:
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
73
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
74 <UL>
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
75
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
76 <LI> Tcl and Tk can be obtained from <A
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
77 HREF="ftp://ftp.smli.com/pub/tcl/mac/">ftp://ftp.smli.com/pub/tcl/mac/</A>.
4822
44e86dadec94 - CWGUSI has moved
Jack Jansen <jack.jansen@cwi.nl>
parents: 4526
diff changeset
78 The current distributions, Tcl 7.6 and Tk 4.2 need a bit of work,
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
79 see the section on <A HREF="#tcltk">building Tcl/Tk Python</A>
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
80 below. Get the "full source" distribution, which includes MoreFiles.
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
81
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
82 <LI> Waste, a TextEdit replacement written by Marco Piovanelli, <A
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
83 HREF="mailto:piovanel@kagi.com">&lt;piovanel@kagi.com&gt;</A>. Python
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
84 was built using version 1.2, which you can obtain from <A
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
85 HREF="ftp://rhino.harvard.edu/pub/dan/WASTE">&lt;ftp://rhino.harvard.edu/pub/dan/WASTE&gt;</A>
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
86 and various other places.
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
87
5426
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
88 <LI> Gdbm library for the Mac. Available from Jack's Mac software page at
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
89 <A HREF="http://www.cwi.nl/~jack/macsoftware.html">
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
90 http://www.cwi.nl/~jack/macsoftware.html</A> and <A HREF="ftp://ftp.cwi.nl/pub/jack/mac">
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
91 ftp://ftp.cwi.nl/pub/jack/mac</A>.
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
92
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
93 <LI> JPEG library by the Independent JPEG Group. A version including
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
94 Mac projects can be found at Jack's page mentioned above.
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
95 The most recent JPEG library can always be obtained from <A
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
96 HREF="ftp://ftp.uu.net/graphics/jpeg/">ftp://ftp.uu.net/graphics/jpeg/</A>.
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
97
5426
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
98 <LI> The netpbm/pbmplus, libtiff, zlib and png libraries. The netpbm distribution
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
99 (which includes libtiff) is generally available on Internet ftp
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
100 servers. For Python pbmplus, an older incarnation of netpbm, is
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
101 functionally identical to netpbm, since Python only uses the library
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
102 and not the complete applications. A distribution with correct
5426
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
103 projects and library source only is available from, you guessed it, Jack's Mac software
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
104 page mentioned above.
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
105
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
106 </UL>
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
107
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
108 <H2>Setting Up</H2>
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
109
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
110 Now that you have collected everything you should start with building
5426
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
111 the various parts. If you don't want to fix
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
112 access paths try to set things up as follows:
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
113
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
114 <PRE>
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
115 Top-level-folder:
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
116 CWGUSI
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
117 imglibs
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
118 libjpeg
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
119 pbmplus
5426
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
120 libtiff
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
121 zlib
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
122 libpng
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
123 gdbm
4822
44e86dadec94 - CWGUSI has moved
Jack Jansen <jack.jansen@cwi.nl>
parents: 4526
diff changeset
124 MoreFiles 1.4.3 (not needed by Python, only by tcl/tk)
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
125 Python
4822
44e86dadec94 - CWGUSI has moved
Jack Jansen <jack.jansen@cwi.nl>
parents: 4526
diff changeset
126 Tcl 7.6
44e86dadec94 - CWGUSI has moved
Jack Jansen <jack.jansen@cwi.nl>
parents: 4526
diff changeset
127 Tk 4.2
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
128 Waste 1.2 distribution (if you want waste)
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
129 </PRE>
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
130
5426
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
131 First build GUSI. If you didn't get the python-specific GUSI you have to
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
132 move the files from the "CWGUSI-mods" to the right
5663
18149980ece9 Updated for 1.5a2 distribution
Jack Jansen <jack.jansen@cwi.nl>
parents: 5426
diff changeset
133 place in the CWGUSI distribution folder. Build the
18149980ece9 Updated for 1.5a2 distribution
Jack Jansen <jack.jansen@cwi.nl>
parents: 5426
diff changeset
134 projects <code>MSLGUSI.68K.µ</code>, <code>MSLGUSI.CFM68K.µ</code> and
18149980ece9 Updated for 1.5a2 distribution
Jack Jansen <jack.jansen@cwi.nl>
parents: 5426
diff changeset
135 <code>MSLGUSI.PPC.µ</code>. <p>
18149980ece9 Updated for 1.5a2 distribution
Jack Jansen <jack.jansen@cwi.nl>
parents: 5426
diff changeset
136
4417
c1435c5da281 Added a warning about gusi cfm68k "far data"
Jack Jansen <jack.jansen@cwi.nl>
parents: 4239
diff changeset
137 If you have a CWGUSI version more recent than
5663
18149980ece9 Updated for 1.5a2 distribution
Jack Jansen <jack.jansen@cwi.nl>
parents: 5426
diff changeset
138 1.8 it could be that the fixes are already included, check it.
4239
6700558a32fb Added note about modified gusi
Jack Jansen <jack.jansen@cwi.nl>
parents: 4119
diff changeset
139 Next, in
5426
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
140 <code>MoreFiles</code>, <code>libjpeg</code>, <code>pbmplus</code>,
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
141 <code>zlib</code>, <code>libpng</code>, <code>gdbm</code>,
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
142 and<code>libtiff</code> you build all projects. Sometimes the projects are in "mac"
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
143 subfolders, sometimes they are in the main folder. Tcl/tk is a special
4119
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
144 case, see below. Of course, if you are only interested in one of
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
145 static 68K, CFM68K or PPC you can skip building the other libraries.
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
146
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
147 <H2><A NAME="tcltk">Building Tcl/Tk</H2>
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
148
5663
18149980ece9 Updated for 1.5a2 distribution
Jack Jansen <jack.jansen@cwi.nl>
parents: 5426
diff changeset
149 You need to make some minor changes to the Tcl/Tk
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
150 distribution. The current instructions are for the
4822
44e86dadec94 - CWGUSI has moved
Jack Jansen <jack.jansen@cwi.nl>
parents: 4526
diff changeset
151 <code>tcl7.6</code> and <code>tk4.2</code> distribution:
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
152
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
153 <UL>
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
154
5663
18149980ece9 Updated for 1.5a2 distribution
Jack Jansen <jack.jansen@cwi.nl>
parents: 5426
diff changeset
155 <LI> You have to change the access path setting and such to use the MSL
18149980ece9 Updated for 1.5a2 distribution
Jack Jansen <jack.jansen@cwi.nl>
parents: 5426
diff changeset
156 libraries (this tcl/tk ditribution predates MSL).
18149980ece9 Updated for 1.5a2 distribution
Jack Jansen <jack.jansen@cwi.nl>
parents: 5426
diff changeset
157
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
158 <LI> Rename the <code>compat</code> folders to <code>(compat)</code>
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
159 in both the Tcl and Tk folders.
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
160
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
161 <LI> In the Tcl folder, move <code>strncasecmp.c</code> and
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
162 <code>tclErrno.h</code> from <code>(compat)</code> to the main Tcl
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
163 folder.
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
164
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
165 <LI> Fix <code>dnr.c</code> as provided by MetroWerks by inserting
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
166 <pre><code> #pragma ANSI_strict off </code></pre> at the
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
167 beginning. The tcl library is built with strict ANSI on, and this file
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
168 uses C++ style comments.
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
169
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
170 <LI> If you want to build <code>SimpleTcl</code> and
4822
44e86dadec94 - CWGUSI has moved
Jack Jansen <jack.jansen@cwi.nl>
parents: 4526
diff changeset
171 <code>SimpleTk</code> you may have to remove the references
44e86dadec94 - CWGUSI has moved
Jack Jansen <jack.jansen@cwi.nl>
parents: 4526
diff changeset
172 to <code>libmoto</code> from the project, not everyone has this library.
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
173
4822
44e86dadec94 - CWGUSI has moved
Jack Jansen <jack.jansen@cwi.nl>
parents: 4526
diff changeset
174 <LI> If you want to build for CFM68K you have to create the projects
44e86dadec94 - CWGUSI has moved
Jack Jansen <jack.jansen@cwi.nl>
parents: 4526
diff changeset
175 for the libraries yourself. Take the 68K library projects, set the C++ header
44e86dadec94 - CWGUSI has moved
Jack Jansen <jack.jansen@cwi.nl>
parents: 4526
diff changeset
176 file to "MW_TclHeaderCFM68K", the project type to "cfm68K library" and the
44e86dadec94 - CWGUSI has moved
Jack Jansen <jack.jansen@cwi.nl>
parents: 4526
diff changeset
177 filename to "Tcl-CFM68K.Lib" (and similarly for Tk).
44e86dadec94 - CWGUSI has moved
Jack Jansen <jack.jansen@cwi.nl>
parents: 4526
diff changeset
178 You may also have to modify <code>TclMacNotify.c</code>
4119
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
179 because there is an error in the Apple Universal headers (sic!). Read the
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
180 comments at the beginning of <code>Mac:Python:macglue.c</code> and copy the
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
181 code to <code>TclMacNotify.c</code>. If you get linker errors on <code>GetEvQHdr</code>
4822
44e86dadec94 - CWGUSI has moved
Jack Jansen <jack.jansen@cwi.nl>
parents: 4526
diff changeset
182 you have not done this correctly. <em>XXXX Is this still needed?</em>
44e86dadec94 - CWGUSI has moved
Jack Jansen <jack.jansen@cwi.nl>
parents: 4526
diff changeset
183
44e86dadec94 - CWGUSI has moved
Jack Jansen <jack.jansen@cwi.nl>
parents: 4526
diff changeset
184 <LI> Note that if you use a different release of Tcl and Tk than the ones
44e86dadec94 - CWGUSI has moved
Jack Jansen <jack.jansen@cwi.nl>
parents: 4526
diff changeset
185 I have used you may have to adapt the Python <code>tkresources.rsrc</code> file.
44e86dadec94 - CWGUSI has moved
Jack Jansen <jack.jansen@cwi.nl>
parents: 4526
diff changeset
186 This is easiest done by building <code>SimpleTk</code> and copying the TEXT, ICON
44e86dadec94 - CWGUSI has moved
Jack Jansen <jack.jansen@cwi.nl>
parents: 4526
diff changeset
187 and CRSR resources from it to <code>tkresources.rsrc</code>. This allows
44e86dadec94 - CWGUSI has moved
Jack Jansen <jack.jansen@cwi.nl>
parents: 4526
diff changeset
188 the <code>_tkinter</code> module to work without an installed Tk/Tcl on your
44e86dadec94 - CWGUSI has moved
Jack Jansen <jack.jansen@cwi.nl>
parents: 4526
diff changeset
189 machine.
4119
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
190
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
191 </UL>
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
192
4822
44e86dadec94 - CWGUSI has moved
Jack Jansen <jack.jansen@cwi.nl>
parents: 4526
diff changeset
193 Build first the Tcl library, then
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
194 SimpleTcl (test it by typing <code>ls -l</code> in the window you get)
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
195 then the Tk library, then SimpleTk (which can again be tested with
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
196 <code>ls -l</code>). If this all worked you are all set to try
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
197 building Python.
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
198
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
199 <H2>Building Waste</H2>
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
200
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
201 You do not need to build the Waste libraries, as Python includes the
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
202 source modules themselves. You have to make one modification,
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
203 though. In file <code>ICCFMGlue.c</code> in folder <code>Minimal IC
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
204 APIs</code>, add the following lines:
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
205
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
206 <blockquote><pre><code>
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
207 #include <Gestalt.h>
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
208 #include <Errors.h>
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
209 </code></pre></blockquote>
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
210
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
211 <H2>The organization of the Python source tree</H2>
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
212
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
213 Time for a short break, while we have a look at the organization of
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
214 the Python source tree. At the top level, we find the following
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
215 folders:
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
216
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
217 <DL>
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
218 <DT> build.mac68k.stand
5426
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
219 <DD> This is where you build static 68K interpreters.
4119
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
220
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
221 <DT> build.mac68k.shared
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
222 <DD> This is where you build the CFM68K shared library, interpreter
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
223 and applet framework.
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
224
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
225 <DT> build.macppc.shared
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
226 <DD> This is where you build the PPC shared library, interpreter and
4119
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
227 applet framework. You can also build the fat applet framework here.
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
228
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
229 <DT> build.macppc.stand
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
230 <DD> This is where you build a nonshared PPC interpreter (optional).
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
231
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
232 <DT> Demo
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
233 <DD> Demo programs that are not Mac-specific. Some of these may not
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
234 work, the file <code>README-Mac</code> has some details.
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
235
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
236 <DT> Extensions
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
237 <DD> Extensions to the interpreter that are not Mac-specific. Contains
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
238 only the <code>img</code> extension in this distribution. Extensions
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
239 are <em>not</em> built here, as they are on Unix, but incorporated in
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
240 the core interpreter or built as plugin modules.
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
241
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
242 <DT> Grammar
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
243 <DD> The Python grammar. Included for reference only, you cannot build
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
244 the parser on a Mac.
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
245
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
246 <DT> Include
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
247 <DD> Machine-independent header files.
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
248
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
249 <DT> Modules
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
250 <DD> Machine-independent optional modules. Not all of these will work
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
251 on the Mac.
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
252
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
253 <DT> Objects
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
254 <DD> Machine-independent code for various objects. Most of these are
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
255 not really optional: the interpreter will not function without them.
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
256
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
257 <DT> Parser
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
258 <DD> The Python parser (machine-independent).
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
259
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
260 <DT> PlugIns
4119
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
261 <DD> This is where you build the PPC and CFM68K dynamically-loaded plugin modules.
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
262
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
263 <DT> Python
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
264 <DD> The core interpreter. Most files are machine-independent, some
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
265 are unix-specific and not used on the Mac.
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
266
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
267 <DT> Tools
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
268 <DD> Tools for python developers. Contains <code>modulator</code>
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
269 which builds skeleton C extension modules and <code>bgen</code> which
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
270 generates complete interface modules from information in C header
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
271 files. There are some readme files, but more documentation is sorely
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
272 needed.
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
273
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
274 </DL>
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
275
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
276 All the mac-specific stuff lives in the <code>Mac</code> folder:
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
277 <DL>
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
278
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
279 <DT> Compat
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
280 <DD> Unix-compatability routines. Some of these are not used anymore,
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
281 since CWGUSI provides a rather complete emulation, but you may need
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
282 these if you are trying to build a non-GUSI python.
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
283
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
284 <DT> Demo
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
285 <DD> Mac-specific demo programs, some of them annotated.
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
286
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
287 <DT> Include
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
288 <DD> Mac-specific but compiler-independent include files.
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
289
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
290 <DT> Lib
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
291 <DD> Mac-specific standard modules. The <code>toolbox</code> folder
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
292 contains modules specifically needed with various MacOS toolbox
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
293 interface modules.
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
294
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
295 <DT> Modules
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
296 <DD> Mac-specific builtin modules. Theoretically these are all
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
297 optional, but some are rather essential (like
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
298 <code>macmodule</code>). A lot of these modules are generated with
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
299 <code>bgen</code>, in which case the bgen input files are included so
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
300 you can attempt to regenerate them or extend them.
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
301
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
302 <DT> MPW
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
303 <DD> MPW-specific files. These have not been used or kept up-to-date
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
304 for a long time, so use at your own risk.
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
305
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
306 <DT> mwerks
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
307 <DD> Mwerks-specific sources and headers. Contains glue code for
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
308 Pythons shared-library architecture, a replacement for
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
309 <code>malloc</code> and a directory with various projects for building
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
310 variations on the Python interpreter. The <code>mwerks_*.h</code>
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
311 files here are the option-setting files for the various interpreters
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
312 and such, comparable to the unix command-line <code>-D</code> options
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
313 to the compiler. Each project uses the correct option file as its
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
314 "prefix file" in the "C/C++ language" settings. Disabling optional
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
315 modules (for the 68K interpreter), building non-GUSI interpreters and
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
316 various other things are accomplished by modifying these files (and
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
317 possibly changing the list of files included in the project window, of
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
318 course).
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
319
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
320 <DT> Python
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
321 <DD> Mac-specific parts of the core interpreter.
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
322
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
323 <DT> Resources
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
324 <DD> Resource files needed to build the interpreter.
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
325
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
326 <DT> Scripts
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
327 <DD> A collection of various mac-specific Python scripts. Some are
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
328 essential, some are useful but few are documented, so you will have to
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
329 use your imagination to work them out.
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
330
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
331 <DT> Unsupported
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
332 <DD> Modules that are not supported any longer but may still work with a little effort.
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
333 </DL>
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
334
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
335 <H2>Building the 68K interpreter</H2>
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
336
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
337 If you have all the optional libraries mentioned <A
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
338 HREF="#optional">above</A> loaded buildin Python for 68K macs is a
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
339 breeze: open the project in the folder <code>build.mac68k.stand</code>
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
340 and build it. Do <em>not</em> run it yet, this will possibly result
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
341 in a garbled preferences file. <p>
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
342
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
343 First remove the <code>Python preferences</code> file from your
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
344 preference folder, only if you had an older version of Python
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
345 installed. (this is also what you do if you did not heed the last
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
346 sentence of the preceeding paragraph). Next, move the interpreter to
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
347 the main Python folder (up one level) and run it there. This will
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
348 create a correct initial preferences file. You are now all set, and
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
349 your tree should be completely compatible with a binary-only
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
350 distribution. Read the release notes
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
351 (<code>Relnotes-somethingorother</code>) and
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
352 <code>ReadMeOrSuffer</code> in the <code>Mac</code> folder.
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
353
4119
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
354 <H2>Building the CFM68K interpreter</H2>
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
355
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
356 Building the CFM68K interpreter is as almost exactly the same as building
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
357 the PPC interpreter, with the exception that you should read "CFM68K"
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
358 for "PPC" every time. Continue reading with the next section.
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
359
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
360 <H2>Building the PPC interpreter</H2>
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
361
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
362 First you build the interpreter, core library and applet skeleton in
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
363 folder <code>build.macppc.stand</code>. The order to build things is
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
364 the following:
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
365
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
366 <DL>
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
367
4119
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
368 <DT> PythonCorePPC
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
369 <DD> The shared library that contains the bulk of the interpreter and
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
370 its resources. It is a good idea to immedeately put an alias to this
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
371 shared library in the <code>Extensions</code> folder of your system
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
372 folder. Do exactly that: put an <em>alias</em> there, copying or
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
373 moving the file will cause you grief later.
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
374
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
375 <DT> PythonPPC
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
376 <DD> The interpreter. This is basically a routine to call out to the
5426
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
377 shared library. Do
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
378 <em>not</em> run it yet, this will possibly result in a garbled
5426
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
379 preferences file. See the section below on rebuilding .exp files if you
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
380 get funny linker errors. <p>
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
381
4444
fa9abf9a8624 Added a note about PythonApplet name
Jack Jansen <jack.jansen@cwi.nl>
parents: 4417
diff changeset
382 <DT> PythonAppletPPC
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
383 <DD> The applet skeleton application. Very similar to
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
384 <code>PythonPPC</code>, but it calls to a different entrypoint in the
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
385 core library. The <code>mkapplet</code> script will copy this complete
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
386 file, and add a <code>'PYC '</code> with the module to generate an
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
387 applet. <p>
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
388
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
389 </DL>
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
390
4444
fa9abf9a8624 Added a note about PythonApplet name
Jack Jansen <jack.jansen@cwi.nl>
parents: 4417
diff changeset
391 After creating the alias to <code>PythonCorePPC</code> you should move
fa9abf9a8624 Added a note about PythonApplet name
Jack Jansen <jack.jansen@cwi.nl>
parents: 4417
diff changeset
392 <code>PythonPPC</code> to the main Python folder. Next you remove any old
fa9abf9a8624 Added a note about PythonApplet name
Jack Jansen <jack.jansen@cwi.nl>
parents: 4417
diff changeset
393 <code>Python XXX Preferences</code> file from the <code>Preferences</code> folder
fa9abf9a8624 Added a note about PythonApplet name
Jack Jansen <jack.jansen@cwi.nl>
parents: 4417
diff changeset
394 (if you had python installed on your system before) and run the interpreter once
fa9abf9a8624 Added a note about PythonApplet name
Jack Jansen <jack.jansen@cwi.nl>
parents: 4417
diff changeset
395 to create the correct preferences file. You should also make an alias
fa9abf9a8624 Added a note about PythonApplet name
Jack Jansen <jack.jansen@cwi.nl>
parents: 4417
diff changeset
396 <code>PythonApplet</code> pointing to <code>PythonAppletPPC</code> in the main
fa9abf9a8624 Added a note about PythonApplet name
Jack Jansen <jack.jansen@cwi.nl>
parents: 4417
diff changeset
397 Python folder. (again: making an alias is preferrable to copying or moving the
fa9abf9a8624 Added a note about PythonApplet name
Jack Jansen <jack.jansen@cwi.nl>
parents: 4417
diff changeset
398 file, since this will cause the correct file to be used if you ever rebuild
fa9abf9a8624 Added a note about PythonApplet name
Jack Jansen <jack.jansen@cwi.nl>
parents: 4417
diff changeset
399 PythonAppletPPC). <p>
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
400
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
401 Next, you have to build the extension modules in the
4119
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
402 <code>PlugIns</code> folder. Open each project with <code>.ppc</code> in the
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
403 name and build it. After all
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
404 the dynamically loaded modules are built you have to create a number
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
405 of aliases: some modules live together in a single dynamic
4119
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
406 library. Run the <code>MkPluginAliases.py</code> script from
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
407 <code>Mac:scripts</code> to create the aliases. <p>
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
408
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
409 Finally, you must build the standard applets:
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
410 <code>EditPythonPrefs</code>, <code>mkapplet</code>, etc. This is
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
411 easiest done with the <code>fullbuild</code> script from
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
412 <code>Mac:scripts</code>. Answer <em>no</em> to all questions except
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
413 when it asks whether to build the applets. <p>
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
414
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
415 <BLOCKQUOTE>
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
416 Actually, the <code>fullbuild</code> script can be used to build
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
417 everything, but you need a fully-functional interpreter before you can
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
418 use it (and one that isn't rebuilt in the process: you cannot rebuild
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
419 a running program). You could copy the 68K interpreter to a different
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
420 place and use that to run fullbuild, or use the standalone PPC python
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
421 for this. I tend to keep a standalone interpreter in a safe place for
5663
18149980ece9 Updated for 1.5a2 distribution
Jack Jansen <jack.jansen@cwi.nl>
parents: 5426
diff changeset
422 this use only. <p>
18149980ece9 Updated for 1.5a2 distribution
Jack Jansen <jack.jansen@cwi.nl>
parents: 5426
diff changeset
423
18149980ece9 Updated for 1.5a2 distribution
Jack Jansen <jack.jansen@cwi.nl>
parents: 5426
diff changeset
424 Using fullbuild is also the only easy way to buid the fat application and applet.
18149980ece9 Updated for 1.5a2 distribution
Jack Jansen <jack.jansen@cwi.nl>
parents: 5426
diff changeset
425 See the fullbuild source for details on how to build the fat binaries "by hand".
18149980ece9 Updated for 1.5a2 distribution
Jack Jansen <jack.jansen@cwi.nl>
parents: 5426
diff changeset
426
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
427 </BLOCKQUOTE>
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
428
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
429 You are all set now, and should read the release notes and
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
430 <code>ReadMeOrSuffer</code> file from the <code>Mac</code> folder.
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
431
4119
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
432 <H2>Rebuilding <code>.exp</code> files for PPC and CFM68K</H2>
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
433
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
434 Occasionally it may be necessary to rebuild your PythonCore <code>.exp</code>
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
435 file, a file that controls which symbols are exported by your PythonCore
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
436 shared library. Rebuild it if you get unexpected undefined symbols when you
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
437 are building a plugin module. <p>
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
438
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
439 Rebuilding the .exp file is done by first removing the file and removing the
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
440 reference to it in the project (in the "config" section). Next, build PythonCore.
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
441 This will create a new .exp file. Edit this file to remove the references to
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
442 the symbols <code>__initialize</code>, <code>__terminate</code>, <code>setjmp</code>,
5426
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
443 <code>longjmp</code>, <code>main</code> and (for PPC) <code>__ptmf_null</code> or (for
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
444 CFM68K) <code>__start</code> and <code>dummy_init_routine</code>.
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
445 Next, add the .exp file to the project
4119
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
446 again and rebuild PythonCore. <p>
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
447
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
448 This rather convoluted procedure is needed to ensure that plugin modules don't
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
449 accidentally link with those entrypoints from PythonCore, which will not work because
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
450 those routines have to be in the same code fragment as they are used from.
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
451
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
452 <H2>Odds and ends</H2>
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
453
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
454 Some remarks that I could not fit in elsewhere:
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
455
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
456 <UL>
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
457
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
458 <LI> It may be possible to use the <code>PythonCore</code> shared
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
459 library to embed Python in another program, if your program can live
5426
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
460 with using GUSI for I/O. Use PythonCore in stead of your MSL C library
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
461 (or, at the very least, link it before the normal C library). Let me
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
462 know whether this works.
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
463
3945
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
464 <LI> It is possible to build PPC extension modules without building a
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
465 complete Python. Take the binary distribution, add folders
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
466 <code>Include</code>, <code>Mac:Include</code> and
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
467 <code>Mac:mwerks</code> from the source distribution and you should be
73cf7082b9e8 Changed instructions for new releases of cwgusi, waste and tcl/tk,
Jack Jansen <jack.jansen@cwi.nl>
parents: 3935
diff changeset
468 all set. A template for a dynamic module can be found in
4119
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
469 <code>xx.ppc.µ</code> or <code>xx.CFM68K.µ</code>.
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
470
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
471 <LI> The Python shared library architecture is a variant of the architecture
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
472 described as "application with shared libraries and dropins" in the MetroWerks
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
473 "Targeting MacOS" documentation. The Python Application and applet-template use
5426
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
474 the <code>MSL AppRuntime.Lib</code> runtime library (with properly set CFM
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
475 initialization and termination routines). PythonCore uses <code>MSL Runtime.Lib</code>,
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
476 which is really intended for standalone programs but which we fool into working by
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
477 providing a dummy main program.
4119
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
478 It is linked statically into PythonCore (and exported to the applications and plugins)
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
479 so we do not have to distribute yet another shared library. Plugin modules use
5426
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
480 <code>MSL ShlibRuntime.Lib</code> (not the dropin runtime: modules are never unloaded)
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
481 and obtain the rest from PythonCore. PythonCore uses a
4119
4f84cee65b8c - Added cfm68k instructions
Jack Jansen <jack.jansen@cwi.nl>
parents: 3945
diff changeset
482 non-standard initialization entry point, <code>__initialize_with_resources</code>, to
5426
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
483 be able to obtain resources from the library file later on. Plugins can do the same
dab863b79deb Updated for building with MSL libraries
Jack Jansen <jack.jansen@cwi.nl>
parents: 4963
diff changeset
484 (_tkinter does) or use the standard <code>__initialize</code> entry point.
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
485
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
486
4963
5ded2bc1908b "ported" Guido's embedding demo to the mac, and wrote some minimal
Jack Jansen <jack.jansen@cwi.nl>
parents: 4822
diff changeset
487 </UL>
3935
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
488 </BODY>
d7d8705ba644 Build instructions for source distribution that were somehow never
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
489 </HTML>