Page MenuHomePhorge

D154.1732343865.diff
No OneTemporary

Size
4 KB
Referenced Files
None
Subscribers
None

D154.1732343865.diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,6 +24,11 @@
set(QT_MIN_VERSION 6.5.0)
set(KF_MIN_VERSION 6.0.0)
+option(kazv_LINK_BREEZE_ICONS "Link to Breeze icons library" OFF)
+set(kazv_LINK_BREEZE_ICONS_MACRO 0)
+if(kazv_LINK_BREEZE_ICONS)
+ set(kazv_LINK_BREEZE_ICONS_MACRO 1)
+endif()
find_package(ECM ${KF_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
@@ -50,7 +55,12 @@
Multimedia Test Network QuickTest
)
qt6_policy(SET QTP0001 NEW)
-find_package(KF${KF_MAJOR_VERSION} ${KF_MIN_VERSION} REQUIRED COMPONENTS Kirigami Config KIO Notifications CoreAddons)
+set(kazv_KF_EXTRA_MODULES)
+if(kazv_LINK_BREEZE_ICONS)
+ list(APPEND kazv_KF_EXTRA_MODULES BreezeIcons)
+endif()
+
+find_package(KF${KF_MAJOR_VERSION} ${KF_MIN_VERSION} REQUIRED COMPONENTS Kirigami Config KIO Notifications CoreAddons ${kazv_KF_EXTRA_MODULES})
find_package(KF6KirigamiAddons)
find_package(Threads REQUIRED)
diff --git a/packaging/GNU-Linux/appimage/build.sh b/packaging/GNU-Linux/appimage/build.sh
--- a/packaging/GNU-Linux/appimage/build.sh
+++ b/packaging/GNU-Linux/appimage/build.sh
@@ -45,6 +45,9 @@
qml6-module-org-kde-notification
kf6-kirigami-addons-dev
kf6-kcoreaddons-dev
+ qml6-module-org-kde-qqc2desktopstyle
+ kf6-qqc2-desktop-style-dev
+ kf6-breeze-icon-theme-dev
cmark
)
export QMAKE=qmake6
@@ -73,7 +76,7 @@
mkdir build && cd build && \
cmake .. -DCMAKE_INSTALL_PREFIX="$KAZV_INSTALL_DIR" \
- -DCMAKE_PREFIX_PATH="$LIBKAZV_INSTALL_DIR;$DEPS_INSTALL_DIR" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -Dkazv_KF_QT_MAJOR_VERSION=$KF_VER && \
+ -DCMAKE_PREFIX_PATH="$LIBKAZV_INSTALL_DIR;$DEPS_INSTALL_DIR" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -Dkazv_KF_QT_MAJOR_VERSION=$KF_VER -Dkazv_LINK_BREEZE_ICONS=ON && \
make -j$JOBS && \
make -j$JOBS DESTDIR=AppDir install && \
dbus-launch --exit-with-session -- bash "$thisDir"/test.sh
@@ -92,13 +95,17 @@
# Enable the appimage to use Plasma themes, linuxdeploy-plugin-qt will only copy the gtk3 plugin -((
mkdir -pv AppDir/usr/plugins/platformthemes/
-cp /usr/lib/x86_64-linux-gnu/qt5/plugins/platformthemes/KDEPlasmaPlatformTheme.so AppDir/usr/plugins/platformthemes/ || true
cp /usr/lib/x86_64-linux-gnu/qt6/plugins/platformthemes/KDEPlasmaPlatformTheme6.so AppDir/usr/plugins/platformthemes/ || true
+mkdir -pv AppDir/usr/qml/org/kde
+cp -rv /usr/lib/x86_64-linux-gnu/qt6/qml/org/kde/desktop AppDir/usr/qml/org/kde
+cp -rv /usr/lib/x86_64-linux-gnu/qt6/qml/org/kde/qqc2desktopstyle AppDir/usr/qml/org/kde
+mkdir -pv AppDir/usr/plugins/kf6/kirigami/platform
+cp -v /usr/lib/x86_64-linux-gnu/qt6/plugins/kf6/kirigami/platform/org.kde.desktop.so AppDir/usr/plugins/kf6/kirigami/platform/
# Workaround "cannot mix incompatible qt versions" problem
mkdir -pv AppDir/apprun-hooks/
-cp -v "$thisDir"/hooks/patch-ld-library-path.sh AppDir/apprun-hooks/
+cp -v "$thisDir"/hooks/*.sh AppDir/apprun-hooks/
./squashfs-root/AppRun --appdir AppDir -i ../icons/kazvlogo-256.png --plugin qt --output appimage # -l /lib/x86_64-linux-gnu/libstdc++.so.6
diff --git a/packaging/GNU-Linux/appimage/hooks/style-fixes.sh b/packaging/GNU-Linux/appimage/hooks/style-fixes.sh
new file mode 100644
--- /dev/null
+++ b/packaging/GNU-Linux/appimage/hooks/style-fixes.sh
@@ -0,0 +1,5 @@
+# Fix styles in AppImages
+
+if [ -z "$QT_QUICK_CONTROLS_STYLE" ]; then
+ export QT_QUICK_CONTROLS_STYLE=org.kde.desktop
+fi
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -275,6 +275,10 @@
kazvqmlqmlmoduleplugin
kazvprivlib
)
+if(kazv_LINK_BREEZE_ICONS)
+ target_link_libraries(kazv PRIVATE KF${KF_MAJOR_VERSION}::BreezeIcons)
+endif()
+
set(kazv_INSTALL_ARGS ${KF_INSTALL_TARGETS_DEFAULT_ARGS})
if(NOT kazv_INSTALL_ARGS)
set(kazv_INSTALL_ARGS ${KF${KF_MAJOR_VERSION}_INSTALL_TARGETS_DEFAULT_ARGS})
diff --git a/src/kazv-defs.hpp.in b/src/kazv-defs.hpp.in
--- a/src/kazv-defs.hpp.in
+++ b/src/kazv-defs.hpp.in
@@ -10,6 +10,7 @@
#include <lager/config.hpp>
#define KAZV_KF_QT_MAJOR_VERSION ${kazv_KF_QT_MAJOR_VERSION}
+#define KAZV_LINK_BREEZE_ICONS ${kazv_LINK_BREEZE_ICONS_MACRO}
#if KAZV_KF_QT_MAJOR_VERSION == 5
#define Q_MOC_INCLUDE(...)
diff --git a/src/main.cpp b/src/main.cpp
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -17,10 +17,14 @@
#include <QCommandLineParser>
#include <QQuickStyle>
#include <KAboutData>
+#if KAZV_LINK_BREEZE_ICONS
+#include <BreezeIcons>
+#endif
#include "meta-types.hpp"
#include "kazv-platform.hpp"
#include "kazv-path-config.hpp"
#include "kazv-version.hpp"
+#include "kazv-log.hpp"
using namespace Qt::Literals::StringLiterals;
@@ -50,6 +54,11 @@
#endif
QQmlApplicationEngine engine;
+
+#if KAZV_LINK_BREEZE_ICONS
+ BreezeIcons::initIcons();
+#endif
+
QString iconThemeToSet;
#if KAZV_IS_WINDOWS
iconThemeToSet = QStringLiteral("breeze");

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 22, 10:37 PM (1 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39175
Default Alt Text
D154.1732343865.diff (4 KB)

Event Timeline