From b98f9c548c4f285ed098b9645bc1b850565f6f9c Mon Sep 17 00:00:00 2001 From: Michel Estermann Date: Wed, 23 Apr 2025 17:47:18 +0000 Subject: [PATCH 01/14] update gitpod dockerfile --- .gitpod.Dockerfile | 63 +++++++++++++++++++++++++++++++++------------- 1 file changed, 46 insertions(+), 17 deletions(-) diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index 581f68e..5255964 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -8,51 +8,80 @@ USER root #install qt RUN apt-get update \ - && apt-get -qq install -y --no-install-recommends software-properties-common \ - && apt-get -qq install -y --no-install-recommends qt6-base-dev qt6-tools-dev qt6-tools-dev-tools libqt6charts6 libqt6charts6-dev libqt6opengl6 libqt6opengl6-dev \ - && apt-get -qq install -y --no-install-recommends libxcb-xinerama0-dev \ - && apt-get -qq install -y --no-install-recommends '^libxcb.*-dev' libgles2-mesa-dev libx11-xcb-dev libgl1-mesa-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev \ - && apt-get -qq install -y --no-install-recommends perl \ - && apt-get clean && rm -rf /var/lib/apt/lists/* + && apt-get -qq install -y --no-install-recommends \ + software-properties-common \ + qt6-base-dev \ + qt6-tools-dev \ + qt6-tools-dev-tools \ + libqt6widgets6 \ + libqt6charts6 \ + libqt6charts6-dev \ + libqt6opengl6 \ + libqt6opengl6-dev \ + libxcb-xinerama0-dev \ + '^libxcb.*-dev' \ + libgles2-mesa-dev \ + libx11-xcb-dev \ + libgl1-mesa-dev \ + libglu1-mesa-dev \ + libxrender-dev \ + libxi-dev \ + libxkbcommon-dev \ + libxkbcommon-x11-dev \ + perl \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* # install clang 19 RUN apt-get update \ - && apt-get -qq install -y --no-install-recommends clang-18 clang-tidy-18 clang-format-18 clangd-18 \ + && apt-get -qq install -y --no-install-recommends \ + clang-18 \ + clang-tidy-18 \ + clang-format-18 \ + clangd-18 \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* # lcov and doxygen RUN apt-get update \ - && apt-get -qq install -y --no-install-recommends lcov doxygen graphviz \ + && apt-get -qq install -y --no-install-recommends \ + lcov \ + doxygen \ + graphviz \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* RUN apt-get update \ - && apt-get -qq install -y --no-install-recommends ccache ninja-build \ + && apt-get -qq install -y --no-install-recommends \ + ccache \ + ninja-build \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -RUN pyenv install 3.12.7 && pyenv global 3.12.7 +RUN pyenv install 3.12.7 \ + && pyenv global 3.12.7 #install cmake -RUN pip3 install cmake==4.0.0 +RUN pip3 install cmake>=3.31,<4.0 #install conan -RUN pip3 install conan==2.11 -RUN pip3 install python-dateutil==2.9.0 +RUN pip3 install conan==2.15 +RUN pip3 install python-dateutil==2.9.0 # pre-commit -RUN pip3 install pre-commit==4.2.0 +RUN pip3 install pre-commit==4.0.1 RUN pip3 install yamlfmt==1.1.1 -USER gitpod - - # cmake-format RUN pip3 install cmake-format==0.6.13 # gcovr RUN pip3 install gcovr==8.3 +# Qt Installer Framework +RUN pip3 install aqtinstall +RUN aqt install-tool linux desktop tools_ifw + +USER gitpod RUN echo 'export PIP_USER=false' >> ~/.bashrc From c513f81a6dc51e547035c0693746e337715ccdf1 Mon Sep 17 00:00:00 2001 From: Michel Estermann Date: Wed, 23 Apr 2025 19:41:00 +0000 Subject: [PATCH 02/14] added package cmake presets --- CMakePresets.json | 102 ++++++++++++++++++++++++++++++---------------- 1 file changed, 66 insertions(+), 36 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index 97eeda2..9d564a3 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -349,42 +349,6 @@ "targets": [ "doxygen-docs" ] - }, - { - "name": "package-gcc", - "description": "build package (gcc).", - "displayName": "Package (gcc)", - "inherits": "gcc-release", - "configurePreset": "linux-gcc-release", - "configuration": "Release", - "targets": [ - "doxygen-docs", - "package" - ] - }, - { - "name": "package-clang", - "description": "build package (clang).", - "displayName": "Package (clang)", - "inherits": "clang-release", - "configurePreset": "linux-clang-release", - "configuration": "Release", - "targets": [ - "doxygen-docs", - "package" - ] - }, - { - "name": "package-windows", - "description": "build package (Visual Studio 2022).", - "displayName": "Package (win)", - "inherits": "visual-studio-release", - "configurePreset": "visual-studio-2022-release", - "configuration": "Release", - "targets": [ - "doxygen-docs", - "package" - ] } ], "testPresets": [ @@ -418,5 +382,71 @@ "displayName": "Unittest", "configurePreset": "visual-studio-2022-debug" } + ], + "packagePresets": [ + { + "name": "tgz-gcc", + "displayName": "Tar GZip", + "configurePreset": "linux-gcc-release", + "generators": [ + "TGZ" + ] + }, + { + "name": "tgz-clang", + "displayName": "Tar GZip", + "configurePreset": "linux-clang-release", + "generators": [ + "TGZ" + ] + }, + { + "name": "debian-gcc", + "displayName": "Debian package", + "configurePreset": "linux-gcc-release", + "generators": [ + "DEB" + ] + }, + { + "name": "debian-clang", + "displayName": "Debian package", + "configurePreset": "linux-clang-release", + "generators": [ + "DEB" + ] + }, + { + "name": "ifw-gcc", + "displayName": "Qt installer", + "configurePreset": "linux-gcc-release", + "generators": [ + "IFW" + ] + }, + { + "name": "ifw-gclang", + "displayName": "Qt installer", + "configurePreset": "linux-clang-release", + "generators": [ + "IFW" + ] + }, + { + "name": "ifw-visual-studio-2022", + "displayName": "Windows Wix", + "configurePreset": "visual-studio-2022-release", + "generators": [ + "IFW" + ] + }, + { + "name": "wix-visual-studio-2022", + "displayName": "Windows Wix", + "configurePreset": "visual-studio-2022-release", + "generators": [ + "WIX" + ] + } ] } From 2a167e6d5ff33f950201161d469e32779a2b2f9c Mon Sep 17 00:00:00 2001 From: Michel Estermann Date: Wed, 23 Apr 2025 19:43:14 +0000 Subject: [PATCH 03/14] fixed doxygen docu (exclude build folder) --- README.md | 48 ++++++++++++---------- cmake/Doxygen.cmake | 6 +-- docs/CMakeLists.txt | 14 +++++++ {docs/images => images}/Screenshot-qt.png | Bin 4 files changed, 41 insertions(+), 27 deletions(-) rename {docs/images => images}/Screenshot-qt.png (100%) diff --git a/README.md b/README.md index c50cc9e..06095da 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ It reads the latest data of Corona (Covid-19) cases for a country from the [COVI _The COVID-19 Statistics API_ provides statistics via REST API from the [Johns Hopkins CSSE](https://github.com/CSSEGISandData/COVID-19). -![Screenshot of the qt application](docs/images/Screenshot-qt.png) +![Screenshot of the qt application](images/Screenshot-qt.png) ## Table of content @@ -75,25 +75,29 @@ _The COVID-19 Statistics API_ provides statistics via REST API from the [Johns H This projects is a C++ project template. It includes everything a "Modern" C++ project possibly needs: * C++ 20 Standard - * [GCC](https://gcc.gnu.org/) _(>= gcc 12)_ - * [Clang](https://clang.llvm.org/) + * [GCC](https://gcc.gnu.org/) _(>= gcc-12)_ + * [Clang](https://clang.llvm.org/) _(>= clang-13)_ * Visual Studio 2022 * [conan](https://conan.io/) package Manager -* Libraries used: - * [Qt6](https://www.qt.io/) _(minimal version required: 6.4)_ - * [Poco](https://pocoproject.org/) Networking library - * [RapidJSON](https://rapidjson.org/) - * [Lyra](https://github.com/bfgroup/Lyra) command line arguments parser - * [{fmt}](https://github.com/fmtlib/fmt) formatting library _(std::print is C++23 and therefore not used yet)_ - * [date](https://github.com/HowardHinnant/date) date and time library _(std::chrono::year_month_day is not fully supported in older c++20 compilers (gcc 12, 13 and clang 13-16) therefor it is not used yet)_ +* Dependencies: + * to install: + * [Qt6](https://www.qt.io/) _(minimal version required: 6.4)_ + * with conan: + * [Poco](https://pocoproject.org/) Networking library + * [RapidJSON](https://rapidjson.org/) + * [Lyra](https://github.com/bfgroup/Lyra) command line arguments parser + * [{fmt}](https://github.com/fmtlib/fmt) formatting library _(std::print is C++23 and therefore not used yet)_ + * [date](https://github.com/HowardHinnant/date) date and time library _(std::chrono::year_month_day is not fully supported in older c++20 compilers (gcc 12, 13 and clang 13-16) therefor it is not used yet)_ + * [Catch2](https://github.com/catchorg/Catch2) _(for unittests)__ * Unittests with Coverage using [Catch2](https://github.com/catchorg/Catch2) * CMake with [CMakePresets](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) _(CMake >= 3.23)_ * CPack packaging: + * tar gzip archive * Debian package * [Qt Installer Framework](https://doc.qt.io/qtinstallerframework/) * [WIX](https://wixtoolset.org/) @@ -106,6 +110,7 @@ This projects is a C++ project template. It includes everything a "Modern" C++ p * [clang-tidy](https://clang.llvm.org/extra/clang-tidy/) * [cppcheck](http://cppcheck.sourceforge.net/) * [include-what-you-use](https://include-what-you-use.org/) + * [link-what-you-use](https://cmake.org/cmake/help/latest/prop_tgt/LINK_WHAT_YOU_USE.html) * Sanitizers support: * [Address Sanitizer](https://clang.llvm.org/docs/AddressSanitizer.html) @@ -115,8 +120,8 @@ This projects is a C++ project template. It includes everything a "Modern" C++ p * [Memory Sanitizer](https://clang.llvm.org/docs/MemorySanitizer.html) * Documentation Generation using - * [Doxygen](https://www.doxygen.nl/index.html) - * [doxygen-awesome-css](https://github.com/jothepro/doxygen-awesome-css) + * [Doxygen](https://www.doxygen.nl/index.html) using the _"doxygen-awesome-sidebar-only"_ theme by + * [doxygen-awesome-css](https://github.com/jothepro/doxygen-awesome-css) by default * Code formatting: * [clang-format](https://clang.llvm.org/docs/ClangFormat.html) for C++ files @@ -222,20 +227,19 @@ _Note: Delete the build directory before formatting, otherwise all CMake files i ### CMake options -* `DOWNLOAD_QT6`: Download and build Qt6 otherwise use installed. _Default_: `OFF` -* `ENABLE_TESTING`: Build (and run) unittests. _Default_: `ON` +* `DOWNLOAD_QT6`: Download and build Qt6 otherwise use installed. _Default: `OFF`_ +* `ENABLE_TESTING`: Build (and run) unittests. _Default: `ON`_ * `ENABLE_BUILD_WITH_TIME_TRACE`: Enable [Clang Time Trace Feature](https://www.snsystems.com/technology/tech-blog/clang-time-trace-feature). _Default: `OFF`_ * `ENABLE_PCH`: Enable [Precompiled Headers](https://en.wikipedia.org/wiki/Precompiled_header). _Default: `OFF`_ * `ENABLE_CACHE`: Enable caching if available, e.g. [ccache](https://ccache.dev/) or [sccache](https://github.com/mozilla/sccache). _Default: `ON`_ * `ENABLE_COVERAGE`: Enable coverage reporting for gcc/clang. _Default: `OFF`_ -* `ENABLE_DOXYGEN`: Enable doxygen documentation build ([Doxygen](https://www.doxygen.nl/index.html) must be installed). _Default: `ON`_ if Doxygen is installed `OFF` otherwise._ -* `ENABLE_SPHINX`: Enable sphinx documentation build ([Sphinx](https://www.sphinx-doc.org/) with [Breath](https://breathe.readthedocs.io/) and [sphinx-mdinclude](https://github.com/omnilib/sphinx-mdinclude) must be installed). _Default: `ON`_ if Sphinx is installed `OFF` otherwise._ -* `ENABLE_SANITIZERS`: Enable supported sanitizers". _Default: `OFF`_ -* `ENABLE_SANITIZER_ADDRESS`: Enable [address sanitizer](https://clang.llvm.org/docs/AddressSanitizer.html). _Default: `ON` if supported by the compiler and `ENABLE_SANITIZERS` == `ON` otherwise `OFF`._ -* `ENABLE_SANITIZER_LEAK`: Enable [leak sanitizer](https://clang.llvm.org/docs/LeakSanitizer.html). _Default: `OFF`_ -* `ENABLE_SANITIZER_UNDEFINED_BEHAVIOR`: Enable [undefined behavior sanitizer](https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html). _Default: `ON` if supported by the compiler and `ENABLE_SANITIZERS` == `ON` otherwise `OFF`._ -* `ENABLE_SANITIZER_THREAD`: Enable [thread sanitizer](https://clang.llvm.org/docs/ThreadSanitizer.html). _Default: `OFF`_ -* `ENABLE_SANITIZER_MEMORY`: Enable [memory sanitizer](https://clang.llvm.org/docs/MemorySanitizer.html). _Default: `OFF`_ +* `ENABLE_DOXYGEN`: Enable doxygen documentation build ([Doxygen](https://www.doxygen.nl/index.html) must be installed). _Default: `ON` if Doxygen is installed `OFF` otherwise._ +* `ENABLE_SANITIZERS`: Enable supported sanitizers. _Default: `OFF`_ + * `ENABLE_SANITIZER_ADDRESS`: Enable [address sanitizer](https://clang.llvm.org/docs/AddressSanitizer.html). _Default: `ON` if supported by the compiler and `ENABLE_SANITIZERS` is `ON` otherwise `OFF`._ + * `ENABLE_SANITIZER_LEAK`: Enable [leak sanitizer](https://clang.llvm.org/docs/LeakSanitizer.html). _Default: `OFF`_ + * `ENABLE_SANITIZER_UNDEFINED_BEHAVIOR`: Enable [undefined behavior sanitizer](https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html). _Default: `ON` if supported by the compiler and `ENABLE_SANITIZERS` is `ON` otherwise `OFF`._ + * `ENABLE_SANITIZER_THREAD`: Enable [thread sanitizer](https://clang.llvm.org/docs/ThreadSanitizer.html). _Default: `OFF`_ + * `ENABLE_SANITIZER_MEMORY`: Enable [memory sanitizer](https://clang.llvm.org/docs/MemorySanitizer.html). _Default: `OFF`_ * `ENABLE_IPO`: Enable intermodular optimization, aka [Link Time Optimization (LTO)](https://llvm.org/docs/LinkTimeOptimization.html). _Default: `OFF`_ * `ENABLE_CPPCHECK`: Enable static analysis with [cppcheck](http://cppcheck.sourceforge.net/). _Default: `ON` if cppcheck is installed `OFF` otherwise._ * `ENABLE_CLANG_TIDY`: Enable static analysis with [clang-tidy](https://clang.llvm.org/extra/clang-tidy/). _Default: `ON` if clang-tidy is installed `OFF` otherwise._ diff --git a/cmake/Doxygen.cmake b/cmake/Doxygen.cmake index 64bc566..aca03d3 100644 --- a/cmake/Doxygen.cmake +++ b/cmake/Doxygen.cmake @@ -4,11 +4,6 @@ if(Doxygen_FOUND) endif() function(enable_doxygen DOXYGEN_THEME) - - if((NOT DOXYGEN_USE_MDFILE_AS_MAINPAGE) AND EXISTS "${PROJECT_SOURCE_DIR}/README.md") - set(DOXYGEN_USE_MDFILE_AS_MAINPAGE "${PROJECT_SOURCE_DIR}/README.md") - endif() - set(DOXYGEN_CALLER_GRAPH YES) set(DOXYGEN_CALL_GRAPH YES) set(DOXYGEN_EXTRACT_ALL YES) @@ -16,6 +11,7 @@ function(enable_doxygen DOXYGEN_THEME) set(DOXYGEN_BUILTIN_STL_SUPPORT YES) set(DOXYGEN_DOT_IMAGE_FORMAT svg) set(DOXYGEN_DOT_TRANSPARENT YES) + set(DOXYGEN_EXCLUDE "${CMAKE_BINARY_DIR}") if("${DOXYGEN_THEME}" STREQUAL "") set(DOXYGEN_THEME "awesome-sidebar") diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 10baa24..b3b4cfa 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -1,8 +1,22 @@ include(GNUInstallDirs) include(Doxygen) +if(EXISTS "${PROJECT_SOURCE_DIR}/README.md") + set(DOXYGEN_USE_MDFILE_AS_MAINPAGE "${PROJECT_SOURCE_DIR}/README.md") + set(DOXYGEN_HTML_EXTRA_FILES "${PROJECT_SOURCE_DIR}/images/*.png") +endif() + +# enable doxygen documentaion with the "awesome-sidebar" theme enable_doxygen("awesome-sidebar") +add_custom_command( + TARGET doxygen-docs + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/images ${CMAKE_CURRENT_BINARY_DIR}/html/images + COMMENT "Copying image files to Doxygen HTML output directory" + VERBATIM +) + install( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION ${CMAKE_INSTALL_DOCDIR} diff --git a/docs/images/Screenshot-qt.png b/images/Screenshot-qt.png similarity index 100% rename from docs/images/Screenshot-qt.png rename to images/Screenshot-qt.png From b0e11650d32c8facc1aeff6007c965e92a22d761 Mon Sep 17 00:00:00 2001 From: Michel Estermann Date: Wed, 23 Apr 2025 19:44:03 +0000 Subject: [PATCH 04/14] update docker images --- .devcontainer/Dockerfile | 41 ++++++++++++--------------------- .devcontainer/devcontainer.json | 9 +++++--- .gitpod.Dockerfile | 3 ++- py-requirements.txt | 3 ++- 4 files changed, 25 insertions(+), 31 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index fb783c7..fdc28bb 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -4,13 +4,15 @@ LABEL maintainer="Michel Estermann " ARG CLANG_VERSION=18 ARG GCC_VERSION=14 -ARG UBUNTU_BASE=noble + +USER root RUN apt-get update \ && apt-get -qq install -y --no-install-recommends \ make \ build-essential \ ninja-build \ + cmake \ ccache \ clang-18 \ clang-tidy-18 \ @@ -23,6 +25,8 @@ RUN apt-get update \ git \ python3-full \ gcc-14 \ + file \ + ssh-client \ && rm -rf /var/lib/apt/lists/* # Install locales package and generate en_US.UTF-8 locale @@ -32,42 +36,22 @@ RUN apt-get update \ && update-locale LANG=en_US.UTF-8 \ && rm -rf /var/lib/apt/lists/* -# Set environment variables +# Install locales and set to english ENV LANG=en_US.UTF-8 \ LANGUAGE=en_US:en \ LC_ALL=en_US.UTF-8 - -# Install locales and set to english -ENV LANG en_US.UTF-8 RUN echo $LANG UTF-8 > /etc/locale.gen + ENV VIRTUAL_ENV=/opt/venv RUN python3 -m venv $VIRTUAL_ENV ENV PATH="$VIRTUAL_ENV/bin:$PATH" -#install cmake -RUN pip3 install cmake==3.31.4 -#install conan -RUN pip3 install conan==2.11 -RUN pip3 install python-dateutil==2.9.0 - -# pre-commit -RUN pip3 install pre-commit==4.0.1 -RUN pip3 install yamlfmt==1.1.1 - -# cmake-format -RUN pip3 install cmake-format==0.6.13 - -# gcovr -RUN pip3 install gcovr==8.2 - -# docu stuff -RUN pip3 install Sphinx==8.1.3 -RUN pip3 install sphinx_rtd_theme==3.0.2 -RUN pip3 install breathe==4.35.0 -RUN pip3 install sphinx_mdinclude==0.6.2 +COPY py-requirements.txt requirements.txt +RUN pip3 install -Ur requirements.txt +RUN pip3 install aqtinstall #install qt RUN apt-get update \ @@ -95,6 +79,9 @@ RUN apt-get update \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* +RUN aqt install-tool linux desktop tools_ifw qt.tools.ifw.47 +ENV PATH="/Tools/QtInstallerFramework/4.7/bin:$PATH" + # lcov and doxygen RUN apt-get update \ && apt-get -qq install -y --no-install-recommends \ @@ -147,3 +134,5 @@ RUN update-alternatives --install /usr/bin/cc cc /usr/bin/clang-${CLANG_VERSION} RUN update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-${CLANG_VERSION} 100 RUN update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-${CLANG_VERSION} 100 RUN update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-${CLANG_VERSION} 100 + +USER ubuntu diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 48d7d08..fa6d140 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,7 @@ { "name": "C++", "build": { + "context": "..", "dockerfile": "Dockerfile", "args": { "CLANG_VERSION": "18", @@ -8,9 +9,12 @@ } }, "mounts": [ - "source=${localEnv:HOME}/.conan2,target=/home/user/.conan2,type=bind", + "source=${localEnv:HOME}/.ssh,target=/home/ubuntu/.ssh,type=bind", + "source=${localEnv:HOME}/.conan2,target=/home/ubuntu/.conan2,type=bind", "source=native-ccache,target=/opt/.native-ccache,type=volume" ], + "updateRemoteUserUID": true, + "containerUser": "ubuntu", "postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}", "postAttachCommand": "pre-commit install -f --hook-type pre-commit && conan profile detect --force", @@ -21,8 +25,7 @@ "ms-vscode.cpptools-extension-pack", "xaver.clang-format", "llvm-vs-code-extensions.vscode-clangd", - "twxs.cmake", - "ms-vscode.cmake-tools", + "twxs.cmake", "ms-vscode.cmake-tools", "mhutchie.git-graph", "donjayamanne.githistory", "webfreak.debug", diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index 5255964..cd2d3e0 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -80,7 +80,8 @@ RUN pip3 install gcovr==8.3 # Qt Installer Framework RUN pip3 install aqtinstall -RUN aqt install-tool linux desktop tools_ifw +RUN aqt install-tool linux desktop tools_ifw qt.tools.ifw.47 +ENV PATH="/Tools/QtInstallerFramework/4.7/bin:$PATH" USER gitpod diff --git a/py-requirements.txt b/py-requirements.txt index 17d9edc..a658d59 100644 --- a/py-requirements.txt +++ b/py-requirements.txt @@ -1,9 +1,10 @@ -cmake>=3.31.4 +cmake>=3.31,<4.0 conan>=2.15 gcovr>=8.2 pre-commit>=4.0.1 cmake-format>=0.6.13 setuptools>=75.0.0 +python-dateutil==2.9.0 requests>=2.32.2 # not directly required, pinned by Snyk to avoid a vulnerability zipp>=3.19.1 # not directly required, pinned by Snyk to avoid a vulnerability urllib3>=1.26.19 # not directly required, pinned by Snyk to avoid a vulnerability From c8c5aa5478547c35867a4abf12cd88f59e284512 Mon Sep 17 00:00:00 2001 From: Michel Estermann Date: Wed, 23 Apr 2025 19:45:00 +0000 Subject: [PATCH 05/14] use and configure IFW cpack generator when available --- cmake/CPackConfig.cmake | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/cmake/CPackConfig.cmake b/cmake/CPackConfig.cmake index 9a5f65c..d41c112 100644 --- a/cmake/CPackConfig.cmake +++ b/cmake/CPackConfig.cmake @@ -31,7 +31,12 @@ endif() find_program(DPKG_PROGRAM dpkg) if(DPKG_PROGRAM) list(APPEND CPACK_GENERATOR DEB) - set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) + find_program(SHLIBDEPS_PROGRAMM dpkg-shlibdeps) + if(SHLIBDEPS_PROGRAMM) + set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) + else() + message(WARNING "dpkg-shlibdeps not found, skipping shlibdeps") + endif() # DEB package config set(CPACK_DEBIAN_PACKAGE_NAME "coronan") @@ -41,14 +46,24 @@ if(DPKG_PROGRAM) set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt6widgets6 (>=6.2.4),libqt6charts6 (>=6.2.4)") endif(DPKG_PROGRAM) -# IFW (Qt Installer Framework) config -set(CPACK_IFW_VERBOSE ON) -set(CPACK_IFW_PACKAGE_TITLE "Co[ro]nan") +find_program( + BINARYCREATOR_EXECUTABLE + NAMES binarycreator + HINTS ${CPACK_IFW_ROOT}/bin +) +if(BINARYCREATOR_EXECUTABLE) + message(STATUS "Found binarycreator: ${BINARYCREATOR_EXECUTABLE}") + list(APPEND CPACK_GENERATOR IFW) + # IFW (Qt Installer Framework) config + set(CPACK_IFW_VERBOSE ON) + set(CPACK_IFW_PACKAGE_TITLE "Co[ro]nan") + include(CPackIFW) +endif() + include(CPack) -include(CPackIFW) cpack_add_component( - Coronan_Development + Coronan_Development DISABLED DISPLAY_NAME "coronan SDK" DESCRIPTION "Development components" INSTALL_TYPES Full Developer @@ -62,12 +77,18 @@ cpack_add_component( ) cpack_add_component( - Coronan_Runtime_CLI + Coronan_Runtime_CLI DISABLED DISPLAY_NAME "coronan command line interface" DESCRIPTION "Gui executables" INSTALL_TYPES Full Developer Minimal ) +if(BINARYCREATOR_EXECUTABLE) + cpack_ifw_configure_component(Coronan_Development VIRTUAL) + cpack_ifw_configure_component(Coronan_Runtime_GUI ESSENTIAL) + cpack_ifw_configure_component(Coronan_Runtime_CLI VIRTUAL) +endif() + cpack_add_install_type(Full) cpack_add_install_type(Minimal) cpack_add_install_type(Developer DISPLAY_NAME "SDK Development") From 189bb9704fffdc0283b3e589fea83b5afafd835e Mon Sep 17 00:00:00 2001 From: Michel Estermann Date: Wed, 23 Apr 2025 19:45:55 +0000 Subject: [PATCH 06/14] add gcc build on windows github action. update qt version on github actions --- .github/workflows/ci-linux-sanatizer.yml | 38 ++++++++++++------------ .github/workflows/ci-linux.yml | 34 ++++++++++----------- .github/workflows/ci-macos.yml | 10 +++---- .github/workflows/ci-windows.yml | 25 ++++++++++++---- 4 files changed, 60 insertions(+), 47 deletions(-) diff --git a/.github/workflows/ci-linux-sanatizer.yml b/.github/workflows/ci-linux-sanatizer.yml index 2a54230..a3d0365 100644 --- a/.github/workflows/ci-linux-sanatizer.yml +++ b/.github/workflows/ci-linux-sanatizer.yml @@ -18,105 +18,105 @@ jobs: include: - name: ubuntu-22.04-clang-13-address os: ubuntu-22.04 - compiler: clang++-13 + cppcompiler: clang++-13 ccompiler: clang-13 clang-tidy: clang-tidy-13 generator: Ninja profile: linux-clang-address-sanitizers - name: ubuntu-22.04-clang-14-address os: ubuntu-22.04 - compiler: clang++-14 + cppcompiler: clang++-14 ccompiler: clang-14 clang-tidy: clang-tidy-14 generator: Ninja profile: linux-clang-address-sanitizers - name: ubuntu-22.04-clang-15-address os: ubuntu-22.04 - compiler: clang++-15 + cppcompiler: clang++-15 ccompiler: clang-15 clang-tidy: clang-tidy-15 generator: Ninja profile: linux-clang-address-sanitizers - name: ubuntu-24.04-clang-16-address os: ubuntu-24.04 - compiler: clang++-16 + cppcompiler: clang++-16 ccompiler: clang-16 clang-tidy: clang-tidy-16 generator: Ninja profile: linux-clang-address-sanitizers - name: ubuntu-24.04-clang-17-address os: ubuntu-24.04 - compiler: clang++-17 + cppcompiler: clang++-17 ccompiler: clang-17 clang-tidy: clang-tidy-17 generator: Ninja profile: linux-clang-address-sanitizers - name: ubuntu-24.04-clang-18-address os: ubuntu-24.04 - compiler: clang++-18 + cppcompiler: clang++-18 ccompiler: clang-18 clang-tidy: clang-tidy-18 generator: Ninja profile: linux-clang-address-sanitizers - name: ubuntu-latest-address os: ubuntu-latest - compiler: g++ + cppcompiler: g++ ccompiler: gcc clang-tidy: clang-tidy generator: Ninja profile: linux-clang-address-sanitizers - name: ubuntu-22.04-clang-13-memory os: ubuntu-22.04 - compiler: clang++-13 + cppcompiler: clang++-13 ccompiler: clang-13 clang-tidy: clang-tidy-13 generator: Ninja profile: linux-clang-memory-sanitizers - name: ubuntu-22.04-clang-14-memory os: ubuntu-22.04 - compiler: clang++-14 + cppcompiler: clang++-14 ccompiler: clang-14 clang-tidy: clang-tidy-14 generator: Ninja profile: linux-clang-memory-sanitizers - name: ubuntu-22.04-clang-15-memory os: ubuntu-22.04 - compiler: clang++-15 + cppcompiler: clang++-15 ccompiler: clang-15 clang-tidy: clang-tidy-15 generator: Ninja profile: linux-clang-memory-sanitizers - name: ubuntu-24.04-clang-16-memory os: ubuntu-24.04 - compiler: clang++-16 + cppcompiler: clang++-16 ccompiler: clang-16 clang-tidy: clang-tidy-16 generator: Ninja profile: linux-clang-memory-sanitizers - name: ubuntu-24.04-clang-17-memory os: ubuntu-24.04 - compiler: clang++-17 + cppcompiler: clang++-17 ccompiler: clang-17 clang-tidy: clang-tidy-17 generator: Ninja profile: linux-clang-memory-sanitizers - name: ubuntu-24.04-clang-18-memory os: ubuntu-24.04 - compiler: clang++-18 + cppcompiler: clang++-18 ccompiler: clang-18 clang-tidy: clang-tidy-18 generator: Ninja profile: linux-clang-memory-sanitizers - name: ubuntu-latest-memory os: ubuntu-latest - compiler: g++ + cppcompiler: g++ ccompiler: gcc clang-tidy: clang-tidy generator: Ninja profile: linux-clang-memory-sanitizers env: - CXX: ${{ matrix.compiler }} + CXX: ${{ matrix.cppcompiler }} CC: ${{ matrix.ccompiler }} steps: @@ -125,17 +125,17 @@ jobs: uses: actions/cache@v4 with: path: ~/.conan2/p - key: cache-${{ matrix.os }}-${{ matrix.compiler }}-conan-${{ hashFiles('conanfile.txt') }} + key: cache-${{ matrix.os }}-${{ matrix.cppcompiler }}-conan-${{ hashFiles('conanfile.txt') }} restore-keys: | - cache-${{ matrix.os }}-${{ matrix.compiler }}-conan + cache-${{ matrix.os }}-${{ matrix.cppcompiler }}-conan - name: Cache (ccache) uses: actions/cache@v4 with: path: | ~/.cache/ccache - key: ccache-${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.generator }}-${{ hashFiles('**/CMakeLists.txt') }} + key: ccache-${{ matrix.os }}-${{ matrix.cppcompiler }}-${{ matrix.generator }}-${{ hashFiles('**/CMakeLists.txt') }} restore-keys: | - ccache-${{ matrix.os }}-${{ matrix.compiler }} + ccache-${{ matrix.os }}-${{ matrix.cppcompiler }} - name: Install dependencies run: | sudo apt-get update diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index ede41a0..7a0e623 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -19,7 +19,7 @@ jobs: - name: ubuntu-22.04-clang-13 os: ubuntu-22.04 build_type: Release - compiler: clang++-13 + cppcompiler: clang++-13 ccompiler: clang-13 clang-tidy: clang-tidy-13 generator: Ninja @@ -28,7 +28,7 @@ jobs: - name: ubuntu-22.04-clang-14 os: ubuntu-22.04 build_type: Release - compiler: clang++-14 + cppcompiler: clang++-14 ccompiler: clang-14 clang-tidy: clang-tidy-14 generator: Ninja @@ -37,7 +37,7 @@ jobs: - name: ubuntu-22.04-clang-15 os: ubuntu-22.04 build_type: Release - compiler: clang++-15 + cppcompiler: clang++-15 ccompiler: clang-15 clang-tidy: clang-tidy-15 generator: Ninja @@ -46,7 +46,7 @@ jobs: - name: ubuntu-22.04-gcc-12 os: ubuntu-22.04 build_type: Debug - compiler: g++-12 + cppcompiler: g++-12 ccompiler: gcc-12 clang-tidy: clang-tidy generator: Ninja @@ -55,7 +55,7 @@ jobs: - name: ubuntu-24.04-clang-16 os: ubuntu-24.04 build_type: Release - compiler: clang++-16 + cppcompiler: clang++-16 ccompiler: clang-16 clang-tidy: clang-tidy-16 generator: Ninja @@ -64,7 +64,7 @@ jobs: - name: ubuntu-24.04-clang-17 os: ubuntu-24.04 build_type: Release - compiler: clang++-17 + cppcompiler: clang++-17 ccompiler: clang-17 clang-tidy: clang-tidy-17 generator: Ninja @@ -73,7 +73,7 @@ jobs: - name: ubuntu-24.04-clang-18 os: ubuntu-24.04 build_type: Release - compiler: clang++-18 + cppcompiler: clang++-18 ccompiler: clang-18 clang-tidy: clang-tidy-18 generator: Ninja @@ -82,7 +82,7 @@ jobs: - name: ubuntu-24.04-clang-18-download-qt os: ubuntu-24.04 build_type: Release - compiler: clang++-18 + cppcompiler: clang++-18 ccompiler: clang-18 clang-tidy: clang-tidy-18 generator: Ninja @@ -91,7 +91,7 @@ jobs: - name: ubuntu-24.04-gcc-13 os: ubuntu-24.04 build_type: Debug - compiler: g++-13 + cppcompiler: g++-13 ccompiler: gcc-13 clang-tidy: clang-tidy generator: Ninja @@ -100,7 +100,7 @@ jobs: - name: ubuntu-24.04-gcc-14 os: ubuntu-24.04 build_type: Debug - compiler: g++-14 + cppcompiler: g++-14 ccompiler: gcc-14 clang-tidy: clang-tidy generator: Ninja @@ -109,7 +109,7 @@ jobs: - name: ubuntu-24.04-gcc-14-download-qt os: ubuntu-24.04 build_type: Debug - compiler: g++-14 + cppcompiler: g++-14 ccompiler: gcc-14 clang-tidy: clang-tidy generator: Ninja @@ -118,7 +118,7 @@ jobs: - name: ubuntu-latest os: ubuntu-latest build_type: Debug - compiler: g++ + cppcompiler: g++ ccompiler: gcc clang-tidy: clang-tidy generator: Ninja @@ -126,7 +126,7 @@ jobs: download_qt: OFF env: - CXX: ${{ matrix.compiler }} + CXX: ${{ matrix.cppcompiler }} CC: ${{ matrix.ccompiler }} steps: @@ -135,18 +135,18 @@ jobs: uses: actions/cache@v4 with: path: ~/.conan2/p - key: cache-${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.build_type }}-conan-${{ hashFiles('conanfile.txt') }} + key: cache-${{ matrix.os }}-${{ matrix.cppcompiler }}-${{ matrix.build_type }}-conan-${{ hashFiles('conanfile.txt') }} restore-keys: | - cache-${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.build_type }}-conan + cache-${{ matrix.os }}-${{ matrix.cppcompiler }}-${{ matrix.build_type }}-conan - name: Cache (ccache) uses: actions/cache@v4 with: path: | ~/.cache/ccache - key: ccache-${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.build_type }}-${{ matrix.generator }}-${{ hashFiles('**/CMakeLists.txt') + key: ccache-${{ matrix.os }}-${{ matrix.cppcompiler }}-${{ matrix.build_type }}-${{ matrix.generator }}-${{ hashFiles('**/CMakeLists.txt') }} restore-keys: | - ccache-${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.build_type }} + ccache-${{ matrix.os }}-${{ matrix.cppcompiler }}-${{ matrix.build_type }} - name: Install dependencies run: | sudo apt-get update diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index ff3afc3..82bda69 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -19,24 +19,24 @@ jobs: - name: macOS-13-clang os: macOS-13 build_type: Release - compiler: clang++ + cppcompiler: clang++ ccompiler: clang generators: Ninja - name: macOS-14-clang os: macOS-14 build_type: Release - compiler: clang++ + cppcompiler: clang++ ccompiler: clang generators: Ninja - name: macOS-15-clang os: macOS-15 build_type: Release - compiler: clang++ + cppcompiler: clang++ ccompiler: clang generators: Ninja env: - CXX: ${{ matrix.compiler }} + CXX: ${{ matrix.cppcompiler }} CC: ${{ matrix.ccompiler }} steps: @@ -54,7 +54,7 @@ jobs: - name: Install Qt uses: jurplel/install-qt-action@v4 with: - version: 6.8.2 + version: 6.8.3 host: mac target: desktop arch: clang_64 diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index c3e1339..14ba4c8 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -16,21 +16,33 @@ jobs: fail-fast: false matrix: include: - - name: windows-VS-2022 + - name: windows-2022-VS-2022 os: windows-2022 build_type: Release - compiler: cl + cppcompiler: cl ccompiler: cl generators: Visual Studio 17 2022 - - name: windows-VS-2025 + - name: windows-2022-gcc + os: windows-2022 + build_type: Release + cppcompiler: g++ + ccompiler: gcc + generators: Ninja + - name: windows-2025-VS-2022 os: windows-2025 build_type: Release - compiler: cl + cppcompiler: cl ccompiler: cl generators: Visual Studio 17 2022 + - name: windows-2025-gcc + os: windows-2025 + build_type: Release + cppcompiler: g++ + ccompiler: gcc + generators: Ninja env: - CXX: ${{ matrix.compiler }} + CXX: ${{ matrix.cppcompiler }} CC: ${{ matrix.ccompiler }} steps: @@ -49,13 +61,14 @@ jobs: - name: Install Qt uses: jurplel/install-qt-action@v4 with: - version: 6.8.2 + version: 6.8.3 host: windows target: desktop arch: win64_msvc2022_64 modules: qtcharts tools: tools_ifw - name: setup-msvc-dev + if: matrix.cppcompiler == 'cl' uses: TheMrMilchmann/setup-msvc-dev@v3 with: arch: x64 From 4400c06c7c04a4e71588abb036446a14c3c8db61 Mon Sep 17 00:00:00 2001 From: Michel Estermann Date: Wed, 23 Apr 2025 20:35:46 +0000 Subject: [PATCH 07/14] updated devcontainer and gitpod --- .devcontainer/Dockerfile | 4 +- .devcontainer/devcontainer.json | 7 +-- .gitpod.Dockerfile | 88 ------------------------------ .gitpod.yml | 4 +- conan_profiles/clang_debug_linux | 2 +- conan_profiles/clang_release_linux | 2 +- conan_profiles/gnu_debug_linux | 2 +- conan_profiles/gnu_release_linux | 2 +- 8 files changed, 10 insertions(+), 101 deletions(-) delete mode 100644 .gitpod.Dockerfile diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index fdc28bb..20d4e8b 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:24.04 +FROM mcr.microsoft.com/devcontainers/base:dev-ubuntu24.04 LABEL maintainer="Michel Estermann " @@ -134,5 +134,3 @@ RUN update-alternatives --install /usr/bin/cc cc /usr/bin/clang-${CLANG_VERSION} RUN update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-${CLANG_VERSION} 100 RUN update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-${CLANG_VERSION} 100 RUN update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-${CLANG_VERSION} 100 - -USER ubuntu diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index fa6d140..96dca99 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -9,15 +9,14 @@ } }, "mounts": [ - "source=${localEnv:HOME}/.ssh,target=/home/ubuntu/.ssh,type=bind", - "source=${localEnv:HOME}/.conan2,target=/home/ubuntu/.conan2,type=bind", + "source=${localEnv:HOME}/.ssh,target=/home/vscode/.ssh,type=bind", + "source=${localEnv:HOME}/.conan2,target=/home/vscode/.conan2,type=bind", "source=native-ccache,target=/opt/.native-ccache,type=volume" ], "updateRemoteUserUID": true, - "containerUser": "ubuntu", "postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}", - "postAttachCommand": "pre-commit install -f --hook-type pre-commit && conan profile detect --force", + "postAttachCommand": "pre-commit install -f --hook-type pre-commit && conan profile detect --force && conan install . --build=missing --settings=build_type=Debug && conan install . --build=missing --settings=build_type=Release", "customizations": { "vscode": { "extensions": [ diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile deleted file mode 100644 index cd2d3e0..0000000 --- a/.gitpod.Dockerfile +++ /dev/null @@ -1,88 +0,0 @@ -FROM gitpod/workspace-full-vnc:2025-01-15-08-55-28 - -# More information: https://www.gitpod.io/docs/config-docker/ - -LABEL maintainer="Michel Estermann " - -USER root - -#install qt -RUN apt-get update \ - && apt-get -qq install -y --no-install-recommends \ - software-properties-common \ - qt6-base-dev \ - qt6-tools-dev \ - qt6-tools-dev-tools \ - libqt6widgets6 \ - libqt6charts6 \ - libqt6charts6-dev \ - libqt6opengl6 \ - libqt6opengl6-dev \ - libxcb-xinerama0-dev \ - '^libxcb.*-dev' \ - libgles2-mesa-dev \ - libx11-xcb-dev \ - libgl1-mesa-dev \ - libglu1-mesa-dev \ - libxrender-dev \ - libxi-dev \ - libxkbcommon-dev \ - libxkbcommon-x11-dev \ - perl \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - - -# install clang 19 -RUN apt-get update \ - && apt-get -qq install -y --no-install-recommends \ - clang-18 \ - clang-tidy-18 \ - clang-format-18 \ - clangd-18 \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -# lcov and doxygen -RUN apt-get update \ - && apt-get -qq install -y --no-install-recommends \ - lcov \ - doxygen \ - graphviz \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -RUN apt-get update \ - && apt-get -qq install -y --no-install-recommends \ - ccache \ - ninja-build \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -RUN pyenv install 3.12.7 \ - && pyenv global 3.12.7 - -#install cmake -RUN pip3 install cmake>=3.31,<4.0 -#install conan -RUN pip3 install conan==2.15 -RUN pip3 install python-dateutil==2.9.0 - -# pre-commit -RUN pip3 install pre-commit==4.0.1 -RUN pip3 install yamlfmt==1.1.1 - -# cmake-format -RUN pip3 install cmake-format==0.6.13 - -# gcovr -RUN pip3 install gcovr==8.3 - -# Qt Installer Framework -RUN pip3 install aqtinstall -RUN aqt install-tool linux desktop tools_ifw qt.tools.ifw.47 -ENV PATH="/Tools/QtInstallerFramework/4.7/bin:$PATH" - -USER gitpod - -RUN echo 'export PIP_USER=false' >> ~/.bashrc diff --git a/.gitpod.yml b/.gitpod.yml index 887fa5d..4fd2783 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,6 +1,6 @@ --- image: - file: .gitpod.Dockerfile + file: .devcontainer/Dockerfile tasks: - before: | @@ -9,7 +9,7 @@ tasks: export CXX=clang++-18 export CC=clang-18 conan profile detect - init: conan install . -pr:a conan_profiles/clang_debug_linux --build=missing + init: conan install . --build=missing --settings=build_type=Debug command: cmake -S . -B build --preset=linux-clang-debug vscode: diff --git a/conan_profiles/clang_debug_linux b/conan_profiles/clang_debug_linux index ef71857..f2cb0ad 100644 --- a/conan_profiles/clang_debug_linux +++ b/conan_profiles/clang_debug_linux @@ -3,7 +3,7 @@ arch=x86_64 build_type=Debug compiler=clang compiler.cppstd=20 -compiler.libcxx=libc++11 +compiler.libcxx=libstdc++11 compiler.version=18 os=Linux diff --git a/conan_profiles/clang_release_linux b/conan_profiles/clang_release_linux index a6f3d84..6496876 100644 --- a/conan_profiles/clang_release_linux +++ b/conan_profiles/clang_release_linux @@ -3,7 +3,7 @@ arch=x86_64 build_type=Release compiler=clang compiler.cppstd=20 -compiler.libcxx=libc++11 +compiler.libcxx=libstdc++11 compiler.version=18 os=Linux diff --git a/conan_profiles/gnu_debug_linux b/conan_profiles/gnu_debug_linux index 71e4169..4eb7ff1 100644 --- a/conan_profiles/gnu_debug_linux +++ b/conan_profiles/gnu_debug_linux @@ -3,7 +3,7 @@ arch=x86_64 build_type=Debug compiler=gcc compiler.cppstd=gnu20 -compiler.libcxx=libc++11 +compiler.libcxx=libstdc++11 compiler.version=14 os=Linux diff --git a/conan_profiles/gnu_release_linux b/conan_profiles/gnu_release_linux index 40ae065..bf799db 100644 --- a/conan_profiles/gnu_release_linux +++ b/conan_profiles/gnu_release_linux @@ -3,7 +3,7 @@ arch=x86_64 build_type=Release compiler=gcc compiler.cppstd=gnu20 -compiler.libcxx=libc++11 +compiler.libcxx=libstdc++11 compiler.version=14 os=Linux From d6340877f8eac1421140975c9de67ed4663211b8 Mon Sep 17 00:00:00 2001 From: Michel Estermann Date: Wed, 23 Apr 2025 20:48:13 +0000 Subject: [PATCH 08/14] removed DOXYGEN_HTML_EXTRA_FILES (error on windows build) --- docs/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index b3b4cfa..3c49c73 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -3,7 +3,6 @@ include(Doxygen) if(EXISTS "${PROJECT_SOURCE_DIR}/README.md") set(DOXYGEN_USE_MDFILE_AS_MAINPAGE "${PROJECT_SOURCE_DIR}/README.md") - set(DOXYGEN_HTML_EXTRA_FILES "${PROJECT_SOURCE_DIR}/images/*.png") endif() # enable doxygen documentaion with the "awesome-sidebar" theme From 7114c4b759f8f0cf863d4345e8baf278fc888a41 Mon Sep 17 00:00:00 2001 From: Michel Estermann Date: Wed, 23 Apr 2025 21:43:10 +0000 Subject: [PATCH 09/14] release action --- .github/workflows/ci-linux.yml | 1 + .github/workflows/ci-macos.yml | 1 + .github/workflows/ci-release.yml | 158 +++++++++++++++++++++++++++++++ .github/workflows/ci-windows.yml | 14 +-- CMakePresets.json | 2 +- 5 files changed, 162 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/ci-release.yml diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index 7a0e623..b90bb1f 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -198,3 +198,4 @@ jobs: path: | ./build/Coronan-*.deb ./build/Coronan-*.tar.gz + ./build/Coronan-*.run diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index 82bda69..5589ec8 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -84,3 +84,4 @@ jobs: path: | ./build/Coronan-*.tar.gz ./build/Coronan-*.pkg + ./build/Coronan-*.dmg diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml new file mode 100644 index 0000000..9549b05 --- /dev/null +++ b/.github/workflows/ci-release.yml @@ -0,0 +1,158 @@ +--- +name: Release + +on: + push: + tags: + - v* + branches: + - main # nur, wenn Tag auf main ist + +jobs: + build-linux: + runs-on: ubuntu-24.04 + env: + CXX: g++ + CC: gcc + steps: + - uses: actions/checkout@v4 + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends ccache ninja-build dpkg pkg-config doxygen lcov + sudo apt-get install -y --no-install-recommends libgl1-mesa-dev freeglut3-dev + - name: Install Qt + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends qt6-base-dev qt6-tools-dev qt6-tools-dev-tools libqt6charts6 libqt6charts6-dev libqt6opengl6 libqt6opengl6-dev '^libxcb.*-dev' libgles2-mesa-dev libx11-xcb-dev libgl1-mesa-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.x + - name: Install python dependencies + run: | + python -m pip install --upgrade pip + pip install -r py-requirements.txt + - name: Set conan compiler env + run: conan profile detect + - name: conan install + run: conan install . --build=missing --settings=build_type=Release --settings=compiler.cppstd=17 + - name: CMake configure + run: | + cmake -S . --preset=linux-gcc-release + - name: CMake build + run: cmake --build ./build --config Release + - name: CMake build packages + run: cmake --build ./build --target package --config Release + - uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.name }}-artifacts + path: | + ./build/Coronan-*.deb + ./build/Coronan-*.tar.gz + ./build/Coronan-*.run + + build-windows: + runs-on: windows-2025 + steps: + - uses: actions/checkout@v4 + - name: Install dependencies + run: | + choco install doxygen.install + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.x + - name: Install python dependencies + run: | + python -m pip install --upgrade pip + pip install -r py-requirements.txt + - name: Install Qt + uses: jurplel/install-qt-action@v4 + with: + version: 6.8.3 + host: windows + target: desktop + arch: win64_msvc2022_64 + modules: qtcharts + tools: tools_ifw + - name: setup-msvc-dev + uses: TheMrMilchmann/setup-msvc-dev@v3 + with: + arch: x64 + - name: Set conan compiler env + run: conan profile detect + - name: conan install + run: conan install . --build=missing --settings=build_type=Release --settings=compiler.cppstd=17 + - name: CMake configure + run: | + cmake -S . --preset=visual-studio-2022-release + - name: CMake build + run: cmake --build ./build --config Release + - name: CMake build package + run: cmake --build ./build --target package --config Release + - uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.name }}-artifacts + path: | + ./build/Coronan-*.zip + ./build/Coronan-*.msi + ./build/Coronan-*.exe + + build-macos: + runs-on: macOS-15 + steps: + - uses: actions/checkout@v4 + - name: Install dependencies + run: brew install ninja doxygen sphinx-doc + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.x + - name: Install python dependencies + run: | + python -m pip install --upgrade pip + pip install -r py-requirements.txt + - name: Install Qt + uses: jurplel/install-qt-action@v4 + with: + version: 6.8.3 + host: mac + target: desktop + arch: clang_64 + modules: qtcharts + tools: tools_ifw + - name: Set conan compiler env + run: conan profile detect + - name: conan install + run: conan install . --build=missing --settings=build_type=Release + - name: CMake configure + run: | + cmake -S . -B ./build -G "Ninja" -DCMAKE_BUILD_TYPE=Release + - name: CMake build + run: cmake --build ./build --config Release + - name: CMake build package + run: cmake --build ./build --target package --config Release + - uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.name }}-artifacts + path: | + ./build/Coronan-*.pkg + ./build/Coronan-*.dmg + + release: + needs: [build-linux, build-windows, build-macos] + runs-on: ubuntu-latest + steps: + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: ./downloads + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ github.ref_name }} # z. B. v1.2.3 + name: Release ${{ github.ref_name }} + files: | + downloads/**/* diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index 14ba4c8..3ab5668 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -22,24 +22,12 @@ jobs: cppcompiler: cl ccompiler: cl generators: Visual Studio 17 2022 - - name: windows-2022-gcc - os: windows-2022 - build_type: Release - cppcompiler: g++ - ccompiler: gcc - generators: Ninja - name: windows-2025-VS-2022 os: windows-2025 build_type: Release cppcompiler: cl ccompiler: cl generators: Visual Studio 17 2022 - - name: windows-2025-gcc - os: windows-2025 - build_type: Release - cppcompiler: g++ - ccompiler: gcc - generators: Ninja env: CXX: ${{ matrix.cppcompiler }} @@ -68,7 +56,6 @@ jobs: modules: qtcharts tools: tools_ifw - name: setup-msvc-dev - if: matrix.cppcompiler == 'cl' uses: TheMrMilchmann/setup-msvc-dev@v3 with: arch: x64 @@ -94,3 +81,4 @@ jobs: path: | ./build/Coronan-*.zip ./build/Coronan-*.msi + ./build/Coronan-*.exe diff --git a/CMakePresets.json b/CMakePresets.json index 9d564a3..b7385da 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -434,7 +434,7 @@ }, { "name": "ifw-visual-studio-2022", - "displayName": "Windows Wix", + "displayName": "Windows IFW", "configurePreset": "visual-studio-2022-release", "generators": [ "IFW" From 9a5c7a2d696c35cea8c5a54030fd976bf66a6778 Mon Sep 17 00:00:00 2001 From: Michel Estermann Date: Wed, 23 Apr 2025 21:56:04 +0000 Subject: [PATCH 10/14] fixed Dockerfile issues --- .devcontainer/Dockerfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 20d4e8b..d5eb1b0 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -5,8 +5,6 @@ LABEL maintainer="Michel Estermann " ARG CLANG_VERSION=18 ARG GCC_VERSION=14 -USER root - RUN apt-get update \ && apt-get -qq install -y --no-install-recommends \ make \ @@ -50,8 +48,8 @@ ENV PATH="$VIRTUAL_ENV/bin:$PATH" COPY py-requirements.txt requirements.txt -RUN pip3 install -Ur requirements.txt -RUN pip3 install aqtinstall +RUN pip3 install --requirement requirements.txt +RUN pip3 install aqtinstall==3.2.1 #install qt RUN apt-get update \ From 9ce9645708a0580ba6e103e350b66cdebc847817 Mon Sep 17 00:00:00 2001 From: Michel Estermann Date: Wed, 23 Apr 2025 21:59:57 +0000 Subject: [PATCH 11/14] fixed appveyor build --- appveyor.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index d0de62a..8ccd95d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -26,7 +26,9 @@ before_build: cmake -S %APPVEYOR_BUILD_FOLDER% --preset=visual-studio-2022-release build_script: - - cmd: cmake --build --preset=package-windows + - cmd: |- + cmake --build --preset=visual-studio-release + cmake --build build --target package test_script: - cmd: ctest --preset=unittest-vs-2022 @@ -35,3 +37,6 @@ artifacts: - path: \build\Coronan-*.msi name: Coronan_installer type: File + - path: \build\Coronan-*.exe + name: Coronan_qt_installer + type: File From 805c38386e6de793f2697bed081f2aef749b1ff2 Mon Sep 17 00:00:00 2001 From: Michel Estermann Date: Wed, 23 Apr 2025 22:43:19 +0000 Subject: [PATCH 12/14] fixe coverity scan issues --- apps/cli/src/main.cpp | 8 ++++---- apps/qt/country_overview_table_model.cpp | 4 ++-- include/coronan/corona-api_client.hpp | 6 +++--- include/coronan/http_client.hpp | 6 +++++- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/apps/cli/src/main.cpp b/apps/cli/src/main.cpp index 39b8d53..c3d92a4 100644 --- a/apps/cli/src/main.cpp +++ b/apps/cli/src/main.cpp @@ -39,11 +39,11 @@ int main(int argc, char* argv[]) arguments_or_exit_code); auto const latest_data = coronan::CoronaAPIClient{}.request_country_data(country, std::nullopt); - const auto region_info = + auto region_info = coronan::RegionInfo{.name = "", .iso_code = country, .latitude = std::nullopt, .longitude = std::nullopt}; if (start_date.has_value() && end_date.has_value()) { - return coronan::CountryData{.info = region_info, + return coronan::CountryData{.info = std::move(region_info), .latest = latest_data.latest, .timeline = coronan::CoronaAPIClient{} .request_country_data(country, start_date.value(), end_date.value()) @@ -51,7 +51,7 @@ int main(int argc, char* argv[]) } else if (start_date.has_value() && not end_date.has_value()) { - return coronan::CountryData{.info = region_info, + return coronan::CountryData{.info = std::move(region_info), .latest = latest_data.latest, .timeline = coronan::CoronaAPIClient{} @@ -59,7 +59,7 @@ int main(int argc, char* argv[]) .timeline}; } return coronan::CountryData{ - .info = region_info, .latest = latest_data.latest, .timeline = {{latest_data.latest}}}; + .info = std::move(region_info), .latest = latest_data.latest, .timeline = {{latest_data.latest}}}; }(); print_data(country_data); diff --git a/apps/qt/country_overview_table_model.cpp b/apps/qt/country_overview_table_model.cpp index 979e1c0..ae9fb11 100644 --- a/apps/qt/country_overview_table_model.cpp +++ b/apps/qt/country_overview_table_model.cpp @@ -45,12 +45,12 @@ void CountryOverviewTablewModel::populate_data(coronan::CountryData const& count for (auto const& pair : overview_table_entries) { auto const label = QString{pair.first}; - auto const value = std::visit( + auto value = std::visit( overloaded{[](std::string const& arg) { return QString{arg.c_str()}; }, [](auto const& arg) { return arg.has_value() ? QString::number(arg.value()) : QString{"--"}; }}, pair.second); - country_overview_data.push_back(qMakePair(label, value)); + country_overview_data.push_back(qMakePair(label, std::move(value))); } endResetModel(); } diff --git a/include/coronan/corona-api_client.hpp b/include/coronan/corona-api_client.hpp index 0cdbaaa..fe23d6f 100644 --- a/include/coronan/corona-api_client.hpp +++ b/include/coronan/corona-api_client.hpp @@ -125,7 +125,7 @@ template CountryData CoronaAPIClientType::request_country_data(std::string const& country_code, std::optional const& date) const { - auto const date_query_string = + auto const& date_query_string = date.has_value() ? fmt::format("date={:%Y-%m-%d}&", sys_days(date.value())) : std::string{""}; auto const region_report_url = corona_api_url + std::string{"reports/total?"} + date_query_string + std::string{"iso="} + std::string{country_code}; @@ -151,8 +151,8 @@ CountryData CoronaAPIClientType::request_country_data(std::string co } else { - auto const exception_msg = details::create_exception_msg(region_report_url, http_response); - throw HTTPClientException{exception_msg}; + auto exception_msg = details::create_exception_msg(region_report_url, http_response); + throw HTTPClientException{std::move(exception_msg)}; } } diff --git a/include/coronan/http_client.hpp b/include/coronan/http_client.hpp index 0d24986..10caa7b 100644 --- a/include/coronan/http_client.hpp +++ b/include/coronan/http_client.hpp @@ -90,7 +90,11 @@ HTTPResponse HTTPClientType::get auto const path = std::invoke([&uri]() { auto path_ = uri.getPathAndQuery(); - return path_.empty() ? "/" : std::move(path_); + if (path_.empty()) + { + path_ = "/"; + } + return path_; }); HTTPRequestType request{"GET", path, "HTTP/1.1"}; From 7502c7c9280207d2fae4213b81c37baf7dfd155e Mon Sep 17 00:00:00 2001 From: Michel Estermann Date: Wed, 23 Apr 2025 22:47:12 +0000 Subject: [PATCH 13/14] fix appveyor --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 8ccd95d..d1d00dc 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -28,7 +28,7 @@ before_build: build_script: - cmd: |- cmake --build --preset=visual-studio-release - cmake --build build --target package + cmake --build build --target package --config Release test_script: - cmd: ctest --preset=unittest-vs-2022 From 871d8d4d0cef8d3e80af32c75e5b082c4b4f46fa Mon Sep 17 00:00:00 2001 From: Michel Estermann Date: Wed, 23 Apr 2025 23:43:12 +0000 Subject: [PATCH 14/14] cleanup --- .devcontainer/devcontainer.json | 6 ++++-- .github/workflows/ci-linux.yml | 8 ++++++-- .github/workflows/ci-macos.yml | 7 ++++--- .github/workflows/ci-release.yml | 18 +++++++++++++----- .github/workflows/ci-windows.yml | 7 +++++-- .lgtm.yml | 24 ------------------------ cmake/CPackConfig.cmake | 16 ++++++++++++++++ 7 files changed, 48 insertions(+), 38 deletions(-) delete mode 100644 .lgtm.yml diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 96dca99..88c4459 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -24,14 +24,16 @@ "ms-vscode.cpptools-extension-pack", "xaver.clang-format", "llvm-vs-code-extensions.vscode-clangd", - "twxs.cmake", "ms-vscode.cmake-tools", + "twxs.cmake", + "ms-vscode.cmake-tools", "mhutchie.git-graph", "donjayamanne.githistory", "webfreak.debug", "jnoortheen.nix-ide", "ms-python.python", "hbenl.vscode-test-explorer", - "ms-azuretools.vscode-docker" + "ms-azuretools.vscode-docker", + "codacy-app.codacy" ] } } diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index b90bb1f..2cb2e96 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -182,8 +182,12 @@ jobs: working-directory: ./build - name: CMake build docs run: cmake --build ./build --target doxygen-docs --config ${{ matrix.build_type }} - - name: CMake build package - run: cmake --build ./build --target package --config ${{ matrix.build_type }} + - name: CMake build packages + run: cpack + working-directory: ./build + - name: CMake build source package + run: cpack --config CPackSourceConfig.cmake + working-directory: ./build - name: Coverage if: matrix.coverage == 'ON' run: | diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index 5589ec8..53c6ee2 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -74,10 +74,11 @@ jobs: - name: CTest run: ctest -C Debug working-directory: ./build - - name: CMake build docs and package + - name: CMake build packages run: | - cmake --build ./build --target doxygen-docs --config ${{ matrix.build_type }} - cmake --build ./build --target package --config ${{ matrix.build_type }} + cpack + cpack --config CPackSourceConfig.cmake + working-directory: ./build - uses: actions/upload-artifact@v4 with: name: ${{ matrix.name }}-artifacts diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index 9549b05..d5b67d3 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -43,7 +43,10 @@ jobs: - name: CMake build run: cmake --build ./build --config Release - name: CMake build packages - run: cmake --build ./build --target package --config Release + run: | + cpack --config ${{ matrix.build_type }} + cpack --config CPackSourceConfig.cmake + working-directory: ./build - uses: actions/upload-artifact@v4 with: name: ${{ matrix.name }}-artifacts @@ -89,8 +92,11 @@ jobs: cmake -S . --preset=visual-studio-2022-release - name: CMake build run: cmake --build ./build --config Release - - name: CMake build package - run: cmake --build ./build --target package --config Release + - name: CMake build packages + run: | + cpack --config ${{ matrix.build_type }} + cpack --config CPackSourceConfig.cmake + working-directory: ./build - uses: actions/upload-artifact@v4 with: name: ${{ matrix.name }}-artifacts @@ -131,12 +137,14 @@ jobs: cmake -S . -B ./build -G "Ninja" -DCMAKE_BUILD_TYPE=Release - name: CMake build run: cmake --build ./build --config Release - - name: CMake build package - run: cmake --build ./build --target package --config Release + - name: CMake build packages + run: cpack --config ${{ matrix.build_type }} + working-directory: ./build - uses: actions/upload-artifact@v4 with: name: ${{ matrix.name }}-artifacts path: | + ./build/Coronan-*.tar.gz ./build/Coronan-*.pkg ./build/Coronan-*.dmg diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index 3ab5668..b382c65 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -73,8 +73,11 @@ jobs: working-directory: ./build - name: CMake build docs run: cmake --build ./build --target doxygen-docs --config ${{ matrix.build_type }} - - name: CMake build package - run: cmake --build ./build --target package --config ${{ matrix.build_type }} + - name: CMake build packages + run: | + cpack --config ${{ matrix.build_type }} + cpack --config CPackSourceConfig.cmake + working-directory: ./build - uses: actions/upload-artifact@v4 with: name: ${{ matrix.name }}-artifacts diff --git a/.lgtm.yml b/.lgtm.yml deleted file mode 100644 index a45735b..0000000 --- a/.lgtm.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -# for full syntax documentation see: https://lgtm.com/help/lgtm/lgtm.yml-configuration-file -path_classifiers: - test: - - '*/tests/*.cpp' -extraction: - cpp: - prepare: - packages: - - qt5-default - - libqt5charts5-dev - script: - - mkdir ~/.conan - - cat /usr/local/share/ca-certificates/semmle-cache-ca/semmle-cache-ca.crt >> ~/.conan/cacert.pem - - python3 -m pip install --upgrade pip setuptools - - python3 -m pip install conan - - python3 -m pip install cmake - - source ~/.profile - configure: - command: - - mkdir build - - cmake -DQt5Charts_DIR=/usr/lib/x86_64-linux-gnu/cmake/Qt5Charts/Qt5ChartsConfig.cmake -DENABLE_COVERAGE:BOOL=TRUE -S . -B build - index: - build_command: cmake --build ./build -- -j2 diff --git a/cmake/CPackConfig.cmake b/cmake/CPackConfig.cmake index d41c112..367ecf6 100644 --- a/cmake/CPackConfig.cmake +++ b/cmake/CPackConfig.cmake @@ -4,6 +4,20 @@ set(CPACK_PACKAGE_VENDOR "bbv Software Services AG") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Present the current data of Corona (Covid-19) cases for a country.") set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME}) set(CPACK_VERBATIM_VARIABLES YES) +set(CPACK_ARCHIVE_THREADS 0) +set(CPACK_SOURCE_GENERATOR TGZ) +set(CPACK_SOURCE_IGNORE_FILES + \\.git/ + build/ + \\.devcontainer/ + \\.github/ + \\.venv/ + \\.vscode/ + \\.cache/ + appveyor.yml + \\.gitpod.yml + \\.codecov.yml +) # WIX installer needs a licence file with .txt ending configure_file(${PROJECT_SOURCE_DIR}/LICENSE ${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt COPYONLY) @@ -20,6 +34,7 @@ if(WIN32) # replace existing installations that use the same GUID. set(CPACK_WIX_UPGRADE_GUID "e2b63053-6f9d-4bd1-97b6-97ec70b70a7d") set(CPACK_GENERATOR ZIP WIX) + set(CPACK_SOURCE_GENERATOR ZIP) elseif(APPLE) set(CPACK_GENERATOR TGZ productbuild) elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") @@ -84,6 +99,7 @@ cpack_add_component( ) if(BINARYCREATOR_EXECUTABLE) + # Only allow to install qt application cpack_ifw_configure_component(Coronan_Development VIRTUAL) cpack_ifw_configure_component(Coronan_Runtime_GUI ESSENTIAL) cpack_ifw_configure_component(Coronan_Runtime_CLI VIRTUAL)