diff --git a/CMakeLists.txt b/CMakeLists.txt index cd426b5..9a2e828 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED TRUE) set(CMAKE_CXX_EXTENSIONS OFF) -# Only macOS links SFML as Frameworks, not static +# On macOS using Frameworks, NOT static (dylib) if(NOT APPLE) set(SFML_STATIC_LIBRARIES TRUE) endif() diff --git a/README.md b/README.md index 0c21737..a8fb5cc 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Offline & Online Multiplayer Checkers game in C++ built with SFML 2.6, imGui, Protobuf and ixWebsockets. With very minimal dependencies and a simple build process. All dependencies are auto-downloaded (as `.tar.gz`) and configured for you using [CPM.cmake](https://github.com/cpm-cmake/CPM.cmake). The only dependency you need pre-installed on your OS is SFML 2.6.x (or newer). -This game can connect to both Private and Public game servers. The backend server for this game is written in Golang, and is [available on GitHub](https://github.com/Longwater1234/checkers-backend) which you can self-host! You can download pre-built game (Windows x64 exe) from Actions tab (on GitHub Web). For other platforms, use the itch.io link above. +This game can connect to both Private and Public game servers. The backend server for this game is written in Golang, and is [available on GitHub](https://github.com/Longwater1234/checkers-backend) which you can self-host! Download and Play the game from the itch.io link above. ### Main Libraries Used @@ -22,7 +22,6 @@ This game can connect to both Private and Public game servers. The backend serve ### For Windows -- At least Windows 10 / Server 2016 - MS Visual Studio 2022 or newer (NOT vscode), with "**Desktop C++ Development**" bundle. - Please download "Visual C++ 64bit" edition of SFML; ignore others. - Move your unzipped `SFML-2.6.x` folder to its own home, example: `C:/SFML/SFML-2.6.1`. diff --git a/dependencies/CMakeLists.txt b/dependencies/CMakeLists.txt index 37d9118..4346e9d 100644 --- a/dependencies/CMakeLists.txt +++ b/dependencies/CMakeLists.txt @@ -13,7 +13,6 @@ include(protobuf.cmake) CPMAddPackage( NAME imgui URL "https://github.com/ocornut/imgui/archive/refs/tags/v1.90.8.tar.gz" - VERSION 1.90.8 DOWNLOAD_EXTRACT_TIMESTAMP TRUE ) @@ -35,7 +34,6 @@ endif() CPMAddPackage( NAME imgui-sfml URL "https://github.com/SFML/imgui-sfml/archive/refs/tags/v2.6.tar.gz" - VERSION 2.6 DOWNLOAD_EXTRACT_TIMESTAMP TRUE OPTIONS "IMGUI_SFML_FIND_SFML OFF" "IMGUI_DIR ${imgui_SOURCE_DIR}" ) \ No newline at end of file diff --git a/dependencies/ixwebsocket.cmake b/dependencies/ixwebsocket.cmake index 0cd4530..1d37487 100644 --- a/dependencies/ixwebsocket.cmake +++ b/dependencies/ixwebsocket.cmake @@ -1,9 +1,8 @@ -# IXWebSocket 11.4.2 (BSD-3-Clause License) +# IXWebSocket 11.4.5 (BSD-3-Clause License) CPMAddPackage( NAME ixwebsocket URL "https://github.com/machinezone/IXWebSocket/archive/refs/tags/v11.4.5.tar.gz" - VERSION 11.4.5 DOWNLOAD_EXTRACT_TIMESTAMP TRUE DOWNLOAD_ONLY ON OPTIONS "USE_TLS TRUE" "USE_MBED_TLS TRUE" "USE_ZLIB TRUE" diff --git a/dependencies/libcpr.cmake b/dependencies/libcpr.cmake index c12de4a..635ba00 100644 --- a/dependencies/libcpr.cmake +++ b/dependencies/libcpr.cmake @@ -1,16 +1,14 @@ -# add libcpr (HTTP Client) v1.11.1 +# add libcpr (simpler CURL) v1.11.3 SET(SSL_OPTION "CPR_FORCE_OPENSSL_BACKEND TRUE") if(WIN32) SET(SSL_OPTION "CPR_FORCE_WINSSL_BACKEND TRUE") -# elseif(APPLE) -# SET(SSL_OPTION "CPR_FORCE_DARWINSSL_BACKEND TRUE") endif() +# dont upgrade, will require MESON to build! CPMAddPackage( NAME cpr - URL "https://github.com/libcpr/cpr/archive/refs/tags/1.11.1.tar.gz" - VERSION 1.11.1 + URL "https://github.com/libcpr/cpr/archive/refs/tags/1.11.3.tar.gz" DOWNLOAD_EXTRACT_TIMESTAMP TRUE OPTIONS "BUILD_SHARED_LIBS FALSE" "CURL_USE_LIBPSL OFF" "USE_LIBIDN2 OFF" ${SSL_OPTION} ) diff --git a/dependencies/mbedtls.cmake b/dependencies/mbedtls.cmake index 4b14d21..2f7eb60 100644 --- a/dependencies/mbedtls.cmake +++ b/dependencies/mbedtls.cmake @@ -1,9 +1,8 @@ -# mbedtls v2.25.0 (Apache-2.0 License) +# mbedtls v2.28 (Apache-2.0 License) CPMAddPackage( NAME mbedtls - URL "https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/v2.25.0.tar.gz" - VERSION 2.25.0 + URL "https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/mbedtls-2.28.10.tar.gz" DOWNLOAD_EXTRACT_TIMESTAMP TRUE DOWNLOAD_ONLY ON ) diff --git a/dependencies/protobuf.cmake b/dependencies/protobuf.cmake index d1ad93f..1474a58 100644 --- a/dependencies/protobuf.cmake +++ b/dependencies/protobuf.cmake @@ -2,7 +2,6 @@ CPMAddPackage( NAME abseil URL "https://github.com/abseil/abseil-cpp/archive/refs/tags/20250127.0.tar.gz" - VERSION 220250127 DOWNLOAD_EXTRACT_TIMESTAMP TRUE OPTIONS "ABSL_ENABLE_INSTALL ON" "ABSL_PROPAGATE_CXX_STD ON" ) @@ -11,7 +10,6 @@ CPMAddPackage( CPMAddPackage( NAME protobuf URL "https://github.com/protocolbuffers/protobuf/archive/refs/tags/v30.1.tar.gz" - VERSION 30.1 DOWNLOAD_EXTRACT_TIMESTAMP TRUE OPTIONS "protobuf_BUILD_TESTS OFF" "protobuf_INSTALL OFF" "protobuf_BUILD_PROTOBUF_BINARIES ON" "protobuf_BUILD_LIBUPB OFF" "protobuf_BUILD_PROTOC_BINARIES OFF" "protobuf_MSVC_STATIC_RUNTIME OFF" diff --git a/dependencies/simdjson.cmake b/dependencies/simdjson.cmake index 4eee6c0..9192da5 100644 --- a/dependencies/simdjson.cmake +++ b/dependencies/simdjson.cmake @@ -1,7 +1,6 @@ # Get simdjson 3.10.0 CPMAddPackage( NAME simdjson - URL "https://github.com/simdjson/simdjson/archive/refs/tags/v3.10.0.tar.gz" - VERSION 3.10.0 + URL "https://github.com/simdjson/simdjson/archive/refs/tags/v3.13.0.tar.gz" DOWNLOAD_EXTRACT_TIMESTAMP TRUE ) \ No newline at end of file diff --git a/dependencies/spdlog.cmake b/dependencies/spdlog.cmake index d86289d..ef1f5a5 100644 --- a/dependencies/spdlog.cmake +++ b/dependencies/spdlog.cmake @@ -1,7 +1,6 @@ -# GET spdlog v1.14 +# GET spdlog v1.15 CPMAddPackage( NAME spdlog - URL "https://github.com/gabime/spdlog/archive/refs/tags/v1.14.0.tar.gz" - VERSION 1.14.0 + URL "https://github.com/gabime/spdlog/archive/refs/tags/v1.15.3.tar.gz" DOWNLOAD_EXTRACT_TIMESTAMP TRUE ) diff --git a/dependencies/zlib.cmake b/dependencies/zlib.cmake index 186aed1..b0f07f9 100644 --- a/dependencies/zlib.cmake +++ b/dependencies/zlib.cmake @@ -3,7 +3,6 @@ CPMAddPackage( NAME zlib URL "https://github.com/madler/zlib/archive/refs/tags/v1.3.1.tar.gz" - VERSION 1.3.1 DOWNLOAD_EXTRACT_TIMESTAMP TRUE DOWNLOAD_ONLY ON ) diff --git a/lint.sh b/lint.sh index a2c2077..2187676 100755 --- a/lint.sh +++ b/lint.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Define the source directory +# source directory SRC_DIR="src" clang-format $(find $SRC_DIR -type f -name "*.cpp" -o -name "*.hpp") -i --verbose diff --git a/src/WsClient.cpp b/src/WsClient.cpp index 7659958..6f09d75 100644 --- a/src/WsClient.cpp +++ b/src/WsClient.cpp @@ -126,7 +126,7 @@ void WsClient::showPublicServerWindow(bool &showPublic) } /** - * Fetch updated public servers from central cloud storage (Timeout 5000ms) + * Fetch updated public servers from CDN (Timeout 5000ms) * @see libcpr official docs: https://docs.libcpr.org/advanced-usage.html */ void WsClient::asyncFetchPublicServers()