Skip to content

Commit 4a8fb06

Browse files
committed
nsis: sign uninstaller, maybe
1 parent ad56638 commit 4a8fb06

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

cmake/CodeSign.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ elseif(WIN32)
121121
/td SHA256
122122
/dlib "${TRUSTED_SIGNING_DLIB}"
123123
/dmdf "${METADATA_FILE}")
124-
set(SIGNTOOL_CMD "${SIGNTOOL_CMD}" PARENT_SCOPE)
124+
# set(SIGNTOOL_CMD "${SIGNTOOL_CMD}" PARENT_SCOPE)
125125

126126
add_custom_target(sign-products
127127
COMMAND ${SIGNTOOL_CMD} "${VST3_BINARY}"

cmake/Packaging.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ elseif(WIN32)
4040
set(CPACK_NSIS_CLAP_INSTALL_DIRECTORY "$COMMONFILES64\\\\CLAP")
4141
set(CPACK_NSIS_LV2_INSTALL_DIRECTORY "$COMMONFILES64\\\\LV2")
4242
set(CPACK_NSIS_VST3_INSTALL_DIRECTORY "$COMMONFILES64\\\\VST3")
43+
44+
# Sign the uninstaller using !uninstfinalize
45+
if(SIGNTOOL_CMD)
46+
message(STATUS "NSIS: sign uninstaller")
47+
string(REPLACE ";" " " SIGNTOOL_CMD_STR "${SIGNTOOL_CMD}")
48+
set(CPACK_NSIS_DEFINES "!uninstfinalize '${SIGNTOOL_CMD_STR} \"%1\"'")
49+
endif()
4350
else()
4451
set(CPACK_GENERATOR "ZIP")
4552
set(CPACK_SET_DESTDIR OFF)

0 commit comments

Comments
 (0)