DXGL r934 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r933‎ | r934 | r935 >
Date:01:51, 10 August 2019
Author:admin
Status:new
Tags:
Comment:
Update compiler to Visual C++ 2019 Update 2.
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} == "VC2019_1"
 40+!if ${COMPILER} == "VC2019_2"
4141 !ifdef _DEBUG
4242 !define SRCDIR "Debug VS2019"
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} == "VC2019_1"
 116+!else if ${COMPILER} == "VC2019_2"
117117 !define download_runtime 1
118 -!define runtime_url http://www.dxgl.org/download/runtimes/vc14.21/vc_redist.x86.exe
119 -!define runtime_name "Visual C++ 2019.1"
 118+!define runtime_url http://www.dxgl.org/download/runtimes/vc14.22/vc_redist.x86.exe
 119+!define runtime_name "Visual C++ 2019.2"
120120 !define runtime_filename "vc_redist.x86.exe"
121 -!define runtime_sha512 "2DE5956C1C55DE35B5863372BBC7C662F2840B03A9D4115FE14A9036BFAC334F415FFBB5E60AD3E59A79C755980216D8D54D027D1AA2E84BA5109B900C9E5629"
 121+!define runtime_sha512 "9E023DD1258B20D3DD29EB3858282D5E99F86DC980BECB044A867A0AA8C5210EEBB426B3F7D574C3E10B58A72436C7E360C644A64F5653F19AD28B9C96ECD183"
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} == "VC2019_1"
 263+ !if ${COMPILER} == "VC2019_2"
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} == "VC2019_1"
 316+ !if ${COMPILER} == "VC2019_2"
317317 StrCmp $0 1 skipvcredist1
318318 goto vcinstall
319319 skipvcredist1:
320320 ReadRegDWORD $0 HKLM ${runtime_regkey} ${runtime_regvalue2}
321 - ${VersionCompare} "$0" "14.21.27702" $1
 321+ ${VersionCompare} "$0" "14.22.27821" $1
322322 ${If} $1 == 0
323323 goto skipvcredist
324324 ${EndIf}
@@ -427,7 +427,7 @@
428428
429429 !if ${SIGNTOOL} == 1
430430 !finalize 'signtool sign /t http://timestamp.comodoca.com %1'
431 -!if ${COMPILER} == "VC2019_1"
 431+!if ${COMPILER} == "VC2019_2"
432432 !finalize 'signtool sign /tr http://timestamp.comodoca.com /td sha256 /fd sha256 /as %1'
433433 !endif
434434 !endif
\ No newline at end of file
Index: buildtool/buildtool.c
@@ -222,13 +222,13 @@
223223 strncpy(findptr, "\"VC2010\"\n", 13);
224224 #elif (_MSC_VER == 1800)
225225 strncpy(findptr, "\"VC2013\"\n", 13);
226 - #elif (_MSC_VER == 1921)
227 - strncpy(findptr, "\"VC2019_1\"\n", 13);
 226+ #elif (_MSC_VER == 1922)
 227+ strncpy(findptr, "\"VC2019_2\"\n", 13);
228228 #elif ((_MSC_VER > 1900) && (_MSC_VER < 1916))
229229 #error Please update your Visual Studio 2017 to version 2017.9 before continuing.
230 - #elif (_MSC_VER > 1921)
231 - #pragma message ("Detected a newer version of Visual Studio, compiling assuming 2019.1.")
232 - strncpy(findptr, "\"VC2019_1\"\n", 13);
 230+ #elif (_MSC_VER > 1922)
 231+ #pragma message ("Detected a newer version of Visual Studio, compiling assuming 2019.2.")
 232+ strncpy(findptr, "\"VC2019_2\"\n", 13);
233233 #else
234234 strncpy(findptr, "\"UNKNOWN\"\n", 13);
235235 #endif