updated build system
All checks were successful
Public/monitarr/pipeline/head This commit looks good
All checks were successful
Public/monitarr/pipeline/head This commit looks good
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
set(BINUTILS_HASH ce2017e059d63e67ddb9240e9d4ec49c2893605035cd60e92ad53177f4377237)
|
||||
set(CPP_HTTPLIB_HASH 18064587e0cc6a0d5d56d619f4cbbcaba47aa5d84d86013abbd45d95c6653866)
|
||||
set(CURL_HASH ccc5ba45d9f5320c70ffb24e5411b66ba55ea1f333bf78be0963ed90a9328699)
|
||||
set(CPP_HTTPLIB_HASH 410a1347ed6bcbcc4a19af8ed8ad3873fe9fa97731d52db845c4c78f3f9c31e6)
|
||||
set(CURL_HASH 2937cadde007aa3a52a17c21ac9153ea054700f37926d1d96602bf07e888c847)
|
||||
set(EXPAT_HASH 85372797ff0673a8fc4a6be16466bb5a0ca28c0dcf3c6f7ac1686b4a3ba2aabb)
|
||||
set(GCC_HASH 7d376d445f93126dc545e2c0086d0f647c3094aae081cdb78f42ce2bc25e7293)
|
||||
set(GTEST_HASH 78c676fc63881529bf97bf9d45948d905a66833fbfa5318ea2cd7478cb98f399)
|
||||
set(GCC_HASH 51b9919ea69c980d7a381db95d4be27edf73b21254eb13d752a08003b4d013b1)
|
||||
set(GTEST_HASH 65fab701d9829d38cb77c14acdc431d2108bfdbf8979e40eb8ae567edf10b27c)
|
||||
set(ICU_HASH a2c443404f00098e9e90acf29dc318e049d2dc78d9ae5f46efb261934a730ce2)
|
||||
set(JSON_HASH 4b92eb0c06d10683f7447ce9406cb97cd4b453be18d7279320f7b2f025c10187)
|
||||
set(MINGW_HASH cc41898aac4b6e8dd5cffd7331b9d9515b912df4420a3a612b5ea2955bbeed2f)
|
||||
set(OPENSSL_HASH 344d0a79f1a9b08029b0744e2cc401a43f9c90acd1044d09a530b4885a8e9fc0)
|
||||
set(MINGW_HASH 5afe822af5c4edbf67daaf45eec61d538f49eef6b19524de64897c6b95828caf)
|
||||
set(OPENSSL_HASH 529043b15cffa5f36077a4d0af83f3de399807181d607441d734196d889b641f)
|
||||
set(PKG_CONFIG_HASH 6fc69c01688c9458a57eb9a1664c9aba372ccda420a02bf4429fe610e7e7d591)
|
||||
set(ROCKSDB_HASH 3fdc9ca996971c4c039959866382c4a3a6c8ade4abf888f3b2ff77153e07bf28)
|
||||
set(SPDLOG_HASH 7a80896357f3e8e920e85e92633b14ba0f229c506e6f978578bdc35ba09e9a5d)
|
||||
set(ROCKSDB_HASH afccfab496556904900afacf7d99887f1d50cb893e5d2288bd502db233adacac)
|
||||
set(SPDLOG_HASH 15a04e69c222eb6c01094b5c7ff8a249b36bb22788d72519646fb85feb267e67)
|
||||
set(ZLIB_HASH 17e88863f3600672ab49182f217281b6fc4d3c762bde361935e436a95214d05c)
|
||||
|
||||
@@ -5,18 +5,18 @@ set(BOOST2_PATCH_VERSION 0)
|
||||
set(BOOST_MAJOR_VERSION 1)
|
||||
set(BOOST_MINOR_VERSION 88)
|
||||
set(BOOST_PATCH_VERSION 0)
|
||||
set(CPP_HTTPLIB_VERSION 0.20.0)
|
||||
set(CURL2_VERSION 8_13_0)
|
||||
set(CURL_VERSION 8.13.0)
|
||||
set(CPP_HTTPLIB_VERSION 0.23.1)
|
||||
set(CURL2_VERSION 8_15_0)
|
||||
set(CURL_VERSION 8.15.0)
|
||||
set(EXPAT2_VERSION 2_7_1)
|
||||
set(EXPAT_VERSION 2.7.1)
|
||||
set(GCC_VERSION 14.2.0)
|
||||
set(GTEST_VERSION 1.16.0)
|
||||
set(GCC_VERSION 15.1.0)
|
||||
set(GTEST_VERSION 1.17.0)
|
||||
set(ICU_VERSION 76-1)
|
||||
set(JSON_VERSION 3.12.0)
|
||||
set(MINGW_VERSION 12.0.0)
|
||||
set(OPENSSL_VERSION 3.5.0)
|
||||
set(MINGW_VERSION 13.0.0)
|
||||
set(OPENSSL_VERSION 3.5.1)
|
||||
set(PKG_CONFIG_VERSION 0.29.2)
|
||||
set(ROCKSDB_VERSION 10.0.1)
|
||||
set(SPDLOG_VERSION 1.15.2)
|
||||
set(ROCKSDB_VERSION 10.4.2)
|
||||
set(SPDLOG_VERSION 1.15.3)
|
||||
set(ZLIB_VERSION 1.3.1)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#comment
|
||||
FROM arm64v8/alpine:3.21.3
|
||||
FROM arm64v8/alpine:3.21.4
|
||||
MAINTAINER Scott E. Graves <scott.e.graves@protonmail.com>
|
||||
CMD bash
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#comment
|
||||
FROM alpine:3.21.3
|
||||
FROM alpine:3.21.4
|
||||
MAINTAINER Scott E. Graves <scott.e.graves@protonmail.com>
|
||||
CMD bash
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#comment
|
||||
FROM alpine:3.21.3
|
||||
FROM alpine:3.21.4
|
||||
|
||||
RUN apk update
|
||||
RUN apk upgrade
|
||||
|
||||
@@ -1,24 +1,3 @@
|
||||
/*
|
||||
Copyright <2018-2025> <scott.e.graves@protonmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
#ifndef LIBMONITARR_INCLUDE_INITIALIZE_HPP_
|
||||
#define LIBMONITARR_INCLUDE_INITIALIZE_HPP_
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#include "version.hpp"
|
||||
|
||||
namespace {
|
||||
static constexpr const std::string_view git_rev = "@PROJECT_GIT_REV@";
|
||||
static constexpr const std::string_view version =
|
||||
constexpr std::string_view git_rev = "@PROJECT_GIT_REV@";
|
||||
constexpr std::string_view version =
|
||||
"@PROJECT_MAJOR_VERSION@.@PROJECT_MINOR_VERSION@.@PROJECT_REVISION_VERSION@"
|
||||
"-@PROJECT_RELEASE_ITER@";
|
||||
} // namespace
|
||||
@@ -11,4 +11,4 @@ namespace monitarr {
|
||||
auto project_get_git_rev() -> std::string_view { return git_rev; }
|
||||
|
||||
auto project_get_version() -> std::string_view { return version; }
|
||||
} // namespace monitarr
|
||||
} // namespace %PROJECT_NAME %
|
||||
|
||||
@@ -194,7 +194,7 @@ if [ "${PROJECT_ENABLE_WINFSP}" == "ON" ]; then
|
||||
fi
|
||||
|
||||
if [ "${WINFSP_DLL_PART}" != "" ]; then
|
||||
PROJECT_MINGW64_COPY_DEPENDENCIES+=(${PROJECT_3RD_PARTY_DIR}/winfsp-2.0/bin/winfsp-${WINFSP_DLL_PART}.dll)
|
||||
PROJECT_MINGW64_COPY_DEPENDENCIES+=(${PROJECT_3RD_PARTY_DIR}/winfsp-2.1/bin/winfsp-${WINFSP_DLL_PART}.dll)
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ PROJECT_DOWNLOADS[BOOST2]="https://archives.boost.io/release/${PROJECT_VERSIONS[
|
||||
PROJECT_DOWNLOADS[CPP_HTTPLIB]="https://github.com/yhirose/cpp-httplib/archive/refs/tags/v${PROJECT_VERSIONS[CPP_HTTPLIB]}.tar.gz;cpp-httplib-${PROJECT_VERSIONS[CPP_HTTPLIB]}.tar.gz;3rd_party"
|
||||
PROJECT_DOWNLOADS[CURL]="https://github.com/curl/curl/archive/refs/tags/curl-${PROJECT_VERSIONS[CURL2]}.tar.gz;curl-${PROJECT_VERSIONS[CURL]}.tar.gz;3rd_party"
|
||||
PROJECT_DOWNLOADS[EXPAT]="https://github.com/libexpat/libexpat/archive/refs/tags/R_${PROJECT_VERSIONS[EXPAT2]}.tar.gz;expat-${PROJECT_VERSIONS[EXPAT]}.tar.gz;3rd_party/mingw64"
|
||||
PROJECT_DOWNLOADS[GCC]="https://ftp.gnu.org/gnu/gcc/gcc-${PROJECT_VERSIONS[GCC]}/gcc-${PROJECT_VERSIONS[GCC]}.tar.gz;gcc-${PROJECT_VERSIONS[GCC]}.tar.gz;3rd_party/mingw64"
|
||||
PROJECT_DOWNLOADS[GCC]="https://mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-${PROJECT_VERSIONS[GCC]}/gcc-${PROJECT_VERSIONS[GCC]}.tar.gz;gcc-${PROJECT_VERSIONS[GCC]}.tar.gz;3rd_party/mingw64"
|
||||
PROJECT_DOWNLOADS[GTEST]="https://github.com/google/googletest/archive/refs/tags/v${PROJECT_VERSIONS[GTEST]}.tar.gz;googletest-${PROJECT_VERSIONS[GTEST]}.tar.gz;3rd_party"
|
||||
PROJECT_DOWNLOADS[ICU]="https://github.com/unicode-org/icu/archive/refs/tags/release-${PROJECT_VERSIONS[ICU]}.tar.gz;icu-release-${PROJECT_VERSIONS[ICU]}.tar.gz;3rd_party/mingw64"
|
||||
PROJECT_DOWNLOADS[JSON]="https://github.com/nlohmann/json/archive/refs/tags/v${PROJECT_VERSIONS[JSON]}.tar.gz;json-${PROJECT_VERSIONS[JSON]}.tar.gz;3rd_party"
|
||||
|
||||
@@ -8,19 +8,19 @@ PROJECT_VERSIONS[BOOST2_PATCH]="0"
|
||||
PROJECT_VERSIONS[BOOST_MAJOR]="1"
|
||||
PROJECT_VERSIONS[BOOST_MINOR]="88"
|
||||
PROJECT_VERSIONS[BOOST_PATCH]="0"
|
||||
PROJECT_VERSIONS[CPP_HTTPLIB]="0.20.0"
|
||||
PROJECT_VERSIONS[CURL]="8.13.0"
|
||||
PROJECT_VERSIONS[CURL2]="8_13_0"
|
||||
PROJECT_VERSIONS[CPP_HTTPLIB]="0.23.1"
|
||||
PROJECT_VERSIONS[CURL]="8.15.0"
|
||||
PROJECT_VERSIONS[CURL2]="8_15_0"
|
||||
PROJECT_VERSIONS[EXPAT]="2.7.1"
|
||||
PROJECT_VERSIONS[EXPAT2]="2_7_1"
|
||||
PROJECT_VERSIONS[GCC]="14.2.0"
|
||||
PROJECT_VERSIONS[GTEST]="1.16.0"
|
||||
PROJECT_VERSIONS[GCC]="15.1.0"
|
||||
PROJECT_VERSIONS[GTEST]="1.17.0"
|
||||
PROJECT_VERSIONS[ICU]="76-1"
|
||||
PROJECT_VERSIONS[JSON]="3.12.0"
|
||||
PROJECT_VERSIONS[MINGW]="12.0.0"
|
||||
PROJECT_VERSIONS[OPENSSL]="3.5.0"
|
||||
PROJECT_VERSIONS[MINGW]="13.0.0"
|
||||
PROJECT_VERSIONS[OPENSSL]="3.5.1"
|
||||
PROJECT_VERSIONS[PKG_CONFIG]="0.29.2"
|
||||
PROJECT_VERSIONS[ROCKSDB]="10.0.1"
|
||||
PROJECT_VERSIONS[SPDLOG]="1.15.2"
|
||||
PROJECT_VERSIONS[ROCKSDB]="10.4.2"
|
||||
PROJECT_VERSIONS[SPDLOG]="1.15.3"
|
||||
PROJECT_VERSIONS[ZLIB]="1.3.1"
|
||||
export PROJECT_VERSIONS
|
||||
|
||||
BIN
support/3rd_party/cpp-httplib-0.20.0.tar.gz
LFS
vendored
BIN
support/3rd_party/cpp-httplib-0.20.0.tar.gz
LFS
vendored
Binary file not shown.
@@ -1 +0,0 @@
|
||||
18064587e0cc6a0d5d56d619f4cbbcaba47aa5d84d86013abbd45d95c6653866 cpp-httplib-0.20.0.tar.gz
|
||||
BIN
support/3rd_party/cpp-httplib-0.23.1.tar.gz
LFS
vendored
Normal file
BIN
support/3rd_party/cpp-httplib-0.23.1.tar.gz
LFS
vendored
Normal file
Binary file not shown.
1
support/3rd_party/cpp-httplib-0.23.1.tar.gz.sha256
vendored
Normal file
1
support/3rd_party/cpp-httplib-0.23.1.tar.gz.sha256
vendored
Normal file
@@ -0,0 +1 @@
|
||||
410a1347ed6bcbcc4a19af8ed8ad3873fe9fa97731d52db845c4c78f3f9c31e6 cpp-httplib-0.23.1.tar.gz
|
||||
BIN
support/3rd_party/curl-8.13.0.tar.gz
LFS
vendored
BIN
support/3rd_party/curl-8.13.0.tar.gz
LFS
vendored
Binary file not shown.
1
support/3rd_party/curl-8.13.0.tar.gz.sha256
vendored
1
support/3rd_party/curl-8.13.0.tar.gz.sha256
vendored
@@ -1 +0,0 @@
|
||||
ccc5ba45d9f5320c70ffb24e5411b66ba55ea1f333bf78be0963ed90a9328699 curl-8.13.0.tar.gz
|
||||
BIN
support/3rd_party/curl-8.15.0.tar.gz
LFS
vendored
Normal file
BIN
support/3rd_party/curl-8.15.0.tar.gz
LFS
vendored
Normal file
Binary file not shown.
1
support/3rd_party/curl-8.15.0.tar.gz.sha256
vendored
Normal file
1
support/3rd_party/curl-8.15.0.tar.gz.sha256
vendored
Normal file
@@ -0,0 +1 @@
|
||||
2937cadde007aa3a52a17c21ac9153ea054700f37926d1d96602bf07e888c847 curl-8.15.0.tar.gz
|
||||
BIN
support/3rd_party/googletest-1.15.2.tar.gz
LFS
vendored
BIN
support/3rd_party/googletest-1.15.2.tar.gz
LFS
vendored
Binary file not shown.
@@ -1 +0,0 @@
|
||||
7b42b4d6ed48810c5362c265a17faebe90dc2373c885e5216439d37927f02926 googletest-1.15.2.tar.gz
|
||||
BIN
support/3rd_party/googletest-1.16.0.tar.gz
LFS
vendored
BIN
support/3rd_party/googletest-1.16.0.tar.gz
LFS
vendored
Binary file not shown.
@@ -1 +0,0 @@
|
||||
78c676fc63881529bf97bf9d45948d905a66833fbfa5318ea2cd7478cb98f399 *googletest-1.16.0.tar.gz
|
||||
BIN
support/3rd_party/googletest-1.17.0.tar.gz
LFS
vendored
Normal file
BIN
support/3rd_party/googletest-1.17.0.tar.gz
LFS
vendored
Normal file
Binary file not shown.
1
support/3rd_party/googletest-1.17.0.tar.gz.sha256
vendored
Normal file
1
support/3rd_party/googletest-1.17.0.tar.gz.sha256
vendored
Normal file
@@ -0,0 +1 @@
|
||||
65fab701d9829d38cb77c14acdc431d2108bfdbf8979e40eb8ae567edf10b27c googletest-1.17.0.tar.gz
|
||||
BIN
support/3rd_party/mingw64/gcc-14.2.0.tar.gz
LFS
vendored
BIN
support/3rd_party/mingw64/gcc-14.2.0.tar.gz
LFS
vendored
Binary file not shown.
@@ -1 +0,0 @@
|
||||
7d376d445f93126dc545e2c0086d0f647c3094aae081cdb78f42ce2bc25e7293 gcc-14.2.0.tar.gz
|
||||
BIN
support/3rd_party/mingw64/gcc-15.1.0.tar.gz
LFS
vendored
Normal file
BIN
support/3rd_party/mingw64/gcc-15.1.0.tar.gz
LFS
vendored
Normal file
Binary file not shown.
1
support/3rd_party/mingw64/gcc-15.1.0.tar.gz.sha256
vendored
Normal file
1
support/3rd_party/mingw64/gcc-15.1.0.tar.gz.sha256
vendored
Normal file
@@ -0,0 +1 @@
|
||||
51b9919ea69c980d7a381db95d4be27edf73b21254eb13d752a08003b4d013b1 *gcc-15.1.0.tar.gz
|
||||
@@ -1 +0,0 @@
|
||||
cc41898aac4b6e8dd5cffd7331b9d9515b912df4420a3a612b5ea2955bbeed2f mingw-w64-v12.0.0.tar.bz2
|
||||
Binary file not shown.
1
support/3rd_party/mingw64/mingw-w64-v13.0.0.tar.bz2.sha256
vendored
Normal file
1
support/3rd_party/mingw64/mingw-w64-v13.0.0.tar.bz2.sha256
vendored
Normal file
@@ -0,0 +1 @@
|
||||
5afe822af5c4edbf67daaf45eec61d538f49eef6b19524de64897c6b95828caf mingw-w64-v13.0.0.tar.bz2
|
||||
BIN
support/3rd_party/openssl-3.5.0.tar.gz
LFS
vendored
BIN
support/3rd_party/openssl-3.5.0.tar.gz
LFS
vendored
Binary file not shown.
@@ -1 +0,0 @@
|
||||
344d0a79f1a9b08029b0744e2cc401a43f9c90acd1044d09a530b4885a8e9fc0 openssl-3.5.0.tar.gz
|
||||
BIN
support/3rd_party/openssl-3.5.1.tar.gz
LFS
vendored
Normal file
BIN
support/3rd_party/openssl-3.5.1.tar.gz
LFS
vendored
Normal file
Binary file not shown.
1
support/3rd_party/openssl-3.5.1.tar.gz.sha256
vendored
Normal file
1
support/3rd_party/openssl-3.5.1.tar.gz.sha256
vendored
Normal file
@@ -0,0 +1 @@
|
||||
529043b15cffa5f36077a4d0af83f3de399807181d607441d734196d889b641f openssl-3.5.1.tar.gz
|
||||
BIN
support/3rd_party/rocksdb-10.0.1.tar.gz
LFS
vendored
BIN
support/3rd_party/rocksdb-10.0.1.tar.gz
LFS
vendored
Binary file not shown.
@@ -1 +0,0 @@
|
||||
3fdc9ca996971c4c039959866382c4a3a6c8ade4abf888f3b2ff77153e07bf28 rocksdb-10.0.1.tar.gz
|
||||
BIN
support/3rd_party/rocksdb-10.4.2.tar.gz
LFS
vendored
Normal file
BIN
support/3rd_party/rocksdb-10.4.2.tar.gz
LFS
vendored
Normal file
Binary file not shown.
1
support/3rd_party/rocksdb-10.4.2.tar.gz.sha256
vendored
Normal file
1
support/3rd_party/rocksdb-10.4.2.tar.gz.sha256
vendored
Normal file
@@ -0,0 +1 @@
|
||||
afccfab496556904900afacf7d99887f1d50cb893e5d2288bd502db233adacac rocksdb-10.4.2.tar.gz
|
||||
BIN
support/3rd_party/spdlog-1.15.2.tar.gz
LFS
vendored
BIN
support/3rd_party/spdlog-1.15.2.tar.gz
LFS
vendored
Binary file not shown.
@@ -1 +0,0 @@
|
||||
7a80896357f3e8e920e85e92633b14ba0f229c506e6f978578bdc35ba09e9a5d spdlog-1.15.2.tar.gz
|
||||
BIN
support/3rd_party/spdlog-1.15.3.tar.gz
LFS
vendored
Normal file
BIN
support/3rd_party/spdlog-1.15.3.tar.gz
LFS
vendored
Normal file
Binary file not shown.
1
support/3rd_party/spdlog-1.15.3.tar.gz.sha256
vendored
Normal file
1
support/3rd_party/spdlog-1.15.3.tar.gz.sha256
vendored
Normal file
@@ -0,0 +1 @@
|
||||
15a04e69c222eb6c01094b5c7ff8a249b36bb22788d72519646fb85feb267e67 spdlog-1.15.3.tar.gz
|
||||
@@ -75,7 +75,7 @@ template <typename val_t>
|
||||
-> bool {
|
||||
MONITARR_USES_FUNCTION_NAME();
|
||||
|
||||
static constexpr const auto base16{16};
|
||||
static constexpr auto base16{16};
|
||||
|
||||
try {
|
||||
val.clear();
|
||||
@@ -158,7 +158,7 @@ template <typename col_t>
|
||||
inline auto to_hex_string(const col_t &collection) -> std::string {
|
||||
static_assert(sizeof(typename col_t::value_type) == 1U,
|
||||
"value_type must be 1 byte in size");
|
||||
static constexpr const auto mask = 0xFF;
|
||||
static constexpr auto mask{0xFF};
|
||||
|
||||
std::stringstream stream{};
|
||||
for (auto &&val : collection) {
|
||||
|
||||
@@ -106,7 +106,6 @@
|
||||
#include <bit>
|
||||
#include <cerrno>
|
||||
#include <chrono>
|
||||
#include <ciso646>
|
||||
#include <climits>
|
||||
#include <codecvt>
|
||||
#include <condition_variable>
|
||||
@@ -147,6 +146,7 @@
|
||||
#include <utility>
|
||||
#include <variant>
|
||||
#include <vector>
|
||||
#include <version>
|
||||
#endif // defined(__cplusplus)
|
||||
|
||||
#if defined(PROJECT_ENABLE_CURL)
|
||||
@@ -415,6 +415,9 @@ using vlc_string_t = std::unique_ptr<char, vlc_string_deleter>;
|
||||
#endif // defined(PROJECT_ENABLE_TPL)
|
||||
|
||||
#if defined(PROJECT_ENABLE_WINFSP)
|
||||
#if defined(_ReadWriteBarrier)
|
||||
#undef _ReadWriteBarrier
|
||||
#endif // defined(_ReadWriteBarrier)
|
||||
#include "winfsp/winfsp.hpp"
|
||||
#endif // defined(PROJECT_ENABLE_WINFSP)
|
||||
|
||||
@@ -429,14 +432,14 @@ using unique_recur_mutex_lock = std::unique_lock<std::recursive_mutex>;
|
||||
|
||||
#if defined(_WIN32)
|
||||
#if defined(PROJECT_ENABLE_WIN32_LONG_PATH_NAMES)
|
||||
inline constexpr const auto max_path_length = std::size_t{32767U};
|
||||
inline constexpr auto max_path_length = std::size_t{32767U};
|
||||
#else // !defined(PROJECT_ENABLE_WIN32_LONG_PATH_NAMES)
|
||||
inline constexpr const auto max_path_length = std::size_t{MAX_PATH};
|
||||
inline constexpr auto max_path_length = std::size_t{MAX_PATH};
|
||||
#endif // defined(PROJECT_ENABLE_WIN32_LONG_PATH_NAMES)
|
||||
|
||||
using native_handle = HANDLE;
|
||||
#else // !defined(_WIN32)
|
||||
inline constexpr const auto max_path_length = std::size_t{PATH_MAX};
|
||||
inline constexpr auto max_path_length = std::size_t{PATH_MAX};
|
||||
using native_handle = int;
|
||||
#if !defined(INVALID_HANDLE_VALUE)
|
||||
#define INVALID_HANDLE_VALUE (-1)
|
||||
@@ -482,7 +485,7 @@ using http_ranges = std::vector<http_range>;
|
||||
#endif // defined(__cplusplus)
|
||||
|
||||
#define MONITARR_USES_FUNCTION_NAME() \
|
||||
static constexpr const std::string_view function_name { \
|
||||
static constexpr std::string_view function_name { \
|
||||
static_cast<const char *>(__FUNCTION__), \
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "utils/hash.hpp"
|
||||
|
||||
namespace monitarr::utils::encryption {
|
||||
inline constexpr const std::uint32_t encryption_header_size{
|
||||
inline constexpr std::uint32_t encryption_header_size{
|
||||
crypto_aead_xchacha20poly1305_IETF_NPUBBYTES +
|
||||
crypto_aead_xchacha20poly1305_IETF_ABYTES,
|
||||
};
|
||||
|
||||
@@ -26,30 +26,30 @@
|
||||
#include "utils/string.hpp"
|
||||
|
||||
namespace monitarr::utils::path {
|
||||
inline constexpr const std::string_view backslash{"\\"};
|
||||
inline constexpr const std::wstring_view backslash_w{L"\\"};
|
||||
inline constexpr const std::string_view dot{"."};
|
||||
inline constexpr const std::wstring_view dot_w{L"."};
|
||||
inline constexpr const std::string_view dot_backslash{".\\"};
|
||||
inline constexpr const std::wstring_view dot_backslash_w{L".\\"};
|
||||
inline constexpr const std::string_view dot_slash{"./"};
|
||||
inline constexpr const std::wstring_view dot_slash_w{L"./"};
|
||||
inline constexpr const std::string_view long_notation{"\\\\?\\"};
|
||||
inline constexpr const std::wstring_view long_notation_w{L"\\\\?\\"};
|
||||
inline constexpr const std::string_view slash{"/"};
|
||||
inline constexpr const std::wstring_view slash_w{L"/"};
|
||||
inline constexpr std::string_view backslash{"\\"};
|
||||
inline constexpr std::wstring_view backslash_w{L"\\"};
|
||||
inline constexpr std::string_view dot{"."};
|
||||
inline constexpr std::wstring_view dot_w{L"."};
|
||||
inline constexpr std::string_view dot_backslash{".\\"};
|
||||
inline constexpr std::wstring_view dot_backslash_w{L".\\"};
|
||||
inline constexpr std::string_view dot_slash{"./"};
|
||||
inline constexpr std::wstring_view dot_slash_w{L"./"};
|
||||
inline constexpr std::string_view long_notation{"\\\\?\\"};
|
||||
inline constexpr std::wstring_view long_notation_w{L"\\\\?\\"};
|
||||
inline constexpr std::string_view slash{"/"};
|
||||
inline constexpr std::wstring_view slash_w{L"/"};
|
||||
#if defined(_WIN32)
|
||||
inline constexpr const std::string_view directory_seperator{backslash};
|
||||
inline constexpr const std::wstring_view directory_seperator_w{backslash_w};
|
||||
inline constexpr const std::string_view not_directory_seperator{slash};
|
||||
inline constexpr const std::wstring_view not_directory_seperator_w{slash_w};
|
||||
inline constexpr const std::string_view unc_notation{"\\\\"};
|
||||
inline constexpr const std::wstring_view unc_notation_w{L"\\\\"};
|
||||
inline constexpr std::string_view directory_seperator{backslash};
|
||||
inline constexpr std::wstring_view directory_seperator_w{backslash_w};
|
||||
inline constexpr std::string_view not_directory_seperator{slash};
|
||||
inline constexpr std::wstring_view not_directory_seperator_w{slash_w};
|
||||
inline constexpr std::string_view unc_notation{"\\\\"};
|
||||
inline constexpr std::wstring_view unc_notation_w{L"\\\\"};
|
||||
#else // !defined(_WIN32)
|
||||
inline constexpr const std::string_view directory_seperator{slash};
|
||||
inline constexpr const std::wstring_view directory_seperator_w{slash_w};
|
||||
inline constexpr const std::string_view not_directory_seperator{backslash};
|
||||
inline constexpr const std::wstring_view not_directory_seperator_w{backslash_w};
|
||||
inline constexpr std::string_view directory_seperator{slash};
|
||||
inline constexpr std::wstring_view directory_seperator_w{slash_w};
|
||||
inline constexpr std::string_view not_directory_seperator{backslash};
|
||||
inline constexpr std::wstring_view not_directory_seperator_w{backslash_w};
|
||||
#endif // defined(_WIN32)
|
||||
|
||||
template <typename char_t>
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
#include "utils/config.hpp"
|
||||
|
||||
namespace monitarr::utils::time {
|
||||
inline constexpr const auto NANOS_PER_SECOND{1000000000ULL};
|
||||
inline constexpr const auto WIN32_TIME_CONVERSION{116444736000000000ULL};
|
||||
inline constexpr const auto WIN32_TIME_NANOS_PER_TICK{100ULL};
|
||||
inline constexpr auto NANOS_PER_SECOND{1000000000ULL};
|
||||
inline constexpr auto WIN32_TIME_CONVERSION{116444736000000000ULL};
|
||||
inline constexpr auto WIN32_TIME_NANOS_PER_TICK{100ULL};
|
||||
|
||||
#if defined(PROJECT_ENABLE_SPDLOG) || defined(PROJECT_ENABLE_FMT)
|
||||
[[nodiscard]] inline auto convert_to_utc(time_t time) -> std::time_t {
|
||||
|
||||
@@ -119,7 +119,7 @@ auto get_free_drive_space(std::string_view path)
|
||||
try {
|
||||
#if defined(_WIN32)
|
||||
ULARGE_INTEGER li{};
|
||||
if (not::GetDiskFreeSpaceEx(std::string{path}.c_str(), &li, nullptr,
|
||||
if (not ::GetDiskFreeSpaceEx(std::string{path}.c_str(), &li, nullptr,
|
||||
nullptr)) {
|
||||
throw utils::error::create_exception(
|
||||
function_name, {
|
||||
@@ -276,7 +276,7 @@ auto get_total_drive_space(std::string_view path)
|
||||
try {
|
||||
#if defined(_WIN32)
|
||||
ULARGE_INTEGER li{};
|
||||
if (not::GetDiskFreeSpaceEx(std::string{path}.c_str(), nullptr, &li,
|
||||
if (not ::GetDiskFreeSpaceEx(std::string{path}.c_str(), nullptr, &li,
|
||||
nullptr)) {
|
||||
throw utils::error::create_exception(
|
||||
function_name, {
|
||||
@@ -376,7 +376,7 @@ auto read_json_file(std::string_view path, nlohmann::json &data) -> bool {
|
||||
try {
|
||||
auto abs_path = utils::path::absolute(path);
|
||||
auto file = file::open_file(abs_path);
|
||||
if (not*file) {
|
||||
if (not *file) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -498,7 +498,7 @@ auto write_json_file(std::wstring_view path, const nlohmann::json &data)
|
||||
#endif // defined(PROJECT_ENABLE_JSON)
|
||||
|
||||
#if defined(PROJECT_ENABLE_LIBDSM)
|
||||
static constexpr const auto validate_smb_path =
|
||||
static constexpr auto validate_smb_path =
|
||||
[](std::string_view path) -> bool {
|
||||
return (not utils::string::begins_with(path, "///") &&
|
||||
utils::string::begins_with(path, "//") &&
|
||||
|
||||
@@ -152,19 +152,19 @@ auto find_program_in_path(const std::string &name_without_extension)
|
||||
}
|
||||
|
||||
#if defined(_WIN32)
|
||||
static constexpr const std::array<std::string_view, 4U> extension_list{
|
||||
static constexpr std::array<std::string_view, 4U> extension_list{
|
||||
".bat",
|
||||
".cmd",
|
||||
".exe",
|
||||
".ps1",
|
||||
};
|
||||
static constexpr const auto split_char = ';';
|
||||
static constexpr auto split_char = ';';
|
||||
#else // !defined(_WIN32)
|
||||
static constexpr const std::array<std::string_view, 2U> extension_list{
|
||||
static constexpr std::array<std::string_view, 2U> extension_list{
|
||||
"",
|
||||
".sh",
|
||||
};
|
||||
static constexpr const auto split_char = ':';
|
||||
static constexpr auto split_char = ':';
|
||||
#endif // defined(_WIN32)
|
||||
|
||||
auto search_path_list = utils::string::split(path, split_char, false);
|
||||
@@ -274,18 +274,18 @@ auto strip_to_file_name(std::wstring path) -> std::wstring {
|
||||
}
|
||||
|
||||
auto unmake_file_uri(std::string_view uri) -> std::string {
|
||||
static constexpr const std::array<std::string_view, 23U> escape_characters = {
|
||||
static constexpr std::array<std::string_view, 23U> escape_characters = {
|
||||
{
|
||||
" ", "<", ">", "#", "%", "+", "{", "}", "|", "\\", "^", "~",
|
||||
"[", "]", "`", ";", "/", "?", ":", "@", "=", "&", "$",
|
||||
}};
|
||||
static constexpr const std::array<std::string_view, 23U>
|
||||
static constexpr std::array<std::string_view, 23U>
|
||||
escape_sequences_lower = {{
|
||||
"%20", "%3c", "%3e", "%23", "%25", "%2b", "%7b", "%7d",
|
||||
"%7c", "%5c", "%5e", "%7e", "%5b", "%5d", "%60", "%3b",
|
||||
"%2f", "%3f", "%3a", "%40", "%3d", "%26", "%24",
|
||||
}};
|
||||
static constexpr const std::array<std::string_view, 23U>
|
||||
static constexpr std::array<std::string_view, 23U>
|
||||
escape_sequences_upper = {{
|
||||
"%20", "%3C", "%3E", "%23", "%25", "%2B", "%7B", "%7D",
|
||||
"%7C", "%5C", "%5E", "%7E", "%5B", "%5D", "%60", "%3B",
|
||||
|
||||
@@ -183,7 +183,7 @@ TEST(utils_common, divide_with_ceiling) {
|
||||
}
|
||||
|
||||
TEST(utils_common, generate_random_between_for_signed_integers) {
|
||||
static constexpr const auto max_iterations{1000000UL};
|
||||
static constexpr auto max_iterations{1000000UL};
|
||||
|
||||
for (std::size_t idx = 0U; idx < max_iterations; ++idx) {
|
||||
auto res = utils::generate_random_between(5, 12);
|
||||
@@ -205,7 +205,7 @@ TEST(utils_common, generate_random_between_for_signed_integers) {
|
||||
}
|
||||
|
||||
TEST(utils_common, generate_random_between_for_unsigned_integers) {
|
||||
static constexpr const auto max_iterations{1000000UL};
|
||||
static constexpr auto max_iterations{1000000UL};
|
||||
|
||||
for (std::size_t idx = 0U; idx < max_iterations; ++idx) {
|
||||
auto res = utils::generate_random_between(5U, 12U);
|
||||
@@ -239,7 +239,7 @@ TEST(utils_common, generate_random_between_throws_error_on_invalid_range) {
|
||||
}
|
||||
|
||||
TEST(utils_common, generate_random_string) {
|
||||
static constexpr const auto max_iterations{10000L};
|
||||
static constexpr auto max_iterations{10000L};
|
||||
|
||||
const auto test_string = [](auto str) {
|
||||
static std::vector<decltype(str)> list{};
|
||||
@@ -267,7 +267,7 @@ TEST(utils_common, generate_random_string_for_zero_length) {
|
||||
}
|
||||
|
||||
TEST(utils_common, get_environment_variable) {
|
||||
static constexpr const std::string path_env{"PATH"};
|
||||
static constexpr std::string path_env{"PATH"};
|
||||
std::string path;
|
||||
|
||||
#if defined(_WIN32)
|
||||
|
||||
@@ -28,8 +28,8 @@ const auto get_stop_requested = []() -> bool { return false; };
|
||||
} // namespace
|
||||
|
||||
namespace monitarr {
|
||||
static constexpr const std::string_view token{"moose"};
|
||||
static constexpr const std::wstring_view token_w{L"moose"};
|
||||
static constexpr std::string_view token{"moose"};
|
||||
static constexpr std::wstring_view token_w{L"moose"};
|
||||
|
||||
TEST(utils_encryption, generate_key) {
|
||||
auto key1 =
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
namespace {
|
||||
#if defined(PROJECT_ENABLE_LIBSODIUM) && defined(PROJECT_ENABLE_BOOST)
|
||||
#include "utils/file_enc_file.hpp"
|
||||
constexpr const auto file_type_count{3U};
|
||||
constexpr auto file_type_count{3U};
|
||||
#else
|
||||
constexpr const auto file_type_count{2U};
|
||||
constexpr auto file_type_count{2U};
|
||||
#endif
|
||||
|
||||
[[nodiscard]] auto create_file(auto idx, auto path, bool read_only = false)
|
||||
|
||||
Reference in New Issue
Block a user