make ${WinVerGetServicePackLevel} accept an output variable again
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5807 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
7524b7c256
commit
f1cd865190
2 changed files with 11 additions and 9 deletions
|
@ -405,28 +405,30 @@
|
||||||
|
|
||||||
# service pack macros
|
# service pack macros
|
||||||
|
|
||||||
!macro _WinVer_GetServicePackLevel
|
!macro _WinVer_GetServicePackLevel OUTVAR
|
||||||
!insertmacro _LOGICLIB_TEMP
|
|
||||||
${CallArtificialFunction} __WinVer_InitVars
|
${CallArtificialFunction} __WinVer_InitVars
|
||||||
IntOp $_LOGICLIB_TEMP $__WINVERSP & ${_WINVER_MASKSP}
|
IntOp ${OUTVAR} $__WINVERSP & ${_WINVER_MASKSP}
|
||||||
IntOp $_LOGICLIB_TEMP $_LOGICLIB_TEMP >> 16
|
IntOp ${OUTVAR} ${OUTVAR} >> 16
|
||||||
!macroend
|
!macroend
|
||||||
!define WinVerGetServicePackLevel '!insertmacro _WinVer_GetServicePackLevel '
|
!define WinVerGetServicePackLevel '!insertmacro _WinVer_GetServicePackLevel '
|
||||||
|
|
||||||
!macro _AtLeastServicePack _a _b _t _f
|
!macro _AtLeastServicePack _a _b _t _f
|
||||||
${WinVerGetServicePackLevel}
|
!insertmacro _LOGICLIB_TEMP
|
||||||
|
${WinVerGetServicePackLevel} $_LOGICLIB_TEMP
|
||||||
!insertmacro _>= $_LOGICLIB_TEMP `${_b}` `${_t}` `${_f}`
|
!insertmacro _>= $_LOGICLIB_TEMP `${_b}` `${_t}` `${_f}`
|
||||||
!macroend
|
!macroend
|
||||||
!define AtLeastServicePack `"" AtLeastServicePack`
|
!define AtLeastServicePack `"" AtLeastServicePack`
|
||||||
|
|
||||||
!macro _AtMostServicePack _a _b _t _f
|
!macro _AtMostServicePack _a _b _t _f
|
||||||
${WinVerGetServicePackLevel}
|
!insertmacro _LOGICLIB_TEMP
|
||||||
|
${WinVerGetServicePackLevel} $_LOGICLIB_TEMP
|
||||||
!insertmacro _<= $_LOGICLIB_TEMP `${_b}` `${_t}` `${_f}`
|
!insertmacro _<= $_LOGICLIB_TEMP `${_b}` `${_t}` `${_f}`
|
||||||
!macroend
|
!macroend
|
||||||
!define AtMostServicePack `"" AtMostServicePack`
|
!define AtMostServicePack `"" AtMostServicePack`
|
||||||
|
|
||||||
!macro _IsServicePack _a _b _t _f
|
!macro _IsServicePack _a _b _t _f
|
||||||
${WinVerGetServicePackLevel}
|
!insertmacro _LOGICLIB_TEMP
|
||||||
|
${WinVerGetServicePackLevel} $_LOGICLIB_TEMP
|
||||||
!insertmacro _= $_LOGICLIB_TEMP `${_b}` `${_t}` `${_f}`
|
!insertmacro _= $_LOGICLIB_TEMP `${_b}` `${_t}` `${_f}`
|
||||||
!macroend
|
!macroend
|
||||||
!define IsServicePack `"" IsServicePack`
|
!define IsServicePack `"" IsServicePack`
|
||||||
|
|
|
@ -239,11 +239,11 @@ Var OSVERSIONINFOEX_INIT
|
||||||
${OrIf} ${IsServicePack} $0
|
${OrIf} ${IsServicePack} $0
|
||||||
${OrIf} ${IsServicePack} $1
|
${OrIf} ${IsServicePack} $1
|
||||||
|
|
||||||
!insertmacro _WinVer_GetServicePackLevel
|
${WinVerGetServicePackLevel} $2
|
||||||
|
|
||||||
DetailPrint "Service pack detection failed for ${NAME}"
|
DetailPrint "Service pack detection failed for ${NAME}"
|
||||||
DetailPrint " Expected: ${SP}"
|
DetailPrint " Expected: ${SP}"
|
||||||
DetailPrint " Got: $_LOGICLIB_TEMP"
|
DetailPrint " Got: $2"
|
||||||
|
|
||||||
StrCpy $R0 "FAILURE"
|
StrCpy $R0 "FAILURE"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue