comparison deploy/win64/build-and-package.bat @ 2394:32107caa1aaa

Add /a flag to do the right thing if more than one cert is found
author Chris Cannam
date Tue, 22 Oct 2019 16:32:14 +0100
parents 0a2cdcbc22e6
children c956435cb3e8
comparison
equal deleted inserted replaced
2389:0a2cdcbc22e6 2394:32107caa1aaa
21 if "%ARG%" == "sign" ( 21 if "%ARG%" == "sign" (
22 @ echo NOTE: sign option specified, will attempt to codesign exe and msi 22 @ echo NOTE: sign option specified, will attempt to codesign exe and msi
23 @ echo NOTE: starting by codesigning an unrelated executable, so we know 23 @ echo NOTE: starting by codesigning an unrelated executable, so we know
24 @ echo NOTE: whether it'll work before doing the entire build 24 @ echo NOTE: whether it'll work before doing the entire build
25 copy sv-dependency-builds\win64-msvc\bin\capnp.exe signtest.exe 25 copy sv-dependency-builds\win64-msvc\bin\capnp.exe signtest.exe
26 signtool sign /v /n "%NAME%" /t http://time.certum.pl /fd sha1 signtest.exe 26 signtool sign /v /n /a "%NAME%" /t http://time.certum.pl /fd sha1 signtest.exe
27 if errorlevel 1 exit /b %errorlevel% 27 if errorlevel 1 exit /b %errorlevel%
28 signtool verify /pa signtest.exe 28 signtool verify /pa signtest.exe
29 if errorlevel 1 exit /b %errorlevel% 29 if errorlevel 1 exit /b %errorlevel%
30 del signtest.exe 30 del signtest.exe
31 @ echo NOTE: success 31 @ echo NOTE: success
41 call .\deploy\win32\build-32.bat 41 call .\deploy\win32\build-32.bat
42 if %errorlevel% neq 0 exit /b %errorlevel% 42 if %errorlevel% neq 0 exit /b %errorlevel%
43 43
44 if "%ARG%" == "sign" ( 44 if "%ARG%" == "sign" (
45 @echo Signing 32-bit executables and libraries 45 @echo Signing 32-bit executables and libraries
46 signtool sign /v /n "%NAME%" /t http://time.certum.pl /fd sha1 build_win32\release\*.exe build_win32\release\*.dll 46 signtool sign /v /n /a "%NAME%" /t http://time.certum.pl /fd sha1 build_win32\release\*.exe build_win32\release\*.dll
47 ) 47 )
48 48
49 @echo Rebuilding 64-bit 49 @echo Rebuilding 64-bit
50 50
51 cd %STARTPWD% 51 cd %STARTPWD%
53 call .\deploy\win64\build-64.bat 53 call .\deploy\win64\build-64.bat
54 if %errorlevel% neq 0 exit /b %errorlevel% 54 if %errorlevel% neq 0 exit /b %errorlevel%
55 55
56 if "%ARG%" == "sign" ( 56 if "%ARG%" == "sign" (
57 @echo Signing 64-bit executables and libraries 57 @echo Signing 64-bit executables and libraries
58 signtool sign /v /n "%NAME%" /t http://time.certum.pl /fd sha1 build_win64\release\*.exe build_win64\release\*.dll 58 signtool sign /v /n /a "%NAME%" /t http://time.certum.pl /fd sha1 build_win64\release\*.exe build_win64\release\*.dll
59 ) 59 )
60 60
61 set PATH=%PATH%;"C:\Program Files (x86)\WiX Toolset v3.11\bin" 61 set PATH=%PATH%;"C:\Program Files (x86)\WiX Toolset v3.11\bin"
62 62
63 @echo Packaging 32-bit 63 @echo Packaging 32-bit
70 del sonic-visualiser.wixobj 70 del sonic-visualiser.wixobj
71 del sonic-visualiser.wixpdb 71 del sonic-visualiser.wixpdb
72 72
73 if "%ARG%" == "sign" ( 73 if "%ARG%" == "sign" (
74 @echo Signing 32-bit package 74 @echo Signing 32-bit package
75 signtool sign /v /n "%NAME%" /t http://time.certum.pl /fd sha1 sonic-visualiser.msi 75 signtool sign /v /n /a "%NAME%" /t http://time.certum.pl /fd sha1 sonic-visualiser.msi
76 signtool verify /pa sonic-visualiser.msi 76 signtool verify /pa sonic-visualiser.msi
77 ) 77 )
78 78
79 @echo Packaging 64-bit 79 @echo Packaging 64-bit
80 80
86 del sonic-visualiser.wixobj 86 del sonic-visualiser.wixobj
87 del sonic-visualiser.wixpdb 87 del sonic-visualiser.wixpdb
88 88
89 if "%ARG%" == "sign" ( 89 if "%ARG%" == "sign" (
90 @echo Signing 64-bit package 90 @echo Signing 64-bit package
91 signtool sign /v /n "%NAME%" /t http://time.certum.pl /fd sha1 sonic-visualiser.msi 91 signtool sign /v /n /a "%NAME%" /t http://time.certum.pl /fd sha1 sonic-visualiser.msi
92 signtool verify /pa sonic-visualiser.msi 92 signtool verify /pa sonic-visualiser.msi
93 ) 93 )
94 94
95 set PATH=%ORIGINALPATH% 95 set PATH=%ORIGINALPATH%
96 96