1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
|
#
# NOTE: Always return an empty string (i.e. and not any response data).
#
return ""
}
#
# NOTE: This procedure checks if there is a higher version available of the
# specified package on the package file server. 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 platform argument
# must be an empty string -OR- one of the literal strings "msil" or
# "neutral", or one of the values returned by the [getPlatform]
# procedure. An empty string means that the associated package does
# not require a specific platform. The packageName argument is a
# directory name relative to the language and version-specific
# directory on the package file server and may be an empty string.
# The usePgp argument should be non-zero when an OpenPGP signature
# file needs to be downloaded and verified for the downloaded file.
#
# <public>
proc checkForHigherVersion { language version platform packageName usePgp } {
variable clientDirectory
variable persistentRootDirectory
variable temporaryRootDirectory
verifyLanguageAndVersion $language $version isClient
verifyPlatform $platform platform
set temporaryDirectory [file join \
$temporaryRootDirectory [appendArgs \
pkgd_ver_ [::PackageRepository::getUniqueSuffix]]]
if {$isClient} then {
set persistentDirectory $clientDirectory
} else {
verifyPersistentRootDirectory
set persistentDirectory $persistentRootDirectory
}
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
<
|
<
<
|
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
|
#
# NOTE: Always return an empty string (i.e. and not any response data).
#
return ""
}
#
# NOTE: This procedure returns a unique temporary directory where one or
# more files may be saved. The prefix argument is a prefix for the
# directory name and it may be an empty string. There is no attempt
# to actually create the resulting directory.
#
proc getUniqueTempDirectory { {prefix ""} } {
variable temporaryRootDirectory
set suffix [::PackageRepository::getUniqueSuffix]
if {[string length $prefix] > 0} then {
return [file join $temporaryRootDirectory \
[appendArgs $prefix $suffix]]
} else {
return [file join $temporaryRootDirectory \
$suffix]
}
}
#
# NOTE: This procedure checks if there is a higher version available of the
# specified package on the package file server. 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 platform argument
# must be an empty string -OR- one of the literal strings "msil" or
# "neutral", or one of the values returned by the [getPlatform]
# procedure. An empty string means that the associated package does
# not require a specific platform. The packageName argument is a
# directory name relative to the language and version-specific
# directory on the package file server and may be an empty string.
# The usePgp argument should be non-zero when an OpenPGP signature
# 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
} else {
verifyPersistentRootDirectory
set persistentDirectory $persistentRootDirectory
}
|
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
|
# needs to be verified for the downloaded file.
#
proc downloadAllPlatforms { language version packageName fileNames usePgp } {
variable baseUri
variable branchName
variable platformsUri
variable platformsUrn
variable temporaryRootDirectory
#
# NOTE: Verify that the package language and version are correct.
#
verifyLanguageAndVersion $language $version isClient
set temporaryDirectory [file join \
$temporaryRootDirectory [appendArgs \
pkgd_plat_ [::PackageRepository::getUniqueSuffix]]]
set localFileName [file join $temporaryDirectory manifest.txt]
file mkdir [file dirname $localFileName]
#
# NOTE: First, build the final URI to download from the remote package
# repository, performing any applicable substitutions in the URI
|
<
|
<
<
|
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
|
# needs to be verified for the downloaded file.
#
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]
#
# NOTE: First, build the final URI to download from the remote package
# repository, performing any applicable substitutions in the URI
|
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
|
# -allowUpdate option should be non-zero to allow existing package
# files to be overwritten.
#
# <public>
proc downloadFiles { language version platform fileNames options } {
variable clientDirectory
variable persistentRootDirectory
variable temporaryRootDirectory
variable viaInstall
verifyLanguageAndVersion $language $version isClient
verifyPlatform $platform platform
set temporaryDirectory [file join \
$temporaryRootDirectory [appendArgs \
pkgd_lib_ [::PackageRepository::getUniqueSuffix]]]
if {$isClient} then {
set persistentDirectory $clientDirectory
} else {
verifyPersistentRootDirectory
set persistentDirectory $persistentRootDirectory
}
|
<
|
<
<
|
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
|
# -allowUpdate option should be non-zero to allow existing package
# files to be overwritten.
#
# <public>
proc downloadFiles { language version platform fileNames options } {
variable clientDirectory
variable persistentRootDirectory
variable viaInstall
verifyLanguageAndVersion $language $version isClient
verifyPlatform $platform platform
set temporaryDirectory [getUniqueTempDirectory pkgd_lib_]
if {$isClient} then {
set persistentDirectory $clientDirectory
} else {
verifyPersistentRootDirectory
set persistentDirectory $persistentRootDirectory
}
|