208 lines
7.5 KiB
Plaintext
208 lines
7.5 KiB
Plaintext
|
Tcl 7.6 for Macintosh
|
||
|
|
||
|
by Ray Johnson
|
||
|
Sun Microsystems Laboratories
|
||
|
rjohnson@eng.sun.com
|
||
|
|
||
|
SCCS: @(#) README 1.17 96/10/07 14:00:05
|
||
|
|
||
|
1. Introduction
|
||
|
---------------
|
||
|
|
||
|
This is the README file for the Macintosh version of the Tcl
|
||
|
scripting language. The file consists of information specific
|
||
|
to the Macintosh version of Tcl. For more general information
|
||
|
please read the README file in the main Tcl directory.
|
||
|
|
||
|
2. What's new?
|
||
|
--------------
|
||
|
|
||
|
There are several new features in Tcl 7.6. The most important
|
||
|
are the new file manipulation commands. These are subcommands
|
||
|
to the file command and include "delete", "rename", "copy", and
|
||
|
"mkdir". These should be used over the old "rm", "rmdir", "mkdir",
|
||
|
and "cp" commands. The older commands will eventually be removed
|
||
|
(they currently contain known bugs.)
|
||
|
|
||
|
In addition, a new memory allocator has been added to the Mac
|
||
|
version of Tcl. This allocator is much faster than the one shipped
|
||
|
by MetroWerks (which is much faster than calling NewPtr directly).
|
||
|
Having our own allocator will also allow us to have a little more
|
||
|
control over memory useage. More work still needs to be done in
|
||
|
this area - but the goal is to work around the fixed application
|
||
|
partition imposed by the MacOS. The result will be less crashes
|
||
|
of your Tcl applications. I hope you notice a difference.
|
||
|
|
||
|
There is also a new command called "resource". This command should
|
||
|
be considered "alpha" software. It mostly works but will be
|
||
|
enhanced in the future. Backwards compatability will probably not
|
||
|
be maintained. However, I think you will find it very usefull.
|
||
|
Unfortunantly, the command doesn't currently have documentation -
|
||
|
but you should be able to use the error messages to get an idea
|
||
|
of what it does.
|
||
|
|
||
|
Aside from bugs in the resource command, I know of no outstanding
|
||
|
bugs in the Tcl core for the Macintosh. (I'm not saying there are
|
||
|
none - just that I don't know about them!) Please let me know what
|
||
|
bugs you find. Also, I welcome any feedback on how to improve the
|
||
|
feature set, the integration with the Mac OS, or the distribution.
|
||
|
|
||
|
|
||
|
3. The Distribution
|
||
|
-------------------
|
||
|
|
||
|
Macintosh Tcl is distributed in three different forms. This
|
||
|
should make it easier to only download what you need. The
|
||
|
packages are as follows:
|
||
|
|
||
|
mactk4.2.sea.hqx
|
||
|
|
||
|
This distribution is a "binary" only release. It contains an
|
||
|
installer program that will install a 68k, PowerPC, or Fat
|
||
|
version of the "Tcl Shell" and "Wish" applications. In addition,
|
||
|
it installs the Tcl & Tk libraries in the Extensions folder inside
|
||
|
your System Folder. (These are just text files - no inits are
|
||
|
installed.)
|
||
|
|
||
|
mactcltk-full-4.2.sea.hqx
|
||
|
|
||
|
This release contains the full release of Tcl and Tk for the
|
||
|
Macintosh plus the More Files packages which Macintosh Tcl and Tk
|
||
|
rely on.
|
||
|
|
||
|
mactcl-source-7.6.sea.hqx
|
||
|
|
||
|
This release contains the complete source for Tcl 7.6. In
|
||
|
addition, Metrowerks CodeWarrior libraries and project files
|
||
|
are included. However, you must already have the More Files
|
||
|
package to compile this code.
|
||
|
|
||
|
4. Documentation
|
||
|
----------------
|
||
|
|
||
|
The "html" subdirectory contains reference documentation in
|
||
|
in the HTML format. You may also find these pages at:
|
||
|
|
||
|
http://www.smli.com/research/tcl/man/
|
||
|
|
||
|
Other documentation and sample Tcl scripts can be found at
|
||
|
the Tcl ftp site:
|
||
|
|
||
|
ftp://ftp.neosoft.com/tcl/
|
||
|
|
||
|
The internet news group comp.lang.tcl is also a valuable
|
||
|
source of information about Tcl. A mailing list is also
|
||
|
available (see below).
|
||
|
|
||
|
5. Compiling Tcl
|
||
|
----------------
|
||
|
|
||
|
In order to compile Macintosh Tcl you must have the
|
||
|
following items:
|
||
|
|
||
|
CodeWarrior Release 8 or higher (newer is better)
|
||
|
Mac Tcl 7.6 (source)
|
||
|
More Files 1.4.3
|
||
|
|
||
|
The project files included with the Mac Tcl source should work
|
||
|
fine. The only thing you may need to update are the access paths.
|
||
|
Unfortunantly, it's somewhat common for the project files to become
|
||
|
slightly corrupted. The most common problem is that the "Prefix file"
|
||
|
found in the "C/C++ Preference" panel is incorrect. This should be
|
||
|
set to MW_TclHeaderPPC or MW_TclHeader68K.
|
||
|
|
||
|
Special notes:
|
||
|
|
||
|
* Problem with dnr.c. You will also need to modify the file dnr.c
|
||
|
which is supplied by MetroWerks and included by the Mac Tcl project
|
||
|
files. This file uses C++ style comments which will not compile
|
||
|
because the supplied project files have the "Strict ANSI" option
|
||
|
set. The best thing to do is simply change the C++ style comments
|
||
|
into standard ANSI comment blocks. You should also send a bug
|
||
|
report to MetroWerks so they will fix this stupid problem.
|
||
|
|
||
|
* There is a small bug in More Files 1.4.3. Look in the file named
|
||
|
morefiles.doc for more details.
|
||
|
|
||
|
* You may not have the libmoto library which will cause a compile
|
||
|
error. Look at the file libmoto.doc for more details.
|
||
|
|
||
|
* Check out the file bugs.doc for information about known bugs.
|
||
|
|
||
|
6. Environment Variables
|
||
|
------------------------
|
||
|
|
||
|
Environment variables may be added to the system via three different
|
||
|
mechanisms. The first is automatic inclusion of system variables. These
|
||
|
variables include things like the system folder path. These variables are
|
||
|
determined at startup time (for the interpreter) but are not changed if
|
||
|
the system changes. The following environment variables are created via
|
||
|
this method:
|
||
|
|
||
|
LOGIN - holds the Chooser name of the Macintosh
|
||
|
USER - also holds the Chooser name of the Macintosh
|
||
|
SYS_FOLDER - path to the system directory
|
||
|
APPLE_M_FOLDER - path to the Apple Menu directory
|
||
|
CP_FOLDER - path to the control panels directory
|
||
|
DESK_FOLDER - path to the desk top directory
|
||
|
EXT_FOLDER - path to the system extensions directory
|
||
|
PREF_FOLDER - path to the preferences directory
|
||
|
PRINT_MON_FOLDER - path to the print monitor directory
|
||
|
SHARED_TRASH_FOLDER - path to the network trash directory
|
||
|
TRASH_FOLDER - path to the trash directory
|
||
|
START_UP_FOLDER - path to the start up directory
|
||
|
PWD - path to the application's default directory
|
||
|
|
||
|
Environment variables may also be placed in a file. A file named
|
||
|
"Tcl Environment Variables" may be placed in the preferences folder.
|
||
|
Each line of this file should be of the form "VAR_NAME=var_data".
|
||
|
|
||
|
For example,
|
||
|
|
||
|
PRINTER=Joe's LW
|
||
|
TCLLIBPATH=Lozoya:System Folder:Tcl Lib
|
||
|
|
||
|
The last alternative is to place environment variables in a 'STR#'
|
||
|
resource named "Tcl Environment Variables" of the application. This is
|
||
|
considered a little more "Mac like" than a Unix style Environment
|
||
|
Variable file. Each entry in the 'STR#' resource has the same format
|
||
|
as above. The source code file "tclMacEnv.c" contains the
|
||
|
implementation of the env mechanisms. This file contains many
|
||
|
#define's that allow customization of the env mechanisms to fit your
|
||
|
applications needs.
|
||
|
|
||
|
7. Macintosh Tcl Mailing List
|
||
|
-----------------------------
|
||
|
|
||
|
A Mailing List has been set up to discuss Macintosh related Tcl issues
|
||
|
including (but not limited to) MacTcl. In order to use this Mailing
|
||
|
List you must have access to the internet. If you have access to the
|
||
|
WWW the home page for this mailing list is located at the following
|
||
|
URL:
|
||
|
|
||
|
http://www.smli.com/research/tcl/lists/mactcl-list.html
|
||
|
|
||
|
The home page contains information about the list and an HTML archive
|
||
|
of all the past messages on the list. To subscribe send a message to:
|
||
|
|
||
|
listserv@sunlabs.sun.com
|
||
|
|
||
|
In the body of the message (the subject will be ignored) put:
|
||
|
|
||
|
subscribe mactcl Joe Blow
|
||
|
|
||
|
Replacing Joe Blow with your real name, of course. If you would just
|
||
|
like to receive more information about the list without subscribing
|
||
|
but the line:
|
||
|
|
||
|
information mactcl
|
||
|
|
||
|
in the body instead.
|
||
|
|
||
|
|
||
|
|
||
|
If you have comments or Bug reports send them to:
|
||
|
Ray Johnson
|
||
|
rjohnson@eng.sun.com
|
||
|
|