diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c836226..1b23f4b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,10 +5,10 @@ on: pull_request: env: - QT_VERSION: 6.10.0 # Keep in sync with CMakeLists.txt - KF_VERSION: v6.19.0 # Ditto + QT_VERSION: 6.10.1 # Keep in sync with CMakeLists.txt + KF_VERSION: v6.21.0 # Ditto KIRIGAMI_ADDONS_VERSION: v1.10.0 # Ditto x2 - PLASMA_VERSION: v6.5.1 # For Breeze + PLASMA_VERSION: v6.5.4 # For Breeze COMMON_CMAKE_OPTIONS: "-DBUILD_TESTING=OFF -DBUILD_PYTHON_BINDINGS=OFF" jobs: @@ -77,6 +77,10 @@ jobs: gettext \ libsecret-1-dev + - name: Setup Python dependencies + run: | + pip install lxml + - name: Cache Prefix id: cache-prefix-restore uses: actions/cache/restore@v4 @@ -172,7 +176,6 @@ jobs: - name: Build KGuiAddons if: steps.cache-prefix-restore.outputs.cache-hit != 'true' - continue-on-error: true run: | git clone --depth 1 --branch ${{ env.KF_VERSION }} https://invent.kde.org/frameworks/kguiaddons.git cmake -B ${{ steps.strings.outputs.build-output-dir }}-kguiaddons -DCMAKE_PREFIX_PATH=${{ steps.strings.outputs.prefix-dir }} -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -S kguiaddons -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DWITH_WAYLAND=OFF -DWITH_X11=OFF ${{ env.COMMON_CMAKE_OPTIONS }} @@ -180,24 +183,33 @@ jobs: - name: Build KGlobalAccel if: (runner.os == 'Linux') && (steps.cache-prefix-restore.outputs.cache-hit != 'true') - continue-on-error: true run: | git clone --depth 1 --branch ${{ env.KF_VERSION }} https://invent.kde.org/frameworks/kglobalaccel.git cmake -B ${{ steps.strings.outputs.build-output-dir }}-kglobalaccel -DCMAKE_PREFIX_PATH=${{ steps.strings.outputs.prefix-dir }} -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -S kglobalaccel -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} ${{ env.COMMON_CMAKE_OPTIONS }} cmake --build ${{ steps.strings.outputs.build-output-dir }}-kglobalaccel --config ${{ matrix.build_type }} --target install - - name: Build Breeze Icons + - name: Clone Breeze Icons if: steps.cache-prefix-restore.outputs.cache-hit != 'true' - continue-on-error: true run: | git clone --depth 1 --branch ${{ env.KF_VERSION }} https://invent.kde.org/frameworks/breeze-icons.git - cmake -B ${{ steps.strings.outputs.build-output-dir }}-breeze-icons -DCMAKE_PREFIX_PATH=${{ steps.strings.outputs.prefix-dir }} -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -S breeze-icons -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DICONS_LIBRARY=ON -DSKIP_INSTALL_ICONS=ON ${{ env.COMMON_CMAKE_OPTIONS }} - cmake --build ${{ steps.strings.outputs.build-output-dir }}-breeze-icons --config ${{ matrix.build_type }} --target install + + # Don't exit on XML errors (which happen for some reason) + - name: Fix Breeze Icons + uses: richardrigutins/replace-in-files@v2 + if: steps.cache-prefix-restore.outputs.cache-hit != 'true' + with: + files: 'breeze-icons/tools/qrcAlias.cpp' + search-text: 'qFatal' + replacement-text: 'qWarning' + + - name: Build Breeze Icons + if: steps.cache-prefix-restore.outputs.cache-hit != 'true' + run: | + cmake -B ${{ steps.strings.outputs.build-output-dir }}-breeze-icons -DCMAKE_PREFIX_PATH=${{ steps.strings.outputs.prefix-dir }} -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -S breeze-icons -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DSKIP_INSTALL_ICONS=ON ${{ env.COMMON_CMAKE_OPTIONS }} cmake --build ${{ steps.strings.outputs.build-output-dir }}-breeze-icons --config ${{ matrix.build_type }} --target install - name: Build KWidgetsAddons if: steps.cache-prefix-restore.outputs.cache-hit != 'true' - continue-on-error: true run: | git clone --depth 1 --branch ${{ env.KF_VERSION }} https://invent.kde.org/frameworks/kwidgetsaddons.git cmake -B ${{ steps.strings.outputs.build-output-dir }}-kwidgetsaddons -DCMAKE_PREFIX_PATH=${{ steps.strings.outputs.prefix-dir }} -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -S kwidgetsaddons -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} ${{ env.COMMON_CMAKE_OPTIONS }} @@ -205,7 +217,6 @@ jobs: - name: Build KColorScheme if: steps.cache-prefix-restore.outputs.cache-hit != 'true' - continue-on-error: true run: | git clone --depth 1 --branch ${{ env.KF_VERSION }} https://invent.kde.org/frameworks/kcolorscheme.git cmake -B ${{ steps.strings.outputs.build-output-dir }}-kcolorscheme -DCMAKE_PREFIX_PATH=${{ steps.strings.outputs.prefix-dir }} -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -S kcolorscheme -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} ${{ env.COMMON_CMAKE_OPTIONS }} @@ -213,7 +224,6 @@ jobs: - name: Build KIconThemes if: steps.cache-prefix-restore.outputs.cache-hit != 'true' - continue-on-error: true run: | git clone --depth 1 --branch ${{ env.KF_VERSION }} https://invent.kde.org/frameworks/kiconthemes.git cmake -B ${{ steps.strings.outputs.build-output-dir }}-kiconthemes -DCMAKE_PREFIX_PATH=${{ steps.strings.outputs.prefix-dir }} -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -S kiconthemes -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} ${{ env.COMMON_CMAKE_OPTIONS }} @@ -221,7 +231,6 @@ jobs: - name: Build KCrash if: steps.cache-prefix-restore.outputs.cache-hit != 'true' - continue-on-error: true run: | git clone --depth 1 --branch ${{ env.KF_VERSION }} https://invent.kde.org/frameworks/kcrash.git cmake -B ${{ steps.strings.outputs.build-output-dir }}-kcrash -DCMAKE_PREFIX_PATH=${{ steps.strings.outputs.prefix-dir }} -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -S kcrash -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} ${{ env.COMMON_CMAKE_OPTIONS }} diff --git a/CMakeLists.txt b/CMakeLists.txt index 52d6a28..7621bfe 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,7 +48,7 @@ if (LINUX) find_package(Qt6 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS DBus) endif () -find_package(KF6 ${KF_MIN_VERSION} REQUIRED COMPONENTS Kirigami I18n Config CoreAddons Archive) +find_package(KF6 ${KF_MIN_VERSION} REQUIRED COMPONENTS Kirigami I18n Config CoreAddons Archive IconThemes) find_package(KF6KirigamiAddons 1.10.0 REQUIRED) find_package(QCoro6 REQUIRED COMPONENTS Core Network Qml) qcoro_enable_coroutines() diff --git a/launcher/CMakeLists.txt b/launcher/CMakeLists.txt index 2415284..bfff040 100644 --- a/launcher/CMakeLists.txt +++ b/launcher/CMakeLists.txt @@ -165,6 +165,7 @@ target_link_libraries(astra PRIVATE Qt6::Widgets Qt6::QuickControls2 KF6::Kirigami + KF6::IconThemes KirigamiApp) if (BUILD_WEBVIEW) diff --git a/launcher/src/main.cpp b/launcher/src/main.cpp index 8586fcd..e5c0890 100755 --- a/launcher/src/main.cpp +++ b/launcher/src/main.cpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-or-later #include +#include #include #include #include // NOTE: do not remove this, if your IDE suggests to do so @@ -30,6 +31,8 @@ int main(int argc, char *argv[]) QtWebView::initialize(); #endif + KIconTheme::initTheme(); // TODO: KirigamiApp doesn't call this before app construction so it doesn't work on Windows + KirigamiApp::App app(argc, argv); KirigamiApp kapp;