Skip to content

Commit

Permalink
Update compiler to Visual C++ 2019 Update 1.
Browse files Browse the repository at this point in the history
git-svn-id: https://www.williamfeely.info/svn/dxgl@932 8a90861a-4eca-46d5-b744-240ff16d0c4d
  • Loading branch information
dxgldotorg committed May 25, 2019
1 parent 4334f6e commit 2fd576f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
18 changes: 9 additions & 9 deletions Installer/dxgl.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ SetCompressor /SOLID lzma
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
!include "..\common\version.nsh"

!if ${COMPILER} == "VC2019_0"
!if ${COMPILER} == "VC2019_1"
!ifdef _DEBUG
!define SRCDIR "Debug VS2019"
!else
Expand Down Expand Up @@ -112,12 +112,12 @@ SetCompressor /SOLID lzma
!define runtime_regkey SOFTWARE\Microsoft\DevDiv\vc\Servicing\12.0\RuntimeMinimum
!define runtime_regvalue Install
!define PRODUCT_SUFFIX "-msvc12"
!else if ${COMPILER} == "VC2019_0"
!else if ${COMPILER} == "VC2019_1"
!define download_runtime 1
!define runtime_url http://www.dxgl.org/download/runtimes/vc14.20/vc_redist.x86.exe
!define runtime_name "Visual C++ 2019"
!define runtime_url http://www.dxgl.org/download/runtimes/vc14.21/vc_redist.x86.exe
!define runtime_name "Visual C++ 2019.1"
!define runtime_filename "vc_redist.x86.exe"
!define runtime_sha512 "A983C078823E6E80004FD472AAB02D5DDC4D8DC1600DB45F786695CD73CDE57405F3164E960E6CAB627F92AF2AAFAE0E97132A08E564D234F1166A49B88F0A13"
!define runtime_sha512 "2DE5956C1C55DE35B5863372BBC7C662F2840B03A9D4115FE14A9036BFAC334F415FFBB5E60AD3E59A79C755980216D8D54D027D1AA2E84BA5109B900C9E5629"
!define runtime_regkey SOFTWARE\Microsoft\DevDiv\vc\Servicing\14.0\RuntimeMinimum
!define runtime_regvalue Install
!define runtime_regvalue2 Version
Expand Down Expand Up @@ -259,7 +259,7 @@ SectionEnd


Function .onInit
!if ${COMPILER} == "VC2019_0"
!if ${COMPILER} == "VC2019_1"
dxgl-nsis::CheckSSE2 $0
Pop $0
${If} $0 == "0"
Expand Down Expand Up @@ -312,12 +312,12 @@ Function .onInit
!else
!if ${download_runtime} >= 1
ReadRegDWORD $0 HKLM ${runtime_regkey} ${runtime_regvalue}
!if ${COMPILER} == "VC2019_0"
!if ${COMPILER} == "VC2019_1"
StrCmp $0 1 skipvcredist1
goto vcinstall
skipvcredist1:
ReadRegDWORD $0 HKLM ${runtime_regkey} ${runtime_regvalue2}
${VersionCompare} "$0" "14.20.27508" $1
${VersionCompare} "$0" "14.21.27702" $1
${If} $1 == 0
goto skipvcredist
${EndIf}
Expand Down Expand Up @@ -427,7 +427,7 @@ SectionEnd

!if ${SIGNTOOL} == 1
!finalize 'signtool sign /t http://timestamp.comodoca.com %1'
!if ${COMPILER} == "VC2019_0"
!if ${COMPILER} == "VC2019_1"
!finalize 'signtool sign /tr http://timestamp.comodoca.com /td sha256 /fd sha256 /as %1'
!endif
!endif
10 changes: 5 additions & 5 deletions buildtool/buildtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,13 @@ int ProcessHeaders(char *path)
strncpy(findptr, "\"VC2010\"\n", 13);
#elif (_MSC_VER == 1800)
strncpy(findptr, "\"VC2013\"\n", 13);
#elif (_MSC_VER == 1920)
strncpy(findptr, "\"VC2019_0\"\n", 13);
#elif (_MSC_VER == 1921)
strncpy(findptr, "\"VC2019_1\"\n", 13);
#elif ((_MSC_VER > 1900) && (_MSC_VER < 1916))
#error Please update your Visual Studio 2017 to version 2017.9 before continuing.
#elif (_MSC_VER > 1920)
#pragma message ("Detected a newer version of Visual Studio, compiling assuming 2019.0.")
strncpy(findptr, "\"VC2019_0\"\n", 13);
#elif (_MSC_VER > 1921)
#pragma message ("Detected a newer version of Visual Studio, compiling assuming 2019.1.")
strncpy(findptr, "\"VC2019_1\"\n", 13);
#else
strncpy(findptr, "\"UNKNOWN\"\n", 13);
#endif
Expand Down

0 comments on commit 2fd576f

Please sign in to comment.