1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(appimage): Patch snore to enable notifications in AppImage

Patch for other builds as well since the patch is harmless and it simplifies
the build script.

Fix #6411
This commit is contained in:
Anthony Bilinski 2022-02-10 14:22:26 -08:00
parent f81c9bca29
commit b05c069dfe
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
7 changed files with 37 additions and 0 deletions

View File

@ -42,6 +42,8 @@ else
INSTALL_PREFIX_ARGS="" INSTALL_PREFIX_ARGS=""
fi fi
patch -Np1 < "$(dirname "$0")"/patches/snore.patch
cmake -DCMAKE_BUILD_TYPE=Release $INSTALL_PREFIX_ARGS \ cmake -DCMAKE_BUILD_TYPE=Release $INSTALL_PREFIX_ARGS \
-DBUILD_daemon=OFF \ -DBUILD_daemon=OFF \
-DBUILD_settings=OFF \ -DBUILD_settings=OFF \

View File

@ -33,6 +33,7 @@ RUN dnf --nodocs -y install dnf-plugins-core && \
opus-devel \ opus-devel \
libsodium-devel \ libsodium-devel \
libasan \ libasan \
patch \
ffmpeg-devel \ ffmpeg-devel \
libexif-devel \ libexif-devel \
qrencode-devel \ qrencode-devel \
@ -47,8 +48,10 @@ RUN dnf --nodocs -y install dnf-plugins-core && \
ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig
COPY download/common.sh /build/download/common.sh COPY download/common.sh /build/download/common.sh
COPY download/download_snore.sh /build/download/download_snore.sh COPY download/download_snore.sh /build/download/download_snore.sh
COPY build_snore_linux.sh /build/build_snore_linux.sh COPY build_snore_linux.sh /build/build_snore_linux.sh
COPY patches/snore.patch /build/patches/snore.patch
RUN mkdir -p /src/snore && \ RUN mkdir -p /src/snore && \
cd /src/snore && \ cd /src/snore && \
/build/build_snore_linux.sh && \ /build/build_snore_linux.sh && \

View File

@ -49,6 +49,7 @@ COPY download/common.sh /build/download/common.sh
COPY download/download_snore.sh /build/download/download_snore.sh COPY download/download_snore.sh /build/download/download_snore.sh
COPY build_snore_linux.sh /build/build_snore_linux.sh COPY build_snore_linux.sh /build/build_snore_linux.sh
COPY patches/snore.patch /build/patches/snore.patch
RUN mkdir -p /src/snore && \ RUN mkdir -p /src/snore && \
cd /src/snore && \ cd /src/snore && \
/build/build_snore_linux.sh && \ /build/build_snore_linux.sh && \

View File

@ -52,6 +52,7 @@ COPY download/common.sh /build/download/common.sh
COPY download/download_snore.sh /build/download/download_snore.sh COPY download/download_snore.sh /build/download/download_snore.sh
COPY build_snore_linux.sh /build/build_snore_linux.sh COPY build_snore_linux.sh /build/build_snore_linux.sh
COPY patches/snore.patch /build/patches/snore.patch
RUN mkdir -p /src/snore && \ RUN mkdir -p /src/snore && \
cd /src/snore && \ cd /src/snore && \
/build/build_snore_linux.sh && \ /build/build_snore_linux.sh && \

View File

@ -38,6 +38,7 @@ RUN dnf --nodocs -y install dnf-plugins-core && \
kf5-sonnet-devel \ kf5-sonnet-devel \
libXScrnSaver-devel \ libXScrnSaver-devel \
msgpack-devel \ msgpack-devel \
patch \
sqlite-devel \ sqlite-devel \
sqlcipher-devel && \ sqlcipher-devel && \
dnf clean all dnf clean all
@ -45,8 +46,10 @@ RUN dnf --nodocs -y install dnf-plugins-core && \
ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig
COPY download/common.sh /build/download/common.sh COPY download/common.sh /build/download/common.sh
COPY download/download_snore.sh /build/download/download_snore.sh COPY download/download_snore.sh /build/download/download_snore.sh
COPY build_snore_linux.sh /build/build_snore_linux.sh COPY build_snore_linux.sh /build/build_snore_linux.sh
COPY patches/snore.patch /build/patches/snore.patch
RUN mkdir -p /src/snore && \ RUN mkdir -p /src/snore && \
cd /src/snore && \ cd /src/snore && \
/build/build_snore_linux.sh && \ /build/build_snore_linux.sh && \

View File

@ -73,6 +73,7 @@ COPY download/common.sh /build/download/common.sh
COPY download/download_snore.sh /build/download/download_snore.sh COPY download/download_snore.sh /build/download/download_snore.sh
COPY build_snore_linux.sh /build/build_snore_linux.sh COPY build_snore_linux.sh /build/build_snore_linux.sh
COPY patches/snore.patch /build/patches/snore.patch
RUN mkdir -p /src/snore && \ RUN mkdir -p /src/snore && \
cd /src/snore && \ cd /src/snore && \
/build/build_snore_linux.sh --system-install && \ /build/build_snore_linux.sh --system-install && \

View File

@ -0,0 +1,26 @@
--- src/libsnore/plugins/plugincontainer.cpp 2022-02-10 14:14:10.157272874 -0800
+++ patched/src/libsnore/plugins/plugincontainer.cpp 2022-02-10 14:14:53.371062246 -0800
@@ -27,6 +27,7 @@
#include <QDir>
#include <QGuiApplication>
#include <QTime>
+#include <QLibraryInfo>
using namespace Snore;
@@ -134,6 +135,7 @@
static QDir path;
if (!isLoaded) {
isLoaded = true;
+ QString pluginDir = QLibraryInfo::location(QLibraryInfo::PluginsPath);
QString appDir = qApp->applicationDirPath();
QStringList list;
#ifdef Q_OS_MAC
@@ -152,6 +154,7 @@
<< appDir + suffix
<< appDir + QStringLiteral("/../lib/plugins") + suffix
<< appDir + QStringLiteral("/../lib64/plugins") + suffix
+ << pluginDir + suffix
<< QStringLiteral(LIBSNORE_PLUGIN_PATH);
foreach(const QString & p, list) {
path = QDir(p);