Skip to content

Commit c849cfc

Browse files
authored
Merge 00ab66c into 96d59ec
2 parents 96d59ec + 00ab66c commit c849cfc

8 files changed

Lines changed: 75 additions & 46 deletions

File tree

appveyor.yml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ branches:
1313
- /try-.*/
1414
- /release-.*/
1515

16-
# scripts that are called at very beginning, before repo cloning
17-
init:
18-
# set the init time for the build, used to calculate the time taken for each stage of the build.
19-
- ps: |
20-
"INIT, $(Get-Date -Format 'o')"| Out-File ../timing.csv -Append
21-
2216
environment:
2317
PY_PYTHON: 3.11-32
2418
secure_authenticode_pass:
@@ -31,6 +25,20 @@ environment:
3125
crowdinProjectID: 598017
3226
crowdinAuthToken:
3327
secure: E3084gj4JeMZKvZIOLIhqZefuSo/tj7iYPt4yK0geOI/eQgmPvoXt37Xq0KwvXzvZiJny4AsMj1rKMTVxio8EG8KA0YsYYuy+WV1wpFRIn25zGQS+DZ/yycL75SmTWfr
28+
scons_publisher: NV Access
29+
# Comment out any of the feature_* variables to disable the respective build feature.
30+
# They are checked for existence of content, not specific value.
31+
feature_buildSymbols: True
32+
feature_uploadSymbolsToMozilla: True
33+
feature_buildAppx: True
34+
feature_crowdinSync: True
35+
feature_signing: True
36+
37+
# scripts that are called at very beginning, before repo cloning
38+
init:
39+
# set the init time for the build, used to calculate the time taken for each stage of the build.
40+
- ps: |
41+
"INIT, $(Get-Date -Format 'o')"| Out-File ../timing.csv -Append
3442
3543
install:
3644
- ps: |
@@ -51,9 +59,12 @@ build_script:
5159
- ps: appveyor\scripts\buildSymbolStore.ps1
5260
# The server expects the symbols archive to be structured as ./*.ex_ not ./symbols/*.ex_.
5361
# Change directory to package, as 7z will structure the archive using the relative path.
54-
- cd symbols
55-
- 7z a -tzip -r ..\output\symbols.zip *.dl_ *.ex_ *.pd_
56-
- cd ..
62+
- ps: >-
63+
if ($env:feature_buildSymbols) {
64+
cd symbols
65+
7z a -tzip -r ..\output\symbols.zip *.dl_ *.ex_ *.pd_
66+
cd ..
67+
}
5768
- ps: |
5869
"BUILD_END, $(Get-Date -Format 'o')"| Out-File ../timing.csv -Append
5970

