Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.

Commit 465cb37

Browse files
author
Dirk Lemstra
committed
The executables and libraries will now be signed.
1 parent b760b32 commit 465cb37

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

AppVeyor/Build.ps1

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ function BuildConfiguration($config)
9898
msbuild $config.solution /m:4 /t:Rebuild ("/p:Configuration=Release,Platform=$platformName")
9999
CheckExitCode "Failed to build: $($config.name)"
100100

101+
SignFiles "bin\*.exe"
102+
SignFiles "bin\*.dll"
103+
101104
Set-Location ../AppVeyor
102105

103106
if ($config.perl -eq $true)
@@ -147,6 +150,7 @@ function CreateInstaller($config)
147150
CheckExitCode "Failed to create setup executable."
148151

149152
Get-ChildItem -Path ..\VisualMagick\installer\output\*.exe -Recurse | Move-Item -Destination ..\Windows-Distribution
153+
SignFiles "..\Windows-Distribution\*.exe"
150154
}
151155

152156
function CreateZipFile($fileName, $directory)
@@ -217,14 +221,10 @@ function CreateSource($version)
217221
CreateZipFile $output ".\Source"
218222
}
219223

220-
function CheckUpload()
224+
function SignFiles($files)
221225
{
222-
# $day = (Get-Date).DayOfWeek
223-
# if ($day -ne "Saturday" -And $day -ne "Sunday")
224-
# {
225-
# Write-Host "Only uploading in the weekend."
226-
# Remove-Item ..\Windows-Distribution\*
227-
# }
226+
& $env:SignTool sign /f $env:KeyFile /p "$env:CertPassword" /t http://timestamp.comodoca.com $files
227+
CheckExitCode "Failed to sign files."
228228
}
229229

230230
$platform = $args[0]
@@ -250,5 +250,4 @@ else
250250
BuildConfigure
251251
BuildConfiguration $config
252252
CreatePackage $config $version
253-
CheckUpload
254253
}

appveyor.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ matrix:
1212

1313
environment:
1414

15+
PfxUri:
16+
secure: bQc3Nboe/KLQhUg19FYGyNxL+w6OQ7pTTE2OXPBi2JD9aQICOH9ZNO8MRioScKRSeMR39Jw1T/s3Pnz5pZ2K4pbntOqS5FnF94VnKkekee9MYHOnhSOMh4YrI9D+HmRdTuC+Q0B6IsO2gC1iATI7y2RkbB7cOHYgycyGVuotLVs=
17+
KeyFile: C:\ImageMagick\ImageMagick.pfx
18+
19+
SignTool: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\signtool.exe
20+
CertPassword:
21+
secure: FPTUZszs2LsBXvLLO0u7rD/UJaT2IbyNZAxL9Kjhq4VSZB/hTDq87E7qNN+Wfj+F
22+
1523
matrix:
1624
- im_platform: "x64"
1725
im_name: "dll-Q8"
@@ -50,6 +58,7 @@ environment:
5058
im_name: "source"
5159

5260
install:
61+
- ps: Start-FileDownload $env:PfxUri -FileName $env:KeyFile
5362
- cd AppVeyor
5463
- Install.cmd %im_platform%
5564

0 commit comments

Comments
 (0)