diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c53d1d5ee..e8758b524 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -79,7 +79,7 @@ jobs: container: fedora:${{ matrix.container }} strategy: matrix: - container: [39, 40] + container: [39, 40, 41] steps: - name: Install Deps run: | @@ -111,7 +111,7 @@ jobs: container: ubuntu:${{ matrix.container }} strategy: matrix: - container: ['20.04', '22.04', '24.04'] + container: ['20.04', '22.04', '24.04', '24.10'] env: DEBIAN_FRONTEND: noninteractive DEBFULLNAME: github-actions @@ -156,7 +156,6 @@ jobs: env: VER_SUFFIX: .VS${{ matrix.toolset }} CXXFLAGS: '/D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR' # https://github.com/actions/runner-images/issues/10004 - VCPKG_INSTALLED_DIR: ${{ github.workspace }}/vcpkg_installed steps: - name: Checkout uses: actions/checkout@v4 @@ -171,6 +170,7 @@ jobs: runVcpkgFormatString: "[`install`, `--recurse`, `--clean-after-build`, `--x-install-root`, `$[env.VCPKG_INSTALLED_DIR]`, `--triplet`, `$[env.VCPKG_DEFAULT_TRIPLET]`, `--x-feature`, `tests`]" env: VCPKG_DEFAULT_TRIPLET: ${{ matrix.platform }}-windows + VCPKG_INSTALLED_DIR: ${{ github.workspace }}/vcpkg_installed_${{ matrix.platform }} - name: Install dependencies run: choco install doxygen.install -y > $null - uses: actions/setup-python@v5 @@ -185,7 +185,6 @@ jobs: - name: Build run: | & .\build.ps1 ` - -vcpkg_installed ${{ env.VCPKG_INSTALLED_DIR }} ` -vcvars "${{ matrix.vcvars }}" ` -platform ${{ matrix.platform }} ` -swig C:/ProgramData/chocolatey/bin/swig.exe ` @@ -199,7 +198,7 @@ jobs: pages: name: Deploy pages if: github.repository == 'open-eid/libdigidocpp' && contains(github.ref, 'master') - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 permissions: contents: write steps: @@ -222,7 +221,7 @@ jobs: coverity: name: Run Coverity tests if: github.repository == 'open-eid/libdigidocpp' && contains(github.ref, 'coverity_scan') - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 env: TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} PROJECTNAME: ${{ github.repository }} @@ -257,7 +256,7 @@ jobs: codeql: name: Run CodeQL tests if: github.repository == 'open-eid/libdigidocpp' - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 permissions: security-events: write steps: diff --git a/CMakeLists.txt b/CMakeLists.txt index 53a7100d7..1c3696222 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ endif() if(POLICY CMP0167) cmake_policy(SET CMP0167 NEW) endif() -project(libdigidocpp VERSION 4.0.0) +project(libdigidocpp VERSION 4.1.0) set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) list(APPEND CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}) @@ -32,6 +32,8 @@ set( BUILD_TOOLS YES CACHE BOOL "Build digidoc-tool" ) set( BUILD_SHARED_LIBS YES CACHE BOOL "Build library as SHARED or STATIC" ) set( SIGNCERT "" CACHE STRING "Common name of certificate to used sign binaries, empty skip signing" ) set( CROSSSIGNCERT "" CACHE STRING "Common name of certificate to used cross sign binaries, empty skip signing" ) +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED YES) set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Adds a postfix for debug-built libraries.") set(CPACK_PACKAGE_VERSION ${VERSION}) set(CPACK_GENERATOR RPM) diff --git a/build.ps1 b/build.ps1 index 4a0e86c83..29c02b02b 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,14 +1,14 @@ #powershell -ExecutionPolicy ByPass -File build.ps1 param( [string]$libdigidocpp = $PSScriptRoot, + [string]$platform = "x64", [string]$git = "git.exe", [string]$vcpkg = "vcpkg\vcpkg.exe", [string]$vcpkg_dir = (split-path -parent $vcpkg), [string]$vcpkg_installed = $libdigidocpp, [string]$vcpkg_installed_platform = "$vcpkg_installed\vcpkg_installed_$platform", [string]$build_number = $(if ($null -eq $env:BUILD_NUMBER) {"0"} else {$env:BUILD_NUMBER}), - [string]$msiversion = "4.0.0.$build_number", - [string]$platform = "x64", + [string]$msiversion = "4.1.0.$build_number", [string]$msi_name = "libdigidocpp-$msiversion$env:VER_SUFFIX.$platform.msi", [string]$cmake = "cmake.exe", [string]$generator = "NMake Makefiles", diff --git a/cmake b/cmake index 8ce75e605..31d9f2197 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit 8ce75e6057067ca51d7c619d34d88422bad201e5 +Subproject commit 31d9f21971764f98e4c04177ba3efc49fe8f98f8 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 01317a3d8..70cf695d3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -130,6 +130,8 @@ set_target_properties(digidocpp PROPERTIES FRAMEWORK_VERSION 1 FRAMEWORK "${FRAMEWORK}" MACOSX_FRAMEWORK_IDENTIFIER "ee.ria.digidocpp" + MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${PROJECT_VERSION} + MACOSX_FRAMEWORK_BUNDLE_VERSION ${BUILD_VER} MACOSX_RPATH YES COMPILE_DEFINITIONS TARGET_NAME="$" POSITION_INDEPENDENT_CODE YES diff --git a/src/XmlConf.cpp b/src/XmlConf.cpp index d38446401..0dbd930a7 100644 --- a/src/XmlConf.cpp +++ b/src/XmlConf.cpp @@ -164,7 +164,7 @@ void XmlConf::Private::init(const string& path, bool global) optional lock; if(auto val = elem["lock"]; !val.empty()) lock = val == "true"; - auto setValue = [&](auto ¶m) { + auto setValue = [&](auto ¶m) constexpr { if(paramName != param.name) return false; if(global && lock.has_value()) param.locked = lock.value(); @@ -384,9 +384,12 @@ GET1(string, proxyUser) GET1(string, proxyPass) GET1(bool, proxyForceSSL) GET1(bool, proxyTunnelSSL) +DIGIDOCPP_WARNING_PUSH +DIGIDOCPP_WARNING_DISABLE_GCC("-Wdeprecated-declarations") GET1EX(string, PKCS12Cert, Conf::PKCS12Cert()) -GET1EX(string, PKCS12Pass, Conf::PKCS12Cert()) +GET1EX(string, PKCS12Pass, Conf::PKCS12Pass()) GET1EX(bool, PKCS12Disable, Conf::PKCS12Disable()) +DIGIDOCPP_WARNING_POP GET1(string, TSUrl) GET1(bool, TSLAutoUpdate) GET1(string, TSLCache) diff --git a/vcpkg.json b/vcpkg.json index de815d66d..c96307225 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -1,6 +1,6 @@ { "name": "libdigidocpp", - "version": "4.0.0", + "version": "4.1.0", "dependencies": [ { "name": "libxml2",