Martin v. Löwis | b21cb5f | 2001-03-21 07:42:07 +0000 | [diff] [blame] | 1 | $Id$ |
| 2 | |
| 3 | Installing PyTix |
| 4 | ---------------- |
| 5 | |
| 6 | 0) To use PyTix, you need Tcl/Tk (V8.2+), Tix (V8.1+) and Python (V2.1+). |
| 7 | PyTix has been written and tested on a Intel Pentium running RH Linux 5.2 |
| 8 | and Mandrake Linux 7.0 and Windows with the above mentioned packages. |
| 9 | |
| 10 | Older versions, e.g. Tix 4.1 and Tk 8.0, might also work. |
| 11 | |
| 12 | There is nothing OS-specific in PyTix itself so it should work on |
| 13 | any machine with Tix and Python installed. You can get Tcl and Tk |
| 14 | from http://dev.scriptics.com and Tix from http://tix.sourceforge.net. |
| 15 | |
| 16 | 1) Build and install Tcl/Tk 8.2 or 8.3. Build and install Tix 8.1 or better. |
| 17 | Ensure that Tix is properly installed by running tixwish and executing |
| 18 | the demo programs. Under Unix, use the --enable-shared configure option |
| 19 | for all three. We recommend tcl8.2.3 for this release of PyTix. |
| 20 | |
| 21 | 2) Modify Modules/Setup.dist and setup.py to change the version of the |
| 22 | tix library from tix4.1.8.0 to tix8.1.8.2 |
| 23 | These modified files can be used for Tkinter with or without Tix. |
| 24 | |
| 25 | 3) The default is to build dynamically, and use the Tcl 'package require'. |
| 26 | To build statically, modify the Modules/Setup file to link in the Tix |
| 27 | library according to the comments in the file. On Linux this looks like: |
| 28 | |
| 29 | # *** Always uncomment this (leave the leading underscore in!): |
| 30 | _tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \ |
| 31 | # *** Uncomment and edit to reflect where your Tcl/Tk libraries are: |
| 32 | -L/usr/local/lib \ |
| 33 | # *** Uncomment and edit to reflect where your Tcl/Tk headers are: |
| 34 | -I/usr/local/include \ |
| 35 | # *** Uncomment and edit to reflect where your X11 header files are: |
| 36 | -I/usr/X11R6/include \ |
| 37 | # *** Or uncomment this for Solaris: |
| 38 | # -I/usr/openwin/include \ |
| 39 | # *** Uncomment and edit for BLT extension only: |
| 40 | # -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \ |
| 41 | # *** Uncomment and edit for PIL (TkImaging) extension only: |
| 42 | # (See http://www.pythonware.com/products/pil/ for more info) |
| 43 | # -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \ |
| 44 | # *** Uncomment and edit for TOGL extension only: |
| 45 | # -DWITH_TOGL togl.c \ |
| 46 | # *** Uncomment and edit for Tix extension only: |
| 47 | -DWITH_TIX -ltix8.1.8.2 \ |
| 48 | # *** Uncomment and edit to reflect your Tcl/Tk versions: |
| 49 | -ltk8.2 -ltcl8.2 \ |
| 50 | # *** Uncomment and edit to reflect where your X11 libraries are: |
| 51 | -L/usr/X11R6/lib \ |
| 52 | # *** Or uncomment this for Solaris: |
| 53 | # -L/usr/openwin/lib \ |
| 54 | # *** Uncomment these for TOGL extension only: |
| 55 | # -lGL -lGLU -lXext -lXmu \ |
| 56 | # *** Uncomment for AIX: |
| 57 | # -lld \ |
| 58 | # *** Always uncomment this; X11 libraries to link with: |
| 59 | -lX11 |
| 60 | |
| 61 | 4) Rebuild Python and reinstall. |
| 62 | |
| 63 | You should now have a working Tix implementation in Python. To see if all |
| 64 | is as it should be, run the 'tixwidgets.py' script in the Demo/tix directory. |
| 65 | Under X windows, do |
| 66 | /usr/local/bin/python Demo/tix/tixwidgets.py |
| 67 | |
| 68 | If this does not work, you may need to tell python where to find |
| 69 | the Tcl, Tk and Tix library files. This is done by setting the |
| 70 | TCL_LIBRARY, TK_LIBRARY and TIX_LIBRARY environment variables. Try this: |
| 71 | |
| 72 | env TCL_LIBRARY=/usr/local/lib/tcl8.2 \ |
| 73 | TK_LIBRARY=/usr/local/lib/tk8.2 \ |
| 74 | TIX_LIBRARY=/usr/local/lib/tix8.1 \ |
| 75 | /usr/local/bin/python Demo/tix/tixwidgets.py |
| 76 | |
| 77 | |
| 78 | If you find any bugs or have suggestions for improvement, please report them |
| 79 | via http://tix.sourceforge.net |
| 80 | |
| 81 | |