DXGL r932 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r931‎ | r932 | r933 >
Date:00:51, 25 May 2019
Author:admin
Status:new
Tags:
Comment:
Update compiler to Visual C++ 2019 Update 1.
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_0"
 40+!if ${COMPILER} == "VC2019_1"
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_0"
 116+!else if ${COMPILER} == "VC2019_1"
117117 !define download_runtime 1
118 -!define runtime_url http://www.dxgl.org/download/runtimes/vc14.20/vc_redist.x86.exe
119 -!define runtime_name "Visual C++ 2019"
 118+!define runtime_url http://www.dxgl.org/download/runtimes/vc14.21/vc_redist.x86.exe
 119+!define runtime_name "Visual C++ 2019.1"
120120 !define runtime_filename "vc_redist.x86.exe"
121 -!define runtime_sha512 "A983C078823E6E80004FD472AAB02D5DDC4D8DC1600DB45F786695CD73CDE57405F3164E960E6CAB627F92AF2AAFAE0E97132A08E564D234F1166A49B88F0A13"
 121+!define runtime_sha512 "2DE5956C1C55DE35B5863372BBC7C662F2840B03A9D4115FE14A9036BFAC334F415FFBB5E60AD3E59A79C755980216D8D54D027D1AA2E84BA5109B900C9E5629"
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_0"
 263+ !if ${COMPILER} == "VC2019_1"
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_0"
 316+ !if ${COMPILER} == "VC2019_1"
317317 StrCmp $0 1 skipvcredist1
318318 goto vcinstall
319319 skipvcredist1:
320320 ReadRegDWORD $0 HKLM ${runtime_regkey} ${runtime_regvalue2}
321 - ${VersionCompare} "$0" "14.20.27508" $1
 321+ ${VersionCompare} "$0" "14.21.27702" $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_0"
 431+!if ${COMPILER} == "VC2019_1"
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 == 1920)
227 - strncpy(findptr, "\"VC2019_0\"\n", 13);
 226+ #elif (_MSC_VER == 1921)
 227+ strncpy(findptr, "\"VC2019_1\"\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 > 1920)
231 - #pragma message ("Detected a newer version of Visual Studio, compiling assuming 2019.0.")
232 - strncpy(findptr, "\"VC2019_0\"\n", 13);
 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);
233233 #else
234234 strncpy(findptr, "\"UNKNOWN\"\n", 13);
235235 #endif