Diff

Differences From Artifact [ff68791fbb]:

To Artifact [6e02118269]:


178
179
180
181
182
183
184








185
186
187
188
189
190
191
		catch {
			set apiMethod [dict get $args(dict) action]
		}

		switch -exact -- $apiMethod {
			build {
				# Do nothing, handled below








			}
			platforms {
				set apiResultDict [array get platforms]
			}
			tcl_versions {
				set apiResultDict [array get tcl_versions]
				dict set apiResultDict default $tcl_version_selected







>
>
>
>
>
>
>
>







178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
		catch {
			set apiMethod [dict get $args(dict) action]
		}

		switch -exact -- $apiMethod {
			build {
				# Do nothing, handled below
			}
			storages {
				set apiResultDict {
					mk4 {Metakit}
					zip {Zip}
					cvfs {C-VFS}
					auto {Automatically Determine}
				}
			}
			platforms {
				set apiResultDict [array get platforms]
			}
			tcl_versions {
				set apiResultDict [array get tcl_versions]
				dict set apiResultDict default $tcl_version_selected
199
200
201
202
203
204
205

206
207
208
209
210
211
212
			}
			packages {
				set apiResultDict [array get packages]
			}
			help {
				set apiResultDict {
					build {Build a TclKit.  Accepts arguments: platform [mandatory, string], tcl_version [string], kitcreator_version [string], storage [string, one of mk4, cvfs, zip], options [array], packages [array]}

					platforms {Get a list of platforms to use as the "platform" argument to build}
					tcl_versions {Get a list of Tcl versions and their descriptions to use as the "tcl_version" argument to build}
					kitcreator_versions {Get a list of KitCreator versions and their descriptions to use as the "kitcreator_version" argument to build}
					options {Get a list of options and their descriptions}
					packages {Get a list of packages and their descriptions}
					examples {A few examples}
					help {This help}







>







207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
			}
			packages {
				set apiResultDict [array get packages]
			}
			help {
				set apiResultDict {
					build {Build a TclKit.  Accepts arguments: platform [mandatory, string], tcl_version [string], kitcreator_version [string], storage [string, one of mk4, cvfs, zip], options [array], packages [array]}
					storages {Get a list of supported storage mechanisms to use as the "storage" argument to build}
					platforms {Get a list of platforms to use as the "platform" argument to build}
					tcl_versions {Get a list of Tcl versions and their descriptions to use as the "tcl_version" argument to build}
					kitcreator_versions {Get a list of KitCreator versions and their descriptions to use as the "kitcreator_version" argument to build}
					options {Get a list of options and their descriptions}
					packages {Get a list of packages and their descriptions}
					examples {A few examples}
					help {This help}
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467


468
469
470
471
472
473
474
475
476
477
478
479
480

		# Queue build up and wait for it to complete
		set fd [open $queue a+]
		puts $fd [list filename $filename key $key platform $build_platform tcl_version $build_tcl_version kitcreator_version $build_kitcreator_version packages $build_packages options [array get build_options]]
		close $fd

		set url "http://kitcreator.rkeene.org/kits/building/$key/"
		set kiturl "http://kitcreator.rkeene.org/kits/$key/$filename"

		if {!$resultIsAPI} {
			headers redirect $url
?><html>
	<head>
		<title>KitCreator, Web Interface</title>
	</head>
	<body>
		<h1>KitCreator Web Interface</h1>
		<p>Build in progress, see <a href="<? puts -nonewline $url ?>"><? puts -nonewline $url ?></a> for build information</p>
	</body>
</html>
<?
		} else {


			switch -exact -- $apiReturnFormat {
				"json" {
					puts "{\"kit_url\": \"${kiturl}\"}"
				}
				"dict" {
					puts [dict create kit_url $kiturl]
				}
			}
		}
	} else {
?><html>
  <head>
    <title>KitCreator, Web Interface</title>







<














>
>


|


|







455
456
457
458
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
488
489
490

		# Queue build up and wait for it to complete
		set fd [open $queue a+]
		puts $fd [list filename $filename key $key platform $build_platform tcl_version $build_tcl_version kitcreator_version $build_kitcreator_version packages $build_packages options [array get build_options]]
		close $fd

		set url "http://kitcreator.rkeene.org/kits/building/$key/"


		if {!$resultIsAPI} {
			headers redirect $url
?><html>
	<head>
		<title>KitCreator, Web Interface</title>
	</head>
	<body>
		<h1>KitCreator Web Interface</h1>
		<p>Build in progress, see <a href="<? puts -nonewline $url ?>"><? puts -nonewline $url ?></a> for build information</p>
	</body>
</html>
<?
		} else {
			set kiturl "http://kitcreator.rkeene.org/kits/building/$apiReturnFormat/$key/"

			switch -exact -- $apiReturnFormat {
				"json" {
					puts "{\"url\": \"${kiturl}\"}"
				}
				"dict" {
					puts [dict create url $kiturl]
				}
			}
		}
	} else {
?><html>
  <head>
    <title>KitCreator, Web Interface</title>