Windows/NSIS installer: use signtool.exe found by CMake
This commit is contained in:
@@ -228,6 +228,7 @@ if (WIN32)
|
||||
if (NOT SIGNTOOL)
|
||||
message(FATAL_ERROR "Unable to locate signtool.exe used for code signing")
|
||||
endif()
|
||||
add_definitions(-DSIGNTOOL="${SIGNTOOL}")
|
||||
|
||||
add_custom_command(TARGET ${PROJECT_NAME}
|
||||
POST_BUILD
|
||||
|
||||
@@ -63,13 +63,13 @@ InstallDir "$PROGRAMFILES\Raspberry Pi Imager"
|
||||
; That will have written an uninstaller binary for us. Now we sign it with your
|
||||
; favorite code signing tool.
|
||||
|
||||
!system '"c:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool\signtool.exe" sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 /a "$%TEMP%\uninstall.exe"' = 0
|
||||
!system '"@SIGNTOOL@" sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 /a "$%TEMP%\uninstall.exe"' = 0
|
||||
|
||||
; Good. Now we can carry on writing the real installer.
|
||||
|
||||
OutFile "${INSTALLER_NAME}"
|
||||
SetCompressor /SOLID lzma
|
||||
!finalize '"c:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool\signtool.exe" sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 /a "%1"'
|
||||
!finalize '"@SIGNTOOL@" sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 /a "%1"'
|
||||
!endif
|
||||
|
||||
###
|
||||
|
||||
Reference in New Issue
Block a user