Diff

Differences From Artifact [787ecac4e4]:

To Artifact [d37f77e079]:


     1      1   <?
     2      2   	package require sha1
     3      3   
     4      4   	load_response args
            5  +
            6  +	proc versionEncoded {versionString} {
            7  +		set output 0
            8  +
            9  +		if {$versionString eq "trunk"} {
           10  +			return [versionEncoded "255.255.255"]
           11  +		}
           12  +
           13  +		foreach element [lrange [split $versionString .] 0 2] {
           14  +			if {![string is integer -strict $element]} {
           15  +				return "\"$versionString\""
           16  +			}
           17  +
           18  +			set output [expr {($output << 8) | $element}]
           19  +		}
           20  +
           21  +		return $output
           22  +	}
     5     23   
     6     24   	set sourcedir "/web/rkeene/devel/kitcreator/all"
     7     25   	set queue "/home/rkeene/devel/kitcreator/build/web/queue"
     8     26   	set secretfile "/home/rkeene/etc/kitcreator-web-secret"
     9     27   
    10     28   	foreach file [glob -tails -nocomplain -directory $sourcedir "kitcreator-*.tar.gz"] {
    11     29   		regexp {^kitcreator-(.*).tar.gz$} $file -> vers
................................................................................
    89    107   		platform linux-i386-static {package_tk package_dbus kitdll}
    90    108   		platform macosx-ppc {package_dbus package_tcc4tcl package_tuapi}
    91    109   		platform macosx-ppc64 {package_dbus package_tcc4tcl package_tuapi}
    92    110   		platform macosx-i386 {package_dbus package_tuapi}
    93    111   		platform macosx-amd64 {package_dbus package_tuapi}
    94    112   		platform win32 {package_tuapi}
    95    113   		platform win64 {package_tuapi}
          114  +		kitcreator_version <0.8.0 {package_dbus package_tls staticlibssl buildlibssl}
          115  +		kitcreator_version <0.9.0 {package_tcc4tcl}
          116  +		kitcreator_version <0.9.2 {package_tcllib package_tclx package_udp package_yajltcl}
          117  +		kitcreator_version <0.9.3 {package_nsf}
          118  +		kitcreator_version <0.10.0 {package_tdom package_tuapi}
          119  +		kitcreator_version <0.11.0 {package_tclcurl package_lmdb}
          120  +		kitcreator_version <trunk {package_duktape}
    96    121   	}
    97    122   
    98    123   	set specific {
    99    124   		platform win32 file icon {Kit Icon}
   100    125   		platform win32 text description {Description}
   101    126   		platform win64 file icon {Kit Icon}
   102    127   		platform win64 text description {Description}
................................................................................
   267    292       <title>KitCreator, Web Interface</title>
   268    293       <script>
   269    294   <!--
   270    295   	function enableOption(option) {
   271    296   		var obj;
   272    297   
   273    298   		obj = document.getElementById('option_' + option);
          299  +		if (!obj) {
          300  +			return;
          301  +		}
   274    302   		obj.disabled = false;
   275    303   	}
   276    304   
   277    305   	function disableOption(option) {
   278    306   		var obj;
   279    307   
   280    308   		obj = document.getElementById('option_' + option);
          309  +		if (!obj) {
          310  +			return;
          311  +		}
   281    312   		obj.checked = false;
   282    313   		obj.disabled = true;
   283    314   	}
          315  +
          316  +	function versionEncoded(versionString) {
          317  +		var output = 0;
          318  +
          319  +		if (versionString === "trunk") {
          320  +			return(versionEncoded("255.255.255"));
          321  +		}
          322  +
          323  +		try {
          324  +			versionString.split(".").slice(0, 3).forEach(function(element) {
          325  +				element = parseInt(element);
          326  +				if (isNaN(element)) {
          327  +					throw new Error("Invalid version string");
          328  +				}
          329  +
          330  +				output <<= 8;
          331  +				output |= element;
          332  +			});
          333  +		} catch (e) {
          334  +			output = versionString;
          335  +		}
          336  +
          337  +		return(output);
          338  +	}
   284    339   
   285    340   	function verifyOptions() {
   286    341   		var kitcreator_version;
   287    342   		var tcl_version;
   288    343   		var platform;
   289    344   
   290    345   		kitcreator_version = document.getElementsByName('kitcreator_version')[0].value;
................................................................................
   302    357   		}
   303    358   
   304    359   		foreach option $alldisabledoptions {
   305    360   			puts "\t\tenableOption(\"$option\");"
   306    361   		}
   307    362   
   308    363   		foreach {keyword value disableoptions} $disable {
   309         -			puts "\t\tif ($keyword == \"$value\") \{"
          364  +			set comparator [string index $value 0]
          365  +			set value [string range $value 1 end]
          366  +			switch -exact -- $comparator {
          367  +				"<" - ">" {
          368  +				}
          369  +				"=" {
          370  +					set comparator "==="
          371  +				}
          372  +				"!" {
          373  +					set comparator "!=="
          374  +				}
          375  +				default {
          376  +					set value "${comparator}${value}"
          377  +					set comparator "=="
          378  +				}
          379  +			}
          380  +
          381  +			if {$keyword in {tcl_version kitcreator_version}} {
          382  +				set keyword "versionEncoded($keyword)"
          383  +				set value [versionEncoded $value]
          384  +			} else {
          385  +				set value "\"$value\""
          386  +			}
          387  +
          388  +			puts "\t\tif ($keyword $comparator $value) \{"
   310    389   
   311    390   			foreach option $disableoptions {
   312    391   				puts "\t\t\tdisableOption(\"$option\");"
   313    392   			}
   314    393   
   315    394   			puts "\t\t\}"
   316    395   		}
................................................................................
   380    459           </tr>
   381    460           <tr>
   382    461             <td>Kit Options:</td>
   383    462             <td>
   384    463   <?  foreach package [lsort -dictionary [array names packages]] { ?>
   385    464               <input type="checkbox" name="option_package_<? puts -nonewline $package ?>" id="option_package_<? puts -nonewline $package ?>">Package: <? puts -nonewline $packages($package) ?><br>
   386    465   <? } ?>
   387         -            <input type="checkbox" name="option_threaded">Kit: Threaded<br>
   388         -            <input type="checkbox" name="option_debug">Kit: Debugging Build<br>
          466  +            <input type="checkbox" name="option_threaded" id="option_threaded">Kit: Threaded<br>
          467  +            <input type="checkbox" name="option_debug" id="option_debug">Kit: Debugging Build<br>
   389    468               <input type="checkbox" name="option_kitdll" id="option_kitdll">Kit: Build Library (KitDLL)<br>
   390    469               <input type="checkbox" name="option_dynamictk" id="option_dynamictk">Kit: Always link Tk dynamically (if Tk is built)<br>
   391         -            <input type="checkbox" name="option_minbuild">Kit: "Minimal" build (remove extra packages shipped as part of Tcl and reduce encodings)<br>
   392         -            <input type="checkbox" name="option_staticpkgs">Kit: Statically link packages in pkgs directory<br>
   393         -            <input type="checkbox" name="option_tclutfmax6">Kit: TCL_UTF_MAX=6 (incompatibility with standard Tcl)<br>
   394         -            <input type="checkbox" name="option_staticlibssl">TLS: Statically link to LibSSL<br>
   395         -            <input type="checkbox" name="option_buildlibssl">TLS: Build LibreSSL for this platform
          470  +            <input type="checkbox" name="option_minbuild" id="option_minbuild">Kit: "Minimal" build (remove extra packages shipped as part of Tcl and reduce encodings)<br>
          471  +            <input type="checkbox" name="option_staticpkgs" id="option_staticpkgs">Kit: Statically link packages in pkgs directory<br>
          472  +            <input type="checkbox" name="option_tclutfmax6" id="option_tclutfmax6">Kit: TCL_UTF_MAX=6 (incompatibility with standard Tcl)<br>
          473  +            <input type="checkbox" name="option_staticlibssl" id="option_staticlibssl">TLS: Statically link to LibSSL<br>
          474  +            <input type="checkbox" name="option_buildlibssl" id="option_buildlibssl">TLS: Build LibreSSL for this platform
   396    475             </td>
   397    476           </tr>
   398    477   	<tr>
   399    478   		<td>Kit Storage:</td>
   400    479   		<td>
   401         -			<select name="option_storage">
          480  +			<select name="option_storage" id="option_storage">
   402    481   				<option value="auto">Automatically Determined</option>
   403    482   				<option value="mk4">Metakit</option>
   404    483   				<option value="zip">Zip</option>
   405    484   				<option value="cvfs">C-VFS</option>
   406    485   			</select>
   407    486   		</td>
   408    487   	</tr>