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
RUN /tmp/prepare-container.sh
WORKDIR /work

View File

@ -16,10 +16,16 @@ fi
tmpdir="$(mktemp -d)"
builddir="$tmpdir/build"
appdir="$tmpdir/AppDir"
export CMAKE_GENERATOR="Ninja"
cmake -B "$builddir" -S "$PWD"
cmake --build "$builddir" --config Release
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..."
export DEBIAN_FRONTEND=noninteractive
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)"
curl -Lo "$tmpdir/linuxdeployqt.AppImage" "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
chmod +x "$tmpdir/linuxdeployqt.AppImage"
sed '0,/AI\x02/{s|AI\x02|\x00\x00\x00|}' -i -i "$tmpdir/linuxdeployqt.AppImage"
(cd "$tmpdir" && ./linuxdeployqt.AppImage --appimage-extract)
mv -v "$tmpdir/squashfs-root" "/opt/linuxdeployqt"
ln -sv "/opt/linuxdeployqt/AppRun" "/usr/local/bin/linuxdeployqt"
install_appimage() {
curl -Lo "$tmpdir/$1.AppImage" "$2"
chmod +x "$tmpdir/$1.AppImage"
sed '0,/AI\x02/{s|AI\x02|\x00\x00\x00|}' -i -i "$tmpdir/$1.AppImage"
(cd "$tmpdir" && ./$1.AppImage --appimage-extract)
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..."
rm -rf "$tmpdir"

View File

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