remove logic for old ccache versions, 32bit, comments

This commit is contained in:
tooomm 2026-07-07 18:07:27 +02:00
parent 544906042a
commit d90e5263e0
10 changed files with 47 additions and 55 deletions

View file

@ -136,7 +136,7 @@ cd "$BUILD_DIR"
# Set minimum CMake Version
export CMAKE_POLICY_VERSION_MINIMUM=3.10
# Add cmake flags
# Add CMake flags
flags=("-DCMAKE_BUILD_TYPE=$BUILDTYPE")
if [[ $MAKE_SERVER ]]; then
flags+=("-DWITH_SERVER=1")
@ -150,7 +150,7 @@ fi
if [[ $USE_CCACHE ]]; then
flags+=("-DUSE_CCACHE=1")
if [[ $CCACHE_SIZE ]]; then
# note, this setting persists after running the script
# This setting persists after running the script
ccache --max-size "$CCACHE_SIZE"
fi
fi
@ -161,17 +161,11 @@ if [[ $USE_VCPKG ]]; then
flags+=("-DUSE_VCPKG=1")
fi
# Add cmake --build flags
# Add CMake --build flags
buildflags=(--config "$BUILDTYPE")
function ccachestatsverbose() {
# note, verbose only works on newer ccache, discard the error
local got
if got="$(ccache --show-stats --verbose 2>/dev/null)"; then
echo "$got"
else
ccache --show-stats
fi
ccache --show-stats --verbose
}
# Compile
@ -184,9 +178,9 @@ if [[ $RUNNER_OS == macOS ]]; then
echo "could not find QTDIR!"
exit 2
fi
# the qtdir is located at Qt/[qtversion]/macos
# we use find to get the first subfolder with the name "macos"
# this works independent of the qt version as there should be only one version installed on the runner at a time
# QTDIR is located at Qt/<QtVersion>/macos
# We use find to get the first subfolder with the name "macos"
# This works independent of the Qt version as there should be only one version installed on the runner at a time
export QTDIR
# Add QTDIR to CMAKE_PREFIX_PATH so CMake can find Qt6
export CMAKE_PREFIX_PATH="$QTDIR:$CMAKE_PREFIX_PATH"
@ -237,7 +231,7 @@ if [[ $RUNNER_OS == macOS ]]; then
if [[ $MAKE_PACKAGE ]]; then
# Workaround https://github.com/actions/runner-images/issues/7522
# have hdiutil repeat the command 10 times in hope of success
# Have hdiutil repeat the command 10 times in hope of success
hdiutil_script="/tmp/hdiutil.sh"
# shellcheck disable=SC2016
echo '#!/bin/bash

View file

