Purpose: to collect information regarding special tips, techniques, tricks, and got-chas in writing '''true''' cross platform Tcl scripts. Page begun by [Larry Virden]. See also [Tcl built-ins for cross platform functionality]. ---- Issues: * Directory naming conventions differ somewhat between Unix, Windows, MacOS. * Line endings on text based disk files vary. * Command pipelines are not supported on some platforms. * [How do I manage lock files in a cross platform manner in Tcl]? * [Practical Guide to Choosing Fonts] * [What about time epoch differences]? * [Tcl built-ins for cross platform functionality] ---- Other resources: * Tcl Engineering White Paper ftp://ftp.scriptics.com/pub/tcl/doc/engManual.tar.Z * Tcl Style Guide ftp://ftp.scriptics.com/pub/tcl/doc/styleGuide.tar.gz * Tcl portability White Paper ftp://ftp.scriptics.com/pub/tcl/doc/portable-tk.ps (I think) ---- Here are some example Tcl applications that run on all of UNIX, Win, and MacOS and which are not merely trivial but demonstrate many of the problems/solutions of cross-platform portability. * Alphatk [http://www.santafe.edu/~vince/Alphatk.html] is such an application. It is a cross-platform programmer's editor. It has some problems on MacOS, but this is due to a few remaining bugs/issues in MacTk, and not in Alphatk's scripts. It has cross-platform support for things like: executing external scripts, starting up latex processes (and capturing their output), etc. There are now about 170000 lines of Tcl code in there, which work cross-platform! * tkbiff [http://expect.nist.gov/tkbiff] includes a lot of code to make it work on all platforms. It sounds like a trivial app but it is actually 4300 lines of Tcl. Besides the things Tcl handles automatically, extra coding is necessary for cross-platform issues like : playing audios, fonts, cursors, preference file locations, keyboard/mouse bindings, invoking browsers, dialogues, and diagnostics. Fairly good rosetta stone since it is small and yet demonstrates things like UNIX/Win exec vs Mac-Applescript and Mac-resources. ---- Sometimes, even when a command itself isn't available in Tcl or Tk, it can be built rather easily. Hopefully the maintainer of [tcllib] and developers will continue to work together to gather things like [fileutil] and other pieces of code together into modules. ---- Please feel free to add anything you can. Hopefully some new tools could be added to the Tcl and Tk core to improve portability!