From 207716f69f2644df843d462e9f830b099ae779be Mon Sep 17 00:00:00 2001 From: Richard Stanway Date: Wed, 2 Dec 2020 02:08:22 +0100 Subject: [PATCH] UI/installer: Add additional VS2019 DLL check Also updates references from 2017 to 2019 for consistency. --- UI/installer/mp-installer.nsi | 39 ++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/UI/installer/mp-installer.nsi b/UI/installer/mp-installer.nsi index d2c5a3b11..719692246 100644 --- a/UI/installer/mp-installer.nsi +++ b/UI/installer/mp-installer.nsi @@ -104,34 +104,35 @@ Function PreReqCheck ${EndIf} !ifdef INSTALL64 - ; 64 bit Visual Studio 2017 runtime check + ; 64 bit Visual Studio 2019 runtime check ClearErrors SetOutPath "$PLUGINSDIR" - File check_for_64bit_visual_studio_2017_runtimes.exe - ExecWait "$PLUGINSDIR\check_for_64bit_visual_studio_2017_runtimes.exe" $R0 - Delete "$PLUGINSDIR\check_for_64bit_visual_studio_2017_runtimes.exe" - IntCmp $R0 126 vs2017Missing_64 vs2017OK_64 - vs2017Missing_64: - MessageBox MB_YESNO|MB_ICONEXCLAMATION "Your system is missing runtime components that ${APPNAME} requires. Would you like to download them?" IDYES vs2017true_64 IDNO vs2017false_64 - vs2017true_64: - ExecShell "open" "https://obsproject.com/visual-studio-2017-runtimes-64-bit" - vs2017false_64: + File check_for_64bit_visual_studio_2019_runtimes.exe + ExecWait "$PLUGINSDIR\check_for_64bit_visual_studio_2019_runtimes.exe" $R0 + Delete "$PLUGINSDIR\check_for_64bit_visual_studio_2019_runtimes.exe" + IntCmp $R0 126 vs2019Missing_64 vs2019OK_64 + vs2019Missing_64: + MessageBox MB_YESNO|MB_ICONEXCLAMATION "Your system is missing runtime components that ${APPNAME} requires. Would you like to download them?" IDYES vs2019true_64 IDNO vs2019false_64 + vs2019true_64: + ExecShell "open" "https://obsproject.com/visual-studio-2019-runtimes-64-bit" + vs2019false_64: Quit - vs2017OK_64: + vs2019OK_64: ClearErrors !else - ; 32 bit Visual Studio 2017 runtime check + ; 32 bit Visual Studio 2019 runtime check ClearErrors GetDLLVersion "vcruntime140.DLL" $R0 $R1 + GetDLLVersion "vcruntime140_1.DLL" $R0 $R1 GetDLLVersion "msvcp140.DLL" $R0 $R1 - IfErrors vs2017Missing_32 vs2017OK_32 - vs2017Missing_32: - MessageBox MB_YESNO|MB_ICONEXCLAMATION "Your system is missing runtime components that ${APPNAME} requires. Would you like to download them?" IDYES vs2017true_32 IDNO vs2017false_32 - vs2017true_32: - ExecShell "open" "https://obsproject.com/visual-studio-2017-runtimes-32-bit" - vs2017false_32: + IfErrors vs2019Missing_32 vs2019OK_32 + vs2019Missing_32: + MessageBox MB_YESNO|MB_ICONEXCLAMATION "Your system is missing runtime components that ${APPNAME} requires. Would you like to download them?" IDYES vs2019true_32 IDNO vs2019false_32 + vs2019true_32: + ExecShell "open" "https://obsproject.com/visual-studio-2019-runtimes-32-bit" + vs2019false_32: Quit - vs2017OK_32: + vs2019OK_32: ClearErrors !endif