Check-in [92177746f4]
Overview
Comment:Made KitCreator web interface able to disable options based on KitCreator version
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:92177746f46347883bc24faec541794210f09a9a
User & Date: rkeene on 2019-02-04 14:55:27
Other Links: manifest | tags
Context
2019-02-04
15:04
Web interface fix: TclCurl is not in 0.11.0 Leaf check-in: 6352ceb861 user: rkeene tags: trunk
14:55
Made KitCreator web interface able to disable options based on KitCreator version check-in: 92177746f4 user: rkeene tags: trunk
2019-02-03
21:09
Upgraded to Tcl/Tk 8.6.9 check-in: f13053c0b5 user: rkeene tags: trunk
Changes

Modified build/web/kitcreator.vfs/index.rvt from [787ecac4e4] to [d37f77e079].

1
2
3
4


















5
6
7
8
9
10
11
..
89
90
91
92
93
94
95







96
97
98
99
100
101
102
...
267
268
269
270
271
272
273



274
275
276
277
278
279
280



281
282
283
























284
285
286
287
288
289
290
...
302
303
304
305
306
307
308
























309
310
311
312
313
314
315
316
...
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
<?
	package require sha1

	load_response args



















	set sourcedir "/web/rkeene/devel/kitcreator/all"
	set queue "/home/rkeene/devel/kitcreator/build/web/queue"
	set secretfile "/home/rkeene/etc/kitcreator-web-secret"

	foreach file [glob -tails -nocomplain -directory $sourcedir "kitcreator-*.tar.gz"] {
		regexp {^kitcreator-(.*).tar.gz$} $file -> vers
................................................................................
		platform linux-i386-static {package_tk package_dbus kitdll}
		platform macosx-ppc {package_dbus package_tcc4tcl package_tuapi}
		platform macosx-ppc64 {package_dbus package_tcc4tcl package_tuapi}
		platform macosx-i386 {package_dbus package_tuapi}
		platform macosx-amd64 {package_dbus package_tuapi}
		platform win32 {package_tuapi}
		platform win64 {package_tuapi}







	}

	set specific {
		platform win32 file icon {Kit Icon}
		platform win32 text description {Description}
		platform win64 file icon {Kit Icon}
		platform win64 text description {Description}
................................................................................
    <title>KitCreator, Web Interface</title>
    <script>
<!--
	function enableOption(option) {
		var obj;

		obj = document.getElementById('option_' + option);



		obj.disabled = false;
	}

	function disableOption(option) {
		var obj;

		obj = document.getElementById('option_' + option);



		obj.checked = false;
		obj.disabled = true;
	}

























	function verifyOptions() {
		var kitcreator_version;
		var tcl_version;
		var platform;

		kitcreator_version = document.getElementsByName('kitcreator_version')[0].value;
................................................................................
		}

		foreach option $alldisabledoptions {
			puts "\t\tenableOption(\"$option\");"
		}

		foreach {keyword value disableoptions} $disable {
























			puts "\t\tif ($keyword == \"$value\") \{"

			foreach option $disableoptions {
				puts "\t\t\tdisableOption(\"$option\");"
			}

			puts "\t\t\}"
		}
................................................................................
        </tr>
        <tr>
          <td>Kit Options:</td>
          <td>
<?  foreach package [lsort -dictionary [array names packages]] { ?>
            <input type="checkbox" name="option_package_<? puts -nonewline $package ?>" id="option_package_<? puts -nonewline $package ?>">Package: <? puts -nonewline $packages($package) ?><br>
<? } ?>
            <input type="checkbox" name="option_threaded">Kit: Threaded<br>
            <input type="checkbox" name="option_debug">Kit: Debugging Build<br>
            <input type="checkbox" name="option_kitdll" id="option_kitdll">Kit: Build Library (KitDLL)<br>
            <input type="checkbox" name="option_dynamictk" id="option_dynamictk">Kit: Always link Tk dynamically (if Tk is built)<br>
            <input type="checkbox" name="option_minbuild">Kit: "Minimal" build (remove extra packages shipped as part of Tcl and reduce encodings)<br>
            <input type="checkbox" name="option_staticpkgs">Kit: Statically link packages in pkgs directory<br>
            <input type="checkbox" name="option_tclutfmax6">Kit: TCL_UTF_MAX=6 (incompatibility with standard Tcl)<br>
            <input type="checkbox" name="option_staticlibssl">TLS: Statically link to LibSSL<br>
            <input type="checkbox" name="option_buildlibssl">TLS: Build LibreSSL for this platform
          </td>
        </tr>
	<tr>
		<td>Kit Storage:</td>
		<td>
			<select name="option_storage">
				<option value="auto">Automatically Determined</option>
				<option value="mk4">Metakit</option>
				<option value="zip">Zip</option>
				<option value="cvfs">C-VFS</option>
			</select>
		</td>
	</tr>




>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







>
>
>
>
>
>
>







 







>
>
>







>
>
>



>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|







 







|
|


|
|
|
|
|





|







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
...
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
...
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
...
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
...
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
<?
	package require sha1

	load_response args

	proc versionEncoded {versionString} {
		set output 0

		if {$versionString eq "trunk"} {
			return [versionEncoded "255.255.255"]
		}

		foreach element [lrange [split $versionString .] 0 2] {
			if {![string is integer -strict $element]} {
				return "\"$versionString\""
			}

			set output [expr {($output << 8) | $element}]
		}

		return $output
	}

	set sourcedir "/web/rkeene/devel/kitcreator/all"
	set queue "/home/rkeene/devel/kitcreator/build/web/queue"
	set secretfile "/home/rkeene/etc/kitcreator-web-secret"

	foreach file [glob -tails -nocomplain -directory $sourcedir "kitcreator-*.tar.gz"] {
		regexp {^kitcreator-(.*).tar.gz$} $file -> vers
................................................................................
		platform linux-i386-static {package_tk package_dbus kitdll}
		platform macosx-ppc {package_dbus package_tcc4tcl package_tuapi}
		platform macosx-ppc64 {package_dbus package_tcc4tcl package_tuapi}
		platform macosx-i386 {package_dbus package_tuapi}
		platform macosx-amd64 {package_dbus package_tuapi}
		platform win32 {package_tuapi}
		platform win64 {package_tuapi}
		kitcreator_version <0.8.0 {package_dbus package_tls staticlibssl buildlibssl}
		kitcreator_version <0.9.0 {package_tcc4tcl}
		kitcreator_version <0.9.2 {package_tcllib package_tclx package_udp package_yajltcl}
		kitcreator_version <0.9.3 {package_nsf}
		kitcreator_version <0.10.0 {package_tdom package_tuapi}
		kitcreator_version <0.11.0 {package_tclcurl package_lmdb}
		kitcreator_version <trunk {package_duktape}
	}

	set specific {
		platform win32 file icon {Kit Icon}
		platform win32 text description {Description}
		platform win64 file icon {Kit Icon}
		platform win64 text description {Description}
................................................................................
    <title>KitCreator, Web Interface</title>
    <script>
<!--
	function enableOption(option) {
		var obj;

		obj = document.getElementById('option_' + option);
		if (!obj) {
			return;
		}
		obj.disabled = false;
	}

	function disableOption(option) {
		var obj;

		obj = document.getElementById('option_' + option);
		if (!obj) {
			return;
		}
		obj.checked = false;
		obj.disabled = true;
	}

	function versionEncoded(versionString) {
		var output = 0;

		if (versionString === "trunk") {
			return(versionEncoded("255.255.255"));
		}

		try {
			versionString.split(".").slice(0, 3).forEach(function(element) {
				element = parseInt(element);
				if (isNaN(element)) {
					throw new Error("Invalid version string");
				}

				output <<= 8;
				output |= element;
			});
		} catch (e) {
			output = versionString;
		}

		return(output);
	}

	function verifyOptions() {
		var kitcreator_version;
		var tcl_version;
		var platform;

		kitcreator_version = document.getElementsByName('kitcreator_version')[0].value;
................................................................................
		}

		foreach option $alldisabledoptions {
			puts "\t\tenableOption(\"$option\");"
		}

		foreach {keyword value disableoptions} $disable {
			set comparator [string index $value 0]
			set value [string range $value 1 end]
			switch -exact -- $comparator {
				"<" - ">" {
				}
				"=" {
					set comparator "==="
				}
				"!" {
					set comparator "!=="
				}
				default {
					set value "${comparator}${value}"
					set comparator "=="
				}
			}

			if {$keyword in {tcl_version kitcreator_version}} {
				set keyword "versionEncoded($keyword)"
				set value [versionEncoded $value]
			} else {
				set value "\"$value\""
			}

			puts "\t\tif ($keyword $comparator $value) \{"

			foreach option $disableoptions {
				puts "\t\t\tdisableOption(\"$option\");"
			}

			puts "\t\t\}"
		}
................................................................................
        </tr>
        <tr>
          <td>Kit Options:</td>
          <td>
<?  foreach package [lsort -dictionary [array names packages]] { ?>
            <input type="checkbox" name="option_package_<? puts -nonewline $package ?>" id="option_package_<? puts -nonewline $package ?>">Package: <? puts -nonewline $packages($package) ?><br>
<? } ?>
            <input type="checkbox" name="option_threaded" id="option_threaded">Kit: Threaded<br>
            <input type="checkbox" name="option_debug" id="option_debug">Kit: Debugging Build<br>
            <input type="checkbox" name="option_kitdll" id="option_kitdll">Kit: Build Library (KitDLL)<br>
            <input type="checkbox" name="option_dynamictk" id="option_dynamictk">Kit: Always link Tk dynamically (if Tk is built)<br>
            <input type="checkbox" name="option_minbuild" id="option_minbuild">Kit: "Minimal" build (remove extra packages shipped as part of Tcl and reduce encodings)<br>
            <input type="checkbox" name="option_staticpkgs" id="option_staticpkgs">Kit: Statically link packages in pkgs directory<br>
            <input type="checkbox" name="option_tclutfmax6" id="option_tclutfmax6">Kit: TCL_UTF_MAX=6 (incompatibility with standard Tcl)<br>
            <input type="checkbox" name="option_staticlibssl" id="option_staticlibssl">TLS: Statically link to LibSSL<br>
            <input type="checkbox" name="option_buildlibssl" id="option_buildlibssl">TLS: Build LibreSSL for this platform
          </td>
        </tr>
	<tr>
		<td>Kit Storage:</td>
		<td>
			<select name="option_storage" id="option_storage">
				<option value="auto">Automatically Determined</option>
				<option value="mk4">Metakit</option>
				<option value="zip">Zip</option>
				<option value="cvfs">C-VFS</option>
			</select>
		</td>
	</tr>