Check-in [cce162f50e]
Overview
Comment:Updated README with a mini-manual for the client. Updated build process cleanup.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: cce162f50e8b0a648dac68a2c8fb7620b8359146
User & Date: rkeene on 2009-04-18 22:15:14
Other Links: manifest | tags
Context
2009-04-18
22:16
Teaparty 0.9.1.x check-in: a50a1e04a0 user: rkeene tags: trunk
22:15
Updated README with a mini-manual for the client. Updated build process cleanup. check-in: cce162f50e user: rkeene tags: trunk
22:14
Updated teapotclient to not require specifying "Tcl Tk" in the existing extensions parameter of download_extensions. Changed default download directory to not include "lib" of teapotclient, but left this behaviour in the "teapot-client.tcl" script Added examples check-in: 68f9c46716 user: rkeene tags: trunk
Changes

Modified README.txt from [90191f367c] to [19cb2c8968].



1










































































































































This is a very basic implementation of a Teapot client








































































































































>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
I. CLIENT
=========
This is a very basic implementation of a Teapot client.  It will fetch all
requested packages and their dependencies from a remote TEAPOT server.

1. Installing
-------------
The supplied Makefile only installs the client library.  A sample client that
makes use of this library is included.  The sample library is called
"teapot-client.tcl".

	a. To install with all the default options and auto configuration,
	   execute:
		# make install
	b. If you wish to install the package into a particular directory,
	   execute:
		# make install TCLDIR=your_particular_directory
	   (note that it will create a "teapotclient0.1" directory and
	    but no "lib" or similar directory)
	c. If you wish to install into an alternate root directory (i.e., for
	   packaging), execute:
		# make install DESTDIR=your_new_rootdir
	   This will search for a "tclConfig.sh" in the destination directory.

Note that the install directory is not encoded in the script in any way so it
can be safely moved after installation.

2. Using
--------

a. teapotclient:

	i. get_extensions
		SYNOPSIS
		package require teapotclient

		::teapotclient::get_extensions <list_of_teapot_servers> \
		  ?<os_glob_pattern>? ?<cpu_glob_pattern>?

		DESCRIPTION
		get_extensions gets the extensions that are available from a
		list of TEAPOT servers, for a particular operating system
		and CPU tuple (which can be glob patterns).

		The default OS and CPU patterns are both "*" which will match
		all operating system and cpus.

		RETURN VALUE
		The returned value is a list in the format of:
		{Extension_1} {ExtensionInfo_1} {Extension_2} {ExtensionInfo_2} ...

		Where ExtensionInfo_N is a list in the format of:
		ExtensionVersion ExtensionPlatformInfo

	ii. download_extensions
		SYNOPSIS
		package require teapotclient

		::teapotclient::download_extensions <rootdir> \
		  <list_of_teapot_servers> <list_of_extensions> \
		  <os_glob_pattern> <cpu_glob_pattern> \
		  ?<list_of_extensions_to_exclude>?

		DESCRIPTION
		download_extensions will download the list of extensions for a
		given operating system and CPU tuple, and download their
		dependencies recursively.  It will place each downloaded
		extensions in its own subdirectory beneath the specified
		"rootdir".

		The latest version available for the given OS and CPU tuple of
		each extension will be downloaded.

		You may optionally specify a list of extensions that you do not
		wish to be downloaded.

		RETURN VALUE
		The return value is a list of extensions actually downloaded.
		This may contain items that were not requested (if they were
		needed to satisfy a dependency), and may not contain all items
		that were requested (if they were unavailable).

	iii. setcachedir
		SYNOPSIS
		package require teapotclient

		::teapotclient::setcachedir <directory>

		DESCRIPTION
		The download_extensions and get_extensions commands use a
		local disk cache to improve performance.  The default
		cache directory is a directory in the user's home directory, or
		a temporary directory if a home directory is not found.

		setcachedir specifies an alternate location to store the cache.

		setcachedir should be called before any other commands if it is
		intended to be used.
	

		RETURN VALUE
		Unspecified.

	iv. Example 1:
		package require teapotclient

		puts "The following extensions are available:"
		foreach {extension extensioninfo} [::teapotclient::get_extensions \
		                                   [list teapot.activestate.com] \
		                                   {*} {*}] {
			puts "  $extension [join $extensioninfo {, }]"
		}

	 v. Example 2:
		package require teapotclient

		set os $tcl_platform(os)
		if {$tcl_platform(platform) == "windows"} {
			set os $tcl_platform(platform)
		}

		puts "Downloading md5 and sha1 packages for the current system"
		::teapotclient::download_extensions "." \
		  [list teapot.activestate.com] [list md5 sha1] $os \
		  $tcl_platform(machine)

		
b. teapot-client.tcl (not installed):
	i. teapot-client get <dir> <os> <cpu> <packages...>
		Downloads all the requested extensions/packages for the OS+CPU
		pair into the "lib" directory of the directory specified.

	ii. teapot-client list ?<os>? ?<cpu>?
		Lists all available extensions and their most recent versions,
		optionally restricted to an OS+CPU pair.

II. SERVER
==========
This is not yet implemented.

Modified build/prepare.sh from [4915f72bf6] to [2fdf538748].

1


2
3
4
#! /bin/sh



make -C client
cp client/*.kit .

>
>



1
2
3
4
5
6
#! /bin/sh

rm -f client/teapot-client client/teapot-client.exe

make -C client
cp client/*.kit .