From: <and...@us...> - 2014-10-21 23:13:35
|
Revision: 6558 http://sourceforge.net/p/nsis/code/6558 Author: anders_k Date: 2014-10-21 23:13:26 +0000 (Tue, 21 Oct 2014) Log Message: ----------- Preliminary ManifestSupportedOS and WinVer.nsh Win10 support Modified Paths: -------------- NSIS/trunk/Docs/src/attributes.but NSIS/trunk/Docs/src/history.but NSIS/trunk/Include/WinVer.nsh NSIS/trunk/Source/manifest.cpp NSIS/trunk/Source/manifest.h NSIS/trunk/Source/tokens.cpp Modified: NSIS/trunk/Docs/src/attributes.but =================================================================== --- NSIS/trunk/Docs/src/attributes.but 2014-10-12 20:09:35 UTC (rev 6557) +++ NSIS/trunk/Docs/src/attributes.but 2014-10-21 23:13:26 UTC (rev 6558) @@ -291,7 +291,7 @@ \S2{amanifestsupportedos} ManifestSupportedOS -\c none|all|WinVista|\\<b\\>Win7|Win8|Win8.1\\</b\\>|{GUID} [...] +\c none|all|WinVista|\\<b\\>Win7|Win8|Win8.1\\</b\\>|Win10|{GUID} [...] Declare that the installer is compatible with the specified Windows version(s). This adds a SupportedOS entry in the compatibility section of the application manifest. The default list of Win7+Win8+Win8.1 will probably be updated to include newer Windows versions in the future. \e{none} is the default if \R{arequestexecutionlevel}{RequestExecutionLevel} is set to \e{none} for compatibility reasons. Modified: NSIS/trunk/Docs/src/history.but =================================================================== --- NSIS/trunk/Docs/src/history.but 2014-10-12 20:09:35 UTC (rev 6557) +++ NSIS/trunk/Docs/src/history.but 2014-10-21 23:13:26 UTC (rev 6558) @@ -1,5 +1,19 @@ \A{history} Changelog and Release Notes +\H{v3.0b2} 3.0 Beta 2 + +Released on ?, 201? + +\S1{v3.0b2-rl} Release Notes + +\b ? + +\S1{v3.0b2-cl} Changelog + +\S2{} Minor Changes + +\b Windows 10 support + \H{v3.0b1} 3.0 Beta 1 Released on October 6th, 2014 Modified: NSIS/trunk/Include/WinVer.nsh =================================================================== --- NSIS/trunk/Include/WinVer.nsh 2014-10-12 20:09:35 UTC (rev 6557) +++ NSIS/trunk/Include/WinVer.nsh 2014-10-21 23:13:26 UTC (rev 6558) @@ -36,7 +36,10 @@ ; 2012 ; 8.1 ; 2012R2 +; 10 ; +; Note: Windows 8.1 and later will be detected as Windows 8 unless ManifestSupportedOS is set correctly! +; ; AtLeastServicePack checks if the installer is running on Windows service pack version at least as specified. ; IsServicePack checks if the installer is running on Windows service pack version exactly as specified. ; AtMostServicePack checks if the installer is running on Windows service version pack at most as specified. @@ -150,6 +153,8 @@ !define WINVER_8.1 0x06030000 ;6.03.9600 !define WINVER_2012R2_NT 0x86030001 ;6.03.9600 !define WINVER_2012R2 0x06030001 ;6.03.9600 +!define WINVER_10_NT 0x86040000 ;6.04.???? +!define WINVER_10 0x06040000 ;6.04.???? # use this to make all nt > 9x @@ -410,6 +415,7 @@ !insertmacro __WinVer_DefineOSTest ${Test} 2012 '${Suffix}' !insertmacro __WinVer_DefineOSTest ${Test} 8.1 '${Suffix}' !insertmacro __WinVer_DefineOSTest ${Test} 2012R2 '${Suffix}' + !insertmacro __WinVer_DefineOSTest ${Test} 10 '${Suffix}' !macroend !insertmacro __WinVer_DefineOSTests AtLeast "" Modified: NSIS/trunk/Source/manifest.cpp =================================================================== --- NSIS/trunk/Source/manifest.cpp 2014-10-12 20:09:35 UTC (rev 6557) +++ NSIS/trunk/Source/manifest.cpp 2014-10-21 23:13:26 UTC (rev 6558) @@ -39,6 +39,20 @@ return true; } +static const struct { const TCHAR *name, *guidstr; } g_soslmap[] = { + { _T("WinVista"), _T("{e2011457-1546-43c5-a5fe-008deee3d3f0}") }, + { _T("Win7"), _T("{35138b9a-5d96-4fbd-8e2d-a2440225f93a}") }, + { _T("Win8"), _T("{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}") }, //msdn.microsoft.com/en-us/library/hh848036 + { _T("Win8.1"), _T("{1f676c76-80e1-4239-95bb-83d0f6d0da78}") }, //msdn.microsoft.com/en-us/library/windows/desktop/dn481241 + { _T("Win10"), _T("{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}") } //blogs.msdn.com/b/chuckw/archive/2013/09/10/manifest-madness.aspx +}; + +void SupportedOSList::addall() +{ + for (UINT i = 0; i < COUNTOF(g_soslmap); ++i) + append(g_soslmap[i].name); +} + bool SupportedOSList::append(const TCHAR* osid) { const TCHAR *guid = 0; @@ -54,10 +68,15 @@ guid = osid; } } - else if (!_tcsicmp(osid,_T("WinVista"))) guid = _T("{e2011457-1546-43c5-a5fe-008deee3d3f0}"); - else if (!_tcsicmp(osid,_T("Win7"))) guid = _T("{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"); - else if (!_tcsicmp(osid,_T("Win8"))) guid = _T("{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"); - else if (!_tcsicmp(osid,_T("Win8.1"))) guid = _T("{1f676c76-80e1-4239-95bb-83d0f6d0da78}"); + else + { + for (UINT i = 0; i < COUNTOF(g_soslmap); ++i) + if (!_tcsicmp(osid, g_soslmap[i].name)) + { + guid = g_soslmap[i].guidstr; + break; + } + } if (guid) { Modified: NSIS/trunk/Source/manifest.h =================================================================== --- NSIS/trunk/Source/manifest.h 2014-10-12 20:09:35 UTC (rev 6557) +++ NSIS/trunk/Source/manifest.h 2014-10-21 23:13:26 UTC (rev 6558) @@ -61,18 +61,12 @@ if (-1 == pos) return 0; return m_list.get() + pos; } + void addall(); void deleteall() { m_list.deleteall(); m_isdefaultlist = false; } - void addall() - { - append(_T("WinVista")); - append(_T("Win7")); - append(_T("Win8")); - append(_T("Win8.1")); - } void setdefault() { m_list.deleteall(); Modified: NSIS/trunk/Source/tokens.cpp =================================================================== --- NSIS/trunk/Source/tokens.cpp 2014-10-12 20:09:35 UTC (rev 6557) +++ NSIS/trunk/Source/tokens.cpp 2014-10-21 23:13:26 UTC (rev 6558) @@ -242,7 +242,7 @@ {TOK_XPSTYLE, _T("XPStyle"),1,0,_T("(on|off)"),TP_GLOBAL}, {TOK_REQEXECLEVEL, _T("RequestExecutionLevel"),1,0,_T("none|user|highest|admin"),TP_GLOBAL}, {TOK_MANIFEST_DPIAWARE,_T("ManifestDPIAware"),1,0,_T("notset|true|false"),TP_GLOBAL}, -{TOK_MANIFEST_SUPPORTEDOS,_T("ManifestSupportedOS"),1,-1,_T("none|all|WinVista|Win7|Win8|Win8.1|{GUID} [...]"),TP_GLOBAL}, +{TOK_MANIFEST_SUPPORTEDOS,_T("ManifestSupportedOS"),1,-1,_T("none|all|WinVista|Win7|Win8|Win8.1|Win10|{GUID} [...]"),TP_GLOBAL}, {TOK_P_PACKEXEHEADER,_T("!packhdr"),2,0,_T("temp_file_name command_line_to_compress_that_temp_file"),TP_ALL}, {TOK_P_FINALIZE,_T("!finalize"),1,0,_T("command_with_%1"),TP_ALL}, {TOK_P_SYSTEMEXEC,_T("!system"),1,2,_T("command [<OP retval> | <retvalsymbol>]\n OP=(< > <> =)"),TP_ALL}, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |