From 8597416bb54cf74850d05b7f4541c3caec93d494 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malte=20J=C3=BCrgens?= Date: Sat, 16 Jul 2022 22:28:16 +0200 Subject: [PATCH] still not working --- scripts/build-appimage.sh | 5 +++-- src/discordpage.cpp | 11 +++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/build-appimage.sh b/scripts/build-appimage.sh index 62fb625..e68002d 100755 --- a/scripts/build-appimage.sh +++ b/scripts/build-appimage.sh @@ -20,12 +20,13 @@ export CMAKE_GENERATOR="Ninja" cmake -B "$builddir" -S "$PWD" cmake --build "$builddir" --config Release DESTDIR="$appdir" cmake --install "$builddir" --prefix "/usr" +# Include libnss related files +mkdir -p "$appdir/AppDir/usr/lib/" +cp -rv "/usr/lib/x86_64-linux-gnu/nss" "$appdir/usr/lib/" VERSION="$(cat version)" linuxdeploy \ --appdir "$appdir" \ --icon-file "assets/discord.png" \ --plugin qt \ - --library "/usr/lib/x86_64-linux-gnu/nss/libsoftokn3.so" \ - --library "/usr/lib/x86_64-linux-gnu/nss/libnssckbi.so" \ --exclude-library "libpipewire-0.3.so.0" \ --output appimage diff --git a/src/discordpage.cpp b/src/discordpage.cpp index 1946de3..3e89c49 100644 --- a/src/discordpage.cpp +++ b/src/discordpage.cpp @@ -36,7 +36,7 @@ DiscordPage::DiscordPage(QWidget *parent) : QWebEnginePage(parent) { } void DiscordPage::injectScript(QString source) { - qDebug() << "[main ] Injecting " << source; + qDebug() << "[main ] Injecting" << source; QFile userscript(source); @@ -68,11 +68,10 @@ void DiscordPage::featurePermissionRequested(const QUrl &securityOrigin, bool DiscordPage::acceptNavigationRequest(const QUrl &url, QWebEnginePage::NavigationType type, bool isMainFrame) { - qDebug() << url; - if (type == QWebEnginePage::NavigationTypeLinkClicked) { - QDesktopServices::openUrl(url); - return false; - } + // if (type == QWebEnginePage::NavigationTypeLinkClicked) { + // QDesktopServices::openUrl(url); + // return false; + // } return true; };