mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-21 00:55:09 -07:00
Compare commits
2 commits
b6614beeb4
...
5d65adfc9c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d65adfc9c | ||
|
|
c892f7fc46 |
22 changed files with 195 additions and 148 deletions
|
|
@ -41,37 +41,40 @@ set(QT_COMPONENTS_ORACLE Concurrent Network Svg Widgets)
|
|||
|
||||
set(QT_COMPONENTS_SERVATRICE Network Sql WebSockets)
|
||||
|
||||
# Union of Qt modules required across all test targets (independent of application targets).
|
||||
# When adding a new test that needs additional Qt modules, add them here instead to tests/CMakeLists.txt.
|
||||
set(QT_COMPONENTS_TEST Concurrent Network Svg Widgets)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Determine which Qt components are required for this build
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
set(REQUIRED_QT_COMPONENTS Core)
|
||||
set(QT_COMPONENTS_REQUIRED Core)
|
||||
|
||||
if(WITH_CLIENT)
|
||||
list(APPEND REQUIRED_QT_COMPONENTS ${QT_COMPONENTS_COCKATRICE})
|
||||
list(APPEND QT_COMPONENTS_REQUIRED ${QT_COMPONENTS_COCKATRICE})
|
||||
endif()
|
||||
|
||||
if(WITH_ORACLE)
|
||||
list(APPEND REQUIRED_QT_COMPONENTS ${QT_COMPONENTS_ORACLE})
|
||||
list(APPEND QT_COMPONENTS_REQUIRED ${QT_COMPONENTS_ORACLE})
|
||||
endif()
|
||||
|
||||
if(WITH_SERVER)
|
||||
list(APPEND REQUIRED_QT_COMPONENTS ${QT_COMPONENTS_SERVATRICE})
|
||||
list(APPEND QT_COMPONENTS_REQUIRED ${QT_COMPONENTS_SERVATRICE})
|
||||
endif()
|
||||
|
||||
if(TEST)
|
||||
list(APPEND REQUIRED_QT_COMPONENTS ${QT_COMPONENTS_TEST})
|
||||
list(APPEND QT_COMPONENTS_REQUIRED ${QT_COMPONENTS_TEST})
|
||||
endif()
|
||||
|
||||
list(REMOVE_DUPLICATES REQUIRED_QT_COMPONENTS)
|
||||
list(REMOVE_DUPLICATES QT_COMPONENTS_REQUIRED)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Find Qt and define minimum version centrally
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
find_package(Qt6 6.4 REQUIRED COMPONENTS ${REQUIRED_QT_COMPONENTS} LinguistTools)
|
||||
# Add Qt Linguist as required component unrelated of build target
|
||||
find_package(Qt6 6.4 REQUIRED COMPONENTS ${QT_COMPONENTS_REQUIRED} LinguistTools)
|
||||
|
||||
set(QT_MAIN_VERSION_STRING Qt6)
|
||||
|
||||
|
|
@ -92,10 +95,11 @@ else()
|
|||
endif()
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Convert components list, e.g.: Network;Sql;WebSockets
|
||||
# into Qt modules: Qt6::Network;Qt6::Sql;Qt6::WebSockets
|
||||
# Export Qt target lists for individual targets
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# Convert components list into Qt modules, e.g.
|
||||
# Network;Sql;WebSockets --> Qt6::Network;Qt6::Sql;Qt6::WebSockets
|
||||
function(_qt_components_to_targets COMPONENTS OUTPUT_VARIABLE)
|
||||
set(TARGETS)
|
||||
|
||||
|
|
@ -109,10 +113,6 @@ function(_qt_components_to_targets COMPONENTS OUTPUT_VARIABLE)
|
|||
)
|
||||
endfunction()
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Export Qt target lists for the individual targets
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
if(WITH_CLIENT)
|
||||
_qt_components_to_targets("${QT_COMPONENTS_COCKATRICE}" QT_MODULES_COCKATRICE)
|
||||
endif()
|
||||
|
|
@ -133,7 +133,7 @@ endif()
|
|||
set(QT_CORE_MODULE "${QT_MAIN_VERSION_STRING}::Core")
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Qt runtime/plugin paths
|
||||
# Qt runtime library & plugin paths
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
if(NOT TARGET "${QT_CORE_MODULE}")
|
||||
|
|
@ -146,7 +146,7 @@ get_filename_component(QT_LIBRARY_DIR "${QT_LIBRARY_DIR}/../../.." ABSOLUTE)
|
|||
get_filename_component(QT_PLUGINS_DIR "${Qt6Core_DIR}/../../../${QT6_INSTALL_PLUGINS}" ABSOLUTE)
|
||||
|
||||
if(UNIX AND APPLE)
|
||||
# macOS needs a bit more help finding all necessary components.
|
||||
# macOS needs a bit more help finding all necessary components
|
||||
list(APPEND QT_LIBRARY_DIR "/usr/local/lib")
|
||||
endif()
|
||||
|
||||
|
|
@ -155,7 +155,7 @@ endif()
|
|||
# ---------------------------------------------------------------------------
|
||||
|
||||
message(STATUS "Found Qt: ${Qt6_DIR} (found version \"${Qt6_VERSION}\")")
|
||||
message(STATUS "REQUIRED_QT_COMPONENTS = ${REQUIRED_QT_COMPONENTS}")
|
||||
message(STATUS "QT_COMPONENTS_REQUIRED = ${QT_COMPONENTS_REQUIRED}")
|
||||
if(WITH_CLIENT)
|
||||
message(STATUS "QT_MODULES_COCKATRICE = ${QT_MODULES_COCKATRICE}")
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -57,13 +57,21 @@ 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
|
||||
${EndIf}
|
||||
StrCpy $NormalDestDir "$ProgramFiles64\Cockatrice"
|
||||
SetRegView 64
|
||||
${Else} #NSIS 32bit
|
||||
${If} ${RunningX64}
|
||||
MessageBox MB_OK|MB_ICONEXCLAMATION \
|
||||
"You are about to install a 32-bit version of Cockatrice on a 64-bit Windows system.$\n\
|
||||
We advise you to use the correct 64-bit installer instead to get around potential issues.$\n$\n\
|
||||
Download from our webpage: https://cockatrice.github.io"
|
||||
${EndIf}
|
||||
StrCpy $NormalDestDir "$ProgramFiles\Cockatrice"
|
||||
${EndIf}
|
||||
|
||||
StrCpy $PortableDestDir "$Desktop\CockatricePortable"
|
||||
|
|
@ -148,6 +156,7 @@ ${If} $8 != "admin"
|
|||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
|
||||
Function SetModeDestinationFromInstdir
|
||||
${If} $PortableMode = 0
|
||||
StrCpy $NormalDestDir $InstDir
|
||||
|
|
@ -166,14 +175,27 @@ Function AutoUninstallIfNeeded
|
|||
|
||||
SetShellVarContext all
|
||||
|
||||
SetRegView 64
|
||||
; --- 32-bit uninstall ---
|
||||
SetRegView 32
|
||||
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "QuietUninstallString"
|
||||
|
||||
StrCmp $R0 "" done64
|
||||
DetailPrint "Removing previous version..."
|
||||
StrCmp $R0 "" done32
|
||||
DetailPrint "Removing previous version (32-bit)..."
|
||||
ExecWait '$R0'
|
||||
|
||||
done64:
|
||||
done32:
|
||||
|
||||
; --- 64-bit uninstall ---
|
||||
${If} ${RunningX64}
|
||||
SetRegView 64
|
||||
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "QuietUninstallString"
|
||||
|
||||
StrCmp $R0 "" done64
|
||||
DetailPrint "Removing previous version (64-bit)..."
|
||||
ExecWait '$R0'
|
||||
|
||||
done64:
|
||||
${EndIf}
|
||||
|
||||
FunctionEnd
|
||||
|
||||
|
|
@ -222,23 +244,45 @@ ${EndIf}
|
|||
${If} $PortableMode = 0
|
||||
SetShellVarContext all
|
||||
|
||||
SetRegView 64
|
||||
# uninstall 32bit version
|
||||
SetRegView 32
|
||||
|
||||
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "UninstallString"
|
||||
StrCmp $R0 "" done64
|
||||
StrCmp $R0 "" done32
|
||||
|
||||
${If} $ReinstallMode = 0
|
||||
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "A previous version of Cockatrice must be uninstalled before installing the new one." IDOK uninst64
|
||||
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "A previous version of Cockatrice must be uninstalled before installing the new one." IDOK uninst32
|
||||
Abort
|
||||
${Else}
|
||||
Goto uninst64
|
||||
Goto uninst32
|
||||
${EndIf}
|
||||
|
||||
uninst64:
|
||||
uninst32:
|
||||
ClearErrors
|
||||
ExecWait "$R0"
|
||||
|
||||
done64:
|
||||
done32:
|
||||
|
||||
# uninstall 64bit version
|
||||
${If} ${NSIS_IS_64_BIT} == 1
|
||||
SetRegView 64
|
||||
|
||||
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "UninstallString"
|
||||
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
|
||||
Abort
|
||||
${Else}
|
||||
Goto uninst64
|
||||
${EndIf}
|
||||
|
||||
uninst64:
|
||||
ClearErrors
|
||||
ExecWait "$R0"
|
||||
|
||||
done64:
|
||||
${EndIf}
|
||||
|
||||
${Else}
|
||||
Abort
|
||||
|
|
@ -252,62 +296,70 @@ SetOutPath "$INSTDIR"
|
|||
|
||||
${If} $PortableMode = 1
|
||||
${AndIf} ${FileExists} "$INSTDIR\portable.dat"
|
||||
; upgrade portable mode
|
||||
RMDir /r "$INSTDIR\plugins"
|
||||
RMDir /r "$INSTDIR\sounds"
|
||||
RMDir /r "$INSTDIR\themes"
|
||||
RMDir /r "$INSTDIR\translations"
|
||||
Delete "$INSTDIR\uninstall.exe"
|
||||
Delete "$INSTDIR\cockatrice.exe"
|
||||
Delete "$INSTDIR\oracle.exe"
|
||||
Delete "$INSTDIR\servatrice.exe"
|
||||
Delete "$INSTDIR\Qt*.dll"
|
||||
Delete "$INSTDIR\libmysql.dll"
|
||||
Delete "$INSTDIR\icu*.dll"
|
||||
Delete "$INSTDIR\libeay32.dll"
|
||||
Delete "$INSTDIR\ssleay32.dll"
|
||||
Delete "$INSTDIR\qt.conf"
|
||||
Delete "$INSTDIR\qdebug.txt"
|
||||
Delete "$INSTDIR\servatrice.sql"
|
||||
Delete "$INSTDIR\servatrice.ini.example"
|
||||
Delete "$INSTDIR\zlib*.dll"
|
||||
RMDir "$INSTDIR"
|
||||
; upgrade portable mode
|
||||
RMDir /r "$INSTDIR\plugins"
|
||||
RMDir /r "$INSTDIR\sounds"
|
||||
RMDir /r "$INSTDIR\themes"
|
||||
RMDir /r "$INSTDIR\translations"
|
||||
Delete "$INSTDIR\uninstall.exe"
|
||||
Delete "$INSTDIR\cockatrice.exe"
|
||||
Delete "$INSTDIR\oracle.exe"
|
||||
Delete "$INSTDIR\servatrice.exe"
|
||||
Delete "$INSTDIR\Qt*.dll"
|
||||
Delete "$INSTDIR\libmysql.dll"
|
||||
Delete "$INSTDIR\icu*.dll"
|
||||
Delete "$INSTDIR\libeay32.dll"
|
||||
Delete "$INSTDIR\ssleay32.dll"
|
||||
Delete "$INSTDIR\qt.conf"
|
||||
Delete "$INSTDIR\qdebug.txt"
|
||||
Delete "$INSTDIR\servatrice.sql"
|
||||
Delete "$INSTDIR\servatrice.ini.example"
|
||||
Delete "$INSTDIR\zlib*.dll"
|
||||
RMDir "$INSTDIR"
|
||||
${EndIf}
|
||||
|
||||
@CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS@
|
||||
@CPACK_NSIS_FULL_INSTALL@
|
||||
|
||||
${If} $PortableMode = 0
|
||||
WriteUninstaller "$INSTDIR\uninstall.exe"
|
||||
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
|
||||
IntFmt $0 "0x%08X" $0
|
||||
WriteUninstaller "$INSTDIR\uninstall.exe"
|
||||
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
|
||||
IntFmt $0 "0x%08X" $0
|
||||
|
||||
; Enable Windows User-Mode Dumps
|
||||
; https://learn.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps
|
||||
WriteRegExpandStr HKLM "Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\cockatrice.exe" "DumpFolder" "%LOCALAPPDATA%\CrashDumps\Cockatrice"
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\cockatrice.exe" "DumpCount" "5"
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\cockatrice.exe" "DumpType" "2"
|
||||
; Enable Windows User-Mode Dumps
|
||||
; https://learn.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps
|
||||
WriteRegExpandStr HKLM "Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\cockatrice.exe" "DumpFolder" "%LOCALAPPDATA%\CrashDumps\Cockatrice"
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\cockatrice.exe" "DumpCount" "5"
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\cockatrice.exe" "DumpType" "2"
|
||||
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "DisplayIcon" "$INSTDIR\cockatrice.exe"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "DisplayName" "Cockatrice"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "DisplayVersion" "@CPACK_PACKAGE_VERSION_MAJOR@.@CPACK_PACKAGE_VERSION_MINOR@.@CPACK_PACKAGE_VERSION_PATCH@"
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "EstimatedSize" "$0"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "InstallLocation" "$INSTDIR"
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "NoModify" "1"
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "NoRepair" "1"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "Publisher" "Cockatrice team"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
|
||||
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@"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "DisplayIcon" "$INSTDIR\cockatrice.exe"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "DisplayName" "Cockatrice"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "DisplayVersion" "@CPACK_PACKAGE_VERSION_MAJOR@.@CPACK_PACKAGE_VERSION_MINOR@.@CPACK_PACKAGE_VERSION_PATCH@"
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "EstimatedSize" "$0"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "InstallLocation" "$INSTDIR"
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "NoModify" "1"
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "NoRepair" "1"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "Publisher" "Cockatrice team"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
|
||||
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" 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"
|
||||
PastVcRedist64Check:
|
||||
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:
|
||||
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:
|
||||
|
||||
${Else}
|
||||
; Create the file the application uses to detect portable mode
|
||||
|
|
@ -325,51 +377,51 @@ SectionEnd
|
|||
|
||||
Section "Start menu item" SecStartMenu
|
||||
${If} $PortableMode = 0
|
||||
SetShellVarContext all
|
||||
createDirectory "$SMPROGRAMS\Cockatrice"
|
||||
createShortCut "$SMPROGRAMS\Cockatrice\Cockatrice.lnk" "$INSTDIR\cockatrice.exe"
|
||||
createShortCut "$SMPROGRAMS\Cockatrice\Oracle.lnk" "$INSTDIR\oracle.exe"
|
||||
createShortCut "$SMPROGRAMS\Cockatrice\Servatrice.lnk" "$INSTDIR\servatrice.exe"
|
||||
SetShellVarContext all
|
||||
createDirectory "$SMPROGRAMS\Cockatrice"
|
||||
createShortCut "$SMPROGRAMS\Cockatrice\Cockatrice.lnk" "$INSTDIR\cockatrice.exe"
|
||||
createShortCut "$SMPROGRAMS\Cockatrice\Oracle.lnk" "$INSTDIR\oracle.exe"
|
||||
createShortCut "$SMPROGRAMS\Cockatrice\Servatrice.lnk" "$INSTDIR\servatrice.exe"
|
||||
${EndIf}
|
||||
SectionEnd
|
||||
|
||||
Section "un.Application" UnSecApplication
|
||||
SetShellVarContext all
|
||||
RMDir /r "$INSTDIR\plugins"
|
||||
RMDir /r "$INSTDIR\sounds"
|
||||
RMDir /r "$INSTDIR\themes"
|
||||
RMDir /r "$INSTDIR\translations"
|
||||
Delete "$INSTDIR\*.exe"
|
||||
Delete "$INSTDIR\*.dll"
|
||||
Delete "$INSTDIR\qt.conf"
|
||||
Delete "$INSTDIR\qdebug.txt"
|
||||
Delete "$INSTDIR\servatrice.sql"
|
||||
Delete "$INSTDIR\servatrice.ini.example"
|
||||
RMDir "$INSTDIR"
|
||||
SetShellVarContext all
|
||||
RMDir /r "$INSTDIR\plugins"
|
||||
RMDir /r "$INSTDIR\sounds"
|
||||
RMDir /r "$INSTDIR\themes"
|
||||
RMDir /r "$INSTDIR\translations"
|
||||
Delete "$INSTDIR\*.exe"
|
||||
Delete "$INSTDIR\*.dll"
|
||||
Delete "$INSTDIR\qt.conf"
|
||||
Delete "$INSTDIR\qdebug.txt"
|
||||
Delete "$INSTDIR\servatrice.sql"
|
||||
Delete "$INSTDIR\servatrice.ini.example"
|
||||
RMDir "$INSTDIR"
|
||||
|
||||
RMDir "$SMPROGRAMS\Cockatrice"
|
||||
RMDir "$SMPROGRAMS\Cockatrice"
|
||||
|
||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice"
|
||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice"
|
||||
SectionEnd
|
||||
|
||||
; unselected because it is /o
|
||||
Section /o "un.Configurations, decks, cards, pics" UnSecConfiguration
|
||||
SetShellVarContext current
|
||||
DeleteRegKey HKCU "Software\Cockatrice"
|
||||
SetShellVarContext current
|
||||
DeleteRegKey HKCU "Software\Cockatrice"
|
||||
|
||||
RMDir /r "$LOCALAPPDATA\Cockatrice"
|
||||
RMDir /r "$LOCALAPPDATA\Cockatrice"
|
||||
SectionEnd
|
||||
|
||||
LangString DESC_SecApplication ${LANG_ENGLISH} "Cockatrice program files"
|
||||
LangString DESC_SecStartMenu ${LANG_ENGLISH} "Create start menu items for Cockatrice and Oracle."
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecApplication} $(DESC_SecApplication)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecStartMenu} $(DESC_SecStartMenu)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecApplication} $(DESC_SecApplication)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecStartMenu} $(DESC_SecStartMenu)
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||
|
||||
LangString DESC_UnSecApplication ${LANG_ENGLISH} "Cockatrice program files and start menu items"
|
||||
LangString DESC_UnSecConfiguration ${LANG_ENGLISH} "Configurations, decks, card database, pictures"
|
||||
!insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${UnSecApplication} $(DESC_UnSecApplication)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${UnSecConfiguration} $(DESC_UnSecConfiguration)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${UnSecApplication} $(DESC_UnSecApplication)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${UnSecConfiguration} $(DESC_UnSecConfiguration)
|
||||
!insertmacro MUI_UNFUNCTION_DESCRIPTION_END
|
||||
|
|
|
|||
|
|
@ -551,7 +551,7 @@ target_link_libraries(
|
|||
libcockatrice_models
|
||||
libcockatrice_rng
|
||||
libcockatrice_settings
|
||||
${COCKATRICE_QT_MODULES}
|
||||
${QT_MODULES_COCKATRICE}
|
||||
)
|
||||
|
||||
if(UNIX)
|
||||
|
|
|
|||
|
|
@ -10,5 +10,5 @@ add_library(libcockatrice_network INTERFACE)
|
|||
target_include_directories(libcockatrice_network INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
target_link_libraries(
|
||||
libcockatrice_network INTERFACE ${COCKATRICE_QT_MODULES} libcockatrice_network_client libcockatrice_network_server
|
||||
libcockatrice_network INTERFACE ${QT_MODULES_COCKATRICE} libcockatrice_network_client libcockatrice_network_server
|
||||
)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ target_include_directories(libcockatrice_network_client INTERFACE .)
|
|||
|
||||
target_link_libraries(
|
||||
libcockatrice_network_client
|
||||
INTERFACE ${COCKATRICE_QT_VERSION_NAME}::Network ${COCKATRICE_QT_VERSION_NAME}::WebSockets
|
||||
INTERFACE ${QT_MAIN_VERSION_STRING}::Network ${QT_MAIN_VERSION_STRING}::WebSockets
|
||||
libcockatrice_network_client_abstract libcockatrice_network_client_local
|
||||
libcockatrice_network_client_remote
|
||||
)
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ add_dependencies(libcockatrice_network_client_abstract libcockatrice_protocol li
|
|||
target_include_directories(libcockatrice_network_client_abstract PUBLIC .)
|
||||
|
||||
target_link_libraries(
|
||||
libcockatrice_network_client_abstract
|
||||
PUBLIC ${COCKATRICE_QT_VERSION_NAME}::Network ${COCKATRICE_QT_VERSION_NAME}::WebSockets libcockatrice_protocol
|
||||
libcockatrice_network_server_remote
|
||||
libcockatrice_network_client_abstract PUBLIC ${QT_MAIN_VERSION_STRING}::Network ${QT_MAIN_VERSION_STRING}::WebSockets
|
||||
libcockatrice_protocol libcockatrice_network_server_remote
|
||||
)
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ add_dependencies(libcockatrice_network_client_local libcockatrice_network_client
|
|||
target_include_directories(libcockatrice_network_client_local PUBLIC .)
|
||||
|
||||
target_link_libraries(
|
||||
libcockatrice_network_client_local
|
||||
PUBLIC ${COCKATRICE_QT_VERSION_NAME}::Network ${COCKATRICE_QT_VERSION_NAME}::WebSockets
|
||||
libcockatrice_network_client_abstract
|
||||
libcockatrice_network_client_local PUBLIC ${QT_MAIN_VERSION_STRING}::Network ${QT_MAIN_VERSION_STRING}::WebSockets
|
||||
libcockatrice_network_client_abstract
|
||||
)
|
||||
|
|
|
|||
|
|
@ -16,6 +16,6 @@ target_include_directories(libcockatrice_network_client_remote PUBLIC .)
|
|||
|
||||
target_link_libraries(
|
||||
libcockatrice_network_client_remote
|
||||
PUBLIC ${COCKATRICE_QT_VERSION_NAME}::Network ${COCKATRICE_QT_VERSION_NAME}::WebSockets
|
||||
libcockatrice_network_client_abstract libcockatrice_interfaces libcockatrice_utility libcockatrice_protocol
|
||||
PUBLIC ${QT_MAIN_VERSION_STRING}::Network ${QT_MAIN_VERSION_STRING}::WebSockets libcockatrice_network_client_abstract
|
||||
libcockatrice_interfaces libcockatrice_utility libcockatrice_protocol
|
||||
)
|
||||
|
|
|
|||
|
|
@ -10,6 +10,6 @@ add_library(libcockatrice_network_server INTERFACE)
|
|||
target_include_directories(libcockatrice_network_server INTERFACE .)
|
||||
|
||||
target_link_libraries(
|
||||
libcockatrice_network_server INTERFACE ${COCKATRICE_QT_MODULES} libcockatrice_network_server_local
|
||||
libcockatrice_network_server INTERFACE ${QT_MODULES_COCKATRICE} libcockatrice_network_server_local
|
||||
libcockatrice_network_server_remote
|
||||
)
|
||||
|
|
|
|||
|
|
@ -14,4 +14,4 @@ add_dependencies(libcockatrice_network_server_local libcockatrice_protocol)
|
|||
|
||||
target_include_directories(libcockatrice_network_server_local PUBLIC .)
|
||||
|
||||
target_link_libraries(libcockatrice_network_server_local PUBLIC ${COCKATRICE_QT_MODULES} libcockatrice_protocol)
|
||||
target_link_libraries(libcockatrice_network_server_local PUBLIC ${QT_MODULES_COCKATRICE} libcockatrice_protocol)
|
||||
|
|
|
|||
|
|
@ -60,5 +60,5 @@ target_include_directories(libcockatrice_network_server_remote PUBLIC .)
|
|||
# Make cockatrice_server depend on cockatrice_protocol
|
||||
target_link_libraries(
|
||||
libcockatrice_network_server_remote PUBLIC libcockatrice_protocol libcockatrice_utility libcockatrice_rng
|
||||
libcockatrice_deck_list ${COCKATRICE_QT_MODULES}
|
||||
libcockatrice_deck_list ${QT_MODULES_COCKATRICE}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -39,5 +39,3 @@ find_package(OpenSSL REQUIRED)
|
|||
target_link_libraries(libcockatrice_utility PUBLIC libcockatrice_rng OpenSSL::Crypto ${QT_CORE_MODULE})
|
||||
|
||||
set(ORACLE_LIBS)
|
||||
|
||||
include_directories(${${COCKATRICE_QT_VERSION_NAME}Core_INCLUDE_DIRS})
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ target_link_libraries(
|
|||
PUBLIC libcockatrice_card
|
||||
PUBLIC libcockatrice_settings
|
||||
PUBLIC libcockatrice_network
|
||||
PUBLIC ${ORACLE_QT_MODULES}
|
||||
PUBLIC ${QT_MODULES_ORACLE}
|
||||
)
|
||||
|
||||
if(ZLIB_FOUND)
|
||||
|
|
|
|||
|
|
@ -99,12 +99,12 @@ target_precompile_headers(servatrice PRIVATE "${CMAKE_SOURCE_DIR}/cmake/pch/qtco
|
|||
|
||||
if(CMAKE_HOST_SYSTEM MATCHES "FreeBSD")
|
||||
target_link_libraries(
|
||||
servatrice libcockatrice_deck_list libcockatrice_network_server_remote Threads::Threads ${SERVATRICE_QT_MODULES}
|
||||
servatrice libcockatrice_deck_list libcockatrice_network_server_remote Threads::Threads ${QT_MODULES_SERVATRICE}
|
||||
${LIBEXECINFO_LIBRARY}
|
||||
)
|
||||
else()
|
||||
target_link_libraries(
|
||||
servatrice libcockatrice_deck_list libcockatrice_network_server_remote Threads::Threads ${SERVATRICE_QT_MODULES}
|
||||
servatrice libcockatrice_deck_list libcockatrice_network_server_remote Threads::Threads ${QT_MODULES_SERVATRICE}
|
||||
)
|
||||
endif()
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# NOTE: Qt modules for tests are defined centrally in cmake/FindQtRuntime.cmake (the _TEST_NEEDED variable).
|
||||
# NOTE: Qt modules for tests are defined centrally in cmake/FindQtRuntime.cmake (the QT_COMPONENTS_TEST variable).
|
||||
# If a new test needs additional Qt modules, add them there — not in individual test CMakeLists.txt files.
|
||||
enable_testing()
|
||||
|
||||
|
|
@ -18,8 +18,6 @@ add_test(NAME latency_tracker_test COMMAND latency_tracker_test)
|
|||
add_test(NAME deck_hash_performance_test COMMAND deck_hash_performance_test)
|
||||
set_tests_properties(deck_hash_performance_test PROPERTIES TIMEOUT 15)
|
||||
|
||||
# Find GTest
|
||||
|
||||
add_executable(dummy_test dummy_test.cpp)
|
||||
add_executable(expression_test expression_test.cpp)
|
||||
add_executable(clamped_arithmetic_test clamped_arithmetic_test.cpp)
|
||||
|
|
@ -35,6 +33,7 @@ add_executable(lag_monitor_test ${CMAKE_SOURCE_DIR}/cockatrice/src/client/lag_mo
|
|||
target_include_directories(lag_monitor_test PRIVATE ${CMAKE_SOURCE_DIR}/cockatrice/src)
|
||||
add_executable(latency_tracker_test latency_tracker_test.cpp)
|
||||
|
||||
# Find GTest
|
||||
find_package(GTest)
|
||||
|
||||
if(NOT GTEST_FOUND)
|
||||
|
|
@ -77,39 +76,39 @@ endif()
|
|||
|
||||
include_directories(${GTEST_INCLUDE_DIRS})
|
||||
target_link_libraries(dummy_test Threads::Threads ${GTEST_BOTH_LIBRARIES})
|
||||
target_link_libraries(expression_test libcockatrice_utility Threads::Threads ${GTEST_BOTH_LIBRARIES} ${TEST_QT_MODULES})
|
||||
target_link_libraries(expression_test libcockatrice_utility Threads::Threads ${GTEST_BOTH_LIBRARIES} ${QT_MODULES_TEST})
|
||||
target_link_libraries(
|
||||
clamped_arithmetic_test libcockatrice_utility Threads::Threads ${GTEST_BOTH_LIBRARIES} ${TEST_QT_MODULES}
|
||||
clamped_arithmetic_test libcockatrice_utility Threads::Threads ${GTEST_BOTH_LIBRARIES} ${QT_MODULES_TEST}
|
||||
)
|
||||
target_link_libraries(
|
||||
test_age_formatting libcockatrice_utility Threads::Threads ${GTEST_BOTH_LIBRARIES} ${TEST_QT_MODULES}
|
||||
test_age_formatting libcockatrice_utility Threads::Threads ${GTEST_BOTH_LIBRARIES} ${QT_MODULES_TEST}
|
||||
)
|
||||
target_link_libraries(
|
||||
password_hash_test libcockatrice_utility Threads::Threads ${GTEST_BOTH_LIBRARIES} ${TEST_QT_MODULES}
|
||||
password_hash_test libcockatrice_utility Threads::Threads ${GTEST_BOTH_LIBRARIES} ${QT_MODULES_TEST}
|
||||
)
|
||||
target_link_libraries(
|
||||
playmat_resolver_test libcockatrice_deck_list libcockatrice_utility Threads::Threads ${GTEST_BOTH_LIBRARIES}
|
||||
${TEST_QT_MODULES}
|
||||
${QT_MODULES_TEST}
|
||||
)
|
||||
target_link_libraries(
|
||||
deck_hash_performance_test libcockatrice_deck_list libcockatrice_utility Threads::Threads ${GTEST_BOTH_LIBRARIES}
|
||||
${TEST_QT_MODULES}
|
||||
${QT_MODULES_TEST}
|
||||
)
|
||||
target_link_libraries(
|
||||
server_card_counter_test libcockatrice_network Threads::Threads ${GTEST_BOTH_LIBRARIES} ${TEST_QT_MODULES}
|
||||
server_card_counter_test libcockatrice_network Threads::Threads ${GTEST_BOTH_LIBRARIES} ${QT_MODULES_TEST}
|
||||
)
|
||||
target_link_libraries(
|
||||
server_counter_test libcockatrice_network Threads::Threads ${GTEST_BOTH_LIBRARIES} ${TEST_QT_MODULES}
|
||||
server_counter_test libcockatrice_network Threads::Threads ${GTEST_BOTH_LIBRARIES} ${QT_MODULES_TEST}
|
||||
)
|
||||
target_link_libraries(
|
||||
server_rate_limiter_test libcockatrice_utility Threads::Threads ${GTEST_BOTH_LIBRARIES} ${TEST_QT_MODULES}
|
||||
server_rate_limiter_test libcockatrice_utility Threads::Threads ${GTEST_BOTH_LIBRARIES} ${QT_MODULES_TEST}
|
||||
)
|
||||
target_link_libraries(
|
||||
warning_categories_test libcockatrice_utility Threads::Threads ${GTEST_BOTH_LIBRARIES} ${TEST_QT_MODULES}
|
||||
warning_categories_test libcockatrice_utility Threads::Threads ${GTEST_BOTH_LIBRARIES} ${QT_MODULES_TEST}
|
||||
)
|
||||
target_link_libraries(lag_monitor_test Threads::Threads ${GTEST_BOTH_LIBRARIES} ${TEST_QT_MODULES})
|
||||
target_link_libraries(lag_monitor_test Threads::Threads ${GTEST_BOTH_LIBRARIES} ${QT_MODULES_TEST})
|
||||
target_link_libraries(
|
||||
latency_tracker_test libcockatrice_network Threads::Threads ${GTEST_BOTH_LIBRARIES} ${TEST_QT_MODULES}
|
||||
latency_tracker_test libcockatrice_network Threads::Threads ${GTEST_BOTH_LIBRARIES} ${QT_MODULES_TEST}
|
||||
)
|
||||
|
||||
add_subdirectory(card_zone_algorithms)
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ target_link_libraries(
|
|||
PRIVATE libcockatrice_card
|
||||
PRIVATE Threads::Threads
|
||||
PRIVATE ${GTEST_BOTH_LIBRARIES}
|
||||
PRIVATE ${TEST_QT_MODULES}
|
||||
PRIVATE ${QT_MODULES_TEST}
|
||||
)
|
||||
|
||||
add_test(NAME carddatabase_test COMMAND carddatabase_test)
|
||||
|
|
@ -32,7 +32,7 @@ target_link_libraries(
|
|||
PRIVATE libcockatrice_models
|
||||
PRIVATE Threads::Threads
|
||||
PRIVATE ${GTEST_BOTH_LIBRARIES}
|
||||
PRIVATE ${TEST_QT_MODULES}
|
||||
PRIVATE ${QT_MODULES_TEST}
|
||||
)
|
||||
|
||||
if(NOT GTEST_FOUND)
|
||||
|
|
@ -51,7 +51,7 @@ if(WITH_ORACLE OR WITH_CLIENT)
|
|||
PRIVATE libcockatrice_filters
|
||||
PRIVATE Threads::Threads
|
||||
PRIVATE ${GTEST_BOTH_LIBRARIES}
|
||||
PRIVATE ${TEST_QT_MODULES}
|
||||
PRIVATE ${QT_MODULES_TEST}
|
||||
)
|
||||
|
||||
add_test(NAME filter_string_test COMMAND filter_string_test)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ target_link_libraries(
|
|||
libcockatrice_deck_list
|
||||
Threads::Threads
|
||||
${GTEST_BOTH_LIBRARIES}
|
||||
${TEST_QT_MODULES}
|
||||
${QT_MODULES_TEST}
|
||||
)
|
||||
add_test(NAME deck_list_model_custom_zones_test COMMAND deck_list_model_custom_zones_test)
|
||||
|
||||
|
|
@ -28,6 +28,6 @@ target_link_libraries(
|
|||
libcockatrice_deck_list
|
||||
Threads::Threads
|
||||
${GTEST_BOTH_LIBRARIES}
|
||||
${TEST_QT_MODULES}
|
||||
${QT_MODULES_TEST}
|
||||
)
|
||||
add_test(NAME deck_list_model_zone_integration_test COMMAND deck_list_model_zone_integration_test)
|
||||
|
|
|
|||
|
|
@ -5,6 +5,6 @@ if(NOT GTEST_FOUND)
|
|||
endif()
|
||||
|
||||
target_link_libraries(
|
||||
deck_list_zones_test libcockatrice_deck_list Threads::Threads ${GTEST_BOTH_LIBRARIES} ${TEST_QT_MODULES}
|
||||
deck_list_zones_test libcockatrice_deck_list Threads::Threads ${GTEST_BOTH_LIBRARIES} ${QT_MODULES_TEST}
|
||||
)
|
||||
add_test(NAME deck_list_zones_test COMMAND deck_list_zones_test)
|
||||
|
|
|
|||
|
|
@ -7,6 +7,6 @@ endif()
|
|||
|
||||
target_link_libraries(
|
||||
loading_from_clipboard_test libcockatrice_deck_list libcockatrice_card Threads::Threads ${GTEST_BOTH_LIBRARIES}
|
||||
${TEST_QT_MODULES}
|
||||
${QT_MODULES_TEST}
|
||||
)
|
||||
add_test(NAME loading_from_clipboard_test COMMAND loading_from_clipboard_test)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ target_link_libraries(
|
|||
PRIVATE libcockatrice_rng
|
||||
PRIVATE Threads::Threads
|
||||
PRIVATE ${GTEST_BOTH_LIBRARIES}
|
||||
PRIVATE ${TEST_QT_MODULES}
|
||||
PRIVATE ${QT_MODULES_TEST}
|
||||
)
|
||||
|
||||
add_test(NAME reverse_card_move_test COMMAND reverse_card_move_test)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ if(NOT GTEST_FOUND)
|
|||
add_dependencies(parse_cipt_test gtest)
|
||||
endif()
|
||||
|
||||
target_link_libraries(parse_cipt_test Threads::Threads ${GTEST_BOTH_LIBRARIES} ${TEST_QT_MODULES})
|
||||
target_link_libraries(parse_cipt_test Threads::Threads ${GTEST_BOTH_LIBRARIES} ${QT_MODULES_TEST})
|
||||
|
||||
add_test(NAME parse_cipt_test COMMAND parse_cipt_test)
|
||||
|
||||
|
|
@ -20,7 +20,7 @@ endif()
|
|||
|
||||
target_link_libraries(
|
||||
oracle_importer_test libcockatrice_card libcockatrice_interfaces Threads::Threads ${GTEST_BOTH_LIBRARIES}
|
||||
${TEST_QT_MODULES}
|
||||
${QT_MODULES_TEST}
|
||||
)
|
||||
|
||||
add_test(NAME oracle_importer_test COMMAND oracle_importer_test)
|
||||
|
|
@ -64,6 +64,6 @@ target_link_libraries(
|
|||
libcockatrice_interfaces
|
||||
Threads::Threads
|
||||
${GTEST_BOTH_LIBRARIES}
|
||||
${TEST_QT_MODULES}
|
||||
${QT_MODULES_TEST}
|
||||
${_ORACLE_BENCH_EXTRA_LIBRARIES}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -3,16 +3,16 @@ add_executable(settings_defaults_test settings_defaults_test.cpp)
|
|||
add_executable(settings_migration_test settings_migration_test.cpp)
|
||||
|
||||
target_link_libraries(
|
||||
settings_manager_test libcockatrice_settings Threads::Threads ${GTEST_BOTH_LIBRARIES} ${TEST_QT_MODULES}
|
||||
settings_manager_test libcockatrice_settings Threads::Threads ${GTEST_BOTH_LIBRARIES} ${QT_MODULES_TEST}
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
settings_defaults_test libcockatrice_settings Threads::Threads ${GTEST_BOTH_LIBRARIES} ${TEST_QT_MODULES}
|
||||
settings_defaults_test libcockatrice_settings Threads::Threads ${GTEST_BOTH_LIBRARIES} ${QT_MODULES_TEST}
|
||||
)
|
||||
target_compile_definitions(settings_defaults_test PRIVATE SETTINGS_UNIT_TEST)
|
||||
|
||||
target_link_libraries(
|
||||
settings_migration_test libcockatrice_settings Threads::Threads ${GTEST_BOTH_LIBRARIES} ${TEST_QT_MODULES}
|
||||
settings_migration_test libcockatrice_settings Threads::Threads ${GTEST_BOTH_LIBRARIES} ${QT_MODULES_TEST}
|
||||
)
|
||||
|
||||
add_test(NAME settings_manager_test COMMAND settings_manager_test)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue