From 0098fe27dfdf543d465c3438108c194b7a56114d Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 14 Jan 2016 15:32:56 -0800 Subject: [PATCH] don't uninstall a previously installed section from the installer --- cmake/templates/NSIS.template.in | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cmake/templates/NSIS.template.in b/cmake/templates/NSIS.template.in index d38d29b1f4..c49442ee1f 100644 --- a/cmake/templates/NSIS.template.in +++ b/cmake/templates/NSIS.template.in @@ -147,10 +147,14 @@ Var AR_RegFlags IntOp $AR_SecFlags $AR_SecFlags & ${SF_SELECTED} IntCmp $AR_SecFlags 1 "leave_${SecName}" ;Section is not selected: - ;Calling Section uninstall macro and writing zero installed flag - !insertmacro "Remove_${${SecName}}" - WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" \ - "Installed" 0 + + ; NOTE: The default CPack template calls Section uninstall macro and writes zero installed flag + ; We do not do that here because it would absolutely cause issues with shared dependencies + + ;!insertmacro "Remove_${${SecName}}" + ;WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" \ + ; "Installed" 0 + Goto "exit_${SecName}" "leave_${SecName}:"