swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

port of tcl/tk to Aqua


From: Marc-Antoine Parent
Subject: port of tcl/tk to Aqua
Date: Fri, 18 Jan 2002 08:25:28 -0500


Le Mercredi 16 janvier 2002, à 05:08 , address@hidden a écrit :

Marc-Antoine wrote:
Still, you may want to know I used Jim Ingham's port of
tcl/tk to Aqua, which you were also looking at, if I can be any help
there.

Sorry if I am back tracking, but where do you get the code for this, and how did you use it?

Actually, they're now part of the tcl project on sourceforge.
You can get a snapshot of the MacOSX build at
http://sourceforge.net/project/showfiles.php?group_id=10894&release_id=57094

Even better, use CVS to checkout tcl and tk:
The roots are respectively
:pserver:address@hidden:/cvsroot/tcl
:pserver:address@hidden:/cvsroot/tktoolkit
and the branch you want is macosx-8-4-branch in both cases.

You can use the projects there to build Tk.Framework and Tcl.Framework;
I put those in /Library myself. (i.e. as opposed to ~/Library)

Then, you can use the good old
/Library/Frameworks/Tcl.framework/Headers/tclConfig.sh
Note that the corresponding tkConfig.sh is missing, but in my case I could do without it to use tk.

When you compile, you use the framework directives:
cc -c test.cc -framework Tcl -framework Tk
cc -o test test.o -framework Tcl -framework Tk

Note that the included headers must be prefixed by the frameworks, as in
#include <Tcl/tcl.h>
#include <Tk/tk.h>

Also, two useful intializations:
    Tk_MacOSXSetupTkNotifier();
goes before
    interp = Tcl_CreateInterp();

and
    TkMacOSXInitAppleEvents(interp);
    TkMacOSXInitMenus(interp);
goes after
    mainWindow = Tk_MainWindow(interp);


Finally, note that the resulting executable will only catch events properly if within a .app structure, skeletal as it may be. That is a real nuisance, as often you want to call tk as a subprocess within a unix application. (Well Mozart does that anyway.) What I ended up doing is creating the .app directory structure somewhere (i.e. myApp.app/Contents/MacOS/test and then I put a symlink from my original executable location to the executable hidden in the .app structure. Invoking the symlink works perfectly, amusingly enough.

That should be all you need, I hope.
(Thanks to Jim for providing me all the above info...)

Good luck!


On another note, I saw that HDF5 also appeared in fink. Another piece of the Swarm puzzle falling in place...
So, where are you folks at otherwise?

Marc-Antoine Parent


                 ==================================
  Swarm-Support is for discussion of the technical details of the day
  to day usage of Swarm.  For list administration needs (esp.
  [un]subscribing), please send a message to <address@hidden>
  with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]