Wapp

Check-in [3e1e061441]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add a documentation file on how to compile wapptclsh.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:3e1e0614419774b3aac205a9601d3f4f05e3e37ae4232fae78941959a61907f3
User & Date: drh 2018-02-08 00:14:07
Context
2018-02-08
01:24
Add the "self.tcl" example application that displays a copy of itself. check-in: 8f65cebe60 user: drh tags: trunk
00:14
Add a documentation file on how to compile wapptclsh. check-in: 3e1e061441 user: drh tags: trunk
2018-02-07
23:55
Fix yet another typo. check-in: e4fc8bab33 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to README.md.

61
62
63
64
65
66
67


68
69
70
71
72
73
  *  [Wapp Parameters](docs/params.md)

  *  [Wapp Commands](docs/commands.md)

  *  [URL Mapping](docs/urlmapping.md)

  *  [Security Features](docs/security.md)



  *  [Limitations of Wapp](docs/limitations.md)

  *  [Example Applications](/file/examples)

  *  [Real-World Uses Of Wapp](docs/usageexamples.md)







>
>






61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
  *  [Wapp Parameters](docs/params.md)

  *  [Wapp Commands](docs/commands.md)

  *  [URL Mapping](docs/urlmapping.md)

  *  [Security Features](docs/security.md)

  *  [How To Compile wapptclsh - Or Not](docs/compiling.md)

  *  [Limitations of Wapp](docs/limitations.md)

  *  [Example Applications](/file/examples)

  *  [Real-World Uses Of Wapp](docs/usageexamples.md)

Added docs/compiling.md.













































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
How To Compile, Or Not
======================

1.0 Use As Pure Tcl - No Compilation Required
---------------------------------------------

The Wapp framework is pure Tcl contained in a single file calls 
"[wapp.tcl](/file/wapp.tcl)".  That, and a generic "tclsh",
is all you need to run a Wapp application.

For example, when testing Wapp, the developers run the following command from
the root of the source tree:

>
    tclsh tests/test01.tcl

The [test01.tcl](/file/tests/test01.tcl) script does a "source ../wapp.tcl" to
load the Wapp framework.  No special interpreter is required.

The [search function](https://sqlite.org/search) of the SQLite homepage takes
this one step further.  The Tcl script that implements the search function embeds
the wapp.tcl script when the website is begin built.  The "wapp.tcl" is neither
"source"-ed or "package require"-ed.  The wapp.tcl script is embedded into the
"search" script.

2.0 Using A Special Interpreter
-------------------------------

It is sometimes convenient to use the special "wapptclsh" interpreter to run
Wapp applications.  The "wapptclsh" works just like ordinary "tclsh" with the
following minor differences:

  +  Wapptclsh understands "package require wapp" natively, without any extra
     finagling.

  +  Wapptclsh comes with SQLite built-in.  SQLite turns out to be very handy
     for the kinds of small web applications that Wapp  is designed for.

  +  Wapptclsh builds (by default) statically linked, so that it works inside
     chroot jails that lack all the shared libraries needed by generic "tclsh".

To reiterate: "wapptclsh" is not required to run Wapp applications.  But it is
convenient.  The developer of Wapp prefers using "wapptclsh" on his installations.

2.1 Compiling The Special Interpreter
-------------------------------------

To build wapptclsh, make a copy of either Makefile or Makefile.macos in the
top-level directory of the source tree.  Change a few settings.  (This step is
not hard as each Makefile is less than 20 lines long.)  Then run the Makefile.

There is no configure scripts of other automation to help do the build.  Maybe
we will add one someday.  But for now, the Makefile is simple enough to work
stand-alone.