Check-in [2203d001cd]
Overview
Comment:Enabled Mk4vfs compression

Added appropriate licensing information.

Updated README

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2203d001cd3c5de03d3dea945eb3095afa6f5086
User & Date: rkeene on 2010-09-26 04:39:48
Other Links: manifest | tags
Context
2010-09-26
04:39
Fixed typo check-in: 6ad3fbe8a5 user: rkeene tags: trunk
04:39
Enabled Mk4vfs compression

Added appropriate licensing information.

Updated README check-in: 2203d001cd user: rkeene tags: trunk

04:39
KitCreator 0.0.7.x check-in: bbb991803b user: rkeene tags: trunk, 0.0.7
Changes

Added LICENSE version [abcc194246].



































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
The MIT License is applied to all files in this distribution, except:
	kitsh/buildsrc/kitsh-0.0/boot.tcl
	kitsh/buildsrc/kitsh-0.0/kitInit.c
	kitsh/buildsrc/kitsh-0.0/license.terms
	kitsh/buildsrc/kitsh-0.0/pwb.c
	kitsh/buildsrc/kitsh-0.0/rechan.c
	kitsh/buildsrc/kitsh-0.0/zlib.c

Please see "kitsh/buildsrc/kitsh-0.0/license.terms" for licensing information
regarding these files.

All others are licensed under the terms of the MIT License, below:
The MIT License

Copyright (c) 2010  Roy S. Keene

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Modified README from [7af6d9d17c] to [6d75316e4a].

1
2



3
4
5
6
7
8
9
This will build a Tclkit named "tclkit-<version>".




Usage:
	kitcreator [{<version> | cvs_<cvsTag> | clean | distclean}]
	           [<configure_options...>]

	Where:
		version            is a Tcl version number (e.g., 8.4.19)
		cvsTag             is a CVS release tag (e.g., HEAD)


>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
This will build a Tclkit named "tclkit-<version>".

---------------
Using This Tool
---------------
Usage:
	kitcreator [{<version> | cvs_<cvsTag> | clean | distclean}]
	           [<configure_options...>]

	Where:
		version            is a Tcl version number (e.g., 8.4.19)
		cvsTag             is a CVS release tag (e.g., HEAD)
59
60
61
62
63
64
65















































































		diff patches.  This script is generally more well tested with
		GNU Patch. 

	3. TCLKIT
		Specify the path to a Tclkit that is runnable on the current
		system.  The default is "tclkit".  A working tclkit is required
		for cross-compiling Tclkits.






















































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
		diff patches.  This script is generally more well tested with
		GNU Patch. 

	3. TCLKIT
		Specify the path to a Tclkit that is runnable on the current
		system.  The default is "tclkit".  A working tclkit is required
		for cross-compiling Tclkits.



-------------------
Method of Operation
-------------------
Summary:
	1. "kitcreator" calls */build.sh
	2. */build.sh downloads and compiles appropriate software
	3. */build.sh installs software into "inst" (run-time + compile-time)
	4. */build.sh installs run-time software into "out", this will be
	   included in the Tclkit as if it were the root directory of the
	   Tclkit (combined with other "out" directories)
	5. kitsh/build.sh compiles a "main" function and links all the built
	   libraries together into an executable
	6. kitsh/build.sh combines all the "out" directories into one
	7. kitsh/build.sh creates a Metakit database from the combined
	   directories and appends that to the compiled executable using:
		a. A Tclkit found in the environment variable "TCLKIT" (tclkit
		   if unset) if it is functional; or
		b. The built kit itself (does not work for cross-compiling)

Details:
	The general mechanism that enables a Tclkit to operate is a small Tcl
initialization routine linked statically to the core libraries needed to
operate a Tcl interpreter, the Tcl VFS Layer, and a database-backed (Metakit)
Virtual File System that is appended to the end of the executable.

This project brings together all of the required pieces, plus some additional
pieces that were found in the original Tclkit:
	1. Tk (dynamically linked)
	2. Itcl (dynamically linked)

These source code for these pieces are downloaded, compiled, and linked, and
the database containing the appropriate filesystem data is created.  What sets
this project apart from other similar projects is that:
	1. It attempts to be modular;
	2. It supports cross-compiling;
	3. It downloads the source from their original repositories;
	4. It allows you to specify an arbitrary version of Tcl (including
	   CVS); and
	5. It uses GNU Autoconf scripts for compiling the part of the Tclkit
	   that brings the whole thing together (the Kitsh)

To accomplish these goals the following mechanisms are in place:
	1. The top-level "kitcreator" script; and
	2. Per-project subdirectories, each containing a "build.sh" script

The top-level "kitcreator" script is very simple.  It's only job is to
interpret command line arguments, and call the per-project "build.sh" scripts.
For the "tcl" project it also finds the appropriate "tclConfig.sh" (and stores
this path in TCLCONFIGDIR) to enable subsequent build scripts to find the
appropriate Tcl to link against.

The per-project "build.sh" scripts are entirely autonomous.  They are
responsible for downloading the source code for the appropriate version that
will compile and link against the current version of Tcl (user requested
version can be found in "TCLVERS", while the actual version must be requested
from the "tclConfig.sh" script), compiling it, installing a functional copy
into the per-project "inst" directory, and installing anything that needs to
be in the Tclkit's VFS root into the per-project "out" directory.

The exception to this is the "kitsh" project.  It is the glue that binds all
the individual projects together into a single executable.  Its build script
does not create an "inst" or an "out" directory because it is not a library.
Instead, it collects all the other project's "out" directories into a single
directory (starpack.vfs), as well a static file (boot.tcl).  It then compiles
the source code, and then installs the Metakit database containing the VFS
onto the resulting executable.

