diff --git a/cmake/hashes.cmake b/cmake/hashes.cmake index 9fbd0b43..dd0fdb37 100644 --- a/cmake/hashes.cmake +++ b/cmake/hashes.cmake @@ -1,20 +1,20 @@ set(BINUTILS_HASH b53606f443ac8f01d1d5fc9c39497f2af322d99e14cea5c0b4b124d630379365) -set(BOOST2_HASH 7bd7ddceec1a1dfdcbdb3e609b60d01739c38390a5f956385a12f3122049f0ca) set(BOOST_HASH f55c340aa49763b1925ccf02b2e83f35fdcf634c9d5164a2acb87540173c741d) -set(CPP_HTTPLIB_HASH 405abd8170f2a446fc8612ac635d0db5947c0d2e156e32603403a4496255ff00) -set(CURL_HASH 5a231145114589491fc52da118f9c7ef8abee885d1cb1ced99c7290e9a352f07) +set(BOOST2_HASH 7bd7ddceec1a1dfdcbdb3e609b60d01739c38390a5f956385a12f3122049f0ca) +set(CPP_HTTPLIB_HASH c9b9e0524666e1cd088f0874c57c1ce7c0eaa8552f9f4e15c755d5201fc8c608) +set(CURL_HASH 6edc063d1ebaf9cf3b3b46e9fef2f3cd8932694989ecd43d005d6e828426d09f) set(EXPAT_HASH 372b18f6527d162fa9658f1c74d22a37429b82d822f5a1e1fc7e00f6045a06a2) set(GCC_HASH 7d376d445f93126dc545e2c0086d0f647c3094aae081cdb78f42ce2bc25e7293) -set(GTEST_HASH 7b42b4d6ed48810c5362c265a17faebe90dc2373c885e5216439d37927f02926) +set(GTEST_HASH 78c676fc63881529bf97bf9d45948d905a66833fbfa5318ea2cd7478cb98f399) set(ICU_HASH a2c443404f00098e9e90acf29dc318e049d2dc78d9ae5f46efb261934a730ce2) set(JSON_HASH 0d8ef5af7f9794e3263480193c491549b2ba6cc74bb018906202ada498a79406) set(LIBSODIUM_HASH 8e5aeca07a723a27bbecc3beef14b0068d37e7fc0e97f51b3f1c82d2a58005c1) -set(MINGW_HASH 30e5aad2c48dd318150f79cff47661232c4175876d6b4d6b270961cf2b49a48b) +set(MINGW_HASH cc41898aac4b6e8dd5cffd7331b9d9515b912df4420a3a612b5ea2955bbeed2f) set(OPENSSL_HASH e15dda82fe2fe8139dc2ac21a36d4ca01d5313c75f99f46c4e8a27709b7294bf) set(PKG_CONFIG_HASH 6fc69c01688c9458a57eb9a1664c9aba372ccda420a02bf4429fe610e7e7d591) -set(PUGIXML_HASH 2f10e276870c64b1db6809050a75e11a897a8d7456c4be5c6b2e35a11168a015) -set(ROCKSDB_HASH 9b810c81731835fda0d4bbdb51d3199d901fa4395733ab63752d297da84c5a47) -set(SPDLOG_HASH 9962648c9b4f1a7bbc76fd8d9172555bad1871fdb14ff4f842ef87949682caa5) -set(SQLITE_HASH 77823cb110929c2bcb0f5d48e4833b5c59a8a6e40cdea3936b99e199dbbe5784) +set(PUGIXML_HASH 655ade57fa703fb421c2eb9a0113b5064bddb145d415dd1f88c79353d90d511a) +set(ROCKSDB_HASH fdccab16133c9d927a183c2648bcea8d956fb41eb1df2aacaa73eb0b95e43724) +set(SPDLOG_HASH 25c843860f039a1600f232c6eb9e01e6627f7d030a2ae5e232bdd3c9205d26cc) +set(SQLITE_HASH 6cebd1d8403fc58c30e93939b246f3e6e58d0765a5cd50546f16c00fd805d2c3) set(STDUUID_HASH b1176597e789531c38481acbbed2a6894ad419aab0979c10410d59eb0ebf40d3) set(ZLIB_HASH 17e88863f3600672ab49182f217281b6fc4d3c762bde361935e436a95214d05c) diff --git a/cmake/libraries/sqlite.cmake b/cmake/libraries/sqlite.cmake index 49b87217..b37e8958 100644 --- a/cmake/libraries/sqlite.cmake +++ b/cmake/libraries/sqlite.cmake @@ -2,7 +2,7 @@ if(PROJECT_ENABLE_SQLITE) if(PROJECT_BUILD) add_definitions(-DPROJECT_ENABLE_SQLITE) if (PROJECT_IS_MINGW AND NOT PROJECT_IS_MINGW_UNIX) - pkg_check_modules(SQLITE3 REQUIRED sqlite3>=${SQLITE2_VERSION}) + pkg_check_modules(SQLITE3 REQUIRED sqlite3) include_directories(SYSTEM BEFORE ${SQLITE3_INCLUDE_DIRS}) link_libraries(${SQLITE3_LIBRARIES}) else() diff --git a/cmake/versions.cmake b/cmake/versions.cmake index 2a121d97..523639a1 100644 --- a/cmake/versions.cmake +++ b/cmake/versions.cmake @@ -1,17 +1,17 @@ set(BINUTILS_VERSION 2.43) -set(BOOST2_MAJOR_VERSION 1) -set(BOOST2_MINOR_VERSION 76) -set(BOOST2_PATCH_VERSION 0) set(BOOST_MAJOR_VERSION 1) set(BOOST_MINOR_VERSION 87) set(BOOST_PATCH_VERSION 0) -set(CPP_HTTPLIB_VERSION 0.18.1) -set(CURL2_VERSION 8_11_0) -set(CURL_VERSION 8.11.0) -set(EXPAT2_VERSION 2_6_4) +set(BOOST2_MAJOR_VERSION 1) +set(BOOST2_MINOR_VERSION 76) +set(BOOST2_PATCH_VERSION 0) +set(CPP_HTTPLIB_VERSION 0.19.0) +set(CURL_VERSION 8.12.1) +set(CURL2_VERSION 8_12_1) set(EXPAT_VERSION 2.6.4) +set(EXPAT2_VERSION 2_6_4) set(GCC_VERSION 14.2.0) -set(GTEST_VERSION 1.15.2) +set(GTEST_VERSION 1.16.0) set(ICU_VERSION 76-1) set(JSON_VERSION 3.11.3) set(LIBSODIUM_VERSION 1.0.20) @@ -19,10 +19,10 @@ set(MESA_VERSION 23.3.3) set(MINGW_VERSION 12.0.0) set(OPENSSL_VERSION 3.4.0) set(PKG_CONFIG_VERSION 0.29.2) -set(PUGIXML_VERSION 1.14) -set(ROCKSDB_VERSION 9.7.4) -set(SPDLOG_VERSION 1.15.0) -set(SQLITE2_VERSION 3.46.1) -set(SQLITE_VERSION 3460100) +set(PUGIXML_VERSION 1.15) +set(ROCKSDB_VERSION 9.10.0) +set(SPDLOG_VERSION 1.15.1) +set(SQLITE_VERSION 3490100) +set(SQLITE2_VERSION 3.49.1) set(STDUUID_VERSION 1.2.3) set(ZLIB_VERSION 1.3.1) diff --git a/docker/x86_64/flutter b/docker/x86_64/flutter new file mode 100644 index 00000000..20e14228 --- /dev/null +++ b/docker/x86_64/flutter @@ -0,0 +1,48 @@ +FROM debian:latest + +ARG UID=0 +ARG GID=0 + +RUN apt-get update +RUN apt-get install -y \ + bash \ + curl \ + fonts-droid-fallback \ + gdb \ + git \ + lib32stdc++6 \ + libgconf-2-4 \ + libglu1-mesa \ + libstdc++6 \ + python3 \ + unzip \ + wget +RUN apt-get clean + +RUN git clone https://github.com/flutter/flutter.git /flutter +RUN git config --system --add safe.directory /flutter + +ENV PATH="/flutter/bin:/flutter/bin/cache/dart-sdk/bin:${PATH}" + +RUN flutter doctor -v +RUN flutter channel master +RUN flutter upgrade +RUN flutter --disable-analytics + +RUN flutter config --no-analytics +RUN flutter config --enable-web +RUN flutter config --no-cli-animations + +RUN mkdir /nonexistent +RUN chown -R $UID:$GID /nonexistent + +RUN mkdir /.config +RUN chown -R $UID:$GID /.config + +RUN mkdir /.dart-tool +RUN chown -R $UID:$GID /.dart-tool + +RUN mkdir /.pub-cache +RUN chown -R $UID:$GID /.pub-cache + +RUN chown -R $UID:$GID /flutter diff --git a/scripts/deliver.sh b/scripts/deliver.sh index a9d9e5c5..d766ee3b 100755 --- a/scripts/deliver.sh +++ b/scripts/deliver.sh @@ -38,14 +38,16 @@ BRANCH=$(git branch --show-current) RELEASE=$(grep PROJECT_RELEASE_ITER= ./config.sh | sed s/PROJECT_RELEASE_ITER=//g) popd -if [ "${BRANCH}" == "master" ] || [ "${BRANCH}" == "alpha" ] || [ "${BRANCH}" == "beta" ] || [ "${BRANCH}" == "rc" ]; then +if [ "${BRANCH}" == "master" ] || [ "${BRANCH}" == "alpha" ] || + [ "${BRANCH}" == "beta" ] || [ "${BRANCH}" == "rc" ]; then DEST_DIR=${DEST_DIR}/${RELEASE} -else +elif [[ ${BRANCH} = *'-alpha-'* ]] || [[ ${BRANCH} = *'-beta-'* ]] || + [[ ${BRANCH} = *'-rc-'* ]] || [[ ${BRANCH} = *'-release-'* ]]; then DEST_DIR=${DEST_DIR}/nightly +else + error_exit "skipping ${PROJECT_FILE_PART}" 0 fi -echo ${DEST_DIR} - pushd "${DIST_DIR}" if [ ! -f "./${PROJECT_OUT_FILE}" ]; then error_exit "failed to find file: ${PROJECT_OUT_FILE}" 1 diff --git a/scripts/env.sh b/scripts/env.sh index ce8873f1..c439c13b 100755 --- a/scripts/env.sh +++ b/scripts/env.sh @@ -7,6 +7,12 @@ PROJECT_IS_MINGW=$4 PROJECT_IS_MINGW_UNIX=$5 DISABLE_CREATE_DIRS=$6 +PROJECT_FLUTTER_BASE_HREF="/" + +if [ "${PROJECT_IS_MINGW}" != "1" ]; then + PROJECT_IS_MINGW_UNIX=0 +fi + PROJECT_SOURCE_DIR=${PROJECT_SCRIPTS_DIR}/.. PROJECT_SOURCE_DIR=$(realpath "${PROJECT_SOURCE_DIR}") @@ -306,9 +312,10 @@ export PROJECT_COMPANY_NAME export PROJECT_COPYRIGHT export PROJECT_DESC export PROJECT_DIST_DIR -export PROJECT_ENABLE_WIN32_LONG_PATH_NAMES export PROJECT_ENABLE_V2_ERRORS +export PROJECT_ENABLE_WIN32_LONG_PATH_NAMES export PROJECT_FILE_PART +export PROJECT_FLUTTER_BASE_HREF export PROJECT_GIT_REV export PROJECT_IS_ALPINE export PROJECT_IS_ARM64 @@ -361,6 +368,7 @@ echo " Dist dir: ${PROJECT_DIST_DIR}" echo " Enable v2 errors: ${PROJECT_ENABLE_V2_ERRORS}" echo " External build root: ${PROJECT_EXTERNAL_BUILD_ROOT}" echo " File part: ${PROJECT_FILE_PART}" +echo " Flutter base href: ${PROJECT_FLUTTER_BASE_HREF}" echo " Is ARM64: ${PROJECT_IS_ARM64}" echo " Is Alpine: ${PROJECT_IS_ALPINE}" echo " Is MINGW on Unix: ${PROJECT_IS_MINGW_UNIX}" diff --git a/scripts/libraries.sh b/scripts/libraries.sh index e55d98bd..f3666f08 100755 --- a/scripts/libraries.sh +++ b/scripts/libraries.sh @@ -59,7 +59,7 @@ PROJECT_DOWNLOADS[PKG_CONFIG]="https://pkgconfig.freedesktop.org/releases/pkg-co PROJECT_DOWNLOADS[PUGIXML]="https://github.com/zeux/pugixml/releases/download/v${PROJECT_VERSIONS[PUGIXML]}/pugixml-${PROJECT_VERSIONS[PUGIXML]}.tar.gz;pugixml-${PROJECT_VERSIONS[PUGIXML]}.tar.gz;3rd_party" PROJECT_DOWNLOADS[ROCKSDB]="https://github.com/facebook/rocksdb/archive/refs/tags/v${PROJECT_VERSIONS[ROCKSDB]}.tar.gz;rocksdb-${PROJECT_VERSIONS[ROCKSDB]}.tar.gz;3rd_party" PROJECT_DOWNLOADS[SPDLOG]="https://github.com/gabime/spdlog/archive/refs/tags/v${PROJECT_VERSIONS[SPDLOG]}.tar.gz;spdlog-${PROJECT_VERSIONS[SPDLOG]}.tar.gz;3rd_party" -PROJECT_DOWNLOADS[SQLITE]="https://www.sqlite.org/2024/sqlite-amalgamation-${PROJECT_VERSIONS[SQLITE]}.zip;sqlite-amalgamation-${PROJECT_VERSIONS[SQLITE]}.zip;3rd_party" +PROJECT_DOWNLOADS[SQLITE]="https://www.sqlite.org/2025/sqlite-amalgamation-${PROJECT_VERSIONS[SQLITE]}.zip;sqlite-amalgamation-${PROJECT_VERSIONS[SQLITE]}.zip;3rd_party" PROJECT_DOWNLOADS[STDUUID]="https://github.com/mariusbancila/stduuid/archive/refs/tags/v${PROJECT_VERSIONS[STDUUID]}.tar.gz;stduuid-${PROJECT_VERSIONS[STDUUID]}.tar.gz;3rd_party" PROJECT_DOWNLOADS[ZLIB]="https://github.com/madler/zlib/archive/refs/tags/v${PROJECT_VERSIONS[ZLIB]}.tar.gz;zlib-${PROJECT_VERSIONS[ZLIB]}.tar.gz;3rd_party/mingw64" export PROJECT_DOWNLOADS diff --git a/scripts/make_common.sh b/scripts/make_common.sh index 2d432ea0..4f8382de 100755 --- a/scripts/make_common.sh +++ b/scripts/make_common.sh @@ -79,6 +79,11 @@ EOF fi done +if [ -f "${PROJECT_SOURCE_DIR}/web/${PROJECT_NAME}/pubspec.yaml" ]; then + rsync -av --progress "${PROJECT_SOURCE_DIR}/web/${PROJECT_NAME}/build/web/" \ + "${PROJECT_DIST_DIR}/web/" +fi + if [ "${PROJECT_IS_MINGW}" == "1" ]; then . "${PROJECT_SCRIPTS_DIR}/copy_mingw64_deps.sh" "$1" "$2" "$3" "$4" "$5" fi diff --git a/scripts/make_flutter.sh b/scripts/make_flutter.sh new file mode 100644 index 00000000..23fe784b --- /dev/null +++ b/scripts/make_flutter.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +PROJECT_SCRIPTS_DIR=$(realpath "$0") +PROJECT_SCRIPTS_DIR=$(dirname "${PROJECT_SCRIPTS_DIR}") +. "${PROJECT_SCRIPTS_DIR}/env.sh" "$1" "$2" "$3" "$4" "$5" + +if [ -f "${PROJECT_SOURCE_DIR}/web/${PROJECT_NAME}/pubspec.yaml" ]; then + if [ "${PROJECT_IS_MINGW}" == "0" ] || [ "${PROJECT_IS_MINGW_UNIX}" == "1" ]; then + FLUTTER_CONTAINER_NAME="${PROJECT_NAME}_flutter" + FLUTTER_TAG_NAME="${PROJECT_NAME}:flutter" + + docker stop ${FLUTTER_CONTAINER_NAME} + docker rm ${FLUTTER_CONTAINER_NAME} + + docker build "${PROJECT_SOURCE_DIR}/docker/x86_64/" \ + --build-arg UID=$(id -u) \ + --build-arg GID=$(id -g) \ + -t ${FLUTTER_TAG_NAME} \ + -f "${PROJECT_SOURCE_DIR}/docker/x86_64/flutter" || exit 1 + + docker run -td \ + --name ${FLUTTER_CONTAINER_NAME} \ + -u $(id -u):$(id -g) \ + -v ${PROJECT_SOURCE_DIR}:${PROJECT_SOURCE_DIR}:rw,z \ + -w ${PROJECT_SOURCE_DIR}/web/${PROJECT_NAME} \ + ${FLUTTER_TAG_NAME} || exit 1 + + docker exec \ + ${FLUTTER_CONTAINER_NAME} \ + /bin/bash -c \ + "flutter clean;flutter build web --base-href=${PROJECT_FLUTTER_BASE_HREF}" || exit 1 + + docker stop ${FLUTTER_CONTAINER_NAME} + docker rm ${FLUTTER_CONTAINER_NAME} + else + pushd "${PROJECT_SOURCE_DIR}/web/${PROJECT_NAME}" + export MSYS_NO_PATHCONV=1 + flutter clean + flutter build web --base-href=${PROJECT_FLUTTER_BASE_HREF} || exit 1 + export MSYS_NO_PATHCONV=0 + popd + fi +fi diff --git a/scripts/make_unix.sh b/scripts/make_unix.sh index a2789c3d..ebecf7b6 100755 --- a/scripts/make_unix.sh +++ b/scripts/make_unix.sh @@ -9,6 +9,8 @@ if [ -f "${PROJECT_SCRIPTS_DIR}/cleanup.sh" ]; then rm ${PROJECT_SCRIPTS_DIR}/cleanup.* fi +"${PROJECT_SOURCE_DIR}/scripts/make_flutter.sh" "${PROJECT_BUILD_ARCH}" "${PROJECT_CMAKE_BUILD_TYPE}" "${PROJECT_BUILD_CLEAN}" 0 0 || exit 1 + if [ "${PROJECT_REQUIRE_ALPINE}" == "ON" ] || [ "${PROJECT_IS_ARM64}" == "1" ]; then DOCKER_NAME=alpine DOCKER_CONTAINER=${PROJECT_NAME}_${DOCKER_NAME}_${PROJECT_BUILD_ARCH} diff --git a/scripts/make_win32.cmd b/scripts/make_win32.cmd index 73f10f42..038141f9 100644 --- a/scripts/make_win32.cmd +++ b/scripts/make_win32.cmd @@ -12,5 +12,7 @@ pushd "%~dp0%" call cleanup.cmd "%ARG1%" "%ARG2%" "%ARG3%" 1 0 del cleanup.* ) + + call mingw64 -no-start ./make_flutter.sh "%ARG1%" "%ARG2%" "%ARG3%" 1 0 || exit 1 call mingw64 -no-start ./make_common.sh "%ARG1%" "%ARG2%" "%ARG3%" 1 0 || exit 1 popd diff --git a/scripts/versions.sh b/scripts/versions.sh index af8982ab..139a4a2d 100755 --- a/scripts/versions.sh +++ b/scripts/versions.sh @@ -8,13 +8,13 @@ PROJECT_VERSIONS[BOOST2_PATCH]="0" PROJECT_VERSIONS[BOOST_MAJOR]="1" PROJECT_VERSIONS[BOOST_MINOR]="87" PROJECT_VERSIONS[BOOST_PATCH]="0" -PROJECT_VERSIONS[CPP_HTTPLIB]="0.18.1" -PROJECT_VERSIONS[CURL]="8.11.0" -PROJECT_VERSIONS[CURL2]="8_11_0" +PROJECT_VERSIONS[CPP_HTTPLIB]="0.19.0" +PROJECT_VERSIONS[CURL]="8.12.1" +PROJECT_VERSIONS[CURL2]="8_12_1" PROJECT_VERSIONS[EXPAT]="2.6.4" PROJECT_VERSIONS[EXPAT2]="2_6_4" PROJECT_VERSIONS[GCC]="14.2.0" -PROJECT_VERSIONS[GTEST]="1.15.2" +PROJECT_VERSIONS[GTEST]="1.16.0" PROJECT_VERSIONS[ICU]="76-1" PROJECT_VERSIONS[JSON]="3.11.3" PROJECT_VERSIONS[LIBSODIUM]="1.0.20" @@ -22,11 +22,11 @@ PROJECT_VERSIONS[MESA]="23.3.3" PROJECT_VERSIONS[MINGW]="12.0.0" PROJECT_VERSIONS[OPENSSL]="3.4.0" PROJECT_VERSIONS[PKG_CONFIG]="0.29.2" -PROJECT_VERSIONS[PUGIXML]="1.14" -PROJECT_VERSIONS[ROCKSDB]="9.7.4" -PROJECT_VERSIONS[SPDLOG]="1.15.0" -PROJECT_VERSIONS[SQLITE]="3460100" -PROJECT_VERSIONS[SQLITE2]="3.46.1" +PROJECT_VERSIONS[PUGIXML]="1.15" +PROJECT_VERSIONS[ROCKSDB]="9.10.0" +PROJECT_VERSIONS[SPDLOG]="1.15.1" +PROJECT_VERSIONS[SQLITE]="3490100" +PROJECT_VERSIONS[SQLITE2]="3.49.1" PROJECT_VERSIONS[STDUUID]="1.2.3" PROJECT_VERSIONS[ZLIB]="1.3.1" export PROJECT_VERSIONS diff --git a/support/3rd_party/cpp-httplib-0.18.1.tar.gz b/support/3rd_party/cpp-httplib-0.18.1.tar.gz deleted file mode 100644 index d58b628b..00000000 Binary files a/support/3rd_party/cpp-httplib-0.18.1.tar.gz and /dev/null differ diff --git a/support/3rd_party/cpp-httplib-0.18.1.tar.gz.sha256 b/support/3rd_party/cpp-httplib-0.18.1.tar.gz.sha256 deleted file mode 100644 index 7172dc81..00000000 --- a/support/3rd_party/cpp-httplib-0.18.1.tar.gz.sha256 +++ /dev/null @@ -1 +0,0 @@ -405abd8170f2a446fc8612ac635d0db5947c0d2e156e32603403a4496255ff00 *cpp-httplib-0.18.1.tar.gz diff --git a/support/3rd_party/cpp-httplib-0.19.0.tar.gz b/support/3rd_party/cpp-httplib-0.19.0.tar.gz new file mode 100644 index 00000000..ec296a26 Binary files /dev/null and b/support/3rd_party/cpp-httplib-0.19.0.tar.gz differ diff --git a/support/3rd_party/cpp-httplib-0.19.0.tar.gz.sha256 b/support/3rd_party/cpp-httplib-0.19.0.tar.gz.sha256 new file mode 100644 index 00000000..9e4e54ef --- /dev/null +++ b/support/3rd_party/cpp-httplib-0.19.0.tar.gz.sha256 @@ -0,0 +1 @@ +c9b9e0524666e1cd088f0874c57c1ce7c0eaa8552f9f4e15c755d5201fc8c608 *cpp-httplib-0.19.0.tar.gz diff --git a/support/3rd_party/curl-8.11.0.tar.gz b/support/3rd_party/curl-8.11.0.tar.gz deleted file mode 100644 index 5953bd44..00000000 Binary files a/support/3rd_party/curl-8.11.0.tar.gz and /dev/null differ diff --git a/support/3rd_party/curl-8.11.0.tar.gz.sha256 b/support/3rd_party/curl-8.11.0.tar.gz.sha256 deleted file mode 100644 index bc720dfb..00000000 --- a/support/3rd_party/curl-8.11.0.tar.gz.sha256 +++ /dev/null @@ -1 +0,0 @@ -5a231145114589491fc52da118f9c7ef8abee885d1cb1ced99c7290e9a352f07 *curl-8.11.0.tar.gz diff --git a/support/3rd_party/curl-8.12.1.tar.gz b/support/3rd_party/curl-8.12.1.tar.gz new file mode 100644 index 00000000..ce8921e3 Binary files /dev/null and b/support/3rd_party/curl-8.12.1.tar.gz differ diff --git a/support/3rd_party/curl-8.12.1.tar.gz.sha256 b/support/3rd_party/curl-8.12.1.tar.gz.sha256 new file mode 100644 index 00000000..5c8be961 --- /dev/null +++ b/support/3rd_party/curl-8.12.1.tar.gz.sha256 @@ -0,0 +1 @@ +6edc063d1ebaf9cf3b3b46e9fef2f3cd8932694989ecd43d005d6e828426d09f *curl-8.12.1.tar.gz diff --git a/support/3rd_party/googletest-1.16.0.tar.gz b/support/3rd_party/googletest-1.16.0.tar.gz new file mode 100644 index 00000000..932b4b50 Binary files /dev/null and b/support/3rd_party/googletest-1.16.0.tar.gz differ diff --git a/support/3rd_party/googletest-1.16.0.tar.gz.sha256 b/support/3rd_party/googletest-1.16.0.tar.gz.sha256 new file mode 100644 index 00000000..1c9941ba --- /dev/null +++ b/support/3rd_party/googletest-1.16.0.tar.gz.sha256 @@ -0,0 +1 @@ +78c676fc63881529bf97bf9d45948d905a66833fbfa5318ea2cd7478cb98f399 *googletest-1.16.0.tar.gz diff --git a/support/3rd_party/pugixml-1.14.tar.gz b/support/3rd_party/pugixml-1.14.tar.gz deleted file mode 100644 index 9a71ceff..00000000 Binary files a/support/3rd_party/pugixml-1.14.tar.gz and /dev/null differ diff --git a/support/3rd_party/pugixml-1.14.tar.gz.sha256 b/support/3rd_party/pugixml-1.14.tar.gz.sha256 deleted file mode 100644 index bad0993f..00000000 --- a/support/3rd_party/pugixml-1.14.tar.gz.sha256 +++ /dev/null @@ -1 +0,0 @@ -2f10e276870c64b1db6809050a75e11a897a8d7456c4be5c6b2e35a11168a015 pugixml-1.14.tar.gz diff --git a/support/3rd_party/pugixml-1.15.tar.gz b/support/3rd_party/pugixml-1.15.tar.gz new file mode 100644 index 00000000..62cecb12 Binary files /dev/null and b/support/3rd_party/pugixml-1.15.tar.gz differ diff --git a/support/3rd_party/pugixml-1.15.tar.gz.sha256 b/support/3rd_party/pugixml-1.15.tar.gz.sha256 new file mode 100644 index 00000000..526982f7 --- /dev/null +++ b/support/3rd_party/pugixml-1.15.tar.gz.sha256 @@ -0,0 +1 @@ +655ade57fa703fb421c2eb9a0113b5064bddb145d415dd1f88c79353d90d511a *pugixml-1.15.tar.gz diff --git a/support/3rd_party/rocksdb-9.7.4.tar.gz b/support/3rd_party/rocksdb-9.10.0.tar.gz similarity index 61% rename from support/3rd_party/rocksdb-9.7.4.tar.gz rename to support/3rd_party/rocksdb-9.10.0.tar.gz index d74b8098..e4d0748b 100644 Binary files a/support/3rd_party/rocksdb-9.7.4.tar.gz and b/support/3rd_party/rocksdb-9.10.0.tar.gz differ diff --git a/support/3rd_party/rocksdb-9.10.0.tar.gz.sha256 b/support/3rd_party/rocksdb-9.10.0.tar.gz.sha256 new file mode 100644 index 00000000..d1b36f6d --- /dev/null +++ b/support/3rd_party/rocksdb-9.10.0.tar.gz.sha256 @@ -0,0 +1 @@ +fdccab16133c9d927a183c2648bcea8d956fb41eb1df2aacaa73eb0b95e43724 *rocksdb-9.10.0.tar.gz diff --git a/support/3rd_party/rocksdb-9.7.4.tar.gz.sha256 b/support/3rd_party/rocksdb-9.7.4.tar.gz.sha256 deleted file mode 100644 index 6b280b85..00000000 --- a/support/3rd_party/rocksdb-9.7.4.tar.gz.sha256 +++ /dev/null @@ -1 +0,0 @@ -9b810c81731835fda0d4bbdb51d3199d901fa4395733ab63752d297da84c5a47 *rocksdb-9.7.4.tar.gz diff --git a/support/3rd_party/spdlog-1.15.0.tar.gz b/support/3rd_party/spdlog-1.15.0.tar.gz deleted file mode 100644 index a74418cc..00000000 Binary files a/support/3rd_party/spdlog-1.15.0.tar.gz and /dev/null differ diff --git a/support/3rd_party/spdlog-1.15.0.tar.gz.sha256 b/support/3rd_party/spdlog-1.15.0.tar.gz.sha256 deleted file mode 100644 index 71222723..00000000 --- a/support/3rd_party/spdlog-1.15.0.tar.gz.sha256 +++ /dev/null @@ -1 +0,0 @@ -9962648c9b4f1a7bbc76fd8d9172555bad1871fdb14ff4f842ef87949682caa5 *spdlog-1.15.0.tar.gz diff --git a/support/3rd_party/spdlog-1.15.1.tar.gz b/support/3rd_party/spdlog-1.15.1.tar.gz new file mode 100644 index 00000000..8ddc986f Binary files /dev/null and b/support/3rd_party/spdlog-1.15.1.tar.gz differ diff --git a/support/3rd_party/spdlog-1.15.1.tar.gz.sha256 b/support/3rd_party/spdlog-1.15.1.tar.gz.sha256 new file mode 100644 index 00000000..49f3d929 --- /dev/null +++ b/support/3rd_party/spdlog-1.15.1.tar.gz.sha256 @@ -0,0 +1 @@ +25c843860f039a1600f232c6eb9e01e6627f7d030a2ae5e232bdd3c9205d26cc *spdlog-1.15.1.tar.gz diff --git a/support/3rd_party/sqlite-amalgamation-3460100.zip b/support/3rd_party/sqlite-amalgamation-3460100.zip deleted file mode 100644 index 750873a0..00000000 Binary files a/support/3rd_party/sqlite-amalgamation-3460100.zip and /dev/null differ diff --git a/support/3rd_party/sqlite-amalgamation-3460100.zip.sha256 b/support/3rd_party/sqlite-amalgamation-3460100.zip.sha256 deleted file mode 100644 index ce14d6dd..00000000 --- a/support/3rd_party/sqlite-amalgamation-3460100.zip.sha256 +++ /dev/null @@ -1 +0,0 @@ -77823cb110929c2bcb0f5d48e4833b5c59a8a6e40cdea3936b99e199dbbe5784 sqlite-amalgamation-3460100.zip diff --git a/support/3rd_party/sqlite-amalgamation-3490100.zip b/support/3rd_party/sqlite-amalgamation-3490100.zip new file mode 100644 index 00000000..3edfd709 Binary files /dev/null and b/support/3rd_party/sqlite-amalgamation-3490100.zip differ diff --git a/support/3rd_party/sqlite-amalgamation-3490100.zip.sha256 b/support/3rd_party/sqlite-amalgamation-3490100.zip.sha256 new file mode 100644 index 00000000..03b52fb6 --- /dev/null +++ b/support/3rd_party/sqlite-amalgamation-3490100.zip.sha256 @@ -0,0 +1 @@ +6cebd1d8403fc58c30e93939b246f3e6e58d0765a5cd50546f16c00fd805d2c3 *sqlite-amalgamation-3490100.zip diff --git a/support/include/utils/config.hpp b/support/include/utils/config.hpp index cedba8cd..c7ef65f6 100644 --- a/support/include/utils/config.hpp +++ b/support/include/utils/config.hpp @@ -399,6 +399,13 @@ using vlc_string_t = std::unique_ptr; #include "spdlog/spdlog.h" #endif // defined(PROJECT_ENABLE_SPDLOG) +#if defined(PROJECT_ENABLE_FMT) +#include "fmt/chrono.h" +#include "fmt/core.h" +#include "fmt/format.h" +#include "fmt/ranges.h" +#endif // defined(PROJECT_ENABLE_FMT) + #if defined(PROJECT_ENABLE_STDUUID) #include "uuid.h" #endif // defined(PROJECT_ENABLE_STDUUID) diff --git a/support/include/utils/error.hpp b/support/include/utils/error.hpp index a78a02aa..6cae4af3 100644 --- a/support/include/utils/error.hpp +++ b/support/include/utils/error.hpp @@ -131,15 +131,6 @@ inline const spdlog_exception_handler default_exception_handler{}; inline const iostream_exception_handler default_exception_handler{}; #endif // defined(PROJECT_ENABLE_SPDLOG) && defined(PROJECT_ENABLE_V2_ERRORS) -#if defined(PROJECT_ENABLE_TESTING) -extern std::atomic exception_handler; - -[[nodiscard]] inline auto get_exception_handler() - -> const i_exception_handler * { - return exception_handler; -} -#endif // defined(PROJECT_ENABLE_TESTING) - #if defined(PROJECT_ENABLE_V2_ERRORS) void handle_debug(std::string_view function_name, std::string_view msg); #endif // defined(PROJECT_ENABLE_V2_ERRORS) @@ -159,6 +150,15 @@ void handle_warn(std::string_view function_name, std::string_view msg); #endif // defined(PROJECT_ENABLE_V2_ERRORS) void set_exception_handler(const i_exception_handler *handler); + +#if defined(PROJECT_ENABLE_TESTING) +extern std::atomic exception_handler; + +[[nodiscard]] inline auto get_exception_handler() + -> const i_exception_handler * { + return exception_handler; +} +#endif // defined(PROJECT_ENABLE_TESTING) } // namespace repertory::utils::error #endif // REPERTORY_INCLUDE_UTILS_ERROR_HPP_ diff --git a/support/src/utils/error.cpp b/support/src/utils/error.cpp index feebdbcd..71077fc7 100644 --- a/support/src/utils/error.cpp +++ b/support/src/utils/error.cpp @@ -47,82 +47,4 @@ auto create_exception(std::string_view function_name, return std::runtime_error(create_error_message(function_name, items)); } -#if defined(PROJECT_ENABLE_V2_ERRORS) -void handle_debug(std::string_view function_name, std::string_view msg) { - const i_exception_handler *handler{exception_handler}; - if (handler != nullptr) { - handler->handle_debug(function_name, msg); - return; - } - - default_exception_handler.handle_debug(function_name, msg); -} -#endif // defined(PROJECT_ENABLE_V2_ERRORS) - -void handle_error(std::string_view function_name, std::string_view msg) { - const i_exception_handler *handler{exception_handler}; - if (handler != nullptr) { - handler->handle_error(function_name, msg); - return; - } - - default_exception_handler.handle_error(function_name, msg); -} - -void handle_exception(std::string_view function_name) { - const i_exception_handler *handler{exception_handler}; - if (handler != nullptr) { - handler->handle_exception(function_name); - return; - } - - default_exception_handler.handle_exception(function_name); -} - -void handle_exception(std::string_view function_name, - const std::exception &ex) { - const i_exception_handler *handler{exception_handler}; - if (handler != nullptr) { - handler->handle_exception(function_name, ex); - return; - } - - default_exception_handler.handle_exception(function_name, ex); -} - -#if defined(PROJECT_ENABLE_V2_ERRORS) -void handle_info(std::string_view function_name, std::string_view msg) { - const i_exception_handler *handler{exception_handler}; - if (handler != nullptr) { - handler->handle_info(function_name, msg); - return; - } - - default_exception_handler.handle_info(function_name, msg); -} - -void handle_trace(std::string_view function_name, std::string_view msg) { - const i_exception_handler *handler{exception_handler}; - if (handler != nullptr) { - handler->handle_trace(function_name, msg); - return; - } - - default_exception_handler.handle_trace(function_name, msg); -} - -void handle_warn(std::string_view function_name, std::string_view msg) { - const i_exception_handler *handler{exception_handler}; - if (handler != nullptr) { - handler->handle_warn(function_name, msg); - return; - } - - default_exception_handler.handle_warn(function_name, msg); -} -#endif // defined(PROJECT_ENABLE_V2_ERRORS) - -void set_exception_handler(const i_exception_handler *handler) { - exception_handler = handler; -} } // namespace repertory::utils::error diff --git a/support/src/utils/error_handler.cpp b/support/src/utils/error_handler.cpp index 827ce2b1..9f6a0356 100644 --- a/support/src/utils/error_handler.cpp +++ b/support/src/utils/error_handler.cpp @@ -19,12 +19,15 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "utils/config.hpp" #include "utils/error.hpp" +#include "utils/config.hpp" +#include "utils/string.hpp" + namespace repertory::utils::error { std::atomic exception_handler{ - &default_exception_handler}; + &default_exception_handler, +}; #if defined(PROJECT_ENABLE_V2_ERRORS) void iostream_exception_handler::handle_debug(std::string_view function_name, @@ -238,4 +241,83 @@ void spdlog_exception_handler::handle_warn(std::string_view function_name, file->warn(utils::error::create_error_message(function_name, {msg})); } #endif // defined(PROJECT_ENABLE_SPDLOG) && defined(PROJECT_ENABLE_V2_ERRORS) + +#if defined(PROJECT_ENABLE_V2_ERRORS) +void handle_debug(std::string_view function_name, std::string_view msg) { + const i_exception_handler *handler{exception_handler}; + if (handler != nullptr) { + handler->handle_debug(function_name, msg); + return; + } + + default_exception_handler.handle_debug(function_name, msg); +} +#endif // defined(PROJECT_ENABLE_V2_ERRORS) + +void handle_error(std::string_view function_name, std::string_view msg) { + const i_exception_handler *handler{exception_handler}; + if (handler != nullptr) { + handler->handle_error(function_name, msg); + return; + } + + default_exception_handler.handle_error(function_name, msg); +} + +void handle_exception(std::string_view function_name) { + const i_exception_handler *handler{exception_handler}; + if (handler != nullptr) { + handler->handle_exception(function_name); + return; + } + + default_exception_handler.handle_exception(function_name); +} + +void handle_exception(std::string_view function_name, + const std::exception &ex) { + const i_exception_handler *handler{exception_handler}; + if (handler != nullptr) { + handler->handle_exception(function_name, ex); + return; + } + + default_exception_handler.handle_exception(function_name, ex); +} + +#if defined(PROJECT_ENABLE_V2_ERRORS) +void handle_info(std::string_view function_name, std::string_view msg) { + const i_exception_handler *handler{exception_handler}; + if (handler != nullptr) { + handler->handle_info(function_name, msg); + return; + } + + default_exception_handler.handle_info(function_name, msg); +} + +void handle_trace(std::string_view function_name, std::string_view msg) { + const i_exception_handler *handler{exception_handler}; + if (handler != nullptr) { + handler->handle_trace(function_name, msg); + return; + } + + default_exception_handler.handle_trace(function_name, msg); +} + +void handle_warn(std::string_view function_name, std::string_view msg) { + const i_exception_handler *handler{exception_handler}; + if (handler != nullptr) { + handler->handle_warn(function_name, msg); + return; + } + + default_exception_handler.handle_warn(function_name, msg); +} +#endif // defined(PROJECT_ENABLE_V2_ERRORS) + +void set_exception_handler(const i_exception_handler *handler) { + exception_handler = handler; +} } // namespace repertory::utils::error