1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-05-18 07:07:45 +00:00

Build and include Breeze Icons on Windows

This commit is contained in:
Joshua Goins 2024-04-26 15:46:08 -04:00
parent 3e71bade48
commit b67927f5c4
5 changed files with 34 additions and 1 deletions

View file

@ -158,6 +158,13 @@ jobs:
cmake -B ${{ steps.strings.outputs.build-output-dir }}-kirigami-addons -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 kirigami-addons -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF
cmake --build ${{ steps.strings.outputs.build-output-dir }}-kirigami-addons --config ${{ matrix.build_type }} --target install
- name: Build Breeze Icons
if: (runner.os == 'Windows') && (steps.cache-prefix-restore.outputs.cache-hit != 'true')
run: |
git clone 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
cmake --build ${{ steps.strings.outputs.build-output-dir }}-breeze-icons --config ${{ matrix.build_type }} --target install
- name: Build Corrosion
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
run: |

View file

@ -59,6 +59,11 @@ endif ()
find_package(Qt6Keychain REQUIRED)
# TODO: we should really do this on all platforms anyway
if (WIN32)
find_package(KF6BreezeIcons REQUIRED)
endif ()
add_subdirectory(external)
add_subdirectory(launcher)

View file

@ -154,6 +154,13 @@ if (BUILD_WEBVIEW)
)
target_compile_definitions(astra PRIVATE HAVE_WEBVIEW)
endif ()
if (WIN32)
target_link_libraries(astra PRIVATE
KF6::BreezeIcons
)
endif ()
if (NOT MSVC)
target_compile_options(astra PRIVATE -fexceptions)
endif ()

View file

@ -23,6 +23,10 @@
#include "physis_logger.h"
#include "sapphirelogin.h"
#ifdef Q_OS_WIN
#include <BreezeIcons/BreezeIcons>
#endif
using namespace Qt::StringLiterals;
int main(int argc, char *argv[])
@ -31,6 +35,10 @@ int main(int argc, char *argv[])
QtWebView::initialize();
#endif
#ifdef Q_OS_WIN
BreezeIcons::initIcons();
#endif
if (qEnvironmentVariable("SteamDeck") == QStringLiteral("1")) {
qputenv("QT_SCALE_FACTOR", "1.25");
qputenv("QT_QUICK_CONTROLS_MOBILE", "1");

View file

@ -135,3 +135,9 @@ Clone "unshield" "https://github.com/twogood/unshield.git"
Configure "unshield" "-DBUILD_TESTING=OFF"
cmake --build "$BuildDir-unshield" --config Debug --target install --parallel $NumCores
CheckCompileResult "unshield"
# Build breeze icons
Clone "breeze-icons" "https://invent.kde.org/frameworks/breeze-icons.git"
Configure "breeze-icons" "-DICONS_LIBRARY=ON -DSKIP_INSTALL_ICONS=ON"
cmake --build "$BuildDir-breeze-icons" --config Debug --target install --parallel $NumCores
CheckCompileResult "breeze-icons"