To create the Metakit database, one of two Tclkits is used (tried in this
order):
	1. The Tclkit specified by the TCLKIT environment variable (or
	   "tclkit" if that variable is not set) if it is functional; or
	2. The built Tclkit itself

The second method will not work if the built Tclkit is not executable on the
current platform (i.e., in the case of cross-compilation) and so it may be
necessary to bootstrap a runnable Tclkit first.

Modified kitsh/build.sh from [a9fcedbcad] to [f495d0968a].

13
14
15
16
17
18
19





20
21
22
23
24
25
26

KITSHVERS="0.0"
BUILDDIR="$(pwd)/build/kitsh-${KITSHVERS}"
OUTDIR="$(pwd)/out"
INSTDIR="$(pwd)/inst"
OTHERPKGSDIR="$(pwd)/../"
export KITSHVERS BUILDDIR OUTDIR INSTDIR OTHERPKGSDIR






rm -rf 'build' 'out' 'inst'
mkdir 'out' 'inst' || exit 1


(
	cp -r 'buildsrc' 'build'







>
>
>
>
>







13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

KITSHVERS="0.0"
BUILDDIR="$(pwd)/build/kitsh-${KITSHVERS}"
OUTDIR="$(pwd)/out"
INSTDIR="$(pwd)/inst"
OTHERPKGSDIR="$(pwd)/../"
export KITSHVERS BUILDDIR OUTDIR INSTDIR OTHERPKGSDIR

if [ -z "${ENABLECOMPRESSION}" ]; then
	ENABLECOMPRESSION="1"
fi
export ENABLECOMPRESSION

rm -rf 'build' 'out' 'inst'
mkdir 'out' 'inst' || exit 1


(
	cp -r 'buildsrc' 'build'
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72

	# Intall VFS onto kit
	## Determine if we have a Tclkit to do this work
	TCLKIT="${TCLKIT:-tclkit}"
	if echo 'exit 0' | "${TCLKIT}" >/dev/null 2>/dev/null; then
		## Install using existing Tclkit
		### Call installer
		"${TCLKIT}" installvfs.tcl kit starpack.vfs
	else
		## Bootstrap (cannot cross-compile)
		### Call installer
		cp kit runkit
		echo 'set argv [list kit starpack.vfs]' > setup.tcl
		echo 'if {[catch { clock seconds }]} { proc clock args { return 0 } }' >> setup.tcl
		echo 'source installvfs.tcl' >> setup.tcl
		echo | ./runkit
	fi

	exit 0
) || exit 1

exit 0







|




|









56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77

	# Intall VFS onto kit
	## Determine if we have a Tclkit to do this work
	TCLKIT="${TCLKIT:-tclkit}"
	if echo 'exit 0' | "${TCLKIT}" >/dev/null 2>/dev/null; then
		## Install using existing Tclkit
		### Call installer
		"${TCLKIT}" installvfs.tcl kit starpack.vfs "${ENABLECOMPRESSION}"
	else
		## Bootstrap (cannot cross-compile)
		### Call installer
		cp kit runkit
		echo "set argv [list kit starpack.vfs {${ENABLECOMPRESSION}}]" > setup.tcl
		echo 'if {[catch { clock seconds }]} { proc clock args { return 0 } }' >> setup.tcl
		echo 'source installvfs.tcl' >> setup.tcl
		echo | ./runkit
	fi

	exit 0
) || exit 1

exit 0

Modified kitsh/buildsrc/kitsh-0.0/installvfs.tcl from [9c5d7ceaab] to [848dac55a9].

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
#! /usr/bin/env tclsh


if {[llength $argv] != 2} {
	puts stderr "Usage: installvfs.tcl <kitfile> <vfsdir>"

	exit 1
}

set kitfile [lindex $argv 0]
set vfsdir [lindex $argv 1]




if {[catch {
	package require vfs::mk4
}]} {
	catch {
		load "" vfs
		load "" Mk4tcl

		source [file join $vfsdir lib/vfs/vfsUtils.tcl]
		source [file join $vfsdir lib/vfs/vfslib.tcl]
		source [file join $vfsdir lib/vfs/mk4vfs.tcl]
	}
}


proc copy_file {srcfile destfile} {
	switch -glob -- $srcfile {
		"*.tcl" - "*.txt" {
			set ifd [open $srcfile r]
			set ofd [open $destfile w]



>
|
|






>
>
>













>







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
#! /usr/bin/env tclsh

set opt_compression 1
if {[llength $argv] < 2} {
	puts stderr "Usage: installvfs.tcl <kitfile> <vfsdir> \[<enable_compression>\]"

	exit 1
}

set kitfile [lindex $argv 0]
set vfsdir [lindex $argv 1]
if {[lindex $argv 2] != ""} {
	set opt_compression [lindex $argv 2]
}

if {[catch {
	package require vfs::mk4
}]} {
	catch {
		load "" vfs
		load "" Mk4tcl

		source [file join $vfsdir lib/vfs/vfsUtils.tcl]
		source [file join $vfsdir lib/vfs/vfslib.tcl]
		source [file join $vfsdir lib/vfs/mk4vfs.tcl]
	}
}
set mk4vfs::compress $opt_compression

proc copy_file {srcfile destfile} {
	switch -glob -- $srcfile {
		"*.tcl" - "*.txt" {
			set ifd [open $srcfile r]
			set ofd [open $destfile w]

Added kitsh/buildsrc/kitsh-0.0/license.terms version [092b3f4c55].

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
LICENSE

  The Tclkit-specific sources are license free, they just have a copyright.
  Hold the author(s) harmless and any lawful use is permitted.

  This does *not* apply to any of the sources of the other major Open Source
  Software used in Tclkit, which each have very liberal BSD/MIT-like licenses:
  	Tcl/Tk, Incrtcl, Metakit, TclVFS, Zlib