@ -47,7 +47,7 @@ if(USE_CCACHE)
endif()
endif()
if(WIN32 OR USE_VCPKG)
if(WIN32 OR USE_VCPKG) # Windows (including 64bit) or USE_VCPKG set
# Use vcpkg toolchain on Windows (and on macOS in CI)
set(CMAKE_TOOLCHAIN_FILE
${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake

View file

@ -1,16 +1,15 @@
# Find the MS Visual Studio VC redistributable package
if(WIN32)
if(WIN32) # Windows (including 64bit)
set(VCREDISTRUNTIME_FOUND "NO")
if(CMAKE_SIZEOF_VOID_P EQUAL 8) # 64-bit
set(REDIST_ARCH x64)
else()
set(REDIST_ARCH x86)
endif()
# VS 2017 uses vcredist_ARCH.exe, VS 2022 uses vc_redist.ARCH.exe
set(REDIST_FILE_NAMES vcredist_${REDIST_ARCH}.exe vcredist.${REDIST_ARCH}.exe vc_redist.${REDIST_ARCH}.exe)
# <VS 2017 uses vcredist_ARCH.exe
# >=VS 2017 uses vc_redist.ARCH.exe
set(REDIST_FILE_NAMES vcredist_${REDIST_ARCH}.exe vc_redist.${REDIST_ARCH}.exe)
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
include(InstallRequiredSystemLibraries)

View file

@ -1,12 +1,12 @@
# CMakeLists for cockatrice directory
#
# provides the cockatrice binary
# Provides the cockatrice binary
project(Cockatrice VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
set(cockatrice_SOURCES
${VERSION_STRING_CPP}
# sort by alphabetical order, so that there is no debate about where to add new sources to the list
# Sort by alphabetical order, so that there is no debate about where to add new sources to the list
src/client/network/connection_controller/remote_connection_controller.cpp
src/client/network/update/client/update_downloader.cpp
src/client/network/interfaces/deck_stats_interface.cpp
@ -387,7 +387,7 @@ else()
file(GLOB cockatrice_TS "${CMAKE_CURRENT_SOURCE_DIR}/translations/*.ts")
endif()
if(WIN32)
if(WIN32) # Windows (including 64bit)
set(cockatrice_SOURCES ${cockatrice_SOURCES} cockatrice.rc)
endif(WIN32)
@ -455,7 +455,7 @@ if(UNIX)
install(TARGETS cockatrice BUNDLE DESTINATION ./)
else()
# Assume linux
# Assume Linux
install(TARGETS cockatrice RUNTIME DESTINATION bin/)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/cockatrice.png DESTINATION ${ICONDIR}/hicolor/48x48/apps)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/cockatrice.svg DESTINATION ${ICONDIR}/hicolor/scalable/apps)
@ -466,7 +466,7 @@ elseif(WIN32)
endif()
if(APPLE)
# these needs to be relative to CMAKE_INSTALL_PREFIX
# These needs to be relative to CMAKE_INSTALL_PREFIX
set(plugin_dest_dir cockatrice.app/Contents/Plugins)
set(qtconf_dest_dir cockatrice.app/Contents/Resources)
@ -515,8 +515,8 @@ Data = Resources\")
)
endif()
if(WIN32)
# these needs to be relative to CMAKE_INSTALL_PREFIX
if(WIN32) # Windows (including 64bit)
# These needs to be relative to CMAKE_INSTALL_PREFIX
set(plugin_dest_dir Plugins)
set(qtconf_dest_dir .)

View file

@ -1,6 +1,6 @@
# CMakeLists for sounds directory
#
# add sounds subfolders
# Add sounds subfolders
set(defsounds Default Legacy)
@ -8,9 +8,9 @@ if(UNIX)
if(APPLE)
install(DIRECTORY ${defsounds} DESTINATION Cockatrice.app/Contents/Resources/sounds/)
else()
# Assume linux
# Assume Linux
install(DIRECTORY ${defsounds} DESTINATION share/cockatrice/sounds/)
endif()
elseif(WIN32)
elseif(WIN32) # Windows (including 64bit)
install(DIRECTORY ${defsounds} DESTINATION sounds/)
endif()

View file

@ -59,7 +59,8 @@ bool ReleaseChannel::downloadMatchesCurrentOS(const QString &fileName)
char arch[255];
size_t len = sizeof(arch);
if (sysctlbyname("machdep.cpu.brand_string", arch, &len, nullptr, 0) == 0) {
// Intel Mac is only supported on macOS 13 versions
// We only publish one Intel build, targeting macOS 13 currently
// Newer macOS versions on Intel Macs should continue using it
if (QString::fromUtf8(arch).contains("Intel")) {
return 13;
}

View file

@ -13,9 +13,7 @@
#include <QTextStream>
#include <QVector>
#if defined(Q_PROCESSOR_X86_32)
#define BUILD_ARCHITECTURE "32-bit"
#elif defined(Q_PROCESSOR_X86_64)
#if defined(Q_PROCESSOR_X86_64)
#define BUILD_ARCHITECTURE "64-bit"
#elif defined(Q_PROCESSOR_ARM)
#define BUILD_ARCHITECTURE "ARM"

View file

@ -1,6 +1,6 @@
# CMakeLists for themes directory
#
# add themes subfolders
# Add themes subfolders
set(defthemes Default Fabric Fusion Leather Plasma VelvetMarble)
@ -8,9 +8,9 @@ if(UNIX)
if(APPLE)
install(DIRECTORY ${defthemes} DESTINATION Cockatrice.app/Contents/Resources/themes/)
else()
# Assume linux
# Assume Linux
install(DIRECTORY ${defthemes} DESTINATION share/cockatrice/themes/)
endif()
elseif(WIN32)
elseif(WIN32) # Windows (including 64bit)
install(DIRECTORY ${defthemes} DESTINATION themes/)
endif()

View file

@ -47,7 +47,7 @@ else()
file(GLOB oracle_TS "${CMAKE_CURRENT_SOURCE_DIR}/translations/*.ts")
endif(UPDATE_TRANSLATIONS)
if(WIN32)
if(WIN32) # Windows (including 64bit)
set(oracle_SOURCES ${oracle_SOURCES} oracle.rc)
endif(WIN32)
@ -151,12 +151,12 @@ if(UNIX)
install(TARGETS oracle BUNDLE DESTINATION ./)
else()
# Assume linux
# Assume Linux
install(TARGETS oracle RUNTIME DESTINATION bin/)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/oracle.png DESTINATION ${ICONDIR}/hicolor/48x48/apps)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/oracle.svg DESTINATION ${ICONDIR}/hicolor/scalable/apps)
endif()
elseif(WIN32)
elseif(WIN32) # Windows (including 64bit)
install(TARGETS oracle RUNTIME DESTINATION ./)
endif()
@ -168,7 +168,7 @@ endif(NOT WIN32 AND NOT APPLE)
# Qt plugin handling
# ------------------------
if(APPLE)
# these needs to be relative to CMAKE_INSTALL_PREFIX
# These needs to be relative to CMAKE_INSTALL_PREFIX
set(plugin_dest_dir oracle.app/Contents/Plugins)
set(qtconf_dest_dir oracle.app/Contents/Resources)
@ -207,8 +207,8 @@ Translations = Resources/translations\")
)
endif()
if(WIN32)
# these needs to be relative to CMAKE_INSTALL_PREFIX
if(WIN32) # Windows (including 64bit)
# These needs to be relative to CMAKE_INSTALL_PREFIX
set(plugin_dest_dir Plugins)
set(qtconf_dest_dir .)
list(APPEND libSearchDirs ${QT_LIBRARY_DIR})
@ -265,7 +265,7 @@ endif()
# Qt translations
# ------------------------
if(Qt6_FOUND AND Qt6LinguistTools_FOUND)
#Qt6 Translations happen after the executable is built up
# Qt6 Translations happen after the executable is built up
if(UPDATE_TRANSLATIONS)
qt6_add_translations(
oracle
@ -286,7 +286,7 @@ if(Qt6_FOUND AND Qt6LinguistTools_FOUND)
else()
install(FILES ${oracle_QM} DESTINATION ${ORACLE_UNIX_QM_INSTALL_DIR})
endif()
elseif(WIN32)
elseif(WIN32) # Windows (including 64bit)
install(FILES ${oracle_QM} DESTINATION ${ORACLE_WIN32_QM_INSTALL_DIR})
endif()
endif()

View file

@ -1,6 +1,6 @@
# CMakeLists for servatrice directory
#
# provides the servatrice binary
# Provides the servatrice binary
project(Servatrice VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
@ -25,7 +25,7 @@ set(servatrice_SOURCES
set(servatrice_RESOURCES servatrice.qrc)
if(WIN32)
if(WIN32) # Windows (including 64bit)
set(servatrice_SOURCES ${servatrice_SOURCES} servatrice.rc)
endif(WIN32)
@ -49,14 +49,14 @@ endif()
set(QT_DONT_USE_QTGUI TRUE)
# Mysql connector
# MySQL connector
if(UNIX)
if(APPLE)
set(MYSQLCLIENT_DEFAULT_PATHS "/usr/local/lib" "/opt/local/lib/mysql55/mysql/" "/opt/local/lib/mysql56/mysql/")
else()
set(MYSQLCLIENT_DEFAULT_PATHS "/usr/lib64" "/usr/local/lib64" "/usr/lib" "/usr/local/lib")
endif()
elseif(WIN32)
elseif(WIN32) # Windows (including 64bit)
set(MYSQLCLIENT_DEFAULT_PATHS "C:\\Program Files\\MySQL\\MySQL Server 5.7\\lib"
"C:\\Program Files (x86)\\MySQL\\MySQL Server 5.7\\lib"
)
@ -108,7 +108,7 @@ else()
)
endif()
# install rules
# Install rules
if(UNIX)
if(APPLE)
set(MACOSX_BUNDLE_INFO_STRING "${PROJECT_NAME}")
@ -122,7 +122,7 @@ if(UNIX)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/servatrice.ini.example DESTINATION ./servatrice.app/Contents/Resources/)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/servatrice.sql DESTINATION ./servatrice.app/Contents/Resources/)
else()
# Assume linux
# Assume Linux
install(TARGETS servatrice RUNTIME DESTINATION bin/)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/servatrice.ini.example DESTINATION share/servatrice/)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/servatrice.sql DESTINATION share/servatrice/)
@ -131,14 +131,14 @@ if(UNIX)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/servatrice.svg DESTINATION ${ICONDIR}/hicolor/scalable/apps)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/servatrice.desktop DESTINATION ${DESKTOPDIR})
endif()
elseif(WIN32)
elseif(WIN32) # Windows (including 64bit)
install(TARGETS servatrice RUNTIME DESTINATION ./)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/servatrice.ini.example DESTINATION ./)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/servatrice.sql DESTINATION ./)
endif()
if(APPLE)
# these needs to be relative to CMAKE_INSTALL_PREFIX
# These needs to be relative to CMAKE_INSTALL_PREFIX
set(plugin_dest_dir servatrice.app/Contents/Plugins)
set(qtconf_dest_dir servatrice.app/Contents/Resources)
@ -176,8 +176,8 @@ Translations = Resources/translations\")
)
endif()
if(WIN32)
# these needs to be relative to CMAKE_INSTALL_PREFIX
if(WIN32) # Windows (including 64bit)
# These needs to be relative to CMAKE_INSTALL_PREFIX
set(plugin_dest_dir Plugins)
set(qtconf_dest_dir .)