summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authordas <das>2002-10-21 04:37:33 (GMT)
committerdas <das>2002-10-21 04:37:33 (GMT)
commit61c2582f32b8c8a81a4746264335c35953b66896 (patch)
treed45c7338357175f46c5b980081a0f1e3a3c80dae /macosx
parenta1cf501392a9e4748afd25b97cead4a22de206f8 (diff)
downloadtk-61c2582f32b8c8a81a4746264335c35953b66896.zip
tk-61c2582f32b8c8a81a4746264335c35953b66896.tar.gz
tk-61c2582f32b8c8a81a4746264335c35953b66896.tar.bz2
* macosx/README: revised according to Jim's suggestions
* macosx/tkMacOSXAppInit.c: use standard PATH_MAX from <limits.h>
Diffstat (limited to 'macosx')
-rw-r--r--macosx/README43
-rw-r--r--macosx/tkMacOSXAppInit.c15
2 files changed, 31 insertions, 27 deletions
diff --git a/macosx/README b/macosx/README
index a5446d9..f273805 100644
--- a/macosx/README
+++ b/macosx/README
@@ -1,7 +1,7 @@
TclTkAqua README
----------------
-RCS: @(#) $Id: README,v 1.1 2002/10/16 23:56:02 das Exp $
+RCS: @(#) $Id: README,v 1.2 2002/10/21 04:37:34 das Exp $
This is the README file for the Mac OS X native versions of Tcl & Tk.
@@ -15,8 +15,8 @@ specific to Tcl & Tk on Mac OS X:
(this page also has a link to searchable archives of the list, please check them
before asking on the list, many questions have already been answered).
-- For general tcl/tk questions, the newsgroup comp.lang.tcl is your best bet, but
-also check the Tcl'ers Wiki for a wealth of information:
+- For general tcl/tk questions, the newsgroup comp.lang.tcl is your best bet,
+but also check the Tcl'ers Wiki for a wealth of information:
http://wiki.tcl.tk/
- The wiki has a page listing known bugs in Mac OS X Tk (and other tips)
@@ -45,14 +45,7 @@ OS9 TclTk droplets.
- If standard input is a special file of zero length (e.g. /dev/null), Wish
brings up the tk console window at startup. This is the case when double
-clicking Wish in the finder (or using 'open Wish\ Shell.app').
-
-- Wish accepts drag & drop of text files (i.e. OS type TEXT and other files that
-the system recognizes as being of NSStringPboardType). To claim other OS types
-or file extensions in your Wish clone, you need to edit
- Wish Shell.app/Contents/Info.plist
-for more info on how this works, c.f. the System Overview document:
- file:///Developer/Documentation/Essentials/SystemOverview/index.html
+clicking Wish in the finder (or using 'open Wish\ Shell.app' from the Terminal).
- Tcl extensions will be found in any of:
$HOME/Library/Tcl /Library/Tcl
@@ -62,8 +55,8 @@ for more info on how this works, c.f. the System Overview document:
- Tcl.framework contains the Tcl and Tk documentation in html format in the
standard location for frameworks:
Tcl.framework/Resources/English.lproj/Documentation/Reference/Tcl
-(OTOH no manpages are installed by default).
-Tk.framework contains no documentation.
+Tk.framework contains no documentation, and no manpages are installed by
+default.
- the frameworks Tcl.framework and Tk.framework can be placed in any of the
system's standard framework directories:
@@ -78,10 +71,12 @@ it will break if 'Wish Shell' is moved.
- if 'Wish Shell' is started from the Finder or via 'open', $argv contains a
"-psn_XXXX" argument. This is the Wish's carbon process serial number, you may
need to filter it out for cross platform compatibility of your scripts.
-Also note that the env array is different when Wish is started from
-the Finder, in particular PATH may not be what you expect.
-(Wish inherits the Finder's environment variables, which are essentially
-those set in $HOME/.MacOSX/environment.plist).
+
+- the env array is different when Wish is started from the Finder than when
+it (or tclsh) is invoked from the Terminal, in particular PATH may not be what
+you expect. (Wish started from the Finder inherits the Finder's environment
+variables, which are essentially those set in $HOME/.MacOSX/environment.plist
+and not those set by your shell configuration files).
- Quickdraw text antialiasing is enabled by default when available (from 10.1.5
onwards). Changing the global boolean variable '::tk::mac::antialiasedtext'
@@ -108,6 +103,18 @@ IDE, but you do not have to deal with the IDE if you don't want to: there are
Makefiles available in tcl/macosx and tk/macosx that take care of calling the
ProjectBuilder command line tool with all the details taken care of.
+- For the following instructions to work as is, the tcl and tk source trees
+should be located in a common directory and be named 'tcl' resp. 'tk' (as is
+the case when building directly from CVS). You need to adapt the paths in the
+instructions if they are named differently (e.g. when building from a
+distribution tarball), but the build process will still work fine.
+If the source trees are not located in the same directory, you'll need to create
+a symbolic link
+ ln -fs /path_to_tcl/build /path_to_tk/build
+(where /path_to_{tcl,tk} is the directory where the 'tcl' resp. 'tk' sourcetree
+is located) for the build to work as setup by default by the Makefiles; or you
+can pass an argument of BUILD_DIR=somewhere to both the tcl and tk make.
+
- If you're only interested in _building_ TclTkAqua and don't plan on doing
development with the ProjectBuilder projects, using the Makefiles is easiest.
The following steps will build Tcl and Tk from the Terminal (assuming you are
@@ -149,7 +156,7 @@ the Makefiles, i.e.
make -C tcl/macosx install-embedded INSTALL_ROOT=`pwd`/embedded
make -C tk/macosx install-embedded INSTALL_ROOT=`pwd`/embedded
will build a standalone 'Wish Shell.app' in ./embedded/Applications/Utilities
-(this only requires a relink if you've already built standard TclTkAqua).
+(if you've already built standard TclTkAqua, this only requires a relink).
Note that the embedded frameworks include only optimized builds and no
documentation.
diff --git a/macosx/tkMacOSXAppInit.c b/macosx/tkMacOSXAppInit.c
index 55863a1..ec141d0 100644
--- a/macosx/tkMacOSXAppInit.c
+++ b/macosx/tkMacOSXAppInit.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXAppInit.c,v 1.3 2002/09/12 17:34:16 das Exp $
+ * RCS: @(#) $Id: tkMacOSXAppInit.c,v 1.4 2002/10/21 04:37:34 das Exp $
*/
#include <pthread.h>
#include <sys/stat.h>
@@ -20,13 +20,10 @@
#include "locale.h"
#include <Carbon/Carbon.h>
+#include "tkPort.h"
#include "tkMacOSX.h"
#include "tkMacOSXEvent.h"
-#ifndef MAX_PATH_LEN
- #define MAX_PATH_LEN 1024
-#endif
-
/*
* If the App is in an App package, then we want to add the Scripts
* directory to the auto_path. But we have to wait till after the
@@ -34,7 +31,7 @@
* figured out in main.
*/
-char scriptPath[MAX_PATH_LEN + 1];
+char scriptPath[PATH_MAX + 1];
extern Tcl_Interp *gStdoutInterp;
@@ -116,17 +113,17 @@ main(argc, argv)
if (appMainURL != NULL) {
CFURLRef scriptFldrURL;
- char *startupScript = malloc(MAX_PATH_LEN + 1);
+ char *startupScript = malloc(PATH_MAX + 1);
if (CFURLGetFileSystemRepresentation (appMainURL, true,
- startupScript, MAX_PATH_LEN)) {
+ startupScript, PATH_MAX)) {
TclSetStartupScriptFileName(startupScript);
scriptFldrURL = CFBundleCopyResourceURL(bundleRef,
CFSTR("Scripts"),
NULL,
NULL);
CFURLGetFileSystemRepresentation(scriptFldrURL,
- true, scriptPath, MAX_PATH_LEN);
+ true, scriptPath, PATH_MAX);
CFRelease(scriptFldrURL);
} else {
free(startupScript);