diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2f0ec910882abb489dfcdf291aabf9818a5623e0..5a917b03b0677e788bade6a6df68d7c7ed8dbad4 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: diff --git a/appveyor.yml b/appveyor.yml index d54fffba6f2a4f83c92ea24b88754684bdb63caa..51bf949d8300d4b9cae9e347bd59f1c7e0343fa8 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 diff --git a/io.github.NhekoReborn.Nheko.yaml b/io.github.NhekoReborn.Nheko.yaml index af010422d66e8ac535e28449f8a9303cfaffebfe..5f2c6ddc9beab5244e1eaca4f631404a20a6d01c 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 diff --git a/src/JdenticonProvider.cpp b/src/JdenticonProvider.cpp index e282828637a5d6f981ac4d988492d1d59e937151..e421c932c9101d02d4ef63d67edd26fcaed2b3f3 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<JdenticonInterface *>(plugin); - if (interface) { - nhlog::ui()->info("Loaded jdenticon plugin."); - break; - } - } + QPluginLoader pluginLoader("qtjdenticon"); + QObject *plugin = pluginLoader.instance(); + if (plugin) { + interface = qobject_cast<JdenticonInterface *>(plugin); + if (interface) { + nhlog::ui()->info("Loaded jdenticon plugin."); } - } else { + } + + if (!interface) { nhlog::ui()->info("jdenticon plugin not found."); interfaceExists = false; }