diff --git a/cmake/macros/SetPackagingParameters.cmake b/cmake/macros/SetPackagingParameters.cmake index 2c8443d510..89899bd669 100644 --- a/cmake/macros/SetPackagingParameters.cmake +++ b/cmake/macros/SetPackagingParameters.cmake @@ -51,6 +51,10 @@ macro(SET_PACKAGING_PARAMETERS) set(USE_STABLE_GLOBAL_SERVICES 1) endif () + if (NOT BYPASS_SIGNING) + set(BYPASS_SIGNING 0) + endif () + elseif (RELEASE_TYPE STREQUAL "PR") set(DEPLOY_PACKAGE TRUE) set(PR_BUILD 1) diff --git a/cmake/templates/CPackProperties.cmake.in b/cmake/templates/CPackProperties.cmake.in index 68fa098508..1d7effd18f 100644 --- a/cmake/templates/CPackProperties.cmake.in +++ b/cmake/templates/CPackProperties.cmake.in @@ -50,3 +50,4 @@ set(SERVER_COMPONENT_CONDITIONAL "@SERVER_COMPONENT_CONDITIONAL@") set(CLIENT_COMPONENT_CONDITIONAL "@CLIENT_COMPONENT_CONDITIONAL@") set(INSTALLER_TYPE "@INSTALLER_TYPE@") set(APP_USER_MODEL_ID "@APP_USER_MODEL_ID@") +set(BYPASS_SIGNING "@BYPASS_SIGNING@") diff --git a/cmake/templates/NSIS.template.in b/cmake/templates/NSIS.template.in index ebefe829ed..7f6884f478 100644 --- a/cmake/templates/NSIS.template.in +++ b/cmake/templates/NSIS.template.in @@ -130,10 +130,10 @@ ; The Inner invocation has written an uninstaller binary for us. ; We need to sign it if it's a production or PR build. !if @PRODUCTION_BUILD@ == 1 - !if /FileExists "$%HF_PFX_FILE%" - !system '"@SIGNTOOL_EXECUTABLE@" sign /fd sha256 /f %HF_PFX_FILE% /p %HF_PFX_PASSPHRASE% /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /td SHA256 $%TEMP%\@UNINSTALLER_NAME@' = 0 + !if @BYPASS_SIGNING@ == 1 + !warning "BYPASS_SIGNING set - installer will not be signed" !else - !warning "No signing file - installer will not be signed" + !system '"@SIGNTOOL_EXECUTABLE@" sign /fd sha256 /f %HF_PFX_FILE% /p %HF_PFX_PASSPHRASE% /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /td SHA256 $%TEMP%\@UNINSTALLER_NAME@' = 0 !endif !endif