From 6793fbd7735985713f03059399fbada354b096b0 Mon Sep 17 00:00:00 2001
From: mat <26722564+matcool@users.noreply.github.com>
Date: Sat, 8 Jun 2024 17:11:28 -0300
Subject: [PATCH] make windows installer use x64 vc_redist

---
 installer/windows/dl-vcr.ps1    | 4 ++--
 installer/windows/installer.nsi | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/installer/windows/dl-vcr.ps1 b/installer/windows/dl-vcr.ps1
index 4696f53a..ed27a7e4 100644
--- a/installer/windows/dl-vcr.ps1
+++ b/installer/windows/dl-vcr.ps1
@@ -1,4 +1,4 @@
-if(Test-path VC_redist.x86.exe -PathType leaf) {
+if(Test-path VC_redist.x64.exe -PathType leaf) {
     Return
 }
-Invoke-WebRequest -useb https://aka.ms/vs/17/release/vc_redist.x86.exe -outfile VC_redist.x86.exe
\ No newline at end of file
+Invoke-WebRequest -useb https://aka.ms/vs/17/release/vc_redist.x64.exe -outfile VC_redist.x64.exe
\ No newline at end of file
diff --git a/installer/windows/installer.nsi b/installer/windows/installer.nsi
index df26543c..90815dc5 100644
--- a/installer/windows/installer.nsi
+++ b/installer/windows/installer.nsi
@@ -475,9 +475,9 @@ SectionGroupEnd
 !execute "pwsh -nol -noni -nop dl-vcr.ps1"
 Section "Visual Studio Runtime"
     SetOutPath $INSTDIR
-    File VC_redist.x86.exe
-    ExecWait "$INSTDIR\VC_redist.x86.exe /install /quiet /norestart"
-    Delete "$INSTDIR\VC_redist.x86.exe"
+    File VC_redist.x64.exe
+    ExecWait "$INSTDIR\VC_redist.x64.exe /install /quiet /norestart"
+    Delete "$INSTDIR\VC_redist.x64.exe"
 SectionEnd
 
 Section "steam_appid.txt"