almost working

This commit is contained in:
Malte Jürgens 2022-07-16 22:03:33 +02:00
parent 2741e1afaa
commit ce94b44997
No known key found for this signature in database
GPG Key ID: D29FBD5F93C0CFC3
4 changed files with 23 additions and 13 deletions

View File

@ -1,4 +1,4 @@
FROM ubuntu:jammy FROM debian:11
ADD ./prepare-container.sh /tmp/prepare-container.sh ADD ./prepare-container.sh /tmp/prepare-container.sh
RUN /tmp/prepare-container.sh RUN /tmp/prepare-container.sh
WORKDIR /work WORKDIR /work

View File

@ -16,10 +16,16 @@ fi
tmpdir="$(mktemp -d)" tmpdir="$(mktemp -d)"
builddir="$tmpdir/build" builddir="$tmpdir/build"
appdir="$tmpdir/AppDir" appdir="$tmpdir/AppDir"
export CMAKE_GENERATOR="Ninja"
cmake -B "$builddir" -S "$PWD" cmake -B "$builddir" -S "$PWD"
cmake --build "$builddir" --config Release cmake --build "$builddir" --config Release
DESTDIR="$appdir" cmake --install "$builddir" --prefix "/usr" DESTDIR="$appdir" cmake --install "$builddir" --prefix "/usr"
mkdir -p "$appdir/usr/share/doc/libc6"
touch "$appdir/usr/share/doc/libc6/copyright"
VERSION="$(cat version)" linuxdeployqt "$appdir/usr/share/applications/discord-screenaudio.desktop" -appimage -extra-plugins=iconengines,platformthemes/libqgtk3.so -unsupported-allow-new-glibc 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

View File

@ -16,16 +16,20 @@ fi
echo "-> Installing dependencies with apt..." echo "-> Installing dependencies with apt..."
export DEBIAN_FRONTEND=noninteractive export DEBIAN_FRONTEND=noninteractive
apt-get update apt-get update
apt-get install -y curl build-essential qtbase5-dev qtwebengine5-dev qt5-qmake cmake pkg-config git libpipewire-0.3-dev file apt-get install -y curl build-essential qtbase5-dev qtwebengine5-dev qt5-qmake cmake ninja-build pkg-config git libpipewire-0.3-dev file
echo "-> Installing linuxdeployqt..." echo "-> Installing linuxdeploy..."
tmpdir="$(mktemp -d)" tmpdir="$(mktemp -d)"
curl -Lo "$tmpdir/linuxdeployqt.AppImage" "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" install_appimage() {
chmod +x "$tmpdir/linuxdeployqt.AppImage" curl -Lo "$tmpdir/$1.AppImage" "$2"
sed '0,/AI\x02/{s|AI\x02|\x00\x00\x00|}' -i -i "$tmpdir/linuxdeployqt.AppImage" chmod +x "$tmpdir/$1.AppImage"
(cd "$tmpdir" && ./linuxdeployqt.AppImage --appimage-extract) sed '0,/AI\x02/{s|AI\x02|\x00\x00\x00|}' -i -i "$tmpdir/$1.AppImage"
mv -v "$tmpdir/squashfs-root" "/opt/linuxdeployqt" (cd "$tmpdir" && ./$1.AppImage --appimage-extract)
ln -sv "/opt/linuxdeployqt/AppRun" "/usr/local/bin/linuxdeployqt" mv -v "$tmpdir/squashfs-root" "/opt/$1"
ln -sv "/opt/$1/AppRun" "/usr/local/bin/$1"
}
install_appimage "linuxdeploy" "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
install_appimage "linuxdeploy-plugin-qt" "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage"
echo "-> Cleaning up..." echo "-> Cleaning up..."
rm -rf "$tmpdir" rm -rf "$tmpdir"

View File

@ -24,7 +24,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) {
void MainWindow::setupWebView() { void MainWindow::setupWebView() {
m_webView = new QWebEngineView(this); m_webView = new QWebEngineView(this);
auto page = new DiscordPage; auto page = new DiscordPage(this);
m_webView->setPage(page); m_webView->setPage(page);
setCentralWidget(m_webView); setCentralWidget(m_webView);
} }