276
277
278
279
280
281
282
283
284
285
286
287
288
289
|
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
# library path.
#
variable viaInstall; # DEFAULT: false
if {![info exists viaInstall]} then {
set viaInstall false
}
#
# NOTE: The command to use when attempting to verify that Mono and its
# associated runtimes are installed locally. Generally, this is
# not needed on Windows machines.
#
variable monoInstalledCommand; # DEFAULT: mono --version
if {![info exists monoInstalledCommand]} then {
set monoInstalledCommand {mono --version}
}
#
# NOTE: The regular expression pattern used when attempting to verify
# that Mono and its associated runtimes are installed locally.
# Generally, this is not needed on Windows machines.
#
variable monoInstalledPattern; # DEFAULT: ^Mono JIT compiler version \d+\.
if {![info exists monoInstalledPattern]} then {
set monoInstalledPattern {^Mono JIT compiler version \d+\.}
}
}
#
# NOTE: This procedure modifies the URN variables used by the package
# downloader client so that one or more alternative (private?)
# backend file servers may be used. The serverId argument must
# consist only of alphanumeric characters and it must begin with
|
763
764
765
766
767
768
769
770
771
772
773
774
775
776
|
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
# within the auto-path.
#
addToAutoPath $language $directory
return true
}
#
# NOTE: This procedure attempts to verify that an instance of Mono and its
# associated runtimes are installed locally. There are no arguments.
# The return value is non-zero if Mono appears to be installed and
# available for use; otherwise, the return value is zero.
#
proc isMonoInstalled {} {
variable monoInstalledCommand
variable monoInstalledPattern
if {[isEagle]} then {
if {[catch {
eval exec -success Success $monoInstalledCommand
} result]} then {
return false
}
} else {
if {[catch {
eval exec $monoInstalledCommand
} result]} then {
return false
}
}
if {![info exists result] || \
![regexp -- $monoInstalledPattern $result]} then {
return false
}
return true
}
#
# NOTE: This procedure attempts to verify that some runtime is available to
# run CLR applications locally (e.g. the .NET Framework or Mono JIT).
# There are no arguments. The return value is non-zero if it appears
# that CLR applications should be runnable locally; otherwise, the
# return value is zero.
#
proc canUseMsilPlatform {} {
if {[isWindows]} then {
#
# HACK: Assume that all Windows operating systems have a compatible
# version of the .NET Framework is installed -AND- that it can
# be used to run any CLR application.
#
return true
} else {
#
# HACK: On all other platforms, assume that Mono can be used to run
# any CLR application.
#
return [isMonoInstalled]
}
}
#
# NOTE: This procedure verifies the combination of language and version
# specified by the caller. The language argument must be one of the
# literal strings "eagle", "tcl", or "client". The version argument
# must be one of the literal strings "8.4", "8.5", or "8.6" when the
# language is "tcl" -OR- the literal string "1.0" when the language
# is either "eagle" or "client". The varName argument is the name
|
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
|
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
|
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
+
+
+
+
+
+
+
|
$language $version $localPackageName $localFileNames $localUsePgp]
if {[string length $varName] > 0} then {
upvar 1 $varName newPlatform
}
#
# NOTE: Check the current platform and the neutral platform, in that
# order, to see if that platform is supported by the package
# being saught. If so, return that platform.
# NOTE: First, check the current platform and the neutral platform,
# in that order, to see if that platform is supported by the
# package being saught.
#
set thesePlatforms [list [getPlatform] neutral]
#
# NOTE: Next, optionally, allow the "msil" platform to be checked.
# Currently, this is always applicable on Windows; however,
# on all other platforms this depends on having Mono and its
# associated runtimes installed locally.
#
if {[canUseMsilPlatform]} then {
lappend thesePlatforms msil
}
#
# NOTE: Check each applicable platform, in order, stopping when a
# supported platform is found for the package being saught.
#
foreach thisPlatform [list [getPlatform] msil neutral] {
foreach thisPlatform $thesePlatforms {
if {[lsearch -exact $platforms $thisPlatform] != -1} then {
set newPlatform $thisPlatform
return
}
}
#
# NOTE: If this point is reached, there are no supported platforms
# that are compatible with the current one for the specified
# package.
#
error "could not automatically detect platform"
}
msil -
msil {
#
# NOTE: Forbid the "msil" platform if it is not available for use.
#
if {![canUseMsilPlatform]} then {
error "platform \"msil\" does not appear to be supported"
}
}
neutral -
win32-arm -
win32-x86 -
win64-arm64 -
win64-ia64 -
win64-x64 {
#
|