Added LIBRARY_INSTALL_EQUAL_VERSION option

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7014 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2018-10-08 12:50:09 +00:00
parent a852d07897
commit ab70b857b5
3 changed files with 37 additions and 13 deletions

View file

@ -146,6 +146,13 @@
!macroend
!macro __InstallLib_Helper_CmpPackedVer64 oldhi oldlo newhi newlo jeq jle jgt
IntCmpU ${oldhi} ${newhi} 0 ${jle} ${jgt}
IntCmpU ${oldlo} ${newlo} ${jeq} ${jle} ${jgt}
!macroend
### Get library version
!macro __InstallLib_Helper_GetVersion TYPE FILE
@ -314,9 +321,13 @@
!ifndef INSTALLLIB_LIBTYPE_TLB & INSTALLLIB_LIBTYPE_REGDLLTLB
IntCmpU $R0 $R2 0 "installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
IntCmpU $R1 $R3 "installlib.register_${INSTALLLIB_UNIQUE}" "installlib.register_${INSTALLLIB_UNIQUE}" \
"installlib.upgrade_${INSTALLLIB_UNIQUE}"
!ifdef LIBRARY_INSTALL_EQUAL_VERSION
!insertmacro __InstallLib_Helper_CmpPackedVer64 $R0 $R1 $R2 $R3 "installlib.upgrade_${INSTALLLIB_UNIQUE}" \
"installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
!else
!insertmacro __InstallLib_Helper_CmpPackedVer64 $R0 $R1 $R2 $R3 "installlib.register_${INSTALLLIB_UNIQUE}" \
"installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
!endif
!else
@ -328,15 +339,18 @@
!ifndef LIBRARY_VERSION_NONE
IntCmpU $R0 $R2 0 "installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
IntCmpU $R1 $R3 0 "installlib.register_${INSTALLLIB_UNIQUE}" \
"installlib.upgrade_${INSTALLLIB_UNIQUE}"
!insertmacro __InstallLib_Helper_CmpPackedVer64 $R0 $R1 $R2 $R3 0 \
"installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
!else
IntCmpU $R0 $R2 0 "installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
IntCmpU $R1 $R3 "installlib.register_${INSTALLLIB_UNIQUE}" "installlib.register_${INSTALLLIB_UNIQUE}" \
"installlib.upgrade_${INSTALLLIB_UNIQUE}"
!ifdef LIBRARY_INSTALL_EQUAL_VERSION
!insertmacro __InstallLib_Helper_CmpPackedVer64 $R0 $R1 $R2 $R3 "installlib.upgrade_${INSTALLLIB_UNIQUE}" \
"installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
!else
!insertmacro __InstallLib_Helper_CmpPackedVer64 $R0 $R1 $R2 $R3 "installlib.register_${INSTALLLIB_UNIQUE}" \
"installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
!endif
!endif
@ -377,9 +391,13 @@
Pop $R3
Pop $R2
IntCmpU $R0 $R2 0 "installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
IntCmpU $R1 $R3 "installlib.register_${INSTALLLIB_UNIQUE}" "installlib.register_${INSTALLLIB_UNIQUE}" \
"installlib.upgrade_${INSTALLLIB_UNIQUE}"
!ifdef LIBRARY_INSTALL_EQUAL_VERSION
!insertmacro __InstallLib_Helper_CmpPackedVer64 $R0 $R1 $R2 $R3 "installlib.upgrade_${INSTALLLIB_UNIQUE}" \
"installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
!else
!insertmacro __InstallLib_Helper_CmpPackedVer64 $R0 $R1 $R2 $R3 "installlib.register_${INSTALLLIB_UNIQUE}" \
"installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
!endif
!undef LIBRARY_VERSION_HIGH
!undef LIBRARY_VERSION_LOW
@ -392,7 +410,7 @@
!endif
!endif
!endif ;~LIBRARY_IGNORE_VERSION
;------------------------
;Upgrade