1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173
|
This file has two sections:
1. How to compile the Tkhtml widget.
2. How to run Hv3, the Tkhtml web browser.
--------------------------------------------------------------------------------
1. HOW TO COMPILE THE TKHTML WIDGET
There are two ways to build the Tkhtml widget:
* Using the configure script. This is quick and easy if it works,
virtually impossible to debug if it doesn't.
* Modifying the Makefile template. This takes a few minutes to set up,
but it's easier to understand what's going on.
Both systems have been tested on Suse linux 9.2 and Mingw/Msys on
Windows XP.
Using the configure script
--------------------------
1. If you're reading this you have already obtained the sources and they
are likely in a directory called "htmlwidget".
2. Create a new empty directory to build in.
3. Cd into the new directory.
4. Run the "configure" script located in the htmlwidget directory. The
configure script will probably need the --with-tcl and --with-tk options
passed to it.
5. Run "make".
6. If everything worked, run "make install".
The sequence of commands might look like this:
$ tar -xzf tkhtml-3.alpha1.tar.gz
$ ls -o htmlwidget/configure
-rwxr-xr-x 1 user 233035 2005-07-06 17:37 htmlwidget/configure
$ mkdir bld
$ cd bld
$ ../htmlwidget/configure --with-tcl=/usr/local/ActiveTcl/lib --with-tk=/usr/local/ActiveTcl/lib
<much output>
$ make
$ make install
Modifying a Makefile template
-----------------------------
There are two similar makefiles in the root directory of the source tree.
"main.mk" is for linux, and "mingw.mk" is for Mingw/Msys on windows. Both
require a handful of variables to be modified before they can be used.
Instructions are in comments in either file.
1. If you're reading this you have already obtained the sources and they
are likely in a directory called "htmlwidget".
2. Edit the appropriate makefile ("linux-gcc.mk" or "mingw.mk").
2. Create a new empty directory to build in.
3. Cd into the new directory.
5. Run "make".
6. If everything worked, run "make install" (linux only).
The sequence of commands might look like this:
$ tar -xzf tkhtml-3.alpha1.tar.gz
$ ls -o htmlwidget/main.mk
-rw-r--r-- 1 dan 4143 2005-07-10 19:45 htmlwidget/main.mk
$ vi htmlwidget/main.mk
$ mkdir bld
$ cd bld
$ make -f ../htmlwidget/main.mk
<much output>
$ make install
2. HOW TO RUN HV3, THE TKHTML WEB BROWSER
Hv3 uses the following compiled components:
* Tkhtml3
* Tls
* Img
* Sqlite3
* tclsee (requires: SEE and optionally GC)
Compiling Tclsee (javascript support)
-------------------------------------
When Hv3 is run, it tries to load package "Tclsee". If successful,
javascript support will be enabled. Tclsee is an extension developed
as part of Hv3 to provide access to the "Simple ECMAScript Engine"
(SEE) library from Tcl scripts.
The SEE library depends on the Boehm garbage-collector libary. To build
"Tclsee", the following third-party components are required:
SEE: http://www.adaptive-enterprises.com.au/~d/software/see/
Boehm GC: http://www.hpl.hp.com/personal/Hans_Boehm/gc/
Libraries need to be built from these two packages (files libsee.a
and libgc.a). Refer to the respective package documentation for
details on how to do that. The SEE library should be configured
to use Boehm GC routines by default.
Then, file "hv/hv3see.c" from the source distribution should be compiled
into a shared object linked with the two libraries above. The shared
object will contain the binary extension "Tclsee" (C init function
Tclsee_Init).
The template makefiles (linux-gcc.mk and mingw.mk) include a target
"tclsee" to build this package, complete with pkgIndex.tcl file. This
target requires configuration of makefile variables JSLIB, JSFLAGS and
JS_SHARED_LIB.
Hints for compiling SEE:
If Boehm GC is not in the various paths, need to set CFLAGS, LDFLAGS and
LD_LIBRARY_PATH before running configure:
INSTALL_PATH=/home/dan/work/tkhtml/js/
export CFLAGS="-I${INSTALL_PATH}/include/ -O2 -DNDEBUG"
export LDFLAGS=-L${INSTALL_PATH}/lib/
export LD_LIBRARY_PATH=${INSTALL_PATH}/lib/
Then supply an installation path to configure:
../see-2.1.1206_snapshot/configure --prefix=${INSTALL_PATH}/
This worked on a stock Suse 10.1.
Part of the target - "ssp" fails on linux. Run [make -k install] and
you get both the shell and libary, so no problem... UPDATE: As of
SEE version 2.1.1206, it looks like ssp is not built by default.
Compiling hv3_polipo
--------------------
TODO
3. NOTES FOR CROSS COMPILING
One way to build Tkhtml3 and/or Hv3 for windows is to use a cross
compiler from Linux using mingw. Binaries for the mingw gcc are
available here:
http://mirzam.it.vu.nl/mingw/
Note: If anyone reading this knows how to cross-compile from linux
for mac, please tell me! (danielk1977@gmail.com)
Both SEE and GC can be cross-compiled with a command like:
../<path>/configure --host=i386-mingw32 --prefix=<install-path>
make
make install
Details:
1. In version 2.1.1206 of SEE, do the following to the configure script
(pattern occurs twice):
s/ac_cv_func_memcmp_working=no/ac_cv_func_memcmp_working=yes/
2. I can't compile a working libgc for mingw. Same problem is reported
by these folk (kaya scripting language):
http://kayalang.org/download/compiling/windows
For the starkits, I took their advice and downloaded a binary
package.
|