updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
This commit is contained in:
parent
1560804df8
commit
2c510346f2
@ -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)
|
||||
|
@ -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()
|
||||
|
@ -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)
|
||||
|
48
docker/x86_64/flutter
Normal file
48
docker/x86_64/flutter
Normal file
@ -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
|
@ -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
|
||||
|
@ -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}"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
43
scripts/make_flutter.sh
Normal file
43
scripts/make_flutter.sh
Normal file
@ -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
|
@ -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}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
BIN
support/3rd_party/cpp-httplib-0.18.1.tar.gz
vendored
BIN
support/3rd_party/cpp-httplib-0.18.1.tar.gz
vendored
Binary file not shown.
@ -1 +0,0 @@
|
||||
405abd8170f2a446fc8612ac635d0db5947c0d2e156e32603403a4496255ff00 *cpp-httplib-0.18.1.tar.gz
|
BIN
support/3rd_party/cpp-httplib-0.19.0.tar.gz
vendored
Normal file
BIN
support/3rd_party/cpp-httplib-0.19.0.tar.gz
vendored
Normal file
Binary file not shown.
1
support/3rd_party/cpp-httplib-0.19.0.tar.gz.sha256
vendored
Normal file
1
support/3rd_party/cpp-httplib-0.19.0.tar.gz.sha256
vendored
Normal file
@ -0,0 +1 @@
|
||||
c9b9e0524666e1cd088f0874c57c1ce7c0eaa8552f9f4e15c755d5201fc8c608 *cpp-httplib-0.19.0.tar.gz
|
BIN
support/3rd_party/curl-8.11.0.tar.gz
vendored
BIN
support/3rd_party/curl-8.11.0.tar.gz
vendored
Binary file not shown.
1
support/3rd_party/curl-8.11.0.tar.gz.sha256
vendored
1
support/3rd_party/curl-8.11.0.tar.gz.sha256
vendored
@ -1 +0,0 @@
|
||||
5a231145114589491fc52da118f9c7ef8abee885d1cb1ced99c7290e9a352f07 *curl-8.11.0.tar.gz
|
BIN
support/3rd_party/curl-8.12.1.tar.gz
vendored
Normal file
BIN
support/3rd_party/curl-8.12.1.tar.gz
vendored
Normal file
Binary file not shown.
1
support/3rd_party/curl-8.12.1.tar.gz.sha256
vendored
Normal file
1
support/3rd_party/curl-8.12.1.tar.gz.sha256
vendored
Normal file
@ -0,0 +1 @@
|
||||
6edc063d1ebaf9cf3b3b46e9fef2f3cd8932694989ecd43d005d6e828426d09f *curl-8.12.1.tar.gz
|
BIN
support/3rd_party/googletest-1.16.0.tar.gz
vendored
Normal file
BIN
support/3rd_party/googletest-1.16.0.tar.gz
vendored
Normal file
Binary file not shown.
1
support/3rd_party/googletest-1.16.0.tar.gz.sha256
vendored
Normal file
1
support/3rd_party/googletest-1.16.0.tar.gz.sha256
vendored
Normal file
@ -0,0 +1 @@
|
||||
78c676fc63881529bf97bf9d45948d905a66833fbfa5318ea2cd7478cb98f399 *googletest-1.16.0.tar.gz
|
BIN
support/3rd_party/pugixml-1.14.tar.gz
vendored
BIN
support/3rd_party/pugixml-1.14.tar.gz
vendored
Binary file not shown.
1
support/3rd_party/pugixml-1.14.tar.gz.sha256
vendored
1
support/3rd_party/pugixml-1.14.tar.gz.sha256
vendored
@ -1 +0,0 @@
|
||||
2f10e276870c64b1db6809050a75e11a897a8d7456c4be5c6b2e35a11168a015 pugixml-1.14.tar.gz
|
BIN
support/3rd_party/pugixml-1.15.tar.gz
vendored
Normal file
BIN
support/3rd_party/pugixml-1.15.tar.gz
vendored
Normal file
Binary file not shown.
1
support/3rd_party/pugixml-1.15.tar.gz.sha256
vendored
Normal file
1
support/3rd_party/pugixml-1.15.tar.gz.sha256
vendored
Normal file
@ -0,0 +1 @@
|
||||
655ade57fa703fb421c2eb9a0113b5064bddb145d415dd1f88c79353d90d511a *pugixml-1.15.tar.gz
|
Binary file not shown.
1
support/3rd_party/rocksdb-9.10.0.tar.gz.sha256
vendored
Normal file
1
support/3rd_party/rocksdb-9.10.0.tar.gz.sha256
vendored
Normal file
@ -0,0 +1 @@
|
||||
fdccab16133c9d927a183c2648bcea8d956fb41eb1df2aacaa73eb0b95e43724 *rocksdb-9.10.0.tar.gz
|
@ -1 +0,0 @@
|
||||
9b810c81731835fda0d4bbdb51d3199d901fa4395733ab63752d297da84c5a47 *rocksdb-9.7.4.tar.gz
|
BIN
support/3rd_party/spdlog-1.15.0.tar.gz
vendored
BIN
support/3rd_party/spdlog-1.15.0.tar.gz
vendored
Binary file not shown.
@ -1 +0,0 @@
|
||||
9962648c9b4f1a7bbc76fd8d9172555bad1871fdb14ff4f842ef87949682caa5 *spdlog-1.15.0.tar.gz
|
BIN
support/3rd_party/spdlog-1.15.1.tar.gz
vendored
Normal file
BIN
support/3rd_party/spdlog-1.15.1.tar.gz
vendored
Normal file
Binary file not shown.
1
support/3rd_party/spdlog-1.15.1.tar.gz.sha256
vendored
Normal file
1
support/3rd_party/spdlog-1.15.1.tar.gz.sha256
vendored
Normal file
@ -0,0 +1 @@
|
||||
25c843860f039a1600f232c6eb9e01e6627f7d030a2ae5e232bdd3c9205d26cc *spdlog-1.15.1.tar.gz
|
BIN
support/3rd_party/sqlite-amalgamation-3460100.zip
vendored
BIN
support/3rd_party/sqlite-amalgamation-3460100.zip
vendored
Binary file not shown.
@ -1 +0,0 @@
|
||||
77823cb110929c2bcb0f5d48e4833b5c59a8a6e40cdea3936b99e199dbbe5784 sqlite-amalgamation-3460100.zip
|
BIN
support/3rd_party/sqlite-amalgamation-3490100.zip
vendored
Normal file
BIN
support/3rd_party/sqlite-amalgamation-3490100.zip
vendored
Normal file
Binary file not shown.
1
support/3rd_party/sqlite-amalgamation-3490100.zip.sha256
vendored
Normal file
1
support/3rd_party/sqlite-amalgamation-3490100.zip.sha256
vendored
Normal file
@ -0,0 +1 @@
|
||||
6cebd1d8403fc58c30e93939b246f3e6e58d0765a5cd50546f16c00fd805d2c3 *sqlite-amalgamation-3490100.zip
|
@ -399,6 +399,13 @@ using vlc_string_t = std::unique_ptr<char, vlc_string_deleter>;
|
||||
#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)
|
||||
|
@ -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<const i_exception_handler *> 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<const i_exception_handler *> 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_
|
||||
|
@ -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
|
||||
|
@ -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<const i_exception_handler *> 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user