home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tkisrc04.zip / README.TclTkEMX < prev    next >
Text File  |  1998-08-13  |  15KB  |  278 lines

  1. Last update: 5 January 1998
  2. Illya Vaes
  3. Martin Luther Kingstate 23
  4. 6716 NA Ede
  5. The Netherlands
  6. ivaes@hr.nl (work; this was/is a free time project)
  7.  
  8. Welcome to Tcl 7.5/Tk 4.1 for OS/2 PM.
  9.  
  10. Installation:
  11. Unzip the archive, making sure directories are preserved (PKzip needs -d).
  12. As long as the binaries (tclsh75.exe and wish41.exe) are started in the
  13. \TclTk\bin directory, you don't need to do anything else. If you want to be
  14. able to start them from anywhere, you have to put the directory in your path
  15. or put the executables in a directory that already is in your PATH (and the
  16. DLLs in your LIBPATH).
  17. In such a case, it becomes quite likely that Tcl will not be able to find out
  18. the location of its library by itself, so you're recommended to add environment
  19. variables for those to you CONFIG.SYS (if you want them to persist, that is),
  20. e.g. SET TCL_LIBRARY=E:/TclTk/lib/tcl and TK_LIBRARY=E:/TclTk/lib/tk.
  21. Paths in Tcl/Tk use _forward_ slashes, in this port too! You can change to a
  22. different drive (and, if you like to a different directory there at the same
  23. time) by saying e.g. "cd e:/tk4.1/os2".
  24.  
  25. This port has been compiled with EMX 0.9b, and requires its EMXLIBCM.DLL and
  26. EMX.DLL (or those of a higher version). Kudos to Eberhard Mattes for EMX.
  27.  
  28. Compiling:
  29. To compile the source yourself, you need the Tcl and Tk source from Sun.
  30. After extracting it (gzip -c -d tcl7.5.tar.gz | tar xvf -) on your drive,
  31. unzip the source-zip of Tcl/Tk for OS/2 on the same drive, go to tcl7.5\os2
  32. and execute 'gmake -f makefile.emx'. You might want to use lxlite on generated
  33. executables.
  34. Obviously, you need gzip, tar, unzip and gmake for this, as well as EMX.
  35. Also, RC.EXE of IBM's VisualAge C++ 3.0 was used.
  36.  
  37.  
  38. NOTES
  39. =====
  40. - When you are in Tclsh, you can say "load <full-path-to-tk41.dll>" and you
  41.   have gotten all of Tk at your disposal (without wish's console).
  42.   Eg. "load E:/TclTk/bin/tk41.dll".
  43. - Because of difference in fonts and such, layout of scripts may turn out wrong.
  44.   This includes the test script hscale.tcl for instance, where the arrow that
  45.   follows the scale starts further to the left than the scale. Changing the
  46.   "-wraplength" option to the label $w.msg from 3.5i to 300 makes it (approx.)
  47.   correct.
  48. Programs that are known to run (with or without minor modification)
  49. -------------------------------------------------------------------
  50. Some apps seem to get into an infinite loop upon closing the main window with
  51. double clicking the window menu button (the icon topleft). At least Paradigm
  52. Visual Make does this. Visual Tcl and XF correctly intercept the
  53. WM_DELETE_WINDOW and/ort other WM_PROTOCOLS.
  54. - Paradigm Visual Make (pvm_12).
  55.   Needs to have the testing for the platform to be augmented with OS/2, with
  56.   the same actions as for Windows.
  57. - Visual Tcl 1.08
  58.   A smaller font must be specified to get the texts to show in their entirety
  59.   in the "Geometry Information" dialog, eg {8.Helv}.
  60. - XF 4.0pl1.
  61.   Needs to have "exec command.com..." changed to "exec cmd.exe" in
  62.   src/xfglobals.tcl and src/xfmisc.tcl (failure to do this will crash the
  63.   program), and the scripts xfhardcopy/xfhardcopy.tcl and
  64.   xfappdef/xfappdef.tcl need to have their wish modified to wish41.exe.
  65.  
  66.  
  67. HISTORICAL CHANGES
  68. ==================
  69.  
  70. Fix 1
  71. -----
  72. - Opening files for appending truncated them. Fixed.
  73. - Bitmaps got reversed (again). XCopyPlane has to do the colours "reversed"
  74.   like the Windows port, contrary to what the PM Guide and Reference states.
  75.  
  76. Release
  77. -------
  78. - Execs (usually with pretty much output) gave an OS/2 error message that the
  79.   process tried to write to a non-existent pipe. Fixed by not using a named
  80.   pipe but an unnamed pipe.
  81. - The socket code works.
  82. - The Tclsh console tries its best to add all output to the end, no matter
  83.   where the cursor happens to be.
  84.   Insert output from commands with MLM_IMPORT instead of via the clipboard,
  85.   thereby not being limited to 64K.
  86.   Control-C can be used to (try to) break off a script (like is necessary to
  87.   regain control in the test-script remote.tcl).
  88. - Traced a (not-so) subtle bug in TclSetSystemEnv that reared its ugly head
  89.   later, by running Visual Tcl 1.08 (malloc-ing space for VARIABLE=VARIABLE
  90.   instead of VARIABLE=VALUE, for a lengthy value, ergo using memory that wasn't
  91.   malloc-ed). Stoooopid.
  92. - Use of the command processor in environment variable COMSPEC instead of
  93.   always using CMD for things not in the path (ie. likely internal commands
  94.   like DIR). Still uses CMD.EXE when this can't be determined.
  95. - Array subscripts in determining system values were one off, rendering OS/2
  96.   Warp 4 as major version 4, minor version 0, revision <some-number> instead
  97.   of the (documented) required 20, 40 and 0. Fixed, but "hacked" in the same
  98.   way as CMD.EXE, ie. returning version 4.0 for 20.40.0.
  99. - Globbing was broken for non-current directory searches.
  100.   It accepts volume-relative specs like "e:*.tk" and fills in the current
  101.   directory on the drive between the ':' and '*'.
  102.   It now also determines case (in)sensitivity and case (non)preservation from
  103.   the file system that the directory resides on. FAT, VINES and anything it
  104.   doesn't recognize are taken to be insensitive and non-preserving. NFS and
  105.   EXT2FS (Linux) are taken to be sensitive and preserving, HPFS and NTFS
  106.   insensitive and preserving.
  107. - Fixed "put" with a channelId in the Tclsh console.
  108. - Flashing of a new window in the corner (being displayed there and then
  109.   immediately moved) fixed. Was caused by a superfluous WS_VISIBLE in the
  110.   Window Style). By default windows start in upper left corner.
  111. - Overzealous looking at VK_ALTGRAF in tkOS2X.c removed. This caused any key
  112.   pressed with Alt Gr (German, Dutch keyboards) to be ignored.
  113. - First code for a CLI (Command Line Interface) version of tclsh put in, but
  114.   not pursued further. #ifdef-ed with CLI_VERSION.
  115.  
  116. Beta 5 - 11 sept.1997
  117. ------
  118. - Unlike the Windows port ;-), the functionality of stippling for ARCs is
  119.   implemented.
  120. - Fixed inconsistency and typo in tkOS2Pointer.c wrt. Y coordinate lastMousePos.
  121. - The format of $tcl_platform(os) has been modified again to make them more
  122.   logical though now the array elements for platform and OS return the same,
  123.   ie. "OS/2"; Other values: osVersion e.g. "4.0", machine "intel".
  124.   Similarly, "winfo server ." returns e.g. "OS/2 4.0".
  125.   No marketing names (Warp) allowed here...
  126. - Menus appear at the correct height (aligned with bottom of button).
  127. - Binding to ALT works. NB: A binding is case-sensitive: Control-Shift-x will
  128.   not match anything while Control-Shift-X will. The latter is equivalent to
  129.   Control-X, since you will only get X (not x) by pressing Shift.
  130. - Withdrawn windows completely disappear, ie. from the task list.
  131. - Stippling works (apart from stippled ARCs, which don't get stippled in the
  132.   Windows port either).
  133. - Windows port did not look at GC values for CapStyle, JoinStyle, LineStyle.
  134.   This port does.
  135. - Lines have (specified) width. This needs the "geometric line width" in OS/2,
  136.   which is only used by GpiStrokePath (and GpiModifyPath), so use that.
  137. - Ctrl-X and the likes work.
  138. - Focus problem after grab fixed. I was too correct in following the "Results"
  139.   section for XGrabPointer, which says to return AlreadyGrabbed if the grab
  140.   didn't succeed. This should be ignored, like in the Windows version, and
  141.   GrabSuccess should always be returned.
  142. (Font patch by Ilya Zakharevich assimilated)
  143. - Fonts (sigh ;-}): calculation of size was wrong.
  144.   Furthermore, because of unclear / confusing GPI programming info, the check
  145.   of the sizes of the available fonts wasn't done on the right value. It turns
  146.   out you have to *request* the size via the lMaxBaselineExt member, while the
  147.   actually used value is in lEmHeight.
  148.   Am I dense or what?? Actually, the returned nominal pointsize is OK.
  149.   Compile-time option (via #define) provided for ignoring a PM-provided font
  150.   resolution of 120dpi, taking 96dpi instead, which is the resolution in VGA
  151.   and upto ?800x600?; requested by Ilya Zakharevich.
  152. - Color images now work, including those that get split up into several before
  153.   drawing (LCOLF_RGB instead of LCOLF_CONSECRGB in GpiCreateLogColorTable;
  154.   LCOLF_CONSECRGB should (only) be used with Palette Manager).
  155. - Width calculation of fonts improved by using TXTBOX_BOTTOMRIGHT instead of
  156.   TXTBOX_CONCAT.
  157. - Tcl: File globbing was broken because DosQueryPathInfo doesn't like ".\" for
  158.   the file/directory argument. Similarly, directories weren't seen.
  159. - "option readfile" wasn't succesful with OS/2 files, but was with an .Xdefaults
  160.   copied from Linux. Choked on the Return&Newline being replaced by just the
  161.   Newline, yielding a "nr.of chars read" smaller than the file size, aborting
  162.   the entire process. Fix necessitated changing the generic file tkOption.c,
  163.   function ReadOptionFile with the corresponding (fixed) code of Tk 4.2.
  164. - Compile time option (set in makefile.emx) to use "9.WarpSans" as default
  165.   font.
  166.  
  167. Beta 4
  168. ------
  169. - A "wm withdraw" now also works when running or sourcing a script (i.e.
  170.   mapping/creating in withdrawn state).
  171.   Switching to a withdrawn window (eg. by using the task list) works okay.
  172.   Previously only a "wm deiconify" would do the trick of exposing the client
  173.   area (restoring contents).
  174. - Resizing in vertical direction fixed.
  175.   When resizing to a smaller height with a menu bar involved, the menu bar
  176.   disappeared (partly or entirely, depending on the size).
  177.   Cause was the use of CS_SIZEREDRAW for child windows.
  178. - The default screen name is determined from the DISPLAY environment variable,
  179.   if available, so scripts asking for toplevels with -screen <name> don't
  180.   abort (and any toplevels without specifying a screen in an invocation of
  181.   wish with the -screen <name> argument).
  182. - Double-clicking now works correctly, OS/2 PM's WM_BUTTONxDBLCLK messages get
  183.   changed to both a ButtonDown and a ButtonUp event.
  184. - Fonts changed again. Presentation Parameter-style specification now fully
  185.   supported:  PointSize.FontName[.Attribute][.Attribute]... where Attribute is
  186.   one of bold, italic, outline, strikeout, underline.
  187.   Some fonts (eg. -*-Helvetica-Bold-R-Normal-*-240-*-*-*-*-*-*) didn't show up.
  188.   This was because they were scaled to pointsize 0 because the 240 is in the
  189.   "pixels" spot, which should be a substitute for the point size (or at least
  190.   was in the Windows version), but wasn't implemented identically. An explicit
  191.   point size will override it.
  192.   The ascenders and descenders of scalable fonts are fixed, so they won't get
  193.   progressively larger when enlarging the font.
  194. - Double ckfree because of WM_DESTROY message (caused by WinDestroyWindow in
  195.   XDestroyWindow, tkOS2Window.c) fixed, care of sleuthing by Ilya Zakharevich.
  196. - Resizing works, wm minsize and wm maxsize likewise.
  197.  
  198. Beta 3
  199. ------
  200. - Merged resources for additional pointers into the DLL.
  201. - Clicking in the console gets the focus now too (previously, only clicking the
  202.   titlebar worked).
  203. - Fonts work a little bit more correct. ;-)  Height, width and actually used
  204.   pointsize are correct now. Without special handling, every scalable font is
  205.   of point size 12!
  206.   Code by Ilya Zakharevich (ilya@math.ohio-state.edu) incorporated into
  207.   tkOS2Font.c, enabling the use of e.g. "10.Courier".
  208. - Images work. Funnily, they are (exquisite) greyscale on a 64K display but
  209.   color on a 256 palette management. The OS/2 part is doing what Tk tells it
  210.   to with regard to color though, it just gets handed grey values, so I have to
  211.   assume it is working as advertised.
  212. - 'exec' was broken in Beta 2. Fixed. PM apps should be exec-ed with '&' unless
  213.   they are very short-lived. Tclsh will be "listening" for output from the app
  214.   and this will "lock up the queue" because of the single-threadedness.
  215. - The format of $tcl_platform(os) has been modified slightly; return values are
  216.   now "Warp 3" and "Warp 4" instead of "Warp v3" and "Warp 4 (Merlin)".
  217.   Other values: platform "OS/2", osVersion e.g. "4.0", machine "intel".
  218. - Temporary files are cleaned up when closed by specifying a DosClose wrapper
  219.   to be called on file closure.
  220. - Humongous memory leak in TkOS2SelectPalette fixed.
  221.  
  222. Beta 2
  223. ------
  224. - Font selection works correctly now, so that any font available through the
  225.   font dialog is available. It first determines all fonts in the system (#ifdef
  226.   DEBUG) / all fonts with the specified facename (#ifndef DEBUG) via
  227.   GpiQueryFonts and then determines the most suitable font based on the
  228.   size. Preference is given to bitmap fonts over outline (scalable) fonts for
  229.   purposes of performance in using the font. When many fonts of the same
  230.   facename exist, the scalable one is at the start of the "list" and the
  231.   correctly sized bitmap font is at the end of the "list", this may exact a
  232.   performance penalty at the time of determining the font. This is a small
  233.   one-time penalty though.
  234.   Fonts with a '-' in their name have to be specified by length-3-array (eg.
  235.   "Conga-Normal 180 normal").
  236.   To not get stuck with a default font (ie Courier), you will need to use font
  237.   names that OS/2 knows *and* use the right case:
  238.   helvetica      ->   Helvetica   or   Helv
  239.   Times          ->   Times New Roman   or   Tms Rmn
  240.   (eg: ... -font "-Adobe-Times New Roman-medium-r-normal-*-180-*-*-*-*-*-*" )
  241. - Colors on non-Palette management system work. Not tested on VGA but you will
  242.   not get any better there...
  243. - Choosing "Close" (Alt-F4) on a torn-off menu or otherwise non-"main" window
  244.   will only close that particular window, not the whole application.
  245.  
  246. Beta 1
  247. ------
  248. No record has been maintained for bugfixes previous to this.
  249.  
  250.  
  251. THANKS TO
  252. =========
  253. - Ilya Zakharevich for his critical testing.
  254. - Anna Chiara Bellini for putting an FTP server at my disposal.
  255. - Anyone not named that has assisted by beta testing and/or doing suggestions.
  256.  
  257.  
  258. BUGS
  259. ====
  260.  
  261. TO DO (?) (Extending port)
  262. ==========================
  263. - Have Shift-Insert, Shift-Delete and Ctrl-Insert act on clipboard.
  264.   This means extending the "Tk Clipboard" only approach to use PRIMARY and/or
  265.   SECONDARY too. Just replacing CLIPBOARD with PRIMARY has Shift-Insert working.
  266. - Global Grab doesn't turn pointer into clock outside of dialog. Possible??
  267. - Make button 2 and 3 of the mouse switchable. To OS/2, button 2 is the right
  268.   mouse button and generates a WM_BUTTON2* message, 3 is an optional middle
  269.   mouse button (WM_BUTTON3*). For X, and thus XFree86 in an OS/2 Full Screen
  270.   session, button 2 is the ("always available") middle button and 3 the right.
  271. - Implement a "send", either via DDE or via Pipes/Queues?
  272. - Multithreading (dual-threading: one extra thread for the message queue to
  273.   stay responding to the system, coomunicating with the one that now exists
  274.   which might be computing for a longer time).
  275. - The list of occupied logical font IDs is a straight array. This method will
  276.   leave "holes" when freeing another font than the last one.
  277.   Solution: convert to a linked list or use Tcl's hash table mechanism.
  278.