diff --git a/Mac/Demo/building.html b/Mac/Demo/building.html index c27de03040c..eb64963be91 100644 --- a/Mac/Demo/building.html +++ b/Mac/Demo/building.html @@ -54,7 +54,7 @@ Neeracher. The original CWGUSI is obtainable from ftp://sunsite.cnlab-switch.ch/software/platform/macos/src. -At the moment Python is built with a slightly modified version of GUSI 1.8.1fc2, +At the moment Python is built with a slightly modified version of GUSI, these modifications are available in folder Python:Mac:GUSI-mods. @@ -121,32 +121,31 @@ Top-level-folder: zlib libpng gdbm + MoreFiles 1.4.3 (not needed by Python, only by tcl/tk) Python Tcl/Tk Folder tcl8.0 tk8.0 - MoreFiles 1.4.3 Waste 1.2 distribution (if you want waste) First build GUSI. If you didn't get the python-specific GUSI you have to move the files from the "CWGUSI-mods" to the right -place in the CWGUSI distribution folder. Build the MSL target for your -platform (MSLGUSI PPC, MSLGUSI 68K or MSLGUSI CFM68K).

+place in the CWGUSI distribution folder. Build the MSL version for your +platform (ppc, 68k, cfm68k).

Next, in MoreFiles, libjpeg, pbmplus, zlib, libpng, gdbm, -andlibtiff you build all projects. The projects are in "mac" +andlibtiff you build all projects. Sometimes the projects are in "mac" subfolders, sometimes they are in the main folder. Tcl/tk is a special case, see below. Of course, if you are only interested in one of static 68K, CFM68K or PPC you can skip building the other libraries.

Building Tcl/Tk

-You need to make some minor changes to the Tcl/Tk 8.0 beta2 -distribution. You should make the CW Pro projects TclLibraries.¹ and -TkLibraries.¹ (in the mac subfolders). +You need to make some minor changes to the Tcl/Tk 8.0 +distribution. You should make the CW Pro projects (in the mac subfolders). Let us have a look at the program. The first interesting statement in the main diff --git a/Mac/Demo/example2.html b/Mac/Demo/example2.html index 936cfad4912..84c766f480d 100644 --- a/Mac/Demo/example2.html +++ b/Mac/Demo/example2.html @@ -10,10 +10,7 @@ applets, standalone applications written in Python. Source and resource file (in binary and BinHex form for downloading) are available in the folder example2. If you want to run the program on your -machine and you have Python 1.3 or earlier you will also need a new copy of FrameWork.py, which has been -updated since the 1.3 release.

+HREF="example2">example2.

Again, we start with ResEdit to create our dialogs. Not only do we want a main dialog this time but also an "About" dialog, and we @@ -31,7 +28,7 @@ off, there's the standard BNDL combo. I've picked 'PYTi' as signature for the application. I tend to pick PYT plus one lower-case letter for my signatures. The finder gets confused if you have two applications with the same signature. This may be due to some incorrectness on the -side of "mkapplet", I am not sure. There is one case when you +side of "BuildApplet", I am not sure. There is one case when you definitely need a unique signature: when you create an applet that has its own data files and you want the user to be able to start your applet by double-clicking one of the datafiles.

@@ -135,26 +132,27 @@ nothing has changed.

Creating applets

-Now, if you have a PowerPC Macintosh, let us try to turn the python -script into an applet, a standalone application. Actually, -"standalone" is probably not the correct term here, since an applet -does still depend on a lot of the python environment: the PythonCore -shared library, the Python Preferences file, the python Lib folder and -any other modules that the main module depends on. It is possible to -get rid of all these dependencies except for the dependency on -PythonCore, but at the moment that is still quite difficult so we will -ignore that possibility for now. By standalone we mean here that the -script has the look-and-feel of an application, including the ability -to have its own document types, be droppable, etc.

+Now let us try to turn the python script into an applet, a standalone +application. This will not work if you have the "classic 68k" +Python distribution, only if you have the cfm68k or PPC distribution. +Actually, "standalone" is probably not the correct term here, since an +applet does still depend on a lot of the python environment: the +PythonCore shared library, the Python Preferences file, the python Lib +folder and any other modules that the main module depends on. It is +possible to get rid of all these dependencies except for the dependency +on PythonCore, but at the moment that is still quite difficult so we +will ignore that possibility for now. By standalone we mean here that +the script has the look-and-feel of an application, including the +ability to have its own document types, be droppable, etc.

The easiest way to create an applet is to take your source file and -drop it onto "mkapplet" (normally located in the Python home -folder). This will create an applet with the same name as your python +drop it onto "BuildApplet", located in the Python home +folder. This will create an applet with the same name as your python source with the ".py" stripped. Also, if a resource file with the same name as your source but with ".rsrc" extension is available the resources from that file will be copied to your applet too. If there is no resource file for your script a set of default resources will be -used, and the applet will have the default creator 'PYTa'. The latter +used, and the applet will have the default creator 'Pyt0'. The latter also happens if you do have a resource file but without the BNDL combo. Actually, for our example that would have been the most logical solution, since our applet does not have @@ -164,8 +162,8 @@ having the custom icon, but that could have been done by pasting an icon on the finder Info window, or by providing an custon icon in your resource file and setting the "custom icon" finder bit.

-If you need slightly more control over the mkapplet process you can -double-click mkapplet, and you will get dialogs for source and +If you need slightly more control over the BuildApplet process you can +double-click it, and you will get dialogs for source and destination of the applet. The rest of the process, including locating the resource file, remains the same.

diff --git a/Mac/Demo/index.html b/Mac/Demo/index.html index ba1500d9303..4301fa84f95 100644 --- a/Mac/Demo/index.html +++ b/Mac/Demo/index.html @@ -19,26 +19,17 @@ HREF="http://www-acs.ucsd.edu/~jstrout/python/"> http://www-acs.ucsd.edu/~jstrout/python/.

-The Python Library Reference contains a section on -Macintosh-specific modules -that you should also read. Documentation is also available in PostScript and other -forms, see the documentation section -on the webserver.

+The Python Library +Reference contains a section on Macintosh-specific +modules that you should also read. Documentation is also available +in PostScript and other forms, see the documentation section on the +webserver.

-Some of these documents were actually written while I was working on a "real" -project: creating a single-button application that will allow my -girlfriend to read her mail (which actually pass thry my -mailbox, so I get to read it too, but don't tell her:-) without her -having to worry about internet connections, unix commands, etc. The -application, when finished, will connect to the net using InterSLIP, -start a (pseudo-)POP server on unix using rsh and use AppleScript to -tell Eudora to connect to that server and retrieve messages.

+Some of these documents were actually written a long time ago and have seen +little maintainance, so use with care.

-These examples were all built using Python 1.3.3, which can be downloaded -from ftp.cwi.nl, directory -/pub/jack/python/mac, and possibly from the -ftp.python.org server and its mirrors as well. Some examples may work -with earlier versions of Python, some will definitely not.

Table of contents