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:
parent
f81c9bca29
commit
b05c069dfe
|
@ -42,6 +42,8 @@ else
|
|||
INSTALL_PREFIX_ARGS=""
|
||||
fi
|
||||
|
||||
patch -Np1 < "$(dirname "$0")"/patches/snore.patch
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=Release $INSTALL_PREFIX_ARGS \
|
||||
-DBUILD_daemon=OFF \
|
||||
-DBUILD_settings=OFF \
|
||||
|
|
|
@ -33,6 +33,7 @@ RUN dnf --nodocs -y install dnf-plugins-core && \
|
|||
opus-devel \
|
||||
libsodium-devel \
|
||||
libasan \
|
||||
patch \
|
||||
ffmpeg-devel \
|
||||
libexif-devel \
|
||||
qrencode-devel \
|
||||
|
@ -47,8 +48,10 @@ RUN dnf --nodocs -y install dnf-plugins-core && \
|
|||
ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig
|
||||
|
||||
COPY download/common.sh /build/download/common.sh
|
||||
|
||||
COPY download/download_snore.sh /build/download/download_snore.sh
|
||||
COPY build_snore_linux.sh /build/build_snore_linux.sh
|
||||
COPY patches/snore.patch /build/patches/snore.patch
|
||||
RUN mkdir -p /src/snore && \
|
||||
cd /src/snore && \
|
||||
/build/build_snore_linux.sh && \
|
||||
|
|
|
@ -49,6 +49,7 @@ COPY download/common.sh /build/download/common.sh
|
|||
|
||||
COPY download/download_snore.sh /build/download/download_snore.sh
|
||||
COPY build_snore_linux.sh /build/build_snore_linux.sh
|
||||
COPY patches/snore.patch /build/patches/snore.patch
|
||||
RUN mkdir -p /src/snore && \
|
||||
cd /src/snore && \
|
||||
/build/build_snore_linux.sh && \
|
||||
|
|
|
@ -52,6 +52,7 @@ COPY download/common.sh /build/download/common.sh
|
|||
|
||||
COPY download/download_snore.sh /build/download/download_snore.sh
|
||||
COPY build_snore_linux.sh /build/build_snore_linux.sh
|
||||
COPY patches/snore.patch /build/patches/snore.patch
|
||||
RUN mkdir -p /src/snore && \
|
||||
cd /src/snore && \
|
||||
/build/build_snore_linux.sh && \
|
||||
|
|
|
@ -38,6 +38,7 @@ RUN dnf --nodocs -y install dnf-plugins-core && \
|
|||
kf5-sonnet-devel \
|
||||
libXScrnSaver-devel \
|
||||
msgpack-devel \
|
||||
patch \
|
||||
sqlite-devel \
|
||||
sqlcipher-devel && \
|
||||
dnf clean all
|
||||
|
@ -45,8 +46,10 @@ RUN dnf --nodocs -y install dnf-plugins-core && \
|
|||
ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig
|
||||
|
||||
COPY download/common.sh /build/download/common.sh
|
||||
|
||||
COPY download/download_snore.sh /build/download/download_snore.sh
|
||||
COPY build_snore_linux.sh /build/build_snore_linux.sh
|
||||
COPY patches/snore.patch /build/patches/snore.patch
|
||||
RUN mkdir -p /src/snore && \
|
||||
cd /src/snore && \
|
||||
/build/build_snore_linux.sh && \
|
||||
|
|
|
@ -73,6 +73,7 @@ COPY download/common.sh /build/download/common.sh
|
|||
|
||||
COPY download/download_snore.sh /build/download/download_snore.sh
|
||||
COPY build_snore_linux.sh /build/build_snore_linux.sh
|
||||
COPY patches/snore.patch /build/patches/snore.patch
|
||||
RUN mkdir -p /src/snore && \
|
||||
cd /src/snore && \
|
||||
/build/build_snore_linux.sh --system-install && \
|
||||
|
|
26
buildscripts/patches/snore.patch
Normal file
26
buildscripts/patches/snore.patch
Normal 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);
|
Loading…
Reference in New Issue
Block a user