Open Design and Integration Environment

Hex Artifact Content
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2018 Conference, Houston/TX, US, Oct 15-19
Send your abstracts to tclconference@googlegroups.com or submit via the online form
by Aug 20.

Artifact 7014342dfd790c35ac7e387520f0b34495e80db8090a4045a431d2a3a80fe508:

Wiki page [toadkits] by hypnotoad 2018-01-09 17:03:47.
0000: 44 20 32 30 31 38 2d 30 31 2d 30 39 54 31 37 3a  D 2018-01-09T17:
0010: 30 33 3a 34 37 2e 37 30 30 0a 4c 20 74 6f 61 64  03:47.700.L toad
0020: 6b 69 74 73 0a 50 20 38 62 39 33 37 37 37 65 38  kits.P 8b93777e8
0030: 38 39 63 63 36 38 37 33 66 62 32 31 66 30 37 35  89cc6873fb21f075
0040: 62 37 38 35 66 65 66 62 61 30 32 65 36 36 31 35  b785fefba02e6615
0050: 36 35 62 61 37 34 66 65 61 32 62 64 35 66 61 39  65ba74fea2bd5fa9
0060: 62 33 39 33 65 64 38 0a 55 20 68 79 70 6e 6f 74  b393ed8.U hypnot
0070: 6f 61 64 0a 57 20 32 39 37 35 0a 3c 68 33 3e 57  oad.W 2975.<h3>W
0080: 68 61 74 20 69 73 20 61 20 74 6f 61 64 6b 69 74  hat is a toadkit
0090: 3f 3c 2f 68 33 3e 0d 0a 41 20 74 6f 61 64 6b 69  ?</h3>..A toadki
00a0: 74 20 69 73 20 61 20 73 65 6c 66 2d 63 6f 6e 74  t is a self-cont
00b0: 61 69 6e 65 64 20 65 78 65 63 75 74 61 62 6c 65  ained executable
00c0: 20 77 69 74 68 20 61 20 63 6f 6d 70 6c 65 74 65   with a complete
00d0: 20 73 6f 66 74 77 61 72 65 20 61 70 70 6c 69 63   software applic
00e0: 61 74 69 6f 6e 2e 20 54 6f 61 64 6b 69 74 73 20  ation. Toadkits 
00f0: 61 72 65 20 61 6e 20 75 70 64 61 74 65 20 6f 66  are an update of
0100: 20 74 68 65 20 54 63 6c 20 61 73 20 4f 6e 65 20   the Tcl as One 
0110: 42 69 67 20 45 78 65 63 75 74 61 62 6c 65 20 28  Big Executable (
0120: 54 4f 42 45 29 20 63 6f 6e 63 65 70 74 2e 20 28  TOBE) concept. (
0130: 53 65 65 20 68 74 74 70 3a 2f 2f 77 77 77 2e 68  See http://www.h
0140: 77 61 63 69 2e 63 6f 6d 2f 73 77 2f 74 6f 62 65  waci.com/sw/tobe
0150: 2f 29 2e 20 54 63 6c 2f 54 6b 20 69 73 20 73 74  /). Tcl/Tk is st
0160: 61 74 69 63 61 6c 6c 79 20 63 6f 6d 70 69 6c 65  atically compile
0170: 64 20 61 6c 6f 6e 67 20 77 69 74 68 20 65 6e 6f  d along with eno
0180: 75 67 68 20 74 6f 6f 6c 73 20 74 6f 20 6d 6f 75  ugh tools to mou
0190: 6e 74 20 74 68 65 20 65 78 65 63 75 74 61 62 6c  nt the executabl
01a0: 65 20 61 73 20 61 20 76 69 72 74 75 61 6c 20 66  e as a virtual f
01b0: 69 6c 65 20 73 79 73 74 65 6d 2e 20 54 68 69 73  ile system. This
01c0: 20 76 69 72 74 75 61 6c 20 66 69 6c 65 20 73 79   virtual file sy
01d0: 73 74 65 6d 20 63 6f 6e 74 61 69 6e 73 20 54 63  stem contains Tc
01e0: 6c 2f 54 6b 20 63 6f 64 65 2c 20 61 70 70 6c 69  l/Tk code, appli
01f0: 63 61 74 69 6f 6e 20 72 65 73 6f 75 72 63 65 73  cation resources
0200: 2e 20 42 69 6e 61 72 79 20 70 61 63 6b 61 67 65  . Binary package
0210: 73 20 63 61 6e 20 62 65 20 65 69 74 68 65 72 20  s can be either 
0220: 73 74 61 74 69 63 61 6c 6c 79 20 6c 69 6e 6b 65  statically linke
0230: 64 20 74 6f 20 74 68 65 20 65 78 65 63 75 74 61  d to the executa
0240: 62 6c 65 2c 20 6f 72 20 64 69 73 74 72 69 62 75  ble, or distribu
0250: 74 65 64 20 61 73 20 73 68 61 72 65 64 20 6c 69  ted as shared li
0260: 62 72 61 72 69 65 73 20 69 6e 20 74 68 65 20 56  braries in the V
0270: 46 53 2e 20 0d 0a 3c 70 3e 0d 0a 41 6c 6c 20 6f  FS. ..<p>..All o
0280: 66 20 74 68 69 73 20 63 6f 64 65 20 69 73 20 70  f this code is p
0290: 61 63 6b 61 67 65 64 20 69 6e 20 61 20 73 69 6e  ackaged in a sin
02a0: 67 6c 65 20 66 69 6c 65 20 74 68 61 74 20 74 68  gle file that th
02b0: 65 20 75 73 65 72 20 63 61 6e 20 64 6f 75 62 6c  e user can doubl
02c0: 65 2d 63 6c 69 63 6b 20 6f 6e 2c 20 6f 72 20 64  e-click on, or d
02d0: 72 61 67 20 61 6e 64 20 64 72 6f 70 20 66 69 6c  rag and drop fil
02e0: 65 73 20 6f 6e 20 74 6f 70 20 6f 66 2e 0d 0a 3c  es on top of...<
02f0: 70 3e 0d 0a 3c 68 33 3e 42 75 69 6c 64 69 6e 67  p>..<h3>Building
0300: 20 61 20 74 6f 61 64 6b 69 74 2e 3c 2f 68 33 3e   a toadkit.</h3>
0310: 0d 0a 54 68 65 73 65 20 69 6e 73 74 72 75 63 74  ..These instruct
0320: 69 6f 6e 73 20 75 73 65 64 20 74 6f 20 62 65 20  ions used to be 
0330: 61 20 62 69 74 20 6d 6f 72 65 20 69 6e 76 6f 6c  a bit more invol
0340: 76 65 64 2e 20 42 75 74 20 74 68 65 20 70 72 6f  ved. But the pro
0350: 63 65 73 73 20 68 61 73 20 62 65 65 6e 20 69 6e  cess has been in
0360: 74 65 67 72 61 74 65 64 20 69 6e 74 6f 20 74 68  tegrated into th
0370: 65 20 61 75 74 6f 6d 61 74 69 6f 6e 73 20 6f 66  e automations of
0380: 20 4f 44 49 45 2e 20 0d 0a 3c 70 3e 0d 0a 3c 76   ODIE. ..<p>..<v
0390: 65 72 62 61 74 69 6d 3e 0d 0a 6d 6b 64 69 72 20  erbatim>..mkdir 
03a0: 6f 64 69 65 0d 0a 6d 6b 64 69 72 20 6f 64 69 65  odie..mkdir odie
03b0: 2f 6f 64 69 65 0d 0a 6d 6b 64 69 72 20 6f 64 69  /odie..mkdir odi
03c0: 65 2f 64 6f 77 6e 6c 6f 61 64 0d 0a 6d 6b 64 69  e/download..mkdi
03d0: 72 20 6f 64 69 65 2f 62 75 69 6c 64 0d 0a 66 6f  r odie/build..fo
03e0: 73 73 69 6c 20 63 6c 6f 6e 65 20 68 74 74 70 3a  ssil clone http:
03f0: 2f 2f 66 6f 73 73 69 6c 2e 65 74 6f 79 6f 63 2e  //fossil.etoyoc.
0400: 63 6f 6d 2f 66 6f 73 73 69 6c 2f 6f 64 69 65 20  com/fossil/odie 
0410: 6f 64 69 65 2f 64 6f 77 6e 6c 6f 61 64 2f 6f 64  odie/download/od
0420: 69 65 2e 66 6f 73 0d 0a 63 64 20 6f 64 69 65 2f  ie.fos..cd odie/
0430: 6f 64 69 65 0d 0a 66 6f 73 73 69 6c 20 6f 70 65  odie..fossil ope
0440: 6e 20 2e 2e 2f 64 6f 77 6e 6c 6f 61 64 2f 6f 64  n ../download/od
0450: 69 65 2e 66 6f 73 0d 0a 63 64 20 2e 2e 2f 62 75  ie.fos..cd ../bu
0460: 69 6c 64 0d 0a 74 63 6c 73 68 20 2e 2e 2f 6f 64  ild..tclsh ../od
0470: 69 65 2f 6d 61 6b 65 2e 74 63 6c 20 6c 6f 63 61  ie/make.tcl loca
0480: 6c 2d 65 6e 76 20 74 6f 61 64 6b 69 74 0d 0a 3c  l-env toadkit..<
0490: 2f 76 65 72 62 61 74 69 6d 3e 0d 0a 3c 70 3e 0d  /verbatim>..<p>.
04a0: 0a 54 68 69 73 20 62 75 69 6c 64 20 70 72 6f 63  .This build proc
04b0: 65 73 73 20 61 73 73 75 6d 65 73 20 74 68 65 20  ess assumes the 
04c0: 66 6f 6c 6c 6f 77 69 6e 67 3a 20 79 6f 75 20 68  following: you h
04d0: 61 76 65 20 61 63 63 65 73 73 20 74 6f 20 66 6f  ave access to fo
04e0: 73 73 69 6c 20 61 6e 64 20 67 69 74 20 69 6e 20  ssil and git in 
04f0: 79 6f 75 72 20 6c 6f 63 61 6c 20 65 6e 76 69 72  your local envir
0500: 6f 6e 6d 65 6e 74 2c 20 61 73 20 77 65 6c 6c 20  onment, as well 
0510: 61 73 20 0d 0a 3c 70 3e 0d 0a 49 6e 20 74 68 65  as ..<p>..In the
0520: 20 70 72 6f 63 65 73 73 20 6f 66 20 62 75 69 6c   process of buil
0530: 64 69 6e 67 20 74 68 65 20 62 61 73 65 6b 69 74  ding the basekit
0540: 2c 20 6f 64 69 65 20 77 69 6c 6c 20 64 6f 77 6e  , odie will down
0550: 6c 6f 61 64 20 74 68 65 20 54 63 6c 2f 54 6b 20  load the Tcl/Tk 
0560: 63 6f 72 65 2c 20 61 6e 64 20 73 6f 75 72 63 65  core, and source
0570: 73 20 66 6f 72 20 74 68 65 20 69 6e 63 6c 75 64  s for the includ
0580: 65 64 20 70 61 63 6b 61 67 65 73 2e 20 53 6f 75  ed packages. Sou
0590: 72 63 65 20 63 6f 64 65 20 69 73 20 64 6f 77 6e  rce code is down
05a0: 6c 6f 61 64 65 64 20 74 6f 20 74 68 65 20 3c 62  loaded to the <b
05b0: 3e 73 61 6e 64 62 6f 78 3c 2f 62 3e 20 77 68 69  >sandbox</b> whi
05c0: 63 68 20 69 73 20 74 68 65 20 73 61 6d 65 20 64  ch is the same d
05d0: 69 72 65 63 74 6f 72 79 20 74 68 61 74 20 3c 69  irectory that <i
05e0: 3e 6f 64 69 65 3c 2f 69 3e 20 77 61 73 20 75 6e  >odie</i> was un
05f0: 70 61 63 6b 65 64 20 74 6f 2e 20 49 6e 20 74 68  packed to. In th
0600: 65 20 3c 62 3e 62 75 69 6c 64 3c 2f 62 3e 20 66  e <b>build</b> f
0610: 6f 6c 64 65 72 20 77 69 6c 6c 20 62 79 20 61 20  older will by a 
0620: 73 65 72 69 65 73 20 6f 66 20 3c 62 3e 70 6b 67  series of <b>pkg
0630: 2e 2a 3c 2f 62 3e 20 66 6f 6c 64 65 72 73 2c 20  .*</b> folders, 
0640: 6f 6e 20 70 65 72 20 62 69 6e 61 72 79 20 70 61  on per binary pa
0650: 63 6b 61 67 65 2e 20 54 68 61 74 20 69 73 20 77  ckage. That is w
0660: 68 65 72 65 20 4f 64 69 65 20 63 6f 6d 70 69 6c  here Odie compil
0670: 65 73 20 74 68 65 20 62 69 6e 61 72 79 20 70 61  es the binary pa
0680: 63 6b 61 67 65 73 2e 20 49 6e 20 61 64 64 69 74  ckages. In addit
0690: 69 6f 6e 20 69 73 20 50 4b 47 52 4f 4f 54 2c 20  ion is PKGROOT, 
06a0: 77 68 69 63 68 20 69 73 20 61 20 76 69 72 74 75  which is a virtu
06b0: 61 6c 20 66 69 6c 65 20 73 79 73 74 65 6d 20 77  al file system w
06c0: 68 65 72 65 20 62 69 6e 61 72 79 20 70 61 63 6b  here binary pack
06d0: 61 67 65 73 20 61 72 65 20 22 69 6e 73 74 61 6c  ages are "instal
06e0: 6c 65 64 22 20 73 6f 20 74 68 65 79 20 63 61 6e  led" so they can
06f0: 20 62 65 20 63 6f 70 69 65 64 20 69 6e 74 6f 20   be copied into 
0700: 61 20 77 61 69 74 69 6e 67 20 56 46 53 2e 0d 0a  a waiting VFS...
0710: 3c 70 3e 0d 0a 46 6f 72 20 64 65 74 61 69 6c 73  <p>..For details
0720: 20 6f 6e 20 77 68 61 74 20 69 73 20 69 6e 73 69   on what is insi
0730: 64 65 2c 20 73 65 65 3a 20 5b 41 6e 61 74 6f 6d  de, see: [Anatom
0740: 79 20 6f 66 20 61 20 54 6f 61 64 6b 69 74 20 70  y of a Toadkit p
0750: 72 6f 6a 65 63 74 5d 0d 0a 3c 70 3e 0d 0a 54 6f  roject]..<p>..To
0760: 20 77 72 61 70 20 79 6f 75 72 20 6f 77 6e 20 70   wrap your own p
0770: 72 6f 67 72 61 6d 20 75 73 69 6e 67 20 74 68 65  rogram using the
0780: 20 62 61 73 65 6b 69 74 2c 20 63 72 65 61 74 65   basekit, create
0790: 20 61 20 56 46 53 20 64 69 72 65 63 74 6f 72 79   a VFS directory
07a0: 2e 20 28 53 61 79 20 6d 79 70 72 6f 64 75 63 74  . (Say myproduct
07b0: 2e 76 66 73 29 0d 0a 3c 70 3e 0d 0a 3c 76 65 72  .vfs)..<p>..<ver
07c0: 62 61 74 69 6d 3e 0d 0a 63 70 20 2d 61 20 7e 2f  batim>..cp -a ~/
07d0: 6d 79 70 72 6f 6a 65 63 74 2f 73 72 63 20 6d 79  myproject/src my
07e0: 70 72 6f 6a 65 63 74 2e 76 66 73 0d 0a 74 63 6c  project.vfs..tcl
07f0: 73 68 20 2e 2e 2f 6f 64 69 65 2f 6d 61 6b 65 2e  sh ../odie/make.
0800: 74 63 6c 20 77 72 61 70 20 63 6c 65 76 65 72 6e  tcl wrap clevern
0810: 61 6d 65 20 6d 79 70 72 6f 6a 65 63 74 2e 76 66  ame myproject.vf
0820: 73 0d 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 0d 0a  s..</verbatim>..
0830: 54 68 69 73 20 77 69 6c 6c 20 70 72 6f 64 75 63  This will produc
0840: 65 20 61 6e 20 65 78 65 63 75 61 62 6c 65 20 6e  e an execuable n
0850: 61 6d 65 64 20 3c 62 3e 63 6c 65 76 65 72 6e 61  amed <b>cleverna
0860: 6d 65 3c 2f 62 3e 2e 20 49 66 20 6d 79 70 72 6f  me</b>. If mypro
0870: 6a 65 63 74 2e 76 66 73 20 69 6e 63 6c 75 64 65  ject.vfs include
0880: 73 20 61 20 66 69 6c 65 20 63 61 6c 6c 65 64 20  s a file called 
0890: 22 6d 61 69 6e 2e 74 63 6c 22 20 69 6e 20 74 68  "main.tcl" in th
08a0: 65 20 72 6f 6f 74 2c 20 74 68 65 20 65 78 65 63  e root, the exec
08b0: 75 74 61 62 6c 65 20 77 69 6c 6c 20 6c 6f 61 64  utable will load
08c0: 20 74 68 61 74 20 66 69 6c 65 20 69 6e 73 74 65   that file inste
08d0: 61 64 20 6f 66 20 72 65 76 65 72 74 69 6e 67 20  ad of reverting 
08e0: 74 6f 20 74 68 65 20 73 74 61 6e 64 61 72 64 20  to the standard 
08f0: 74 63 6c 20 69 6e 74 65 72 61 63 74 69 76 65 20  tcl interactive 
0900: 73 68 65 6c 6c 20 62 65 68 61 76 69 6f 72 2e 20  shell behavior. 
0910: 3c 62 3e 6d 61 69 6e 2e 74 63 6c 3c 2f 62 3e 20  <b>main.tcl</b> 
0920: 77 69 6c 6c 20 62 65 20 61 62 6c 65 20 74 6f 20  will be able to 
0930: 72 65 73 70 6f 6e 64 20 74 6f 20 74 68 65 20 63  respond to the c
0940: 6f 6d 6d 61 6e 64 20 6c 69 6e 65 2e 20 41 73 20  ommand line. As 
0950: 70 61 72 74 20 6f 66 20 74 68 65 20 6b 69 74 62  part of the kitb
0960: 75 69 6c 64 69 6e 67 20 70 72 6f 63 65 73 73 2c  uilding process,
0970: 20 74 68 65 20 65 6e 74 69 72 65 20 56 46 53 20   the entire VFS 
0980: 69 73 20 73 63 61 6e 6e 65 64 2c 20 61 6e 64 20  is scanned, and 
0990: 61 20 66 69 6c 65 20 3c 62 3e 70 61 63 6b 61 67  a file <b>packag
09a0: 65 73 2e 74 63 6c 3c 2f 62 3e 20 69 73 20 70 72  es.tcl</b> is pr
09b0: 6f 64 75 63 65 64 2c 20 61 6e 64 20 70 6c 61 63  oduced, and plac
09c0: 65 64 20 69 6e 20 74 68 65 20 72 6f 6f 74 20 6f  ed in the root o
09d0: 66 20 74 68 65 20 56 46 53 2e 20 54 68 69 73 20  f the VFS. This 
09e0: 69 73 20 74 68 65 20 6d 61 73 74 65 72 20 6d 61  is the master ma
09f0: 6e 69 66 65 73 74 20 6f 66 20 61 6c 6c 20 70 61  nifest of all pa
0a00: 63 6b 61 67 65 73 20 74 68 61 74 20 61 72 65 20  ckages that are 
0a10: 69 6e 63 6c 75 64 65 64 20 69 6e 20 74 68 65 20  included in the 
0a20: 56 46 53 2e 20 54 68 69 73 20 66 69 6c 65 20 77  VFS. This file w
0a30: 69 6c 6c 20 62 65 20 72 65 61 64 20 61 75 74 6f  ill be read auto
0a40: 6d 61 74 69 63 61 6c 6c 79 20 77 68 65 6e 20 74  matically when t
0a50: 68 65 20 70 72 6f 63 65 73 73 20 73 74 61 72 74  he process start
0a60: 73 2e 0d 0a 3c 70 3e 0d 0a 49 66 20 61 20 66 69  s...<p>..If a fi
0a70: 6c 65 20 6e 61 6d 65 64 20 22 6d 61 69 6e 2e 74  le named "main.t
0a80: 63 6c 22 20 69 73 20 70 72 65 73 65 6e 74 20 69  cl" is present i
0a90: 6e 20 74 68 65 20 72 6f 6f 74 20 6f 66 20 74 68  n the root of th
0aa0: 65 20 56 46 53 2c 20 74 68 65 20 70 72 6f 63 65  e VFS, the proce
0ab0: 73 73 20 77 69 6c 6c 20 73 6f 75 72 63 65 20 74  ss will source t
0ac0: 68 69 73 20 66 69 6c 65 20 61 66 74 65 72 20 6c  his file after l
0ad0: 6f 61 64 69 6e 67 20 74 68 65 20 70 61 63 6b 61  oading the packa
0ae0: 67 65 20 6d 61 6e 69 66 65 73 74 2e 20 54 4f 42  ge manifest. TOB
0af0: 45 20 62 65 68 61 76 65 73 20 6c 69 6b 65 20 61  E behaves like a
0b00: 6e 79 20 6f 74 68 65 72 20 74 63 6c 20 70 72 6f  ny other tcl pro
0b10: 63 65 73 73 2c 20 69 74 20 63 61 6e 20 72 65 73  cess, it can res
0b20: 70 6f 6e 64 20 74 6f 20 61 72 67 75 6d 65 6e 74  pond to argument
0b30: 73 20 6f 6e 20 74 68 65 20 63 6f 6d 6d 61 6e 64  s on the command
0b40: 20 6c 69 6e 65 20 28 6c 6f 6f 6b 20 69 6e 20 74   line (look in t
0b50: 68 65 20 61 72 67 76 20 76 61 72 69 61 62 6c 65  he argv variable
0b60: 2e 29 0d 0a 3c 70 3e 0d 0a 49 66 20 6e 6f 20 6d  .)..<p>..If no m
0b70: 61 69 6e 2e 74 63 6c 20 69 73 20 70 72 65 73 65  ain.tcl is prese
0b80: 6e 74 2c 20 74 6f 61 64 6b 69 74 73 20 62 65 68  nt, toadkits beh
0b90: 61 76 65 20 61 73 20 61 20 73 74 61 6e 64 61 72  ave as a standar
0ba0: 64 20 54 63 6c 20 73 68 65 6c 6c 2e 20 54 6b 20  d Tcl shell. Tk 
0bb0: 69 73 20 73 74 61 74 69 63 61 6c 6c 79 20 6c 69  is statically li
0bc0: 6e 6b 65 64 2c 20 62 75 74 20 6e 6f 74 20 6c 6f  nked, but not lo
0bd0: 61 64 65 64 20 61 75 74 6f 6d 61 74 69 63 61 6c  aded automatical
0be0: 6c 79 2e 20 49 74 20 63 61 6e 20 62 65 20 61 63  ly. It can be ac
0bf0: 63 65 73 73 65 64 20 77 69 74 68 20 61 20 73 69  cessed with a si
0c00: 6d 70 6c 65 20 22 70 61 63 6b 61 67 65 20 72 65  mple "package re
0c10: 71 75 69 72 65 20 54 6b 22 2e 0a 5a 20 38 62 63  quire Tk"..Z 8bc
0c20: 39 62 32 39 65 33 38 66 38 31 30 37 36 38 34 38  9b29e38f81076848
0c30: 33 61 39 37 63 33 38 31 32 61 34 34 62 0a        3a97c3812a44b.