mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-09 09:33:57 -07:00
More 32bit and cleanup
This commit is contained in:
parent
2ce9168afb
commit
4719542e18
2 changed files with 93 additions and 107 deletions
|
|
@ -51,15 +51,14 @@ if(WIN32 OR USE_VCPKG)
|
||||||
# Use vcpkg toolchain on Windows (and on macOS in CI)
|
# Use vcpkg toolchain on Windows (and on macOS in CI)
|
||||||
set(CMAKE_TOOLCHAIN_FILE
|
set(CMAKE_TOOLCHAIN_FILE
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake
|
${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake
|
||||||
CACHE STRING "Vcpkg toolchain file"
|
CACHE FILEPATH "Vcpkg toolchain file"
|
||||||
)
|
|
||||||
# Qt path set by user or env var
|
|
||||||
if(QTDIR
|
|
||||||
OR DEFINED ENV{QTDIR}
|
|
||||||
OR DEFINED ENV{QTDIR64}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
else()
|
# Show warning if QTDIR is NOT defined
|
||||||
|
if(NOT QTDIR
|
||||||
|
AND NOT DEFINED ENV{QTDIR}
|
||||||
|
AND NOT DEFINED ENV{QTDIR64}
|
||||||
|
)
|
||||||
set(QTDIR
|
set(QTDIR
|
||||||
""
|
""
|
||||||
CACHE PATH "Path to Qt (e.g. C:/Qt/5.7/msvc2015_64)"
|
CACHE PATH "Path to Qt (e.g. C:/Qt/5.7/msvc2015_64)"
|
||||||
|
|
@ -196,16 +195,10 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
||||||
add_definitions("-DSFMT_MEXP=19937")
|
add_definitions("-DSFMT_MEXP=19937")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(Qt6 6.4 REQUIRED)
|
|
||||||
|
|
||||||
find_package(Threads REQUIRED)
|
find_package(Threads REQUIRED)
|
||||||
|
|
||||||
if(DEFINED QTDIR${_lib_suffix})
|
if(DEFINED QTDIR)
|
||||||
list(APPEND CMAKE_PREFIX_PATH "${QTDIR${_lib_suffix}}")
|
|
||||||
elseif(DEFINED QTDIR)
|
|
||||||
list(APPEND CMAKE_PREFIX_PATH "${QTDIR}")
|
list(APPEND CMAKE_PREFIX_PATH "${QTDIR}")
|
||||||
elseif(DEFINED ENV{QTDIR${_lib_suffix}})
|
|
||||||
list(APPEND CMAKE_PREFIX_PATH "$ENV{QTDIR${_lib_suffix}}")
|
|
||||||
elseif(DEFINED ENV{QTDIR})
|
elseif(DEFINED ENV{QTDIR})
|
||||||
list(APPEND CMAKE_PREFIX_PATH "$ENV{QTDIR}")
|
list(APPEND CMAKE_PREFIX_PATH "$ENV{QTDIR}")
|
||||||
endif()
|
endif()
|
||||||
|
|
@ -214,6 +207,8 @@ message(STATUS "Update Translations: ${UPDATE_TRANSLATIONS}")
|
||||||
|
|
||||||
include(FindQtRuntime)
|
include(FindQtRuntime)
|
||||||
|
|
||||||
|
find_package(Qt6 6.4 REQUIRED)
|
||||||
|
|
||||||
set(CMAKE_AUTOMOC TRUE)
|
set(CMAKE_AUTOMOC TRUE)
|
||||||
|
|
||||||
## Find other needed libraries
|
## Find other needed libraries
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ Page Custom PortableModePageCreate PortableModePageLeave
|
||||||
|
|
||||||
Function .onInit
|
Function .onInit
|
||||||
|
|
||||||
${If} ${NSIS_IS_64_BIT} == 1 #NSIS 64bit
|
${If} ${NSIS_IS_64_BIT} == 1 # NSIS 64bit
|
||||||
${IfNot} ${RunningX64}
|
${IfNot} ${RunningX64}
|
||||||
MessageBox MB_OK|MB_ICONSTOP "This version of Cockatrice requires a 64-bit Windows system."
|
MessageBox MB_OK|MB_ICONSTOP "This version of Cockatrice requires a 64-bit Windows system."
|
||||||
Abort
|
Abort
|
||||||
|
|
@ -148,7 +148,6 @@ ${If} $8 != "admin"
|
||||||
${EndIf}
|
${EndIf}
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
|
|
||||||
Function SetModeDestinationFromInstdir
|
Function SetModeDestinationFromInstdir
|
||||||
${If} $PortableMode = 0
|
${If} $PortableMode = 0
|
||||||
StrCpy $NormalDestDir $InstDir
|
StrCpy $NormalDestDir $InstDir
|
||||||
|
|
@ -171,7 +170,7 @@ SetRegView 64
|
||||||
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "QuietUninstallString"
|
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "QuietUninstallString"
|
||||||
|
|
||||||
StrCmp $R0 "" done64
|
StrCmp $R0 "" done64
|
||||||
DetailPrint "Removing previous version (64-bit)..."
|
DetailPrint "Removing previous version..."
|
||||||
ExecWait '$R0'
|
ExecWait '$R0'
|
||||||
|
|
||||||
done64:
|
done64:
|
||||||
|
|
@ -302,14 +301,6 @@ ${If} $PortableMode = 0
|
||||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "VersionMajor" "@CPACK_PACKAGE_VERSION_MAJOR@"
|
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@"
|
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
|
IfFileExists "$INSTDIR\vc_redist.x64.exe" VcRedist64Exists PastVcRedist64Check
|
||||||
VcRedist64Exists:
|
VcRedist64Exists:
|
||||||
ExecWait '"$INSTDIR\vc_redist.x64.exe" /passive /norestart'
|
ExecWait '"$INSTDIR\vc_redist.x64.exe" /passive /norestart'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue