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:
parent
3e71bade48
commit
b67927f5c4
5 changed files with 34 additions and 1 deletions
7
.github/workflows/main.yml
vendored
7
.github/workflows/main.yml
vendored
|
@ -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 -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
|
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
|
- name: Build Corrosion
|
||||||
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -59,6 +59,11 @@ endif ()
|
||||||
|
|
||||||
find_package(Qt6Keychain REQUIRED)
|
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(external)
|
||||||
add_subdirectory(launcher)
|
add_subdirectory(launcher)
|
||||||
|
|
||||||
|
|
|
@ -154,6 +154,13 @@ if (BUILD_WEBVIEW)
|
||||||
)
|
)
|
||||||
target_compile_definitions(astra PRIVATE HAVE_WEBVIEW)
|
target_compile_definitions(astra PRIVATE HAVE_WEBVIEW)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
target_link_libraries(astra PRIVATE
|
||||||
|
KF6::BreezeIcons
|
||||||
|
)
|
||||||
|
endif ()
|
||||||
|
|
||||||
if (NOT MSVC)
|
if (NOT MSVC)
|
||||||
target_compile_options(astra PRIVATE -fexceptions)
|
target_compile_options(astra PRIVATE -fexceptions)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
|
@ -23,6 +23,10 @@
|
||||||
#include "physis_logger.h"
|
#include "physis_logger.h"
|
||||||
#include "sapphirelogin.h"
|
#include "sapphirelogin.h"
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
#include <BreezeIcons/BreezeIcons>
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace Qt::StringLiterals;
|
using namespace Qt::StringLiterals;
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
|
@ -31,6 +35,10 @@ int main(int argc, char *argv[])
|
||||||
QtWebView::initialize();
|
QtWebView::initialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
BreezeIcons::initIcons();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (qEnvironmentVariable("SteamDeck") == QStringLiteral("1")) {
|
if (qEnvironmentVariable("SteamDeck") == QStringLiteral("1")) {
|
||||||
qputenv("QT_SCALE_FACTOR", "1.25");
|
qputenv("QT_SCALE_FACTOR", "1.25");
|
||||||
qputenv("QT_QUICK_CONTROLS_MOBILE", "1");
|
qputenv("QT_QUICK_CONTROLS_MOBILE", "1");
|
||||||
|
|
|
@ -134,4 +134,10 @@ CheckCompileResult "qtkeychain"
|
||||||
Clone "unshield" "https://github.com/twogood/unshield.git"
|
Clone "unshield" "https://github.com/twogood/unshield.git"
|
||||||
Configure "unshield" "-DBUILD_TESTING=OFF"
|
Configure "unshield" "-DBUILD_TESTING=OFF"
|
||||||
cmake --build "$BuildDir-unshield" --config Debug --target install --parallel $NumCores
|
cmake --build "$BuildDir-unshield" --config Debug --target install --parallel $NumCores
|
||||||
CheckCompileResult "unshield"
|
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"
|
Loading…
Add table
Reference in a new issue