DXGL r880 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r879‎ | r880 | r881 >
Date:16:40, 21 November 2018
Author:admin
Status:new
Tags:
Comment:
Update compiler to Visual C++ 2017.9
Modified paths:
  • /Installer/dxgl.nsi (modified) (history)
  • /buildtool/buildtool.c (modified) (history)

Diff [purge]

Index: Installer/dxgl.nsi
@@ -36,7 +36,7 @@
3737 !define PRODUCT_UNINST_ROOT_KEY "HKLM"
3838 !include "..\common\version.nsh"
3939
40 -!if ${COMPILER} == "VC2017_8"
 40+!if ${COMPILER} == "VC2017_9"
4141 !ifdef _DEBUG
4242 !define SRCDIR "Debug VS2017"
4343 !else
@@ -112,12 +112,12 @@
113113 !define runtime_regkey SOFTWARE\Microsoft\DevDiv\vc\Servicing\12.0\RuntimeMinimum
114114 !define runtime_regvalue Install
115115 !define PRODUCT_SUFFIX "-msvc12"
116 -!else if ${COMPILER} == "VC2017_8"
 116+!else if ${COMPILER} == "VC2017_9"
117117 !define download_runtime 1
118 -!define runtime_url http://www.dxgl.org/download/runtimes/vc14.15/vc_redist.x86.exe
119 -!define runtime_name "Visual C++ 2017.8"
 118+!define runtime_url http://www.dxgl.org/download/runtimes/vc14.16/vc_redist.x86.exe
 119+!define runtime_name "Visual C++ 2017.9"
120120 !define runtime_filename "vc_redist.x86.exe"
121 -!define runtime_sha512 "05B02AB523D7DDEA468C94F28D4EDB1BD945BDC525B87DE11F7F995196407D412D9E76A950F9F3134467D88A4F6E0B3456E9E941AB7118EDE04025E19F1D2751"
 121+!define runtime_sha512 "F895E1146ACD8A4F01F13A9E94CCF5FB4C0726CE6554FE1AE93EA1FA07A484A074E6FA0AECCF1A22733EA164D49CF993F6E5983A991072DC5968E9561E7DE2DD"
122122 !define runtime_regkey SOFTWARE\Microsoft\DevDiv\vc\Servicing\14.0\RuntimeMinimum
123123 !define runtime_regvalue Install
124124 !define runtime_regvalue2 Version
@@ -259,7 +259,7 @@
260260
261261
262262 Function .onInit
263 - !if ${COMPILER} == "VC2017_8"
 263+ !if ${COMPILER} == "VC2017_9"
264264 dxgl-nsis::CheckSSE2 $0
265265 Pop $0
266266 ${If} $0 == "0"
@@ -312,12 +312,12 @@
313313 !else
314314 !if ${download_runtime} >= 1
315315 ReadRegDWORD $0 HKLM ${runtime_regkey} ${runtime_regvalue}
316 - !if ${COMPILER} == "VC2017_8"
 316+ !if ${COMPILER} == "VC2017_9"
317317 StrCmp $0 1 skipvcredist1
318318 goto vcinstall
319319 skipvcredist1:
320320 ReadRegDWORD $0 HKLM ${runtime_regkey} ${runtime_regvalue2}
321 - ${VersionCompare} "$0" "14.15.26706" $1
 321+ ${VersionCompare} "$0" "14.16.27012" $1
322322 ${If} $1 == 0
323323 goto skipvcredist
324324 ${EndIf}
Index: buildtool/buildtool.c
@@ -216,8 +216,13 @@
217217 strncpy(findptr, "\"VC2010\"\n", 13);
218218 #elif (_MSC_VER == 1800)
219219 strncpy(findptr, "\"VC2013\"\n", 13);
220 - #elif (_MSC_VER == 1915)
221 - strncpy(findptr, "\"VC2017_8\"\n", 13);
 220+ #elif (_MSC_VER == 1916)
 221+ strncpy(findptr, "\"VC2017_9\"\n", 13);
 222+ #elif ((MSC_VER > 1900) && (_MSC_VER < 1916))
 223+ #error Please update your Visual Studio 2017 to version 2017.9 before continuing.
 224+ #elif (MSC_VER > 1916)
 225+ #pragma message ("Detected a newer version of Visual Studio, compiling assuming 2017.9.")
 226+ strncpy(findptr, "\"VC2017_9\"\n", 13);
222227 #else
223228 strncpy(findptr, "\"UNKNOWN\"\n", 13);
224229 #endif