2011-05-22 13:26:02 +04:00
|
|
|
ActiveTcl is ActiveState's quality-assured distribution of Tcl.
|
2004-07-01 13:38:48 +04:00
|
|
|
|
|
|
|
# see <http://www.activestate.com/Products/ActiveTcl/>
|
|
|
|
# <http://www.tcl.tk/>
|
|
|
|
|
2009-07-13 03:08:32 +04:00
|
|
|
First of all, please try to configure without any options.
|
|
|
|
"extconf.rb" searches ActiveTcl as default action.
|
|
|
|
If you have ActiveTcl and standard (or your own) Tcl/Tk on your
|
|
|
|
environment and don't want to use ActiveTcl on your Ruby/Tk, please
|
|
|
|
use --without-ActiveTcl option.
|
|
|
|
|
|
|
|
When "extconf.rb" fails to find your ActiveTcl libraries, please try
|
|
|
|
the followings.
|
|
|
|
|
2011-05-22 13:26:02 +04:00
|
|
|
If you want to use ActiveTcl binary package as the Tcl/Tk libraries,
|
2004-07-01 13:38:48 +04:00
|
|
|
please use the following configure options.
|
|
|
|
|
2009-07-13 03:08:32 +04:00
|
|
|
--with-ActiveTcl=<ActiveTcl_root>
|
2011-05-22 13:26:02 +04:00
|
|
|
( When without argument; no <ActiveTcl_root>; only '--with-ActiveTcl',
|
2009-07-13 03:08:32 +04:00
|
|
|
it same to '--with-ActiveTcl=/opt/ActiveTcl*/lib' )
|
|
|
|
|
2004-07-01 13:38:48 +04:00
|
|
|
--with-tcl-dir=<ActiveTcl_root>
|
|
|
|
--with-tk-dir=<ActiveTcl_root>
|
|
|
|
|
|
|
|
And use the followings if you need.
|
|
|
|
|
|
|
|
--with-tcllib=<libname>
|
|
|
|
--with-tklib=<libname>
|
|
|
|
--enable-tcltk-stubs
|
|
|
|
|
2011-05-22 13:26:02 +04:00
|
|
|
For example, when you install ActiveTcl-8.4.x to '/usr/local/ActiveTcl',
|
2004-07-01 13:38:48 +04:00
|
|
|
|
|
|
|
configure --with-tcl-dir=/usr/local/ActiveTcl/ \
|
|
|
|
--with-tk-dir=/usr/local/ActiveTcl/ \
|
2004-09-02 21:17:20 +04:00
|
|
|
--with-tcllib=tclstub8.4 \
|
|
|
|
--with-tklib=tkstub8.4 \
|
2004-07-01 13:38:48 +04:00
|
|
|
--enable-tcltk-stubs
|
|
|
|
|
2011-05-22 13:26:02 +04:00
|
|
|
It depends on your environment that you have to add the directory of
|
|
|
|
ActiveTcl's libraries to your library path when execute Ruby/Tk.
|
|
|
|
One of the way is to add entries to TCLLIBPATH environment variable,
|
2004-07-06 13:42:12 +04:00
|
|
|
and one of the others add to LD_LIBRARY_PATH environment variable
|
|
|
|
|
2011-05-22 13:26:02 +04:00
|
|
|
Probably, using TCLLIBPATH is better. The value is appended at the
|
|
|
|
head of Tcl's 'auto_path' variable. You can see the value of the
|
2004-07-06 13:42:12 +04:00
|
|
|
variable by using 'Tk::AUTO_PATH.value' or 'Tk::AUTO_PATH.list'.
|
|
|
|
|
2011-05-22 13:26:02 +04:00
|
|
|
For example, on Linux, one of the ways is to use LD_LIBRARY_PATH
|
|
|
|
environment variable.
|
2004-07-06 13:42:12 +04:00
|
|
|
-------------------------------------------------------------------------
|
|
|
|
[bash]$ LD_LIBRARY_PATH=/usr/local/ActiveTcl/lib:$LD_LIBRARY_PATH \
|
|
|
|
ruby your-Ruby/Tk-script
|
|
|
|
|
|
|
|
[bash]$ LD_LIBRARY_PATH=/usr/local/ActiveTcl/lib:$LD_LIBRARY_PATH irb
|
|
|
|
-------------------------------------------------------------------------
|
|
|
|
Based on it, the Tcl interpreter changes auto_path variable's value.
|
2004-07-01 13:38:48 +04:00
|
|
|
|
|
|
|
Then, you'll be able to use Tcl/Tk extension libraries included in the
|
|
|
|
ActiveTcl package (e.g. call TkPackage.require('BWidget'), and then,
|
2013-05-19 07:10:21 +04:00
|
|
|
use functions/widgets of BWidget extension).
|
2004-07-01 13:38:48 +04:00
|
|
|
|
|
|
|
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
|