From 6b0a6f4e608e815509b08fc68c17b108512d6a06 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Thu, 12 Oct 2023 16:10:16 -0400 Subject: [PATCH 01/18] Update SQLiteCpp submodule to latest --- 3rdparty/SQLiteCpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3rdparty/SQLiteCpp b/3rdparty/SQLiteCpp index 0da8c467daa..bcb4c78fed6 160000 --- a/3rdparty/SQLiteCpp +++ b/3rdparty/SQLiteCpp @@ -1 +1 @@ -Subproject commit 0da8c467daa2def27b4adb206b5fdd244b3b678f +Subproject commit bcb4c78fed6628f150c28fa6377c2b0430f7f99b From 9deff7e65d4e0ab5d7a6e336e6e4444db9194c22 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Thu, 12 Oct 2023 16:11:10 -0400 Subject: [PATCH 02/18] Update date submodule --- 3rdparty/date | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3rdparty/date b/3rdparty/date index 2709deddd3c..cc4685a21e4 160000 --- a/3rdparty/date +++ b/3rdparty/date @@ -1 +1 @@ -Subproject commit 2709deddd3c0deae74bc768b9d7c3b17dc4ba969 +Subproject commit cc4685a21e4a4fdae707ad1233c61bbaff241f93 From 341aeb0f27568b465a4b23e634edce2c5956c956 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Thu, 12 Oct 2023 16:12:41 -0400 Subject: [PATCH 03/18] Update fmt to 10.1.1 --- 3rdparty/fmt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3rdparty/fmt b/3rdparty/fmt index a33701196ad..f5e54359df4 160000 --- a/3rdparty/fmt +++ b/3rdparty/fmt @@ -1 +1 @@ -Subproject commit a33701196adfad74917046096bf5a2aa0ab0bb50 +Subproject commit f5e54359df4c26b6230fc61d38aa294581393084 From 427bffab42101b136313920c82143696229f2fbf Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Thu, 12 Oct 2023 16:14:13 -0400 Subject: [PATCH 04/18] Update miniupnpc to 2.2.5+ (latest) --- 3rdparty/miniupnp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3rdparty/miniupnp b/3rdparty/miniupnp index 1de377faf6a..fb5c328a5e8 160000 --- a/3rdparty/miniupnp +++ b/3rdparty/miniupnp @@ -1 +1 @@ -Subproject commit 1de377faf6a235354d44d3254a628ed622818269 +Subproject commit fb5c328a5e8fd57a3ec0f5d33915377a5d3581f3 From be116ae1b238550c28e8435126cda9bbc14ba9cf Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Thu, 12 Oct 2023 16:16:01 -0400 Subject: [PATCH 05/18] Update re2 submodule to 2023-03-01+ --- 3rdparty/re2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3rdparty/re2 b/3rdparty/re2 index 4be240789d5..b059ae85c83 160000 --- a/3rdparty/re2 +++ b/3rdparty/re2 @@ -1 +1 @@ -Subproject commit 4be240789d5b322df9f02b7e19c8651f3ccbf205 +Subproject commit b059ae85c83ca6b1f29dba20e92e4acb85cb5b29 From 2e8c0ad218d2ac6a97712ee0fb27cd6df02f1c73 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Thu, 12 Oct 2023 16:17:06 -0400 Subject: [PATCH 06/18] Update readerwriterqueue to latest --- 3rdparty/readerwriterqueue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3rdparty/readerwriterqueue b/3rdparty/readerwriterqueue index 8e7627d18c2..2dee33ae3ed 160000 --- a/3rdparty/readerwriterqueue +++ b/3rdparty/readerwriterqueue @@ -1 +1 @@ -Subproject commit 8e7627d18c2108aca178888d88514179899a044f +Subproject commit 2dee33ae3edd1e454ac34fea0a27017613355eff From c42d58587ccea7a91c83d9e8cbb6e2717b63f3e4 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Thu, 12 Oct 2023 16:18:11 -0400 Subject: [PATCH 07/18] Update utf8proc to 2.8.0 --- 3rdparty/utf8proc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3rdparty/utf8proc b/3rdparty/utf8proc index 0520d6f7243..1cb28a66ca7 160000 --- a/3rdparty/utf8proc +++ b/3rdparty/utf8proc @@ -1 +1 @@ -Subproject commit 0520d6f7243c7a2507fe11e9e67fce2697ab2f95 +Subproject commit 1cb28a66ca79a0845e99433fd1056257456cef8b From 63130e5501ed88b8dd4b5d7b1cfff46550832ecd Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Thu, 12 Oct 2023 16:19:00 -0400 Subject: [PATCH 08/18] Update utfcpp to 3.2.5 --- 3rdparty/utfcpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3rdparty/utfcpp b/3rdparty/utfcpp index b85efd66a76..6f0e7c78652 160000 --- a/3rdparty/utfcpp +++ b/3rdparty/utfcpp @@ -1 +1 @@ -Subproject commit b85efd66a76caccbe0c186b00cab34df1e4281fa +Subproject commit 6f0e7c7865208f2a6b882a7e138584beb1b6b2fd From 0c81fe9310dbfd77eef090bf522f7011ac13b982 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Thu, 12 Oct 2023 16:59:31 -0400 Subject: [PATCH 09/18] Update 3rdparty/json/CMakeLists.txt --- 3rdparty/json/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3rdparty/json/CMakeLists.txt b/3rdparty/json/CMakeLists.txt index 1279c2da655..38968239946 100644 --- a/3rdparty/json/CMakeLists.txt +++ b/3rdparty/json/CMakeLists.txt @@ -1,6 +1,6 @@ # A simplified version of: https://github.com/nlohmann/json/blob/b21c34517900c46a943c804d9af3a20cd0c77062/CMakeLists.txt -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.1...3.14) project(nlohmann_json LANGUAGES CXX) From a047d43a9019bf1dd809d57fa4896088efb17cb7 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Thu, 12 Oct 2023 16:59:49 -0400 Subject: [PATCH 10/18] [CMake] Update cmake_minimum_required --- 3rdparty/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt index 871645baf43..42a41aaff99 100644 --- a/3rdparty/CMakeLists.txt +++ b/3rdparty/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.5) +cmake_minimum_required (VERSION 3.5...3.24) SET(UTF8PROC_INSTALL OFF CACHE BOOL "Enable installation of utf8proc" FORCE) add_subdirectory(utf8proc) From 820efdc5e8b6f3fd795f60865b05b94a137fdadc Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Thu, 12 Oct 2023 17:18:52 -0400 Subject: [PATCH 11/18] Remove vcpkg sqlite override, fix SQLiteCpp option overrides --- 3rdparty/CMakeLists.txt | 1 - vcpkg.json | 3 --- 2 files changed, 4 deletions(-) diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt index 42a41aaff99..2abaf2280d9 100644 --- a/3rdparty/CMakeLists.txt +++ b/3rdparty/CMakeLists.txt @@ -29,7 +29,6 @@ endif() find_package(SQLite3 3.14 REQUIRED) set(SQLITECPP_USE_STATIC_RUNTIME OFF CACHE BOOL "Use static runtime" FORCE) -set(SQLITE_ENABLE_COLUMN_METADATA OFF CACHE BOOL "Enable Column::getColumnOriginName(). Require support from sqlite3 library." FORCE) set(SQLITE_HAS_CODEC OFF CACHE BOOL "Enable database encryption API. Not available in the public release of SQLite." FORCE) if(SQLite3_VERSION VERSION_LESS 3.19) set(SQLITE_USE_LEGACY_STRUCT ON CACHE BOOL "Fallback to forward declaration of legacy struct sqlite3_value (pre SQLite 3.19)" FORCE) diff --git a/vcpkg.json b/vcpkg.json index 1659e31bee8..948fdbca029 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -53,9 +53,6 @@ "host": true } ], - "overrides": [ - { "name": "sqlite3", "version": "3.40.1" } - ], "default-features": [ "vulkan" ], From 3640fe269a41d2ef7a10db9a19bc9cd8a6fa2010 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Thu, 12 Oct 2023 17:22:17 -0400 Subject: [PATCH 12/18] Update sentry-native to 0.6.6 --- .sentrynative | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.sentrynative b/.sentrynative index 0123621294b..472363def31 100644 --- a/.sentrynative +++ b/.sentrynative @@ -1,2 +1,2 @@ -URL=https://github.com/getsentry/sentry-native/releases/download/0.6.0/sentry-native.zip -SHA512=e41d3661679ba7ba1cc58059ce86f6fb1a93fb580d2f8e77d6f2a09988fe62f18f3636e13e324a643f736aa891aa2312100740ace043c2e542d4e6b546b61014 +URL=https://github.com/getsentry/sentry-native/releases/download/0.6.6/sentry-native.zip +SHA512=0fa548b70e3fbb87614521d797a577ffa185991f0942cf20dd965f8c068414512a63f5d715672ecf243aa31d18fdcda6ce355ad8614ede7b988d0a103cda7244 From 8cb2859ff2082b96cda2cc400c50fcf91ac742c1 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Thu, 12 Oct 2023 17:23:12 -0400 Subject: [PATCH 13/18] Flatpak: Switch back to crashpad --- .ci/flatpak/net.wz2100.wz2100.yaml.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/flatpak/net.wz2100.wz2100.yaml.in b/.ci/flatpak/net.wz2100.wz2100.yaml.in index 3217b42a980..441baf7c937 100755 --- a/.ci/flatpak/net.wz2100.wz2100.yaml.in +++ b/.ci/flatpak/net.wz2100.wz2100.yaml.in @@ -177,7 +177,7 @@ modules: - -DWZ_SENTRY_PREDOWNLOADED_SENTRY_ARCHIVE=/app/prestaged-dl/sentry-native.zip - -DWZ_DOWNLOAD_PREBUILT_PACKAGES_ASSET_DIR=/app/prestaged-dl # Crashpad/breakpad works in the Flatpak sandbox *if* --allow=devel is set above. Otherwise, this must be: inproc - - -DSENTRY_BACKEND=breakpad + - -DSENTRY_BACKEND=crashpad @WZ_CMAKE_CROSS_CONFIG_OPTIONS@ secret-opts: - -DWZ_DISTRIBUTOR:STRING=$WZ_DISTRIBUTOR From 87d169c9b03d64f4005d4a31e948a634970ee535 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Thu, 12 Oct 2023 19:33:07 -0400 Subject: [PATCH 14/18] [CMake] Tweak crashpad_handler bundling --- src/CMakeLists.txt | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4e0a7940d88..cb0a37b755f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -411,6 +411,17 @@ if(CMAKE_SYSTEM_NAME MATCHES "Darwin") XCODE_ATTRIBUTE_DEPLOYMENT_POSTPROCESSING[variant=Release] YES ) + # Bundle the crashpad_handler (if enabled) + if(TARGET crashpad_handler) + message(FATAL_ERROR "crashpad_handler is not supported for macOS builds (it does not support sandboxed apps)") + # But if we *could* use it, we'd bundle it as follows: + # Use a post-build step to copy it to the executables folder in the app bundle + #add_custom_command(TARGET warzone2100 POST_BUILD + # COMMAND ${CMAKE_COMMAND} -E copy_if_different + # $ $ + #) + endif() + if(WZ_ENABLE_BACKEND_VULKAN) # Vulkan / MoltenVK find_package(Vulkan) @@ -622,13 +633,12 @@ endif() # Support crashpad sentry backend - requires installation of helper binary to handle crashes if(TARGET crashpad_handler) - if(CMAKE_SYSTEM_NAME MATCHES "Darwin") - message(FATAL_ERROR "crashpad_handler is not currently supported for macOS builds") - endif() - install(TARGETS crashpad_handler COMPONENT Core DESTINATION "${WZ_APP_INSTALL_DEST}") - if(WIN32 AND TARGET crashpad_wer) - # On Windows, also install the crashpad_wer.dll (if built with support) - install(TARGETS crashpad_wer RUNTIME COMPONENT Core DESTINATION "${WZ_APP_INSTALL_DEST}") + if(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin") + install(TARGETS crashpad_handler COMPONENT Core DESTINATION "${WZ_APP_INSTALL_DEST}") + if(WIN32 AND TARGET crashpad_wer) + # On Windows, also install the crashpad_wer.dll (if built with support) + install(TARGETS crashpad_wer RUNTIME COMPONENT Core DESTINATION "${WZ_APP_INSTALL_DEST}") + endif() endif() endif() From 2518ac0e7b886074b6f50fe93e3c3c2465078741 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Thu, 12 Oct 2023 20:21:36 -0400 Subject: [PATCH 15/18] [CMake] Drop the HAVE_CONFIG_H define This was an autotools leftover - CMake is always guaranteed to write the config file. Also, rename the WZ-specific generated "config.h" to "wz2100-generated-config.h". --- CMakeLists.txt | 4 +--- lib/framework/types.h | 7 +++---- lib/framework/wzglobal.h | 12 +++--------- src/input/manager.cpp | 1 - 4 files changed, 7 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fdbe4a4141a..d9ec8bbbb7d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -686,8 +686,6 @@ macro(CONFIGURE_WZ_COMPILER_WARNINGS) endif() endmacro(CONFIGURE_WZ_COMPILER_WARNINGS) -add_definitions("-DHAVE_CONFIG_H") - # CMAKE_CURRENT_BINARY_DIR should come before the current source directory # so that any build products are preferentially included over in-source build # products that might have been generated by a different compilation method / run @@ -794,7 +792,7 @@ function(CHECK_IS_ABSOLUTE_PATH _var _output) endfunction() CHECK_IS_ABSOLUTE_PATH(WZ_DATADIR WZ_DATADIR_ISABSOLUTE) CHECK_IS_ABSOLUTE_PATH(WZ_LOCALEDIR WZ_LOCALEDIR_ISABSOLUTE) -CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) +CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/wz2100-generated-config.h) # Attempt to find Miniupnpc (minimum supported API version = 9) # NOTE: This is not available on every platform / distro diff --git a/lib/framework/types.h b/lib/framework/types.h index dae24d74dac..b2030d878c4 100644 --- a/lib/framework/types.h +++ b/lib/framework/types.h @@ -31,10 +31,9 @@ #define __STDC_LIMIT_MACROS #endif -#if defined(HAVE_CONFIG_H) -# undef _XOPEN_SOURCE -# include "config.h" -#endif +// Always include generated config.h +#undef _XOPEN_SOURCE +#include "wz2100-generated-config.h" #include // for size_t diff --git a/lib/framework/wzglobal.h b/lib/framework/wzglobal.h index 417f0607db4..9c7bfd463d2 100644 --- a/lib/framework/wzglobal.h +++ b/lib/framework/wzglobal.h @@ -34,15 +34,9 @@ #define __STDC_LIMIT_MACROS #endif -#if defined(HAVE_CONFIG_H) -# undef _XOPEN_SOURCE -# include "config.h" -#elif !defined(HAVE_CONFIG_H) -# define PACKAGE "warzone2100" -# define PACKAGE_BUGREPORT "http://wz2100.net/" -# define PACKAGE_NAME "Warzone 2100" -# define PACKAGE_TARNAME "warzone2100" -#endif +// Always include generated config.h +#undef _XOPEN_SOURCE +#include "wz2100-generated-config.h" /* ---- Platform detection ---- */ diff --git a/src/input/manager.cpp b/src/input/manager.cpp index b102558bf0a..b2424a1bfff 100644 --- a/src/input/manager.cpp +++ b/src/input/manager.cpp @@ -27,7 +27,6 @@ #include "manager.h" #include "context.h" -#include "config.h" #include "mapping.h" #include "../keybind.h" From 62f210465cefe0ea0e7aa201ba6cae248c2db6de Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Thu, 12 Oct 2023 20:33:33 -0400 Subject: [PATCH 16/18] Fix compilation issue on FreeBSD --- src/multistat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/multistat.cpp b/src/multistat.cpp index 8b023517c68..640a518b3fb 100644 --- a/src/multistat.cpp +++ b/src/multistat.cpp @@ -952,7 +952,7 @@ class KnownPlayersDB { // Begin transaction SQLite::Transaction transaction(*db); - auto mutedTimeValue = mutedTime.has_value() ? mutedTime.value().time_since_epoch().count() : 0; + int64_t mutedTimeValue = static_cast(mutedTime.has_value() ? mutedTime.value().time_since_epoch().count() : 0); query_insertNewPlayerOptions->bind(1, publicKeyb64); query_insertNewPlayerOptions->bind(2, name); From b381a6aaff07adc60356e6dbc84f0eec6a5b207f Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Thu, 12 Oct 2023 20:33:51 -0400 Subject: [PATCH 17/18] GitHub Actions] Drop the Ubuntu 18.04 CI passes, publish the Ubuntu 22.04 artifact --- .github/workflows/CI_ubuntu.yml | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/.github/workflows/CI_ubuntu.yml b/.github/workflows/CI_ubuntu.yml index 4064c264448..72e9639401f 100644 --- a/.github/workflows/CI_ubuntu.yml +++ b/.github/workflows/CI_ubuntu.yml @@ -28,13 +28,6 @@ jobs: matrix: include: # Builds with GCC (uploaded as artifacts, and published as release DEBs) - - name: "Ubuntu 18.04 [GCC]" - docker: "ubuntu-18.04" - arch: "amd64" - output-suffix: "ubuntu18.04" - compiler: gcc - publish_artifact: true - deploy_release: true - name: "Ubuntu 20.04 [GCC]" docker: "ubuntu-20.04" arch: "amd64" @@ -42,22 +35,14 @@ jobs: output-suffix: "ubuntu20.04" publish_artifact: true deploy_release: true - # Newer builds with GCC (not currently uploaded) - name: "Ubuntu 22.04 [GCC]" docker: "ubuntu-22.04" arch: "amd64" output-suffix: "ubuntu22.04" compiler: gcc - publish_artifact: false - deploy_release: false + publish_artifact: true + deploy_release: true # Builds with Clang (not uploaded) - - name: "Ubuntu 18.04 [Clang]" - docker: "ubuntu-18.04" - arch: "amd64" - output-suffix: "ubuntu18.04" - compiler: clang - publish_artifact: false - deploy_release: false - name: "Ubuntu 20.04 [Clang]" docker: "ubuntu-20.04" arch: "amd64" @@ -100,10 +85,6 @@ jobs: - name: Init Git Submodules working-directory: '${{ github.workspace }}/src' run: git submodule update --init --recursive - - name: Pull latest base image - if: success() && (matrix.docker == 'ubuntu-18.04') - run: | - docker pull ubuntu:18.04 - name: Build the Docker image working-directory: '${{ github.workspace }}/src' run: | From 86a08da7178da0a9c0d7ef74c427e89ad6954fc9 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Thu, 12 Oct 2023 21:06:23 -0400 Subject: [PATCH 18/18] Update discord-rpc --- 3rdparty/discord-rpc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3rdparty/discord-rpc b/3rdparty/discord-rpc index 57eb1c89367..1f49ccb21dd 160000 --- a/3rdparty/discord-rpc +++ b/3rdparty/discord-rpc @@ -1 +1 @@ -Subproject commit 57eb1c89367b124fdf9ce09f12a53dbc6341bc4e +Subproject commit 1f49ccb21dd1600900dc9c3608e48e63db105e4b