Merge pull request #14853 from SimonWalton-HiFi/installer-removes

Case 20496: Windows (NSIS) installer shouldn't remove unselected component upon reinstall
This commit is contained in:
Simon Walton 2019-02-14 15:41:25 -08:00 committed by GitHub
commit 75901a1e37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -300,6 +300,8 @@ Var substringResult
SectionGetFlags ${${SecName}} $AR_SecFlags ;Reading section flags
;Checking lowest bit:
IntOp $AR_SecFlags $AR_SecFlags & ${SF_SELECTED}
!insertmacro LoadVar ${SecName}_was_installed
IntOp $AR_SecFlags $AR_SecFlags | $R0
IntCmp $AR_SecFlags 1 "leave_${SecName}"
;Section is not selected:
@ -478,18 +480,6 @@ Var GAClientID
;--------------------------------
; Installation types
Section "-Previous Install Cleanup"
; Remove the resources folder so we don't end up including removed QML files
RMDir /r "$INSTDIR\resources"
; delete old assignment-client and domain-server so they're no longer present
; in client only installs.
Delete "$INSTDIR\@DS_EXEC_NAME@"
Delete "$INSTDIR\@AC_EXEC_NAME@"
; delete interface so it's not there for server-only installs
Delete "$INSTDIR\@INTERFACE_WIN_EXEC_NAME@"
SectionEnd
@CPACK_NSIS_INSTALLATION_TYPES@