From 1d825112b0275db7a3486167ebd70507aa61a20e Mon Sep 17 00:00:00 2001 From: tooomm Date: Mon, 6 Jul 2026 13:41:13 +0200 Subject: [PATCH] 64 --- cmake/NSIS.template.in | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cmake/NSIS.template.in b/cmake/NSIS.template.in index 793d7930a..3d844c309 100644 --- a/cmake/NSIS.template.in +++ b/cmake/NSIS.template.in @@ -57,7 +57,7 @@ Page Custom PortableModePageCreate PortableModePageLeave Function .onInit -${If} ${NSIS_IS_64_BIT} == 1 #NSIS 64bit +${If} ${NSIS_IS_64_BIT} == 1 # NSIS 64bit ${IfNot} ${RunningX64} MessageBox MB_OK|MB_ICONSTOP "This version of Cockatrice requires a 64-bit Windows system." Abort @@ -170,11 +170,11 @@ SetShellVarContext all SetRegView 64 ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "QuietUninstallString" -StrCmp $R0 "" done +StrCmp $R0 "" done64 DetailPrint "Removing previous version..." ExecWait '$R0' -done: +done64: FunctionEnd @@ -226,7 +226,7 @@ ${If} $PortableMode = 0 SetRegView 64 ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "UninstallString" - StrCmp $R0 "" done + StrCmp $R0 "" done64 ${If} $ReinstallMode = 0 MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "A previous version of Cockatrice must be uninstalled before installing the new one." IDOK uninst64 @@ -235,11 +235,11 @@ ${If} $PortableMode = 0 Goto uninst64 ${EndIf} - uninst: + uninst64: ClearErrors ExecWait "$R0" - done: + done64: ${Else} Abort @@ -302,13 +302,13 @@ ${If} $PortableMode = 0 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "VersionMajor" "@CPACK_PACKAGE_VERSION_MAJOR@" WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "VersionMinor" "@CPACK_PACKAGE_VERSION_MINOR@" - IfFileExists "$INSTDIR\vc_redist.x64.exe" VcRedistExists PastVcRedistCheck - VcRedistExists: + IfFileExists "$INSTDIR\vc_redist.x64.exe" VcRedist64Exists PastVcRedist64Check + VcRedist64Exists: ExecWait '"$INSTDIR\vc_redist.x64.exe" /passive /norestart' DetailPrint "Sleep to ensure unlock of vc_redist file after installation..." Sleep 3000 Delete "$INSTDIR\vc_redist.x64.exe" - PastVcRedistCheck: + PastVcRedist64Check: ${Else} ; Create the file the application uses to detect portable mode