From 715e2244b4ba27521496e4714aa3d97dad903864 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Mon, 15 Nov 2021 01:23:15 +0100 Subject: [PATCH 1/4] Cleanup qt-jdenticon loading --- src/JdenticonProvider.cpp | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/JdenticonProvider.cpp b/src/JdenticonProvider.cpp index e2828286..e421c932 100644 --- a/src/JdenticonProvider.cpp +++ b/src/JdenticonProvider.cpp @@ -88,20 +88,16 @@ getJdenticonInterface() if (interface == nullptr && interfaceExists) { QDir pluginsDir(qApp->applicationDirPath()); - bool plugins = pluginsDir.cd("plugins"); - if (plugins) { - for (const QString &fileName : pluginsDir.entryList(QDir::Files)) { - QPluginLoader pluginLoader(pluginsDir.absoluteFilePath(fileName)); - QObject *plugin = pluginLoader.instance(); - if (plugin) { - interface = qobject_cast(plugin); - if (interface) { - nhlog::ui()->info("Loaded jdenticon plugin."); - break; - } - } + QPluginLoader pluginLoader("qtjdenticon"); + QObject *plugin = pluginLoader.instance(); + if (plugin) { + interface = qobject_cast(plugin); + if (interface) { + nhlog::ui()->info("Loaded jdenticon plugin."); } - } else { + } + + if (!interface) { nhlog::ui()->info("jdenticon plugin not found."); interfaceExists = false; } From 7bb413c5c1c972b31c6b5fda661d310faf439612 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Mon, 15 Nov 2021 01:23:29 +0100 Subject: [PATCH 2/4] Add qt-jdention to flatpak --- io.github.NhekoReborn.Nheko.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/io.github.NhekoReborn.Nheko.yaml b/io.github.NhekoReborn.Nheko.yaml index af010422..5f2c6ddc 100644 --- a/io.github.NhekoReborn.Nheko.yaml +++ b/io.github.NhekoReborn.Nheko.yaml @@ -147,6 +147,16 @@ modules: tag: 1.18.3 type: git url: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad.git + - buildsystem: qmake + name: qt-jdenticon + no-make-install: true + build-commands: + - mkdir -p /app/bin/ + - cp libqtjdenticon.so /app/bin/ + sources: + - commit: 77eb0d62441e03bbbfc2b1d2057c4045ac87fb85 + type: git + url: https://github.com/Nheko-Reborn/qt-jdenticon.git - buildsystem: meson config-opts: - -Ddefault_library=static From f16313ad32aba158d66daed09ebe568d8c6f369d Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Mon, 15 Nov 2021 02:07:05 +0100 Subject: [PATCH 3/4] Try to add jdenticon plugin to macos build --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2f0ec910..5a917b03 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -69,6 +69,7 @@ build-macos: -DUSE_BUNDLED_BOOST=ON -DCI_BUILD=ON - cmake --build build + - (cd build && git clone https://github.com/Nheko-Reborn/qt-jdenticon.git && cd qt-jdenticon && qmake && make -j 4 && cp libqtjdenticon.dylib ../nheko.app/Contents/MacOS) after_script: - mv ../.hunter .hunter artifacts: From 97f8c5b9f3476d98e5f9c0878f34c960bdec4146 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Mon, 15 Nov 2021 02:55:37 +0100 Subject: [PATCH 4/4] Try to add jdenticon plugin to Windows build --- appveyor.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index d54fffba..51bf949d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -54,12 +54,19 @@ build_script: - cmake --build build --config Release + - git clone https://github.com/Nheko-Reborn/qt-jdenticon.git + - cd qt-jdenticon + - qmake + - nmake + - cd .. + after_build: # Variables - set BUILD=%APPVEYOR_BUILD_FOLDER% - echo %BUILD% - mkdir NhekoRelease - copy build\Release\nheko.exe NhekoRelease\nheko.exe + - copy qt-jdenticon\release\qtjdenticon0.dll NhekoRelease\qtjdenticon0.dll - copy build\_deps\cmark-build\src\Release\cmark.dll NhekoRelease\cmark.dll - windeployqt --qmldir resources\qml\ NhekoRelease\nheko.exe