diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 665a1ad6a..6dff5a952 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -159,7 +159,7 @@ jobs: - name: Install artifact run: | Rename-Item "libdigidocpp*.msi" libdigidocpp.msi - msiexec /qn /a libdigidocpp.msi "TARGETDIR=$($pwd.Path)\\libs" + msiexec /qn /i libdigidocpp.msi - name: Prepare vcpkg uses: lukka/run-vcpkg@v7 with: @@ -181,12 +181,8 @@ jobs: wix extension -g add WixToolset.UI.wixext/5.0.2 - name: Build run: | - if ($env:VCToolsRedistDir -eq $null) { - $env:VCToolsRedistDir = -join ($env:VCINSTALLDIR, "Redist\MSVC\", $env:VCToolsVersion, "\") - } cmake "-GNinja" -B build -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo ` - -DCMAKE_TOOLCHAIN_FILE=${{ env.RUNVCPKG_VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake ` - "-DLibDigiDocpp_ROOT=libs/PFiles64/libdigidocpp" + -DCMAKE_TOOLCHAIN_FILE=${{ env.RUNVCPKG_VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake cmake --build build --target msi cmake --build build --target msishellext cmake --build build --target appx diff --git a/CMakeLists.txt b/CMakeLists.txt index cb0d25bcb..4a4129c2b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.16) if(NOT EXISTS ${CMAKE_SOURCE_DIR}/cmake/modules/VersionInfo.cmake) message(FATAL_ERROR "cmake submodule directory empty, did you 'git clone --recursive'?") endif() -project(qdigidoc4 VERSION 4.7.0) +project(qdigidoc4 VERSION 4.8.0) set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -11,7 +11,8 @@ set(CMAKE_AUTOMOC ON) include( GNUInstallDirs ) include( VersionInfo ) -find_package(LibDigiDocpp 4.1.0 REQUIRED) +find_package(libdigidocpp 4.2.0 REQUIRED HINTS /Library) +message("-- Found libdigidocpp: ${libdigidocpp_DIR} (found version \"${libdigidocpp_VERSION}\")") find_package( LDAP REQUIRED ) find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED) find_package(Qt${QT_VERSION_MAJOR} 5.12.0 REQUIRED COMPONENTS Core Widgets Network PrintSupport Svg LinguistTools) diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index b2251bcb4..b6a722188 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -1,11 +1,11 @@ +get_target_property(qtCore_install_prefix Qt${QT_VERSION_MAJOR}::qmake IMPORTED_LOCATION) +get_filename_component(qtCore_install_prefix ${qtCore_install_prefix} DIRECTORY) if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/TSL.qrc) set(TSL_QRC ${CMAKE_CURRENT_SOURCE_DIR}/TSL.qrc) else() add_executable(TSLDownload TSLDownload.cpp) target_link_libraries(TSLDownload Qt${QT_VERSION_MAJOR}::Network) set_target_properties(TSLDownload PROPERTIES AUTOMOC OFF) - get_target_property(qtCore_install_prefix Qt${QT_VERSION_MAJOR}::qmake IMPORTED_LOCATION) - get_filename_component(qtCore_install_prefix ${qtCore_install_prefix} DIRECTORY) add_custom_command( OUTPUT TSL.qrc DEPENDS TSLDownload @@ -98,7 +98,7 @@ target_link_libraries(${PROJECT_NAME} qdigidoccommon Qt${QT_VERSION_MAJOR}::PrintSupport Qt${QT_VERSION_MAJOR}::Svg - ${LIBDIGIDOCPP_LIBRARY} + digidocpp::digidocpp ${LDAP_LIBRARIES} $ $ @@ -121,7 +121,6 @@ set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME ${PROJECT_NAME} MACOSX_BUNDLE_GUI_IDENTIFIER "ee.ria.${PROJECT_NAME}" ) -target_include_directories(${PROJECT_NAME} PRIVATE ${LIBDIGIDOCPP_INCLUDE_DIR}) target_compile_definitions(${PROJECT_NAME} PRIVATE CDOC2_GET_URL="${CDOC2_GET_URL}" CDOC2_POST_URL="${CDOC2_POST_URL}" @@ -212,14 +211,8 @@ elseif(WIN32) target_compile_options(${PROJECT_NAME} PRIVATE "/guard:cf") target_link_options(${PROJECT_NAME} PRIVATE "/guard:cf" $<$:/INTEGRITYCHECK>) target_link_libraries(${PROJECT_NAME} NCrypt Crypt32 Cryptui) - cmake_parse_arguments(GETLIB "" "optimized;debug" "" ${LIBDIGIDOCPP_LIBRARY}) - if(GETLIB_debug AND CMAKE_BUILD_TYPE STREQUAL "Debug") - get_filename_component(LIBS_PATH ${GETLIB_debug} DIRECTORY) - elseif(GETLIB_optimized) - get_filename_component(LIBS_PATH ${GETLIB_optimized} DIRECTORY) - else() - get_filename_component(LIBS_PATH ${GETLIB_UNPARSED_ARGUMENTS} DIRECTORY) - endif() + get_filename_component(LIBS_PATH ${libdigidocpp_DIR} DIRECTORY) + get_filename_component(LIBS_PATH ${LIBS_PATH} DIRECTORY) if(CMAKE_SIZEOF_VOID_P EQUAL 8) set(PLATFORM x64) set(OPENSSL_SUFFIX "-x64") @@ -231,15 +224,15 @@ elseif(WIN32) set(WIX_CMD wix.exe build -nologo -arch ${PLATFORM} -ext WixToolset.UI.wixext - -bv WixUIDialogBmp=${CMAKE_SOURCE_DIR}/cmake/modules/dlgbmp.bmp - -bv WixUIBannerBmp=${CMAKE_SOURCE_DIR}/cmake/modules/banner.bmp + -bv WixUIDialogBmp=${CMAKE_SOURCE_DIR}/common/dlgbmp.bmp + -bv WixUIBannerBmp=${CMAKE_SOURCE_DIR}/common/banner.bmp -d ico_path=${CMAKE_CURRENT_SOURCE_DIR}/images/digidoc.ico -d libs_path=${LIBS_PATH} -d client_path=$ -d qt_suffix=$<$:d> ${CMAKE_SOURCE_DIR}/${PROJECT_NAME}.wxs - ${CMAKE_SOURCE_DIR}/cmake/modules/WelcomeDlg.wxs - ${CMAKE_SOURCE_DIR}/cmake/modules/WixUI_Minimal.wxs + ${CMAKE_SOURCE_DIR}/common/WelcomeDlg.wxs + ${CMAKE_SOURCE_DIR}/common/WixUI_Minimal.wxs ) add_custom_target(msi DEPENDS ${PROJECT_NAME} COMMAND ${WIX_CMD} -o "${MSI_FILE}.msi" diff --git a/cmake b/cmake index 4caaffcae..750b4988e 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit 4caaffcae278ffe357f9489a4d0b23180af556bb +Subproject commit 750b4988e87469059cff0c96b9c2d0979c2d61d4 diff --git a/common b/common index c04bf626d..6a68f3087 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit c04bf626dae604343350c1c338700af0b89ba83b +Subproject commit 6a68f3087d99ec8c637b8c2f4ca9bbc3dd2f983c diff --git a/extensions/DigiDocQL/CMakeLists.txt b/extensions/DigiDocQL/CMakeLists.txt index 8856ad0d3..538ae1cd4 100644 --- a/extensions/DigiDocQL/CMakeLists.txt +++ b/extensions/DigiDocQL/CMakeLists.txt @@ -15,10 +15,10 @@ set_target_properties( DigiDocQL PROPERTIES XCODE_ATTRIBUTE_WRAPPER_EXTENSION qlgenerator MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist AUTOMOC OFF - INCLUDE_DIRECTORIES "${LIBDIGIDOCPP_INCLUDE_DIR}" COMPILE_FLAGS "-Wno-unused-parameter" - LINK_LIBRARIES "-framework QuickLook;-framework digidocpp;-framework Cocoa" + LINK_LIBRARIES "-framework QuickLook;-framework Cocoa" LINK_FLAGS "-F/Library/Frameworks -fobjc-arc" BUILD_WITH_INSTALL_RPATH YES INSTALL_RPATH "@loader_path/../../../../../Frameworks" ) +target_link_libraries(DigiDocQL digidocpp::digidocpp)