From: sujeet kumar <
[email protected]>
Subject: Re: How to make a browser in Ruby Tk
Date: Sun, 19 Jun 2005 14:42:09 +0900
Message-ID: said:
I am new to ruby. How to install the extension onTcl/Tk
environment and use the Tcl/Tk's library on Ruby/Tk ? My OS is fc3
and I installed everything of the option on fc3 cd. My ruby version is
"ruby 1.8.2 (2004-12-25) [i686-linux]". I tried to install from
http://www.hwaci.com/sw/tkhtml/index.html link but it doesn't work.
=20
I don't know existence of RPM pakage of tkHTML extension for FC3.
If you have development packages of Tcl/Tk and want install tkHTML
from source files, you'll be able to find the compile steps in
COMPILE.txt included in the tkHTML source archive.
=20
If you don't mind to use RPM packages, maybe to use the ActiveTcl
binary package is one of the easiest way to make some extensions
available on your Ruby/Tk.
Then,
=20
* get an ActiveTcl binary package.
(e.g. ActiveTcl8.4.10.0.147113-linux-ix86.tar.gz)
=20
* extract the package.
(e.g. tar xvzf ActiveTcl8.4.10.0.147113-linux-ix86.tar.gz)
=20
* cd to the extracted directory and run ./install.sh.
(e.g. cd ActiveTcl8.4.10.0.147113-linux-ix86; sh ./install.sh).
=20
Assume that ActiveTcl is installed at /usr/local/ActiveTcl.
=20
* Please read 'ext/tcltklib/README.ActiveTcl'(Ruby-1.8)
'ext/tk/README.ActiveTcl'(Ruby-1.9) .
=20
* add ActiveTcl's library directory to your library path.
=20
* extract Ruby source archive and cd to the generated directory.
=20
* run ./configure with options which indicates ActiveTcl libraries.
(e.g. ./configure --with-tcl-dir=3D/usr/local/ActiveTcl/ \
--with-tk-dir=3D/usr/local/ActiveTcl/ \
--with-tcllib=3Dtclstub8.4 \
--with-tklib=3Dtkstub8.4 \
--enable-tcltk-stubs )
=20
* make & make install
=20
What packages do i need for installing the extension? I don't know
about Tcl . How to check it is properly installed?
=20
On Tcl/Tk, if succeed "package require <package name>",
probably the package is properly installed.
If you want to check whether an extension is ready to use
on Ruby/Tk, please run "<ruby library>/tkextlib/pkg_checker.rb".
It possibly help you to know what kind of extensions are available
on your Ruby/Tk.
When an extension is available on Tcl/Tk but not available on
Ruby/Tk, possibly, the reason of the difference is that
(1) Ruby/Tk use different Tcl/Tk libraries from tested Tcl/Tk, or
(2) Ruby/Tk don't know the library path of the extension.
If (1), maybe remove old(?) library and recompile "tcltklib.so".
If (2), maybe you have to add initialize steps (e.g. add library
path of the extension to AUTO_PATH) to "setup.rb" on the Ruby/Tk's
wrapper library directory for the extension.