appveyor/scripts/buildSymbolStore.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
$ErrorActionPreference = "Stop";
2+
if (!$env:feature_buildSymbols) {
3+
exit
4+
}
5+
26
foreach ($syms in
37
# We don't just include source\*.dll because that would include system dlls.
48
"source\liblouis.dll", "source\*.pdb",

appveyor/scripts/decryptFilesForSigning.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if(!$env:APPVEYOR_PULL_REQUEST_NUMBER) {
1+
if(!$env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:feature_signing) {
22
openssl enc -d -md sha256 -aes-256-cbc -pbkdf2 -salt -pass pass:$env:secure_authenticode_pass -in appveyor\authenticode.pfx.enc -out appveyor\authenticode.pfx
33
if($LastExitCode -ne 0) {
44
$errorCode=$LastExitCode

appveyor/scripts/deployScript.ps1

Lines changed: 36 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,47 @@
11
$ErrorActionPreference = "Stop";
22
if (!$env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:versionType) {
33
# Not a try build.
4-
if ($env:APPVEYOR_REPO_BRANCH -eq "beta") {
4+
if ($env:APPVEYOR_REPO_BRANCH -eq "beta" -and $env:feature_crowdinSync) {
55
# Upload files to Crowdin for translation
66
py -m pip install --no-warn-script-location requests
77
py appveyor\crowdinSync.py uploadSourceFile 2 output\nvda.pot 2>&1
88
}
9-
# Notify our server.
10-
$exe = Get-ChildItem -Name output\*.exe
11-
$hash = (Get-FileHash "output\$exe" -Algorithm SHA1).Hash.ToLower()
12-
$apiVersion = (py -c "import sys; sys.path.append('source'); from addonAPIVersion import CURRENT; print('{}.{}.{}'.format(*CURRENT))")
13-
echo apiversion: $apiVersion
14-
$apiCompatTo = (py -c "import sys; sys.path.append('source'); from addonAPIVersion import BACK_COMPAT_TO; print('{}.{}.{}'.format(*BACK_COMPAT_TO))")
15-
echo apiBackCompatTo: $apiCompatTo
16-
$data = @{
17-
jobId=$env:APPVEYOR_JOB_ID;
18-
commit=$env:APPVEYOR_REPO_COMMIT;
19-
version=$env:version; versionType=$env:versionType;
20-
apiVersion=$apiVersion; apiCompatTo=$apiCompatTo;
21-
avVersion=$env:APPVEYOR_BUILD_VERSION;
22-
branch=$env:APPVEYOR_REPO_BRANCH;
23-
exe=$exe; hash=$hash;
24-
artifacts=$artifacts
9+
# Notify our server, if this is an NV Access build.
10+
if ($env:APPVEYOR_REPO_NAME.StartsWith("nvaccess/")) {
11+
$exe = Get-ChildItem -Name output\*.exe
12+
$hash = (Get-FileHash "output\$exe" -Algorithm SHA1).Hash.ToLower()
13+
$apiVersion = (py -c "import sys; sys.path.append('source'); from addonAPIVersion import CURRENT; print('{}.{}.{}'.format(*CURRENT))")
14+
echo apiversion: $apiVersion
15+
$apiCompatTo = (py -c "import sys; sys.path.append('source'); from addonAPIVersion import BACK_COMPAT_TO; print('{}.{}.{}'.format(*BACK_COMPAT_TO))")
16+
echo apiBackCompatTo: $apiCompatTo
17+
$data = @{
18+
jobId=$env:APPVEYOR_JOB_ID;
19+
commit=$env:APPVEYOR_REPO_COMMIT;
20+
version=$env:version; versionType=$env:versionType;
21+
apiVersion=$apiVersion; apiCompatTo=$apiCompatTo;
22+
avVersion=$env:APPVEYOR_BUILD_VERSION;
23+
branch=$env:APPVEYOR_REPO_BRANCH;
24+
exe=$exe; hash=$hash;
25+
artifacts=$artifacts
26+
}
27+
ConvertTo-Json -InputObject $data -Compress | Out-File -FilePath deploy.json
28+
Push-AppveyorArtifact deploy.json
29+
# Execute the deploy script on the NV Access server via ssh.
30+
# Warning: if the server address is changed,
31+
# The new address must be also included in appveyor\ssh_known_hosts in this repo
32+
# Otherwise ssh will freeze on input!
33+
cat deploy.json | ssh nvaccess@deploy.nvaccess.org nvdaAppveyorHook
2534
}
26-
ConvertTo-Json -InputObject $data -Compress | Out-File -FilePath deploy.json
27-
Push-AppveyorArtifact deploy.json
28-
# Execute the deploy script on the NV Access server via ssh.
29-
# Warning: if the server address is changed,
30-
# The new address must be also included in appveyor\ssh_known_hosts in this repo
31-
# Otherwise ssh will freeze on input!
32-
cat deploy.json | ssh nvaccess@deploy.nvaccess.org nvdaAppveyorHook
3335

34-
# Upload symbols to Mozilla.
35-
py -m pip install --upgrade --no-warn-script-location pip
36-
py -m pip install --no-warn-script-location requests
37-
Try {
38-
py appveyor\mozillaSyms.py
39-
}
40-
Catch {
41-
Add-AppveyorMessage "Unable to upload symbols to Mozilla"
36+
# Upload symbols to Mozilla if feature enabled.
37+
if ($env:feature_buildSymbols -and $env:feature_uploadSymbolsToMozilla) {
38+
py -m pip install --upgrade --no-warn-script-location pip
39+
py -m pip install --no-warn-script-location requests
40+
Try {
41+
py appveyor\mozillaSyms.py
42+
}
43+
Catch {
44+
Add-AppveyorMessage "Unable to upload symbols to Mozilla"
45+
}
4246
}
4347
}

appveyor/scripts/logCiTiming.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
$inputFile = "../timing.csv"
1010
$processedTimesFile = "buildStageTimingWithElapsed.csv"
1111

12+
# Don't run if timing record was not created for some reason
13+
if (!(Test-Path -LiteralPath $inputFile)) {
14+
exit
15+
}
16+
1217
$entries = Import-Csv -Path $inputFile -Header Stage, Time
1318
$lastTime = Get-Date -Date $entries[0].Time
1419

appveyor/scripts/pushPackagingInfo.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,9 @@ $appVeyorUrl = "https://ci.appveyor.com"
66
$exe = Get-ChildItem -Name output\*.exe
77
if($?){
88
$exeUrl="$appVeyorUrl/api/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/output/$exe"
9-
Add-AppveyorMessage "Build (for testing PR): $exeUrl"
9+
if ($env:APPVEYOR_PULL_REQUEST_NUMBER -ne $null) {
10+
Add-AppveyorMessage "Build (for testing PR): $exeUrl"
11+
} else {
12+
Add-AppveyorMessage "Build (for testing branch): $exeUrl"
13+
}
1014
}

appveyor/scripts/setSconsArgs.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
$ErrorActionPreference = "Stop";
22
$sconsOutTargets = "launcher developerGuide changes userGuide keyCommands client moduleList"
3-
if(!$env:APPVEYOR_PULL_REQUEST_NUMBER) {
3+
if(!$env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:feature_buildAppx) {
44
$sconsOutTargets += " appx"
55
}
66
$sconsArgs = "version=$env:version"
@@ -10,8 +10,8 @@ if ($env:release) {
1010
if ($env:versionType) {
1111
$sconsArgs += " updateVersionType=$env:versionType"
1212
}
13-
$sconsArgs += ' publisher="NV Access"'
14-
if(!$env:APPVEYOR_PULL_REQUEST_NUMBER) {
13+
$sconsArgs += " publisher=`"$env:scons_publisher`""
14+
if (!$env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:feature_signing) {
1515
$sconsArgs += " certFile=appveyor\authenticode.pfx certTimestampServer=http://timestamp.digicert.com"
1616
}
1717
$sconsArgs += " version_build=$env:APPVEYOR_BUILD_NUMBER"

user_docs/en/changes.t2t

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ What's New in NVDA
6363
Please refer to [the developer guide https://www.nvaccess.org/files/nvda/documentation/developerGuide.html#API] for information on NVDA's API deprecation and removal process.
6464

6565
- Instantiating ``winVersion.WinVersion`` objects with unknown Windows versions above 10.0.22000 such as 10.0.25398 returns "Windows 11 unknown" instead of "Windows 10 unknown" for release name. (#15992, @josephsl)
66+
- Make the Appveyor compilation process easier for private NVDA builds, by using variables in appveyor.yml to disable or modify portions of the build scripts which are otherwise difficult for those outside NV Access to run in their default form. (#16216, @XLTechie)
6667
-
6768

6869
=== Deprecations ===

0 commit comments

Comments
 (0)