From 73626c98a682a116f75c793aeba5b76d443ef598 Mon Sep 17 00:00:00 2001 From: tooomm Date: Sat, 4 Jul 2026 16:41:39 +0200 Subject: [PATCH] More 32bit and cleanup --- cmake/NSIS.template.in | 26 +++++++++----------------- cockatrice/CMakeLists.txt | 26 +++++++++++++------------- 2 files changed, 22 insertions(+), 30 deletions(-) diff --git a/cmake/NSIS.template.in b/cmake/NSIS.template.in index 24392c6ef..793d7930a 100644 --- a/cmake/NSIS.template.in +++ b/cmake/NSIS.template.in @@ -170,11 +170,11 @@ SetShellVarContext all SetRegView 64 ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "QuietUninstallString" -StrCmp $R0 "" done64 -DetailPrint "Removing previous version (64-bit)..." +StrCmp $R0 "" done +DetailPrint "Removing previous version..." ExecWait '$R0' -done64: +done: FunctionEnd @@ -226,7 +226,7 @@ ${If} $PortableMode = 0 SetRegView 64 ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "UninstallString" - StrCmp $R0 "" done64 + StrCmp $R0 "" done ${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} - uninst64: + uninst: ClearErrors ExecWait "$R0" - done64: + done: ${Else} Abort @@ -302,21 +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.x86.exe" VcRedist86Exists PastVcRedist86Check - VcRedist86Exists: - ExecWait '"$INSTDIR\vc_redist.x86.exe" /passive /norestart' - DetailPrint "Wait to ensure unlock of vc_redist file after installation..." - Sleep 3000 - Delete "$INSTDIR\vc_redist.x86.exe" - PastVcRedist86Check: - - IfFileExists "$INSTDIR\vc_redist.x64.exe" VcRedist64Exists PastVcRedist64Check - VcRedist64Exists: + IfFileExists "$INSTDIR\vc_redist.x64.exe" VcRedistExists PastVcRedistCheck + VcRedistExists: 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" - PastVcRedist64Check: + PastVcRedistCheck: ${Else} ; Create the file the application uses to detect portable mode diff --git a/cockatrice/CMakeLists.txt b/cockatrice/CMakeLists.txt index 5fe2ce163..14447317d 100644 --- a/cockatrice/CMakeLists.txt +++ b/cockatrice/CMakeLists.txt @@ -426,21 +426,21 @@ if(Qt6_FOUND) ${cockatrice_MOC_SRCS} MANUAL_FINALIZATION ) - - target_link_libraries( - cockatrice - PUBLIC libcockatrice_card - libcockatrice_deck_list - libcockatrice_filters - libcockatrice_utility - libcockatrice_network - libcockatrice_models - libcockatrice_rng - libcockatrice_settings - ${COCKATRICE_QT_MODULES} - ) endif() +target_link_libraries( + cockatrice + PUBLIC libcockatrice_card + libcockatrice_deck_list + libcockatrice_filters + libcockatrice_utility + libcockatrice_network + libcockatrice_models + libcockatrice_rng + libcockatrice_settings + ${COCKATRICE_QT_MODULES} +) + if(UNIX) if(APPLE) set(MACOSX_BUNDLE_INFO_STRING "${PROJECT_NAME}")