︙ | | | ︙ | |
888
889
890
891
892
893
894
895
896
897
898
899
900
901
|
# 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 "eagle". When the language is "client", the version match the
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
|
# HACK: On all other platforms, assume that Mono can be used to run
# any CLR application.
#
return [isMonoInstalled]
}
}
#
# NOTE: This procedure verifies that the specified value is indeed a valid
# package name. The packageName argument is the value to verify.
# This procedure may raise script errors.
#
# <internal>
proc verifyPackageName { packageName } {
if {[string length $packageName] > 0 && \
![regexp -nocase -- {^[A-Z][0-9A-Z\.]*$} $packageName]} then {
error "package name must be alphanumeric and start with a letter"
}
}
#
# NOTE: This procedure verifies that the specified value is indeed a valid
# patch level. The patchLevel argument is the value to verify. This
# procedure may raise script errors.
#
# <internal>
proc verifyPackagePatchLevel { patchLevel } {
if {[string length $patchLevel] > 0 && \
![regexp -nocase -- {^\d+\.\d+(?:\.\d+){0,2}$} $patchLevel]} then {
error "patch level must use dotted decimal notation"
}
}
#
# 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 "eagle". When the language is "client", the version match the
|
︙ | | | ︙ | |
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
|
} elseif {$language eq "client"} then {
if {![regexp -- {^1\.0(?:\.\d+)+$} $version]} then {
error "unsupported client version"
}
set isClient true
} else {
error "unsupported language"
}
}
#
# NOTE: This procedure returns the name of the current platform. There are
# no arguments. An empty string will be returned if the name of the
# current platform cannot be determined for any reason.
|
|
|
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
|
} elseif {$language eq "client"} then {
if {![regexp -- {^1\.0(?:\.\d+)+$} $version]} then {
error "unsupported client version"
}
set isClient true
} else {
error "unsupported package language"
}
}
#
# NOTE: This procedure returns the name of the current platform. There are
# no arguments. An empty string will be returned if the name of the
# current platform cannot be determined for any reason.
|
︙ | | | ︙ | |
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
|
win64-ia64 -
win64-x64 {
#
# NOTE: This platform name is supported verbatim, do nothing.
#
}
default {
error "unsupported platform"
}
}
}
#
# NOTE: This procedure issues a request to an HTTP(S) server. It returns
# the raw response data verbatim. It may raise a script error. It
|
|
|
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
|
win64-ia64 -
win64-x64 {
#
# NOTE: This platform name is supported verbatim, do nothing.
#
}
default {
error "unsupported package platform"
}
}
}
#
# NOTE: This procedure issues a request to an HTTP(S) server. It returns
# the raw response data verbatim. It may raise a script error. It
|
︙ | | | ︙ | |
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
|
# file needs to be downloaded and verified for the downloaded file.
#
# <public>
proc checkForHigherVersion { language version platform packageName usePgp } {
variable clientDirectory
variable persistentRootDirectory
verifyLanguageAndVersion $language $version isClient
verifyPlatform $platform platform
set temporaryDirectory [getUniqueTempDirectory pkgd_ver_]
if {$isClient} then {
set persistentDirectory $clientDirectory
|
>
|
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
|
# file needs to be downloaded and verified for the downloaded file.
#
# <public>
proc checkForHigherVersion { language version platform packageName usePgp } {
variable clientDirectory
variable persistentRootDirectory
verifyPackageName $packageName
verifyLanguageAndVersion $language $version isClient
verifyPlatform $platform platform
set temporaryDirectory [getUniqueTempDirectory pkgd_ver_]
if {$isClient} then {
set persistentDirectory $clientDirectory
|
︙ | | | ︙ | |
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
|
proc downloadAllPlatforms { language version packageName fileNames usePgp } {
variable baseUri
variable branchName
variable platformsUri
variable platformsUrn
#
# NOTE: Verify that the package language and version are correct.
#
verifyLanguageAndVersion $language $version isClient
set temporaryDirectory [getUniqueTempDirectory pkgd_plat_]
set localFileName [file join $temporaryDirectory manifest.txt]
file mkdir [file dirname $localFileName]
|
|
>
|
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
|
proc downloadAllPlatforms { language version packageName fileNames usePgp } {
variable baseUri
variable branchName
variable platformsUri
variable platformsUrn
#
# NOTE: Verify that the package name, language, and version are correct.
#
verifyPackageName $packageName
verifyLanguageAndVersion $language $version isClient
set temporaryDirectory [getUniqueTempDirectory pkgd_plat_]
set localFileName [file join $temporaryDirectory manifest.txt]
file mkdir [file dirname $localFileName]
|
︙ | | | ︙ | |
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
|
set useAutoPath [string is true -strict \
[getDictionaryValue $options -useAutoPath]]
set allowUpdate [string is true -strict \
[getDictionaryValue $options -allowUpdate]]
verifyLanguageAndVersion $language $version isClient
verifyPlatform $platform platform
set temporaryDirectory [getUniqueTempDirectory pkgd_lib_]
if {$isClient} then {
set persistentDirectory $clientDirectory
|
>
>
>
>
|
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
|
set useAutoPath [string is true -strict \
[getDictionaryValue $options -useAutoPath]]
set allowUpdate [string is true -strict \
[getDictionaryValue $options -allowUpdate]]
#
# NOTE: Verify that the package language, version, and platform are
# correct.
#
verifyLanguageAndVersion $language $version isClient
verifyPlatform $platform platform
set temporaryDirectory [getUniqueTempDirectory pkgd_lib_]
if {$isClient} then {
set persistentDirectory $clientDirectory
|
︙ | | | ︙ | |