<div dir="ltr"><div>Hi Christophe,<br><br></div>I think it's best to keep the patches as-as, as it will make it simpler to both review and revert in the future.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 6, 2017 at 2:25 PM, Christophe Fergeau <span dir="ltr"><<a href="mailto:cfergeau@redhat.com" target="_blank">cfergeau@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, Mar 06, 2017 at 01:23:43PM +0200, Lev Veyde wrote:<br>
> Hi,<br>
><br>
> Attached are 3 patches: 2 patches for adding general support for Microsoft<br>
> Windows Server 2016,<br>
> and an additional patch that adds the support to the installer itself.<br>
<br>
</span>For the series<br>
Acked-by: Christophe Fergeau <<a href="mailto:cfergeau@redhat.com">cfergeau@redhat.com</a>><br>
<br>
I would squash patch 2/3 and 3/3 fwiw.<br>
<br>
Christophe<br>
<span class=""><br>
><br>
> --<br>
><br>
> Thanks in advance,<br>
> Lev Veyde.<br>
> (RHCE, RHCVA, MCITP)<br>
<br>
</span>> From b2cc5a8b9d8866a9bdbc8289c4fcbd<wbr>6ef192ccbf Mon Sep 17 00:00:00 2001<br>
> From: Lev Veyde <<a href="mailto:lveyde@redhat.com">lveyde@redhat.com</a>><br>
> Date: Mon, 6 Mar 2017 12:56:09 +0200<br>
> Subject: [PATCH 1/2] Re-introduce WinVer.nsh<br>
><br>
> This patch returns WinVer.nsh as it currently appears in NSIS 3.x<br>
> This is done so that we can apply our own local changes, specifically<br>
> adding support for currently unsupported OSes.<br>
><br>
> Change-Id: I83882f681f8da8faee1a394ac58fe<wbr>120fb41e6a6<br>
> Signed-off-by: Lev Veyde <<a href="mailto:lveyde@redhat.com">lveyde@redhat.com</a>><br>
> ---<br>
> WinVer.nsh | 509 ++++++++++++++++++++++++++++++<wbr>++++++++++++++++++++++++++++++<br>
> 1 files changed, 509 insertions(+), 0 deletions(-)<br>
> create mode 100644 WinVer.nsh<br>
><br>
> diff --git a/WinVer.nsh b/WinVer.nsh<br>
> new file mode 100644<br>
> index 0000000..facf28d<br>
> --- /dev/null<br>
> +++ b/WinVer.nsh<br>
> @@ -0,0 +1,509 @@<br>
> +; ---------------------<br>
> +; WinVer.nsh<br>
> +; ---------------------<br>
> +;<br>
> +; LogicLib extensions for handling Windows versions and service packs.<br>
> +;<br>
> +; IsNT checks if the installer is running on Windows NT family (NT4, 2000, XP, etc.)<br>
> +;<br>
> +; ${If} ${IsNT}<br>
> +; DetailPrint "Running on NT. Installing Unicode enabled application."<br>
> +; ${Else}<br>
> +; DetailPrint "Not running on NT. Installing ANSI application."<br>
> +; ${EndIf}<br>
> +;<br>
> +; IsServerOS checks if the installer is running on a server version of Windows (NT4, 2003, 2008, etc.)<br>
> +;<br>
> +; AtLeastWin<version> checks if the installer is running on Windows version at least as specified.<br>
> +; IsWin<version> checks if the installer is running on Windows version exactly as specified.<br>
> +; AtMostWin<version> checks if the installer is running on Windows version at most as specified.<br>
> +;<br>
> +; <version> can be replaced with the following values:<br>
> +;<br>
> +; 95<br>
> +; 98<br>
> +; ME<br>
> +;<br>
> +; NT4<br>
> +; 2000<br>
> +; XP<br>
> +; 2003<br>
> +; Vista<br>
> +; 2008<br>
> +; 7<br>
> +; 2008R2<br>
> +; 8<br>
> +; 2012<br>
> +; 8.1<br>
> +; 2012R2<br>
> +; 10<br>
> +;<br>
> +; Note: Windows 8.1 and later will be detected as Windows 8 unless ManifestSupportedOS is set correctly!<br>
> +;<br>
> +; AtLeastServicePack checks if the installer is running on Windows service pack version at least as specified.<br>
> +; IsServicePack checks if the installer is running on Windows service pack version exactly as specified.<br>
> +; AtMostServicePack checks if the installer is running on Windows service version pack at most as specified.<br>
> +;<br>
> +; Usage examples:<br>
> +;<br>
> +; ${If} ${IsNT}<br>
> +; DetailPrint "Running on NT family."<br>
> +; DetailPrint "Surely not running on 95, 98 or ME."<br>
> +; ${AndIf} ${AtLeastWinNT4}<br>
> +; DetailPrint "Running on NT4 or better. Could even be 2003."<br>
> +; ${EndIf}<br>
> +;<br>
> +; ${If} ${AtLeastWinXP}<br>
> +; DetailPrint "Running on XP or better."<br>
> +; ${EndIf}<br>
> +;<br>
> +; ${If} ${IsWin2000}<br>
> +; DetailPrint "Running on 2000."<br>
> +; ${EndIf}<br>
> +;<br>
> +; ${If} ${IsWin2000}<br>
> +; ${AndIf} ${AtLeastServicePack} 3<br>
> +; ${OrIf} ${AtLeastWinXP}<br>
> +; DetailPrint "Running Win2000 SP3 or above"<br>
> +; ${EndIf}<br>
> +;<br>
> +; ${If} ${AtMostWinXP}<br>
> +; DetailPrint "Running on XP or older. Surely not running on Vista. Maybe 98, or even 95."<br>
> +; ${EndIf}<br>
> +;<br>
> +; Warning:<br>
> +;<br>
> +; Windows 95 and NT both use the same version number. To avoid getting NT4 misidentified<br>
> +; as Windows 95 and vice-versa or 98 as a version higher than NT4, always use IsNT to<br>
> +; check if running on the NT family.<br>
> +;<br>
> +; ${If} ${AtLeastWin95}<br>
> +; ${And} ${AtMostWinME}<br>
> +; DetailPrint "Running 95, 98 or ME."<br>
> +; DetailPrint "Actually, maybe it's NT4?"<br>
> +; ${If} ${IsNT}<br>
> +; DetailPrint "Yes, it's NT4! oops..."<br>
> +; ${Else}<br>
> +; DetailPrint "Nope, not NT4. phew..."<br>
> +; ${EndIf}<br>
> +; ${EndIf}<br>
> +;<br>
> +;<br>
> +; Other useful extensions are:<br>
> +;<br>
> +; * IsWin2003R2<br>
> +; * IsStarterEdition<br>
> +; * OSHasMediaCenter<br>
> +; * OSHasTabletSupport<br>
> +;<br>
> +<br>
> +!verbose push<br>
> +!verbose 3<br>
> +<br>
> +!ifndef ___WINVER__NSH___<br>
> +!define ___WINVER__NSH___<br>
> +<br>
> +!include LogicLib.nsh<br>
> +!include Util.nsh<br>
> +<br>
> +# masks for our variables<br>
> +<br>
> +!define _WINVER_VERXBIT 0x00000001<br>
> +!define _WINVER_MASKVMAJ 0x7F000000<br>
> +!define _WINVER_MASKVMIN 0x00FF0000<br>
> +<br>
> +!define _WINVER_NTBIT 0x80000000<br>
> +!define _WINVER_NTMASK 0x7FFFFFFF<br>
> +!define _WINVER_NTSRVBIT 0x40000000<br>
> +!define _WINVER_MASKVBLD 0x0000FFFF<br>
> +!define _WINVER_MASKSP 0x000F0000<br>
> +<br>
> +# possible variable values for different versions<br>
> +<br>
> +!define WINVER_95_NT 0x04000000 ;4.00.0950<br>
> +!define WINVER_95 0x04000000 ;4.00.0950<br>
> +!define WINVER_98_NT 0x040a0000 ;4.10.1998<br>
> +!define WINVER_98 0x040a0000 ;4.10.1998<br>
> +;define WINVER_98SE 0x040a0000 ;4.10.2222<br>
> +!define WINVER_ME_NT 0x045a0000 ;4.90.3000<br>
> +!define WINVER_ME 0x045a0000 ;4.90.3000<br>
> +;define WINVER_NT3.51 ;3.51.1057<br>
> +!define WINVER_NT4_NT 0x84000000 ;4.00.1381<br>
> +!define WINVER_NT4 0x04000000 ;4.00.1381<br>
> +!define WINVER_2000_NT 0x85000000 ;5.00.2195<br>
> +!define WINVER_2000 0x05000000 ;5.00.2195<br>
> +!define WINVER_XP_NT 0x85010000 ;5.01.2600<br>
> +!define WINVER_XP 0x05010000 ;5.01.2600<br>
> +;define WINVER_XP64 ;5.02.3790<br>
> +!define WINVER_2003_NT 0x85020000 ;5.02.3790<br>
> +!define WINVER_2003 0x05020000 ;5.02.3790<br>
> +!define WINVER_VISTA_NT 0x86000000 ;6.00.6000<br>
> +!define WINVER_VISTA 0x06000000 ;6.00.6000<br>
> +!define WINVER_2008_NT 0x86000001 ;6.00.6001<br>
> +!define WINVER_2008 0x06000001 ;6.00.6001<br>
> +!define WINVER_7_NT 0x86010000 ;6.01.7600<br>
> +!define WINVER_7 0x06010000 ;6.01.7600<br>
> +!define WINVER_2008R2_NT 0x86010001 ;6.01.7600<br>
> +!define WINVER_2008R2 0x06010001 ;6.01.7600<br>
> +!define WINVER_8_NT 0x86020000 ;6.02.9200<br>
> +!define WINVER_8 0x06020000 ;6.02.9200<br>
> +!define WINVER_2012_NT 0x86020001 ;6.02.9200<br>
> +!define WINVER_2012 0x06020001 ;6.02.9200<br>
> +!define WINVER_8.1_NT 0x86030000 ;6.03.9600<br>
> +!define WINVER_8.1 0x06030000 ;6.03.9600<br>
> +!define WINVER_2012R2_NT 0x86030001 ;6.03.9600<br>
> +!define WINVER_2012R2 0x06030001 ;6.03.9600<br>
> +!define WINVER_10_NT 0x8A000000 ;10.0.10240<br>
> +!define WINVER_10 0x0A000000 ;10.0.10240<br>
> +<br>
> +<br>
> +# use this to make all nt > 9x<br>
> +<br>
> +!ifdef WINVER_NT4_OVER_W95<br>
> + !define /redef /math WINVER_NT4 ${WINVER_NT4} | ${_WINVER_VERXBIT}<br>
> +!endif<br>
> +<br>
> +# some definitions from header files<br>
> +<br>
> +!define OSVERSIONINFOW_SIZE 276<br>
> +!define OSVERSIONINFOEXW_SIZE 284<br>
> +!define OSVERSIONINFOA_SIZE 148<br>
> +!define OSVERSIONINFOEXA_SIZE 156<br>
> +!define /ifndef VER_PLATFORM_WIN32_NT 2<br>
> +!define /ifndef VER_NT_WORKSTATION 1<br>
> +<br>
> +!define SM_TABLETPC 86<br>
> +!define SM_MEDIACENTER 87<br>
> +!define SM_STARTER 88<br>
> +!define SM_SERVERR2 89<br>
> +<br>
> +# variable declaration<br>
> +<br>
> +!macro __WinVer_DeclareVars<br>
> +<br>
> + !ifndef __WINVER_VARS_DECLARED<br>
> +<br>
> + !define __WINVER_VARS_DECLARED<br>
> +<br>
> + Var /GLOBAL __WINVERV<br>
> + Var /GLOBAL __WINVERSP<br>
> +<br>
> + !endif<br>
> +<br>
> +!macroend<br>
> +<br>
> +# lazy initialization macro<br>
> +<br>
> +!ifmacrondef __WinVer_Call_GetVersionEx<br>
> +<br>
> + !macro __WinVer_Call_GetVersionEx STRUCT_SIZE<br>
> +<br>
> + System::Call '*$0(i ${STRUCT_SIZE})'<br>
> + System::Call kernel32::GetVersionEx(pr0)i.<wbr>r3<br>
> +<br>
> + !macroend<br>
> +<br>
> +!endif<br>
> +<br>
> +!macro __WinVer_InitVars<br>
> + # variables<br>
> + !insertmacro __WinVer_DeclareVars<br>
> +<br>
> + # only calculate version once<br>
> + StrCmp $__WINVERV "" _winver_noveryet<br>
> + Return<br>
> + _winver_noveryet:<br>
> +<br>
> + # push used registers on the stack<br>
> + Push $0<br>
> + Push $1 ;maj<br>
> + Push $2 ;min<br>
> + Push $3 ;bld<br>
> + Push $R0 ;temp<br>
> +<br>
> + # a plugin call will lock the Unicode mode, it is now safe to set the struct size<br>
> + !ifdef NSIS_UNICODE<br>
> + !define /redef OSVERSIONINFO_SIZE ${OSVERSIONINFOW_SIZE}<br>
> + !define /redef OSVERSIONINFOEX_SIZE ${OSVERSIONINFOEXW_SIZE}<br>
> + !else<br>
> + !define /redef OSVERSIONINFO_SIZE ${OSVERSIONINFOA_SIZE}<br>
> + !define /redef OSVERSIONINFOEX_SIZE ${OSVERSIONINFOEXA_SIZE}<br>
> + !endif<br>
> +<br>
> + # allocate memory<br>
> + System::Call '*(&i${OSVERSIONINFOEX_SIZE})<wbr>p.r0'<br>
> +<br>
> + # use OSVERSIONINFOEX<br>
> + !insertmacro __WinVer_Call_GetVersionEx ${OSVERSIONINFOEX_SIZE}<br>
> +<br>
> + IntCmp $3 0 "" _winver_ex _winver_ex<br>
> + # OSVERSIONINFOEX not allowed (Win9x or NT4 w/SP < 6), use OSVERSIONINFO<br>
> + !insertmacro __WinVer_Call_GetVersionEx ${OSVERSIONINFO_SIZE}<br>
> + _winver_ex:<br>
> +<br>
> + # get results from struct<br>
> + System::Call '*$0(i.s,i.r1,i.r2,i.r3,i.s,&<wbr>t128.s,&i2.s,&i2,&i2,&i1.s,&<wbr>i1)'<br>
> +<br>
> + # free struct<br>
> + System::Free $0<br>
> +<br>
> + # win9x has major and minor info in high word of dwBuildNumber - remove it<br>
> + IntOp $3 $3 & 0xFFFF<br>
> +<br>
> + # get dwOSVersionInfoSize<br>
> + Pop $R0<br>
> +<br>
> + # get dwPlatformId<br>
> + Pop $0<br>
> +<br>
> + # NT?<br>
> + IntCmp $0 ${VER_PLATFORM_WIN32_NT} "" _winver_notnt _winver_notnt<br>
> + IntOp $__WINVERSP $__WINVERSP | ${_WINVER_NTBIT}<br>
> + IntOp $__WINVERV $__WINVERV | ${_WINVER_NTBIT}<br>
> + _winver_notnt:<br>
> +<br>
> + # get service pack information<br>
> + IntCmp $0 ${VER_PLATFORM_WIN32_NT} _winver_nt "" _winver_nt # win9x<br>
> +<br>
> + # get szCSDVersion<br>
> + Pop $0<br>
> +<br>
> + # copy second char<br>
> + StrCpy $0 $0 1 1<br>
> +<br>
> + # discard invalid wServicePackMajor and wProductType<br>
> + Pop $R0<br>
> + Pop $R0<br>
> +<br>
> + # switch<br>
> + StrCmp $0 'A' "" +3<br>
> + StrCpy $0 1<br>
> + Goto _winver_sp_done<br>
> + StrCmp $0 'B' "" +3<br>
> + StrCpy $0 2<br>
> + Goto _winver_sp_done<br>
> + StrCmp $0 'C' "" +3<br>
> + StrCpy $0 3<br>
> + Goto _winver_sp_done<br>
> + StrCpy $0 0<br>
> + Goto _winver_sp_done<br>
> +<br>
> + _winver_nt: # nt<br>
> +<br>
> + IntCmp $R0 ${OSVERSIONINFOEX_SIZE} "" _winver_sp_noex _winver_sp_noex<br>
> +<br>
> + # discard szCSDVersion<br>
> + Pop $0<br>
> +<br>
> + # get wProductType<br>
> + Exch<br>
> + Pop $0<br>
> +<br>
> + # is server?<br>
> + IntCmp $0 ${VER_NT_WORKSTATION} _winver_noserver<br>
> + IntOp $__WINVERSP $__WINVERSP | ${_WINVER_NTSRVBIT}<br>
> + _winver_noserver:<br>
> +<br>
> + # get wServicePackMajor<br>
> + Pop $0<br>
> +<br>
> + # done with sp<br>
> + Goto _winver_sp_done<br>
> +<br>
> + _winver_sp_noex: # OSVERSIONINFO, not OSVERSIONINFOEX<br>
> +<br>
> + #### TODO<br>
> + ## For IsServerOS to support < NT4SP6, we need to check the registry<br>
> + ## here to see if we are a server and/or DC<br>
> +<br>
> + # get szCSDVersion<br>
> + Pop $0<br>
> +<br>
> + # discard invalid wServicePackMajor and wProductType<br>
> + Pop $R0<br>
> + Pop $R0<br>
> +<br>
> + # get service pack number from text<br>
> + StrCpy $R0 $0 13<br>
> + StrCmp $R0 "Service Pack " "" +3<br>
> + StrCpy $0 $0 "" 13 # cut "Service Pack "<br>
> + Goto +2<br>
> + StrCpy $0 0 # no service pack<br>
> +<br>
> +!ifdef WINVER_NT4_OVER_W95<br>
> + IntOp $__WINVERV $__WINVERV | ${_WINVER_VERXBIT}<br>
> +!endif<br>
> +<br>
> + _winver_sp_done:<br>
> +<br>
> + # store service pack<br>
> + IntOp $0 $0 << 16<br>
> + IntOp $__WINVERSP $__WINVERSP | $0<br>
> +<br>
> + ### now for the version<br>
> +<br>
> + # is server?<br>
> + IntOp $0 $__WINVERSP & ${_WINVER_NTSRVBIT}<br>
> +<br>
> + # windows xp x64?<br>
> + IntCmp $0 0 "" _winver_not_xp_x64 _winver_not_xp_x64 # not server<br>
> + IntCmp $1 5 "" _winver_not_xp_x64 _winver_not_xp_x64 # maj 5<br>
> + IntCmp $2 2 "" _winver_not_xp_x64 _winver_not_xp_x64 # min 2<br>
> + # change XP x64 from 5.2 to 5.1 so it's still XP<br>
> + StrCpy $2 1<br>
> + _winver_not_xp_x64:<br>
> +<br>
> + # server 2008?<br>
> + IntCmp $0 0 _winver_not_ntserver # server<br>
> + IntCmp 6 $1 "" "" _winver_not_ntserver # maj 6<br>
> + # extra bit so Server 2008 comes after Vista SP1 that has the same minor version, same for Win7 vs 2008R2<br>
> + IntOp $__WINVERV $__WINVERV | ${_WINVER_VERXBIT}<br>
> + _winver_not_ntserver:<br>
> +<br>
> + # pack version<br>
> + IntOp $1 $1 << 24 # VerMajor<br>
> + IntOp $__WINVERV $__WINVERV | $1<br>
> + IntOp $0 $2 << 16<br>
> + IntOp $__WINVERV $__WINVERV | $0 # VerMinor<br>
> + IntOp $__WINVERSP $__WINVERSP | $3 # VerBuild<br>
> +<br>
> + # restore registers<br>
> + Pop $R0<br>
> + Pop $3<br>
> + Pop $2<br>
> + Pop $1<br>
> + Pop $0<br>
> +<br>
> +!macroend<br>
> +<br>
> +# version comparison LogicLib macros<br>
> +<br>
> +!macro _WinVerAtLeast _a _b _t _f<br>
> + !insertmacro _LOGICLIB_TEMP<br>
> + ${CallArtificialFunction} __WinVer_InitVars<br>
> + IntOp $_LOGICLIB_TEMP $__WINVERV & ${_WINVER_NTMASK}<br>
> + !insertmacro _>= $_LOGICLIB_TEMP `${_b}` `${_t}` `${_f}`<br>
> +!macroend<br>
> +!macro _WinVerIs _a _b _t _f<br>
> + ${CallArtificialFunction} __WinVer_InitVars<br>
> + !insertmacro _= $__WINVERV `${_b}` `${_t}` `${_f}`<br>
> +!macroend<br>
> +!macro _WinVerAtMost _a _b _t _f<br>
> + !insertmacro _LOGICLIB_TEMP<br>
> + ${CallArtificialFunction} __WinVer_InitVars<br>
> + IntOp $_LOGICLIB_TEMP $__WINVERV & ${_WINVER_NTMASK}<br>
> + !insertmacro _<= $_LOGICLIB_TEMP `${_b}` `${_t}` `${_f}`<br>
> +!macroend<br>
> +<br>
> +!macro __WinVer_DefineOSTest Test OS Suffix<br>
> + !define ${Test}Win${OS} `"" WinVer${Test} ${WINVER_${OS}${Suffix}}`<br>
> +!macroend<br>
> +<br>
> +!macro __WinVer_DefineOSTests Test Suffix<br>
> + !insertmacro __WinVer_DefineOSTest ${Test} 95 '${Suffix}'<br>
> + !insertmacro __WinVer_DefineOSTest ${Test} 98 '${Suffix}'<br>
> + !insertmacro __WinVer_DefineOSTest ${Test} ME '${Suffix}'<br>
> + !insertmacro __WinVer_DefineOSTest ${Test} NT4 '${Suffix}'<br>
> + !insertmacro __WinVer_DefineOSTest ${Test} 2000 '${Suffix}'<br>
> + !insertmacro __WinVer_DefineOSTest ${Test} XP '${Suffix}'<br>
> + !insertmacro __WinVer_DefineOSTest ${Test} 2003 '${Suffix}'<br>
> + !insertmacro __WinVer_DefineOSTest ${Test} VISTA '${Suffix}'<br>
> + !insertmacro __WinVer_DefineOSTest ${Test} 2008 '${Suffix}'<br>
> + !insertmacro __WinVer_DefineOSTest ${Test} 7 '${Suffix}'<br>
> + !insertmacro __WinVer_DefineOSTest ${Test} 2008R2 '${Suffix}'<br>
> + !insertmacro __WinVer_DefineOSTest ${Test} 8 '${Suffix}'<br>
> + !insertmacro __WinVer_DefineOSTest ${Test} 2012 '${Suffix}'<br>
> + !insertmacro __WinVer_DefineOSTest ${Test} 8.1 '${Suffix}'<br>
> + !insertmacro __WinVer_DefineOSTest ${Test} 2012R2 '${Suffix}'<br>
> + !insertmacro __WinVer_DefineOSTest ${Test} 10 '${Suffix}'<br>
> +!macroend<br>
> +<br>
> +!insertmacro __WinVer_DefineOSTests AtLeast ""<br>
> +!insertmacro __WinVer_DefineOSTests Is _NT<br>
> +!insertmacro __WinVer_DefineOSTests AtMost ""<br>
> +<br>
> +# version feature LogicLib macros<br>
> +<br>
> +!macro _IsNT _a _b _t _f<br>
> + !insertmacro _LOGICLIB_TEMP<br>
> + ${CallArtificialFunction} __WinVer_InitVars<br>
> + IntOp $_LOGICLIB_TEMP $__WINVERSP & ${_WINVER_NTBIT}<br>
> + !insertmacro _!= $_LOGICLIB_TEMP 0 `${_t}` `${_f}`<br>
> +!macroend<br>
> +!define IsNT `"" IsNT ""`<br>
> +<br>
> +!macro _IsServerOS _a _b _t _f<br>
> + !insertmacro _LOGICLIB_TEMP<br>
> + ${CallArtificialFunction} __WinVer_InitVars<br>
> + IntOp $_LOGICLIB_TEMP $__WINVERSP & ${_WINVER_NTSRVBIT}<br>
> + !insertmacro _!= $_LOGICLIB_TEMP 0 `${_t}` `${_f}`<br>
> +!macroend<br>
> +!define IsServerOS `"" IsServerOS ""`<br>
> +<br>
> +# service pack macros<br>
> +<br>
> +!macro _WinVer_GetServicePackLevel OUTVAR<br>
> + ${CallArtificialFunction} __WinVer_InitVars<br>
> + IntOp ${OUTVAR} $__WINVERSP & ${_WINVER_MASKSP}<br>
> + IntOp ${OUTVAR} ${OUTVAR} >> 16<br>
> +!macroend<br>
> +!define WinVerGetServicePackLevel '!insertmacro _WinVer_GetServicePackLevel '<br>
> +<br>
> +!macro _AtLeastServicePack _a _b _t _f<br>
> + !insertmacro _LOGICLIB_TEMP<br>
> + ${WinVerGetServicePackLevel} $_LOGICLIB_TEMP<br>
> + !insertmacro _>= $_LOGICLIB_TEMP `${_b}` `${_t}` `${_f}`<br>
> +!macroend<br>
> +!define AtLeastServicePack `"" AtLeastServicePack`<br>
> +<br>
> +!macro _AtMostServicePack _a _b _t _f<br>
> + !insertmacro _LOGICLIB_TEMP<br>
> + ${WinVerGetServicePackLevel} $_LOGICLIB_TEMP<br>
> + !insertmacro _<= $_LOGICLIB_TEMP `${_b}` `${_t}` `${_f}`<br>
> +!macroend<br>
> +!define AtMostServicePack `"" AtMostServicePack`<br>
> +<br>
> +!macro _IsServicePack _a _b _t _f<br>
> + !insertmacro _LOGICLIB_TEMP<br>
> + ${WinVerGetServicePackLevel} $_LOGICLIB_TEMP<br>
> + !insertmacro _= $_LOGICLIB_TEMP `${_b}` `${_t}` `${_f}`<br>
> +!macroend<br>
> +!define IsServicePack `"" IsServicePack`<br>
> +<br>
> +# special feature LogicLib macros<br>
> +<br>
> +!macro _WinVer_SysMetricCheck m _b _t _f<br>
> + !insertmacro _LOGICLIB_TEMP<br>
> + System::Call user32::GetSystemMetrics(i${m}<wbr>)i.s<br>
> + pop $_LOGICLIB_TEMP<br>
> + !insertmacro _!= $_LOGICLIB_TEMP 0 `${_t}` `${_f}`<br>
> +!macroend<br>
> +<br>
> +!define IsWin2003R2 `${SM_SERVERR2} WinVer_SysMetricCheck ""`<br>
> +!define IsStarterEdition `${SM_STARTER} WinVer_SysMetricCheck ""`<br>
> +!define OSHasMediaCenter `${SM_MEDIACENTER} WinVer_SysMetricCheck ""`<br>
> +!define OSHasTabletSupport `${SM_TABLETPC} WinVer_SysMetricCheck ""`<br>
> +<br>
> +# version retrieval macros<br>
> +<br>
> +!macro __WinVer_GetVer var rshift mask outvar<br>
> + ${CallArtificialFunction} __WinVer_InitVars<br>
> + !if "${mask}" != ""<br>
> + IntOp ${outvar} ${var} & ${mask}<br>
> + !if "${rshift}" != ""<br>
> + IntOp ${outvar} ${outvar} >> ${rshift}<br>
> + !endif<br>
> + !else<br>
> + IntOp ${outvar} ${var} >> ${rshift}<br>
> + !endif<br>
> +!macroend<br>
> +<br>
> +!define WinVerGetMajor '!insertmacro __WinVer_GetVer $__WINVERV 24 ${_WINVER_MASKVMAJ}'<br>
> +!define WinVerGetMinor '!insertmacro __WinVer_GetVer $__WINVERV 16 ${_WINVER_MASKVMIN}'<br>
> +!define WinVerGetBuild '!insertmacro __WinVer_GetVer $__WINVERSP "" ${_WINVER_MASKVBLD}'<br>
> +<br>
> +# done<br>
> +<br>
> +!endif # !___WINVER__NSH___<br>
> +<br>
> +!verbose pop<br>
> --<br>
> 1.7.1<br>
><br>
<br>
> From add846050105268e0af6d14fe1b18a<wbr>d19dc55c72 Mon Sep 17 00:00:00 2001<br>
> From: Lev Veyde <<a href="mailto:lveyde@redhat.com">lveyde@redhat.com</a>><br>
> Date: Mon, 6 Mar 2017 13:03:25 +0200<br>
> Subject: [PATCH 2/2] Add support for Microsoft Windows Server 2016<br>
><br>
> This patch updates WinVer.nsh, adding support for<br>
> Microsoft Windows Server 2016.<br>
><br>
> The same patch was sent for inclusion in the NSIS<br>
> project: <a href="https://sourceforge.net/p/nsis/patches/282/" rel="noreferrer" target="_blank">https://sourceforge.net/p/<wbr>nsis/patches/282/</a><br>
><br>
> Change-Id: Icc05e7d5c9d0c34adf874e769080d<wbr>23aac868371<br>
> Signed-off-by: Lev Veyde <<a href="mailto:lveyde@redhat.com">lveyde@redhat.com</a>><br>
> ---<br>
> WinVer.nsh | 3 +++<br>
> 1 files changed, 3 insertions(+), 0 deletions(-)<br>
><br>
> diff --git a/WinVer.nsh b/WinVer.nsh<br>
> index facf28d..50dc08f 100644<br>
> --- a/WinVer.nsh<br>
> +++ b/WinVer.nsh<br>
> @@ -155,6 +155,8 @@<br>
> !define WINVER_2012R2 0x06030001 ;6.03.9600<br>
> !define WINVER_10_NT 0x8A000000 ;10.0.10240<br>
> !define WINVER_10 0x0A000000 ;10.0.10240<br>
> +!define WINVER_2016_NT 0x8A000001 ;10.0.14393<br>
> +!define WINVER_2016 0x0A000001 ;10.0.14393<br>
><br>
><br>
> # use this to make all nt > 9x<br>
> @@ -416,6 +418,7 @@<br>
> !insertmacro __WinVer_DefineOSTest ${Test} 8.1 '${Suffix}'<br>
> !insertmacro __WinVer_DefineOSTest ${Test} 2012R2 '${Suffix}'<br>
> !insertmacro __WinVer_DefineOSTest ${Test} 10 '${Suffix}'<br>
> + !insertmacro __WinVer_DefineOSTest ${Test} 2016 '${Suffix}'<br>
> !macroend<br>
><br>
> !insertmacro __WinVer_DefineOSTests AtLeast ""<br>
> --<br>
> 1.7.1<br>
><br>
<br>
> From 225cf45311a497381715829722adc1<wbr>65ea0e053a Mon Sep 17 00:00:00 2001<br>
> From: Lev Veyde <<a href="mailto:lveyde@redhat.com">lveyde@redhat.com</a>><br>
> Date: Mon, 6 Mar 2017 13:17:57 +0200<br>
> Subject: [PATCH] Add support to the installer for Microsoft Windows Server 2016<br>
><br>
> This patch updates the installer, adding support for Microsoft<br>
> Windows Server 2016.<br>
><br>
> Change-Id: Ibc6147054ac61e6bb3e376b602ce8<wbr>ba0e00ffd47<br>
> Signed-off-by: Lev Veyde <<a href="mailto:lveyde@redhat.com">lveyde@redhat.com</a>><br>
> ---<br>
> win-guest-tools.nsis | 6 ++++--<br>
> 1 files changed, 4 insertions(+), 2 deletions(-)<br>
><br>
> diff --git a/win-guest-tools.nsis b/win-guest-tools.nsis<br>
> index 64fe20c..c54608a 100644<br>
> --- a/win-guest-tools.nsis<br>
> +++ b/win-guest-tools.nsis<br>
> @@ -10,8 +10,8 @@<br>
> #<br>
> #<br>
> #<br>
> -# Copyright (c) 2012-2015 Red Hat, Inc<br>
> -# Copyright (c) 2014 Lev Veyde <<a href="mailto:lveyde@gmail.com">lveyde@gmail.com</a>><br>
> +# Copyright (c) 2012-2017 Red Hat, Inc<br>
> +# Copyright (c) 2017 Lev Veyde <<a href="mailto:lveyde@redhat.com">lveyde@redhat.com</a>><br>
> # Copyright (c) 2012 Grant Williamson <<a href="mailto:grant.williamson@gmail.com">grant.williamson@gmail.com</a>><br>
> #<br>
> # Permission is hereby granted, free of charge, to any person obtaining a<br>
> @@ -294,6 +294,8 @@ Function GetDriverSubdir<br>
> StrCpy $0 "$0\2k12r2"<br>
> ${ElseIf} ${IsWin10}<br>
> StrCpy $0 "$0\w10"<br>
> + ${ElseIf} ${IsWin2016}<br>
> + StrCpy $0 "$0\2k16"<br>
> ${Else}<br>
> MessageBox MB_ICONEXCLAMATION "Unsupported Windows version"<br>
> Abort ; causes installer to quit.<br>
<span class="HOEnZb"><font color="#888888">> --<br>
> 1.7.1<br>
><br>
<br>
> ______________________________<wbr>_________________<br>
> Spice-devel mailing list<br>
> <a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.<wbr>org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/spice-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/spice-devel</a><br>
<br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div><br>Thanks in advance,<br></div>Lev Veyde.<br></div>(RHCE, RHCVA, MCITP)<br></div></div>
</div>