From 525b319a9456276ef2a1bf9d071c852edf0f41e0 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Fri, 25 Dec 2020 19:20:15 +0100 Subject: [PATCH 1/7] lint --- src/Cache.cpp | 33 ++++++++++++++++++--------------- src/MainWindow.cpp | 4 ++-- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/src/Cache.cpp b/src/Cache.cpp index 5d11a178..7efae881 100644 --- a/src/Cache.cpp +++ b/src/Cache.cpp @@ -173,7 +173,8 @@ Cache::setup() cacheDirectory_ = QString("%1/%2%3") .arg(QStandardPaths::writableLocation(QStandardPaths::CacheLocation)) - .arg(QString::fromUtf8(localUserId_.toUtf8().toHex())).arg(QString::fromUtf8(settings.profile().toUtf8().toHex())); + .arg(QString::fromUtf8(localUserId_.toUtf8().toHex())) + .arg(QString::fromUtf8(settings.profile().toUtf8().toHex())); bool isInitial = !QFile::exists(cacheDirectory_); @@ -186,7 +187,9 @@ Cache::setup() if (!QDir().mkpath(cacheDirectory_)) { throw std::runtime_error( - ("Unable to create state directory:" + cacheDirectory_).toStdString().c_str()); + ("Unable to create state directory:" + cacheDirectory_) + .toStdString() + .c_str()); } } @@ -575,14 +578,14 @@ Cache::restoreOlmAccount() void Cache::storeSecret(const std::string &name, const std::string &secret) { - UserSettings settings; + UserSettings settings; QKeychain::WritePasswordJob job(QCoreApplication::applicationName()); job.setAutoDelete(false); job.setInsecureFallback(true); - job.setKey( - "matrix." + - QString(QCryptographicHash::hash(settings.profile().toUtf8(), QCryptographicHash::Sha256)) + - "." + name.c_str()); + job.setKey("matrix." + + QString(QCryptographicHash::hash(settings.profile().toUtf8(), + QCryptographicHash::Sha256)) + + "." + name.c_str()); job.setTextData(QString::fromStdString(secret)); QEventLoop loop; job.connect(&job, &QKeychain::Job::finished, &loop, &QEventLoop::quit); @@ -604,10 +607,10 @@ Cache::deleteSecret(const std::string &name) QKeychain::DeletePasswordJob job(QCoreApplication::applicationName()); job.setAutoDelete(false); job.setInsecureFallback(true); - job.setKey( - "matrix." + - QString(QCryptographicHash::hash(settings.profile().toUtf8(), QCryptographicHash::Sha256)) + - "." + name.c_str()); + job.setKey("matrix." + + QString(QCryptographicHash::hash(settings.profile().toUtf8(), + QCryptographicHash::Sha256)) + + "." + name.c_str()); QEventLoop loop; job.connect(&job, &QKeychain::Job::finished, &loop, &QEventLoop::quit); job.start(); @@ -623,10 +626,10 @@ Cache::secret(const std::string &name) QKeychain::ReadPasswordJob job(QCoreApplication::applicationName()); job.setAutoDelete(false); job.setInsecureFallback(true); - job.setKey( - "matrix." + - QString(QCryptographicHash::hash(settings.profile().toUtf8(), QCryptographicHash::Sha256)) + - "." + name.c_str()); + job.setKey("matrix." + + QString(QCryptographicHash::hash(settings.profile().toUtf8(), + QCryptographicHash::Sha256)) + + "." + name.c_str()); QEventLoop loop; job.connect(&job, &QKeychain::Job::finished, &loop, &QEventLoop::quit); job.start(); diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index bc7b5223..bf5fd026 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -56,8 +56,8 @@ MainWindow *MainWindow::instance_ = nullptr; MainWindow::MainWindow(QWidget *parent) - : QMainWindow(parent), - userSettings_{QSharedPointer{new UserSettings}} + : QMainWindow(parent) + , userSettings_{QSharedPointer{new UserSettings}} { setWindowTitle(0); setObjectName("MainWindow"); From f0a355c9cb89333ec312cdfcc7365c62bf44cdf9 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Fri, 25 Dec 2020 19:14:32 +0100 Subject: [PATCH 2/7] AppImages in gitlab --- .gitlab-ci.yml | 50 ++++++ AppImageBuilder.yml | 385 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 435 insertions(+) create mode 100644 AppImageBuilder.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2ecfa17c..d48ead1f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -143,3 +143,53 @@ linting: - apk update && apk add clang make git script: - make lint + +appimage-amd64: + stage: build + image: appimagecrafters/appimage-builder + tags: [docker] + before_script: + # app build requirements + - echo 'deb http://archive.neon.kde.org/user/ bionic main' > /etc/apt/sources.list.d/neon.list + - wget -qO - https://archive.neon.kde.org/public.key | apt-key add - + - apt-get update + - apt-get install -y git wget + + # update appimage-builder (optional) + - pip3 install --upgrade git+https://www.opencode.net/azubieta/appimagecraft.git + + - apt-get install -y qt5-default qtdeclarative5-dev qttools5-dev qtscript5-dev qtquickcontrols2-5-dev qtmultimedia5-dev libqt5svg5-dev liblmdb-dev libssl-dev git ninja-build qt5keychain-dev libgtest-dev ccache + - wget https://github.com/Kitware/CMake/releases/download/v3.19.0/cmake-3.19.0-Linux-x86_64.sh && sh cmake-3.19.0-Linux-x86_64.sh --skip-license --prefix=/usr/local + - /usr/sbin/update-ccache-symlinks + script: + - export PATH="/usr/local/bin/:/usr/lib/ccache:${PATH}" + - export CMAKE_BUILD_PARALLEL_LEVEL=$(cat /proc/cpuinfo | awk '/^processor/{print $3}' | wc -l) + - cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -GNinja + -DHUNTER_ROOT=".hunter" + -DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF + -DHUNTER_CONFIGURATION_TYPES=Release + -DUSE_BUNDLED_BOOST=ON + -DUSE_BUNDLED_SPDLOG=ON + -DUSE_BUNDLED_OLM=ON + -DUSE_BUNDLED_GTEST=OFF + -DUSE_BUNDLED_CMARK=ON + -DUSE_BUNDLED_JSON=ON + -DUSE_BUNDLED_OPENSSL=OFF + -DUSE_BUNDLED_MTXCLIENT=ON + -DUSE_BUNDLED_LMDB=OFF + -DUSE_BUNDLED_LMDBXX=ON + -DUSE_BUNDLED_TWEENY=ON + -DUSE_BUNDLED_QTKEYCHAIN=OFF + - DESTDIR=`pwd`/AppDir ninja -C build install/local + - DESTDIR=`pwd`/AppDir ninja -C build _deps/cmark-build/src/install + - mkdir -p AppDir/usr/lib/x86_64-linux-gnu AppDir/lib/x86_64-linux-gnu + - appimage-builder --skip-test + artifacts: + paths: + - '*.AppImage*' + expire_in: 1 week + cache: + key: "$CI_JOB_NAME" + paths: + - .hunter/ + - .ccache diff --git a/AppImageBuilder.yml b/AppImageBuilder.yml new file mode 100644 index 00000000..9d8ba81d --- /dev/null +++ b/AppImageBuilder.yml @@ -0,0 +1,385 @@ +# appimage-builder recipe see https://appimage-builder.readthedocs.io for details +version: 1 +AppDir: + path: ./AppDir + app_info: + id: nheko + name: nheko + icon: nheko + version: latest + exec: usr/bin/nheko + exec_args: $@ + runtime: + env: + APPDIR_LIBRARY_PATH: $APPDIR/usr/lib:$APPDIR/usr/lib/x86_64-linux-gnu:$APPDIR/lib/x86_64-linux-gnu + files: + include: + - /etc/fonts/conf.avail/09-texlive.conf + - /etc/fonts/conf.avail/10-autohint.conf + - /etc/fonts/conf.avail/10-hinting-full.conf + - /etc/fonts/conf.avail/10-hinting-medium.conf + - /etc/fonts/conf.avail/10-hinting-none.conf + - /etc/fonts/conf.avail/10-hinting-slight.conf + - /etc/fonts/conf.avail/10-no-sub-pixel.conf + - /etc/fonts/conf.avail/10-scale-bitmap-fonts.conf + - /etc/fonts/conf.avail/10-sub-pixel-bgr.conf + - /etc/fonts/conf.avail/10-sub-pixel-rgb.conf + - /etc/fonts/conf.avail/10-sub-pixel-vbgr.conf + - /etc/fonts/conf.avail/10-sub-pixel-vrgb.conf + - /etc/fonts/conf.avail/10-unhinted.conf + - /etc/fonts/conf.avail/11-lcdfilter-default.conf + - /etc/fonts/conf.avail/11-lcdfilter-legacy.conf + - /etc/fonts/conf.avail/11-lcdfilter-light.conf + - /etc/fonts/conf.avail/20-unhint-small-dejavu-sans-mono.conf + - /etc/fonts/conf.avail/20-unhint-small-dejavu-sans.conf + - /etc/fonts/conf.avail/20-unhint-small-dejavu-serif.conf + - /etc/fonts/conf.avail/20-unhint-small-vera.conf + - /etc/fonts/conf.avail/25-unhint-nonlatin.conf + - /etc/fonts/conf.avail/30-metric-aliases.conf + - /etc/fonts/conf.avail/40-nonlatin.conf + - /etc/fonts/conf.avail/42-luxi-mono.conf + - /etc/fonts/conf.avail/45-generic.conf + - /etc/fonts/conf.avail/45-latin.conf + - /etc/fonts/conf.avail/49-sansserif.conf + - /etc/fonts/conf.avail/50-user.conf + - /etc/fonts/conf.avail/51-local.conf + - /etc/fonts/conf.avail/57-dejavu-sans-mono.conf + - /etc/fonts/conf.avail/57-dejavu-sans.conf + - /etc/fonts/conf.avail/57-dejavu-serif.conf + - /etc/fonts/conf.avail/60-generic.conf + - /etc/fonts/conf.avail/60-latin.conf + - /etc/fonts/conf.avail/60-liberation.conf + - /etc/fonts/conf.avail/65-fonts-persian.conf + - /etc/fonts/conf.avail/65-khmer.conf + - /etc/fonts/conf.avail/65-nonlatin.conf + - /etc/fonts/conf.avail/66-noto-mono.conf + - /etc/fonts/conf.avail/66-noto-sans.conf + - /etc/fonts/conf.avail/66-noto-serif.conf + - /etc/fonts/conf.avail/69-unifont.conf + - /etc/fonts/conf.avail/70-no-bitmaps.conf + - /etc/fonts/conf.avail/70-yes-bitmaps.conf + - /etc/fonts/conf.avail/75-yes-terminus.conf + - /etc/fonts/conf.avail/80-delicious.conf + - /etc/fonts/conf.avail/90-synthetic.conf + - /etc/fonts/fonts.conf + - /etc/gai.conf + - /etc/host.conf + - /etc/hosts + - /etc/localtime + - /etc/machine-id + - /etc/os-release + - /etc/resolv.conf + - /lib64/ld-linux-x86-64.so.2 + - /lib64/libacl.so.1 + - /lib64/libblkid.so.1 + - /lib64/libbz2.so.1 + - /lib64/libc.so.6 + - /lib64/libdl.so.2 + - /lib64/liblzma.so.5 + - /lib64/libm.so.6 + - /lib64/libmount.so.1 + - /lib64/libnss_db.so.2 + - /lib64/libnss_dns.so.2 + - /lib64/libnss_files.so.2 + - /lib64/libpcre.so.1 + - /lib64/libpthread.so.0 + - /lib64/libresolv.so.2 + - /lib64/librt.so.1 + - /lib64/libtinfo.so.6 + - /lib64/libudev.so.1 + - /lib64/libuuid.so.1 + - /lib64/libwrap.so.0 + - /lib64/libz.so.1 + - /lib/x86_64-linux-gnu/libc.so.6 + - /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/libgcc_s.so.1 + - /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/libstdc++.so.6 + - /usr/lib/locale/locale-archive + - /usr/lib64/gconv/gconv-modules.cache + - /usr/lib64/gstreamer-1.0/*.so + - /usr/lib64/libEGL.so.1 + - /usr/lib64/libFLAC.so.8 + - /usr/lib64/libGL.so.1 + - /usr/lib64/libGLX.so.0 + - /usr/lib64/libGLX_mesa.so.0 + - /usr/lib64/libGLdispatch.so.0 + - /usr/lib64/libICE.so.6 + - /usr/lib64/libQt5Concurrent.so.5 + - /usr/lib64/libQt5Core.so.5 + - /usr/lib64/libQt5DBus.so.5 + - /usr/lib64/libQt5Gui.so.5 + - /usr/lib64/libQt5Multimedia.so.5 + - /usr/lib64/libQt5MultimediaGstTools.so.5 + - /usr/lib64/libQt5MultimediaQuick.so.5 + - /usr/lib64/libQt5MultimediaWidgets.so.5 + - /usr/lib64/libQt5Network.so.5 + - /usr/lib64/libQt5PrintSupport.so.5 + - /usr/lib64/libQt5Qml.so.5 + - /usr/lib64/libQt5QmlModels.so.5 + - /usr/lib64/libQt5QmlWorkerScript.so.5 + - /usr/lib64/libQt5Quick.so.5 + - /usr/lib64/libQt5QuickControls2.so.5 + - /usr/lib64/libQt5QuickTemplates2.so.5 + - /usr/lib64/libQt5QuickWidgets.so.5 + - /usr/lib64/libQt5Sql.so.5 + - /usr/lib64/libQt5Svg.so.5 + - /usr/lib64/libQt5WaylandClient.so.5 + - /usr/lib64/libQt5Widgets.so.5 + - /usr/lib64/libQt5X11Extras.so.5 + - /usr/lib64/libQt5XcbQpa.so.5 + - /usr/lib64/libQt5Xml.so.5 + - /usr/lib64/libSM.so.6 + - /usr/lib64/libX11-xcb.so.1 + - /usr/lib64/libX11.so.6 + - /usr/lib64/libXau.so.6 + - /usr/lib64/libXcursor.so.1 + - /usr/lib64/libXdamage.so.1 + - /usr/lib64/libXdmcp.so.6 + - /usr/lib64/libXext.so.6 + - /usr/lib64/libXfixes.so.3 + - /usr/lib64/libXrender.so.1 + - /usr/lib64/libXtst.so.6 + - /usr/lib64/libXv.so.1 + - /usr/lib64/libXxf86vm.so.1 + - /usr/lib64/libasound.so.2 + - /usr/lib64/libasyncns.so.0 + - /usr/lib64/libavcodec.so.58 + - /usr/lib64/libavfilter.so.7 + - /usr/lib64/libavformat.so.58 + - /usr/lib64/libavresample.so.4 + - /usr/lib64/libavutil.so.56 + - /usr/lib64/libbluray.so.2 + - /usr/lib64/libbreezecommon5.so.5 + - /usr/lib64/libbsd.so.0 + - /usr/lib64/libcairo-gobject.so.2 + - /usr/lib64/libcairo.so.2 + - /usr/lib64/libcrypto.so.1.1 + - /usr/lib64/libdav1d.so.5 + - /usr/lib64/libdbus-1.so.3 + - /usr/lib64/libdbusmenu-qt5.so.2 + - /usr/lib64/libdouble-conversion.so.3 + - /usr/lib64/libdrm.so.2 + - /usr/lib64/libdrm_amdgpu.so.1 + - /usr/lib64/libdrm_radeon.so.1 + - /usr/lib64/libelf.so.1 + - /usr/lib64/libexpat.so.1 + - /usr/lib64/libffi.so.7 + - /usr/lib64/libfontconfig.so.1 + - /usr/lib64/libfreetype.so.6 + - /usr/lib64/libfribidi.so.0 + - /usr/lib64/libgbm.so.1 + - /usr/lib64/libgdk_pixbuf-2.0.so.0 + - /usr/lib64/libgio-2.0.so.0 + - /usr/lib64/libglapi.so.0 + - /usr/lib64/libglib-2.0.so.0 + - /usr/lib64/libgmodule-2.0.so.0 + - /usr/lib64/libgobject-2.0.so.0 + - /usr/lib64/libgraphite2.so.3 + - /usr/lib64/libgst*-1.0.so.0 + - /usr/lib64/libgudev-1.0.so.0 + - /usr/lib64/libharfbuzz.so.0 + - /usr/lib64/libicudata.so.68 + - /usr/lib64/libicui18n.so.68 + - /usr/lib64/libicuuc.so.68 + - /usr/lib64/libjpeg.so.62 + - /usr/lib64/liblcms2.so.2 + - /usr/lib64/libmng.so.2 + - /usr/lib64/libmp3lame.so.0 + - /usr/lib64/libnss_mdns_minimal.so.2 + - /usr/lib64/libogg.so.0 + - /usr/lib64/libopus.so.0 + - /usr/lib64/liborc-0.4.so.0 + - /usr/lib64/libpango-1.0.so.0 + - /usr/lib64/libpangocairo-1.0.so.0 + - /usr/lib64/libpangoft2-1.0.so.0 + - /usr/lib64/libpcre2-16.so.0 + - /usr/lib64/libphonon4qt5.so.4 + - /usr/lib64/libpixman-1.so.0 + - /usr/lib64/libpng16.so.16 + - /usr/lib64/libpostproc.so.55 + - /usr/lib64/libpulse-mainloop-glib.so.0 + - /usr/lib64/libpulse.so.0 + - /usr/lib64/librsvg-2.so.2 + - /usr/lib64/libsndfile.so.1 + - /usr/lib64/libssl.so.1.1 + - /usr/lib64/libswresample.so.3 + - /usr/lib64/libswscale.so.5 + - /usr/lib64/libtheoradec.so.1 + - /usr/lib64/libtheoraenc.so.1 + - /usr/lib64/libtiff.so.5 + - /usr/lib64/libvdpau.so.1 + - /usr/lib64/libvorbis.so.0 + - /usr/lib64/libvorbisenc.so.2 + - /usr/lib64/libvpx.so.6 + - /usr/lib64/libvulkan.so.1 + - /usr/lib64/libwayland-client.so.0 + - /usr/lib64/libwayland-cursor.so.0 + - /usr/lib64/libwayland-egl.so.1 + - /usr/lib64/libwayland-server.so.0 + - /usr/lib64/libwebp.so.7 + - /usr/lib64/libwebpdemux.so.2 + - /usr/lib64/libwebpmux.so.3 + - /usr/lib64/libx264.so.157 + - /usr/lib64/libx265.so.192 + - /usr/lib64/libxcb-composite.so.0 + - /usr/lib64/libxcb-damage.so.0 + - /usr/lib64/libxcb-dri2.so.0 + - /usr/lib64/libxcb-dri3.so.0 + - /usr/lib64/libxcb-glx.so.0 + - /usr/lib64/libxcb-icccm.so.4 + - /usr/lib64/libxcb-image.so.0 + - /usr/lib64/libxcb-keysyms.so.1 + - /usr/lib64/libxcb-present.so.0 + - /usr/lib64/libxcb-randr.so.0 + - /usr/lib64/libxcb-render-util.so.0 + - /usr/lib64/libxcb-render.so.0 + - /usr/lib64/libxcb-res.so.0 + - /usr/lib64/libxcb-shape.so.0 + - /usr/lib64/libxcb-shm.so.0 + - /usr/lib64/libxcb-sync.so.1 + - /usr/lib64/libxcb-util.so.1 + - /usr/lib64/libxcb-xfixes.so.0 + - /usr/lib64/libxcb-xinerama.so.0 + - /usr/lib64/libxcb-xinput.so.0 + - /usr/lib64/libxcb-xkb.so.1 + - /usr/lib64/libxcb.so.1 + - /usr/lib64/libxkbcommon-x11.so.0 + - /usr/lib64/libxkbcommon.so.0 + - /usr/lib64/libxml2.so.2 + - /usr/lib64/libxshmfence.so.1 + - /usr/lib64/libxvidcore.so.4 + - /usr/lib64/libzstd.so.1 + - /usr/lib64/pulseaudio/libpulsecommon-13.0.so + - /usr/lib64/qt5/plugins/iconengines/libqsvgicon.so + - /usr/lib64/qt5/plugins/imageformats/kimg_hdr.so + - /usr/lib64/qt5/plugins/imageformats/kimg_kra.so + - /usr/lib64/qt5/plugins/imageformats/kimg_ora.so + - /usr/lib64/qt5/plugins/imageformats/kimg_pcx.so + - /usr/lib64/qt5/plugins/imageformats/kimg_pic.so + - /usr/lib64/qt5/plugins/imageformats/kimg_psd.so + - /usr/lib64/qt5/plugins/imageformats/kimg_ras.so + - /usr/lib64/qt5/plugins/imageformats/kimg_rgb.so + - /usr/lib64/qt5/plugins/imageformats/kimg_tga.so + - /usr/lib64/qt5/plugins/imageformats/kimg_xcf.so + - /usr/lib64/qt5/plugins/imageformats/libqgif.so + - /usr/lib64/qt5/plugins/imageformats/libqicns.so + - /usr/lib64/qt5/plugins/imageformats/libqico.so + - /usr/lib64/qt5/plugins/imageformats/libqjpeg.so + - /usr/lib64/qt5/plugins/imageformats/libqmng.so + - /usr/lib64/qt5/plugins/imageformats/libqsvg.so + - /usr/lib64/qt5/plugins/imageformats/libqtga.so + - /usr/lib64/qt5/plugins/imageformats/libqtiff.so + - /usr/lib64/qt5/plugins/imageformats/libqwbmp.so + - /usr/lib64/qt5/plugins/imageformats/libqwebp.so + - /usr/lib64/qt5/plugins/mediaservice/libgstaudiodecoder.so + - /usr/lib64/qt5/plugins/mediaservice/libgstcamerabin.so + - /usr/lib64/qt5/plugins/mediaservice/libgstmediacapture.so + - /usr/lib64/qt5/plugins/mediaservice/libgstmediaplayer.so + - /usr/lib64/qt5/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so + - /usr/lib64/qt5/plugins/platforminputcontexts/libqtvirtualkeyboardplugin.so + - /usr/lib64/qt5/plugins/platforms/libqminimal.so + - /usr/lib64/qt5/plugins/platforms/libqoffscreen.so + - /usr/lib64/qt5/plugins/platforms/libqwayland-egl.so + - /usr/lib64/qt5/plugins/platforms/libqwayland-generic.so + - /usr/lib64/qt5/plugins/platforms/libqwayland-xcomposite-egl.so + - /usr/lib64/qt5/plugins/platforms/libqwayland-xcomposite-glx.so + - /usr/lib64/qt5/plugins/platforms/libqxcb.so + - /usr/lib64/qt5/plugins/platformthemes/KDEPlasmaPlatformTheme.so + - /usr/lib64/qt5/plugins/platformthemes/libqgtk3.so + - /usr/lib64/qt5/plugins/styles/breeze.so + - /usr/lib64/qt5/plugins/styles/oxygen.so + - /usr/lib64/qt5/plugins/xcbglintegrations/libqxcb-egl-integration.so + - /usr/lib64/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so + - /usr/lib64/qt5/qml/QtGraphicalEffects/libqtgraphicaleffectsplugin.so + - /usr/lib64/qt5/qml/QtGraphicalEffects/private/DropShadowBase.qmlc + - /usr/lib64/qt5/qml/QtGraphicalEffects/private/libqtgraphicaleffectsprivate.so + - /usr/lib64/qt5/qml/QtGraphicalEffects/private/qmldir + - /usr/lib64/qt5/qml/QtGraphicalEffects/qmldir + - /usr/lib64/qt5/qml/QtMultimedia/libdeclarative_multimedia.so + - /usr/lib64/qt5/qml/QtMultimedia/qmldir + - /usr/lib64/qt5/qml/QtQuick.2/libqtquick2plugin.so + - /usr/lib64/qt5/qml/QtQuick.2/qmldir + - /usr/lib64/qt5/qml/QtQuick/Controls.2/Fusion/libqtquickcontrols2fusionstyleplugin.so + - /usr/lib64/qt5/qml/QtQuick/Controls.2/Fusion/qmldir + - /usr/lib64/qt5/qml/QtQuick/Controls.2/libqtquickcontrols2plugin.so + - /usr/lib64/qt5/qml/QtQuick/Controls.2/org.kde.desktop/private/qmldir + - /usr/lib64/qt5/qml/QtQuick/Controls.2/qmldir + - /usr/lib64/qt5/qml/QtQuick/Controls/Private/CalendarUtils.jsc + - /usr/lib64/qt5/qml/QtQuick/Controls/Private/StackView.jsc + - /usr/lib64/qt5/qml/QtQuick/Controls/Private/SystemPaletteSingleton.qmlc + - /usr/lib64/qt5/qml/QtQuick/Controls/Private/TextSingleton.qmlc + - /usr/lib64/qt5/qml/QtQuick/Controls/Private/qmldir + - /usr/lib64/qt5/qml/QtQuick/Controls/Private/style.jsc + - /usr/lib64/qt5/qml/QtQuick/Controls/libqtquickcontrolsplugin.so + - /usr/lib64/qt5/qml/QtQuick/Controls/qmldir + - /usr/lib64/qt5/qml/QtQuick/Layouts/libqquicklayoutsplugin.so + - /usr/lib64/qt5/qml/QtQuick/Layouts/qmldir + - /usr/lib64/qt5/qml/QtQuick/Templates.2/libqtquicktemplates2plugin.so + - /usr/lib64/qt5/qml/QtQuick/Templates.2/qmldir + - /usr/lib64/qt5/qml/QtQuick/Window.2/libwindowplugin.so + - /usr/lib64/qt5/qml/QtQuick/Window.2/qmldir + - /usr/share/X11/locale/compose.dir + - /usr/share/X11/locale/en_US.UTF-8/Compose + - /usr/share/X11/locale/en_US.UTF-8/XLC_LOCALE + - /usr/share/X11/locale/locale.dir + - /usr/share/drirc.d/00-mesa-defaults.conf + - /usr/share/icons/breeze/actions/32/view-refresh.svg + - /usr/share/icons/breeze/index.theme + - /usr/share/icons/breeze_cursors/cursors/left_ptr + - /usr/share/icons/breeze_cursors/cursors/pointing_hand + - /usr/share/icons/breeze_cursors/cursors/split_h + - /usr/share/icons/hicolor/128x128/apps/nheko.png + - /usr/share/icons/hicolor/16x16/apps/nheko.png + - /usr/share/icons/hicolor/32x32/apps/nheko.png + - /usr/share/icons/hicolor/48x48/apps/nheko.png + - /usr/share/icons/hicolor/64x64/apps/nheko.png + - /usr/share/libdrm/amdgpu.ids + - /usr/share/locale/de/LC_MESSAGES/glib20.mo + - /usr/share/locale/de/LC_MESSAGES/gstreamer-1.0.mo + - /usr/share/locale/de/LC_MESSAGES/libc.mo + - /usr/share/locale/de/LC_MESSAGES/libkirigami2plugin_qt.qm + - /usr/share/locale/de/LC_MESSAGES/libphonon_qt.qm + - /usr/share/locale/de/LC_MESSAGES/pulseaudio.mo + - /usr/share/mime/audio/aac.xml + - /usr/share/mime/generic-icons + - /usr/share/mime/mime.cache + - /usr/share/mime/types + - /usr/share/mime/video/x-matroska.xml + - /usr/share/qt5/translations/qt_de.qm + - /usr/share/qt5/translations/qt_en.qm + - /usr/share/qt5/translations/qtbase_de.qm + - /usr/share/qt5/translations/qtmultimedia_de.qm + - /usr/share/qt5/translations/qtquickcontrols_de.qm + - /usr/share/qt5/translations/qtscript_de.qm + - /usr/share/qt5/translations/qtxmlpatterns_de.qm + - /usr/share/zoneinfo/Europe/Berlin + exclude: + - usr/share/man + - usr/share/doc/*/README.* + - usr/share/doc/*/changelog.* + - usr/share/doc/*/NEWS.* + - usr/share/doc/*/TODO.* + test: + fedora: + image: appimagecrafters/tests-env:fedora-30 + command: ./AppRun + use_host_x: true + debian: + image: appimagecrafters/tests-env:debian-stable + command: ./AppRun + use_host_x: true + arch: + image: appimagecrafters/tests-env:archlinux-latest + command: ./AppRun + use_host_x: true + centos: + image: appimagecrafters/tests-env:centos-7 + command: ./AppRun + use_host_x: true + ubuntu: + image: appimagecrafters/tests-env:ubuntu-xenial + command: ./AppRun + use_host_x: true +AppImage: + arch: x86_64 + update-information: guess + sign-key: None From 3eb836abb1f35afda7f1862ccb8c92cf5aaaf8b6 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sat, 26 Dec 2020 01:56:27 +0100 Subject: [PATCH 3/7] Fixup library paths --- AppImageBuilder.yml | 419 +++++++++----------------------------------- 1 file changed, 78 insertions(+), 341 deletions(-) diff --git a/AppImageBuilder.yml b/AppImageBuilder.yml index 9d8ba81d..7b263058 100644 --- a/AppImageBuilder.yml +++ b/AppImageBuilder.yml @@ -11,347 +11,84 @@ AppDir: exec_args: $@ runtime: env: - APPDIR_LIBRARY_PATH: $APPDIR/usr/lib:$APPDIR/usr/lib/x86_64-linux-gnu:$APPDIR/lib/x86_64-linux-gnu - files: + APPDIR_LIBRARY_PATH: $APPDIR/usr/lib/x86_64-linux-gnu:$APPDIR/usr/lib/x86_64-linux-gnu/gstreamer-1.0:$APPDIR/usr/lib/x86_64-linux-gnu/gconv:$APPDIR/lib/x86_64-linux-gnu:$APPDIR/usr/lib/x86_64-linux-gnu/pulseaudio + apt: + arch: amd64 + allow_unauthenticated: true + sources: + - sourceline: deb http://de.archive.ubuntu.com/ubuntu/ bionic main restricted + - sourceline: deb http://de.archive.ubuntu.com/ubuntu/ bionic-updates main restricted + - sourceline: deb http://de.archive.ubuntu.com/ubuntu/ bionic universe + - sourceline: deb http://de.archive.ubuntu.com/ubuntu/ bionic-updates universe + - sourceline: deb http://de.archive.ubuntu.com/ubuntu/ bionic multiverse + - sourceline: deb http://de.archive.ubuntu.com/ubuntu/ bionic-updates multiverse + - sourceline: deb http://de.archive.ubuntu.com/ubuntu/ bionic-backports main restricted + universe multiverse + - sourceline: deb http://security.ubuntu.com/ubuntu bionic-security main restricted + - sourceline: deb http://security.ubuntu.com/ubuntu bionic-security universe + - sourceline: deb http://security.ubuntu.com/ubuntu bionic-security multiverse + - sourceline: deb http://archive.neon.kde.org/user/ bionic main include: - - /etc/fonts/conf.avail/09-texlive.conf - - /etc/fonts/conf.avail/10-autohint.conf - - /etc/fonts/conf.avail/10-hinting-full.conf - - /etc/fonts/conf.avail/10-hinting-medium.conf - - /etc/fonts/conf.avail/10-hinting-none.conf - - /etc/fonts/conf.avail/10-hinting-slight.conf - - /etc/fonts/conf.avail/10-no-sub-pixel.conf - - /etc/fonts/conf.avail/10-scale-bitmap-fonts.conf - - /etc/fonts/conf.avail/10-sub-pixel-bgr.conf - - /etc/fonts/conf.avail/10-sub-pixel-rgb.conf - - /etc/fonts/conf.avail/10-sub-pixel-vbgr.conf - - /etc/fonts/conf.avail/10-sub-pixel-vrgb.conf - - /etc/fonts/conf.avail/10-unhinted.conf - - /etc/fonts/conf.avail/11-lcdfilter-default.conf - - /etc/fonts/conf.avail/11-lcdfilter-legacy.conf - - /etc/fonts/conf.avail/11-lcdfilter-light.conf - - /etc/fonts/conf.avail/20-unhint-small-dejavu-sans-mono.conf - - /etc/fonts/conf.avail/20-unhint-small-dejavu-sans.conf - - /etc/fonts/conf.avail/20-unhint-small-dejavu-serif.conf - - /etc/fonts/conf.avail/20-unhint-small-vera.conf - - /etc/fonts/conf.avail/25-unhint-nonlatin.conf - - /etc/fonts/conf.avail/30-metric-aliases.conf - - /etc/fonts/conf.avail/40-nonlatin.conf - - /etc/fonts/conf.avail/42-luxi-mono.conf - - /etc/fonts/conf.avail/45-generic.conf - - /etc/fonts/conf.avail/45-latin.conf - - /etc/fonts/conf.avail/49-sansserif.conf - - /etc/fonts/conf.avail/50-user.conf - - /etc/fonts/conf.avail/51-local.conf - - /etc/fonts/conf.avail/57-dejavu-sans-mono.conf - - /etc/fonts/conf.avail/57-dejavu-sans.conf - - /etc/fonts/conf.avail/57-dejavu-serif.conf - - /etc/fonts/conf.avail/60-generic.conf - - /etc/fonts/conf.avail/60-latin.conf - - /etc/fonts/conf.avail/60-liberation.conf - - /etc/fonts/conf.avail/65-fonts-persian.conf - - /etc/fonts/conf.avail/65-khmer.conf - - /etc/fonts/conf.avail/65-nonlatin.conf - - /etc/fonts/conf.avail/66-noto-mono.conf - - /etc/fonts/conf.avail/66-noto-sans.conf - - /etc/fonts/conf.avail/66-noto-serif.conf - - /etc/fonts/conf.avail/69-unifont.conf - - /etc/fonts/conf.avail/70-no-bitmaps.conf - - /etc/fonts/conf.avail/70-yes-bitmaps.conf - - /etc/fonts/conf.avail/75-yes-terminus.conf - - /etc/fonts/conf.avail/80-delicious.conf - - /etc/fonts/conf.avail/90-synthetic.conf - - /etc/fonts/fonts.conf - - /etc/gai.conf - - /etc/host.conf - - /etc/hosts - - /etc/localtime - - /etc/machine-id - - /etc/os-release - - /etc/resolv.conf - - /lib64/ld-linux-x86-64.so.2 - - /lib64/libacl.so.1 - - /lib64/libblkid.so.1 - - /lib64/libbz2.so.1 - - /lib64/libc.so.6 - - /lib64/libdl.so.2 - - /lib64/liblzma.so.5 - - /lib64/libm.so.6 - - /lib64/libmount.so.1 - - /lib64/libnss_db.so.2 - - /lib64/libnss_dns.so.2 - - /lib64/libnss_files.so.2 - - /lib64/libpcre.so.1 - - /lib64/libpthread.so.0 - - /lib64/libresolv.so.2 - - /lib64/librt.so.1 - - /lib64/libtinfo.so.6 - - /lib64/libudev.so.1 - - /lib64/libuuid.so.1 - - /lib64/libwrap.so.0 - - /lib64/libz.so.1 - - /lib/x86_64-linux-gnu/libc.so.6 - - /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/libgcc_s.so.1 - - /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/libstdc++.so.6 - - /usr/lib/locale/locale-archive - - /usr/lib64/gconv/gconv-modules.cache - - /usr/lib64/gstreamer-1.0/*.so - - /usr/lib64/libEGL.so.1 - - /usr/lib64/libFLAC.so.8 - - /usr/lib64/libGL.so.1 - - /usr/lib64/libGLX.so.0 - - /usr/lib64/libGLX_mesa.so.0 - - /usr/lib64/libGLdispatch.so.0 - - /usr/lib64/libICE.so.6 - - /usr/lib64/libQt5Concurrent.so.5 - - /usr/lib64/libQt5Core.so.5 - - /usr/lib64/libQt5DBus.so.5 - - /usr/lib64/libQt5Gui.so.5 - - /usr/lib64/libQt5Multimedia.so.5 - - /usr/lib64/libQt5MultimediaGstTools.so.5 - - /usr/lib64/libQt5MultimediaQuick.so.5 - - /usr/lib64/libQt5MultimediaWidgets.so.5 - - /usr/lib64/libQt5Network.so.5 - - /usr/lib64/libQt5PrintSupport.so.5 - - /usr/lib64/libQt5Qml.so.5 - - /usr/lib64/libQt5QmlModels.so.5 - - /usr/lib64/libQt5QmlWorkerScript.so.5 - - /usr/lib64/libQt5Quick.so.5 - - /usr/lib64/libQt5QuickControls2.so.5 - - /usr/lib64/libQt5QuickTemplates2.so.5 - - /usr/lib64/libQt5QuickWidgets.so.5 - - /usr/lib64/libQt5Sql.so.5 - - /usr/lib64/libQt5Svg.so.5 - - /usr/lib64/libQt5WaylandClient.so.5 - - /usr/lib64/libQt5Widgets.so.5 - - /usr/lib64/libQt5X11Extras.so.5 - - /usr/lib64/libQt5XcbQpa.so.5 - - /usr/lib64/libQt5Xml.so.5 - - /usr/lib64/libSM.so.6 - - /usr/lib64/libX11-xcb.so.1 - - /usr/lib64/libX11.so.6 - - /usr/lib64/libXau.so.6 - - /usr/lib64/libXcursor.so.1 - - /usr/lib64/libXdamage.so.1 - - /usr/lib64/libXdmcp.so.6 - - /usr/lib64/libXext.so.6 - - /usr/lib64/libXfixes.so.3 - - /usr/lib64/libXrender.so.1 - - /usr/lib64/libXtst.so.6 - - /usr/lib64/libXv.so.1 - - /usr/lib64/libXxf86vm.so.1 - - /usr/lib64/libasound.so.2 - - /usr/lib64/libasyncns.so.0 - - /usr/lib64/libavcodec.so.58 - - /usr/lib64/libavfilter.so.7 - - /usr/lib64/libavformat.so.58 - - /usr/lib64/libavresample.so.4 - - /usr/lib64/libavutil.so.56 - - /usr/lib64/libbluray.so.2 - - /usr/lib64/libbreezecommon5.so.5 - - /usr/lib64/libbsd.so.0 - - /usr/lib64/libcairo-gobject.so.2 - - /usr/lib64/libcairo.so.2 - - /usr/lib64/libcrypto.so.1.1 - - /usr/lib64/libdav1d.so.5 - - /usr/lib64/libdbus-1.so.3 - - /usr/lib64/libdbusmenu-qt5.so.2 - - /usr/lib64/libdouble-conversion.so.3 - - /usr/lib64/libdrm.so.2 - - /usr/lib64/libdrm_amdgpu.so.1 - - /usr/lib64/libdrm_radeon.so.1 - - /usr/lib64/libelf.so.1 - - /usr/lib64/libexpat.so.1 - - /usr/lib64/libffi.so.7 - - /usr/lib64/libfontconfig.so.1 - - /usr/lib64/libfreetype.so.6 - - /usr/lib64/libfribidi.so.0 - - /usr/lib64/libgbm.so.1 - - /usr/lib64/libgdk_pixbuf-2.0.so.0 - - /usr/lib64/libgio-2.0.so.0 - - /usr/lib64/libglapi.so.0 - - /usr/lib64/libglib-2.0.so.0 - - /usr/lib64/libgmodule-2.0.so.0 - - /usr/lib64/libgobject-2.0.so.0 - - /usr/lib64/libgraphite2.so.3 - - /usr/lib64/libgst*-1.0.so.0 - - /usr/lib64/libgudev-1.0.so.0 - - /usr/lib64/libharfbuzz.so.0 - - /usr/lib64/libicudata.so.68 - - /usr/lib64/libicui18n.so.68 - - /usr/lib64/libicuuc.so.68 - - /usr/lib64/libjpeg.so.62 - - /usr/lib64/liblcms2.so.2 - - /usr/lib64/libmng.so.2 - - /usr/lib64/libmp3lame.so.0 - - /usr/lib64/libnss_mdns_minimal.so.2 - - /usr/lib64/libogg.so.0 - - /usr/lib64/libopus.so.0 - - /usr/lib64/liborc-0.4.so.0 - - /usr/lib64/libpango-1.0.so.0 - - /usr/lib64/libpangocairo-1.0.so.0 - - /usr/lib64/libpangoft2-1.0.so.0 - - /usr/lib64/libpcre2-16.so.0 - - /usr/lib64/libphonon4qt5.so.4 - - /usr/lib64/libpixman-1.so.0 - - /usr/lib64/libpng16.so.16 - - /usr/lib64/libpostproc.so.55 - - /usr/lib64/libpulse-mainloop-glib.so.0 - - /usr/lib64/libpulse.so.0 - - /usr/lib64/librsvg-2.so.2 - - /usr/lib64/libsndfile.so.1 - - /usr/lib64/libssl.so.1.1 - - /usr/lib64/libswresample.so.3 - - /usr/lib64/libswscale.so.5 - - /usr/lib64/libtheoradec.so.1 - - /usr/lib64/libtheoraenc.so.1 - - /usr/lib64/libtiff.so.5 - - /usr/lib64/libvdpau.so.1 - - /usr/lib64/libvorbis.so.0 - - /usr/lib64/libvorbisenc.so.2 - - /usr/lib64/libvpx.so.6 - - /usr/lib64/libvulkan.so.1 - - /usr/lib64/libwayland-client.so.0 - - /usr/lib64/libwayland-cursor.so.0 - - /usr/lib64/libwayland-egl.so.1 - - /usr/lib64/libwayland-server.so.0 - - /usr/lib64/libwebp.so.7 - - /usr/lib64/libwebpdemux.so.2 - - /usr/lib64/libwebpmux.so.3 - - /usr/lib64/libx264.so.157 - - /usr/lib64/libx265.so.192 - - /usr/lib64/libxcb-composite.so.0 - - /usr/lib64/libxcb-damage.so.0 - - /usr/lib64/libxcb-dri2.so.0 - - /usr/lib64/libxcb-dri3.so.0 - - /usr/lib64/libxcb-glx.so.0 - - /usr/lib64/libxcb-icccm.so.4 - - /usr/lib64/libxcb-image.so.0 - - /usr/lib64/libxcb-keysyms.so.1 - - /usr/lib64/libxcb-present.so.0 - - /usr/lib64/libxcb-randr.so.0 - - /usr/lib64/libxcb-render-util.so.0 - - /usr/lib64/libxcb-render.so.0 - - /usr/lib64/libxcb-res.so.0 - - /usr/lib64/libxcb-shape.so.0 - - /usr/lib64/libxcb-shm.so.0 - - /usr/lib64/libxcb-sync.so.1 - - /usr/lib64/libxcb-util.so.1 - - /usr/lib64/libxcb-xfixes.so.0 - - /usr/lib64/libxcb-xinerama.so.0 - - /usr/lib64/libxcb-xinput.so.0 - - /usr/lib64/libxcb-xkb.so.1 - - /usr/lib64/libxcb.so.1 - - /usr/lib64/libxkbcommon-x11.so.0 - - /usr/lib64/libxkbcommon.so.0 - - /usr/lib64/libxml2.so.2 - - /usr/lib64/libxshmfence.so.1 - - /usr/lib64/libxvidcore.so.4 - - /usr/lib64/libzstd.so.1 - - /usr/lib64/pulseaudio/libpulsecommon-13.0.so - - /usr/lib64/qt5/plugins/iconengines/libqsvgicon.so - - /usr/lib64/qt5/plugins/imageformats/kimg_hdr.so - - /usr/lib64/qt5/plugins/imageformats/kimg_kra.so - - /usr/lib64/qt5/plugins/imageformats/kimg_ora.so - - /usr/lib64/qt5/plugins/imageformats/kimg_pcx.so - - /usr/lib64/qt5/plugins/imageformats/kimg_pic.so - - /usr/lib64/qt5/plugins/imageformats/kimg_psd.so - - /usr/lib64/qt5/plugins/imageformats/kimg_ras.so - - /usr/lib64/qt5/plugins/imageformats/kimg_rgb.so - - /usr/lib64/qt5/plugins/imageformats/kimg_tga.so - - /usr/lib64/qt5/plugins/imageformats/kimg_xcf.so - - /usr/lib64/qt5/plugins/imageformats/libqgif.so - - /usr/lib64/qt5/plugins/imageformats/libqicns.so - - /usr/lib64/qt5/plugins/imageformats/libqico.so - - /usr/lib64/qt5/plugins/imageformats/libqjpeg.so - - /usr/lib64/qt5/plugins/imageformats/libqmng.so - - /usr/lib64/qt5/plugins/imageformats/libqsvg.so - - /usr/lib64/qt5/plugins/imageformats/libqtga.so - - /usr/lib64/qt5/plugins/imageformats/libqtiff.so - - /usr/lib64/qt5/plugins/imageformats/libqwbmp.so - - /usr/lib64/qt5/plugins/imageformats/libqwebp.so - - /usr/lib64/qt5/plugins/mediaservice/libgstaudiodecoder.so - - /usr/lib64/qt5/plugins/mediaservice/libgstcamerabin.so - - /usr/lib64/qt5/plugins/mediaservice/libgstmediacapture.so - - /usr/lib64/qt5/plugins/mediaservice/libgstmediaplayer.so - - /usr/lib64/qt5/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so - - /usr/lib64/qt5/plugins/platforminputcontexts/libqtvirtualkeyboardplugin.so - - /usr/lib64/qt5/plugins/platforms/libqminimal.so - - /usr/lib64/qt5/plugins/platforms/libqoffscreen.so - - /usr/lib64/qt5/plugins/platforms/libqwayland-egl.so - - /usr/lib64/qt5/plugins/platforms/libqwayland-generic.so - - /usr/lib64/qt5/plugins/platforms/libqwayland-xcomposite-egl.so - - /usr/lib64/qt5/plugins/platforms/libqwayland-xcomposite-glx.so - - /usr/lib64/qt5/plugins/platforms/libqxcb.so - - /usr/lib64/qt5/plugins/platformthemes/KDEPlasmaPlatformTheme.so - - /usr/lib64/qt5/plugins/platformthemes/libqgtk3.so - - /usr/lib64/qt5/plugins/styles/breeze.so - - /usr/lib64/qt5/plugins/styles/oxygen.so - - /usr/lib64/qt5/plugins/xcbglintegrations/libqxcb-egl-integration.so - - /usr/lib64/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so - - /usr/lib64/qt5/qml/QtGraphicalEffects/libqtgraphicaleffectsplugin.so - - /usr/lib64/qt5/qml/QtGraphicalEffects/private/DropShadowBase.qmlc - - /usr/lib64/qt5/qml/QtGraphicalEffects/private/libqtgraphicaleffectsprivate.so - - /usr/lib64/qt5/qml/QtGraphicalEffects/private/qmldir - - /usr/lib64/qt5/qml/QtGraphicalEffects/qmldir - - /usr/lib64/qt5/qml/QtMultimedia/libdeclarative_multimedia.so - - /usr/lib64/qt5/qml/QtMultimedia/qmldir - - /usr/lib64/qt5/qml/QtQuick.2/libqtquick2plugin.so - - /usr/lib64/qt5/qml/QtQuick.2/qmldir - - /usr/lib64/qt5/qml/QtQuick/Controls.2/Fusion/libqtquickcontrols2fusionstyleplugin.so - - /usr/lib64/qt5/qml/QtQuick/Controls.2/Fusion/qmldir - - /usr/lib64/qt5/qml/QtQuick/Controls.2/libqtquickcontrols2plugin.so - - /usr/lib64/qt5/qml/QtQuick/Controls.2/org.kde.desktop/private/qmldir - - /usr/lib64/qt5/qml/QtQuick/Controls.2/qmldir - - /usr/lib64/qt5/qml/QtQuick/Controls/Private/CalendarUtils.jsc - - /usr/lib64/qt5/qml/QtQuick/Controls/Private/StackView.jsc - - /usr/lib64/qt5/qml/QtQuick/Controls/Private/SystemPaletteSingleton.qmlc - - /usr/lib64/qt5/qml/QtQuick/Controls/Private/TextSingleton.qmlc - - /usr/lib64/qt5/qml/QtQuick/Controls/Private/qmldir - - /usr/lib64/qt5/qml/QtQuick/Controls/Private/style.jsc - - /usr/lib64/qt5/qml/QtQuick/Controls/libqtquickcontrolsplugin.so - - /usr/lib64/qt5/qml/QtQuick/Controls/qmldir - - /usr/lib64/qt5/qml/QtQuick/Layouts/libqquicklayoutsplugin.so - - /usr/lib64/qt5/qml/QtQuick/Layouts/qmldir - - /usr/lib64/qt5/qml/QtQuick/Templates.2/libqtquicktemplates2plugin.so - - /usr/lib64/qt5/qml/QtQuick/Templates.2/qmldir - - /usr/lib64/qt5/qml/QtQuick/Window.2/libwindowplugin.so - - /usr/lib64/qt5/qml/QtQuick/Window.2/qmldir - - /usr/share/X11/locale/compose.dir - - /usr/share/X11/locale/en_US.UTF-8/Compose - - /usr/share/X11/locale/en_US.UTF-8/XLC_LOCALE - - /usr/share/X11/locale/locale.dir - - /usr/share/drirc.d/00-mesa-defaults.conf - - /usr/share/icons/breeze/actions/32/view-refresh.svg - - /usr/share/icons/breeze/index.theme - - /usr/share/icons/breeze_cursors/cursors/left_ptr - - /usr/share/icons/breeze_cursors/cursors/pointing_hand - - /usr/share/icons/breeze_cursors/cursors/split_h - - /usr/share/icons/hicolor/128x128/apps/nheko.png - - /usr/share/icons/hicolor/16x16/apps/nheko.png - - /usr/share/icons/hicolor/32x32/apps/nheko.png - - /usr/share/icons/hicolor/48x48/apps/nheko.png - - /usr/share/icons/hicolor/64x64/apps/nheko.png - - /usr/share/libdrm/amdgpu.ids - - /usr/share/locale/de/LC_MESSAGES/glib20.mo - - /usr/share/locale/de/LC_MESSAGES/gstreamer-1.0.mo - - /usr/share/locale/de/LC_MESSAGES/libc.mo - - /usr/share/locale/de/LC_MESSAGES/libkirigami2plugin_qt.qm - - /usr/share/locale/de/LC_MESSAGES/libphonon_qt.qm - - /usr/share/locale/de/LC_MESSAGES/pulseaudio.mo - - /usr/share/mime/audio/aac.xml - - /usr/share/mime/generic-icons - - /usr/share/mime/mime.cache - - /usr/share/mime/types - - /usr/share/mime/video/x-matroska.xml - - /usr/share/qt5/translations/qt_de.qm - - /usr/share/qt5/translations/qt_en.qm - - /usr/share/qt5/translations/qtbase_de.qm - - /usr/share/qt5/translations/qtmultimedia_de.qm - - /usr/share/qt5/translations/qtquickcontrols_de.qm - - /usr/share/qt5/translations/qtscript_de.qm - - /usr/share/qt5/translations/qtxmlpatterns_de.qm - - /usr/share/zoneinfo/Europe/Berlin + - gstreamer1.0-libav + - gstreamer1.0-plugins-bad + - gstreamer1.0-plugins-base + - gstreamer1.0-plugins-good + - gstreamer1.0-pulseaudio + - gstreamer1.0-x + - kimageformat-plugins + - libbs2b0 + - libbz2-1.0 + - libelf1 + - libexpat1 + - libhogweed4 + - libjpeg-turbo8 + - libkf5archive5 + - libllvm10 + - liblmdb0 + - liblz4-1 + - libnorm1 + - libnss-mdns + - libopenexr22 + - libpcre3 + - libqt5keychain1 + - libqt5multimedia5-plugins + - libqt5multimediagsttools5 + - libqt5multimediawidgets5 + - libqt5quickcontrols2-5 + - libqt5quicktemplates2-5 + - libqt5quickwidgets5 + - libqt5svg5 + - librubberband2 + - libsensors4 + - libsm6 + - libsnappy1v5 + - libsystemd0 + - libwayland-server0 + - libx264-152 + - libxau6 + - libxcb-render-util0 + - libxcb-sync1 + - libxcb-xinerama0 + - libxcb-xkb1 + - libxcursor1 + - libxdmcp6 + - libxext6 + - libxfixes3 + - libxrender1 + - libxshmfence1 + - libxv1 + - libxxf86vm1 + - libzstd1 + - qml-module-qtgraphicaleffects + - qml-module-qtmultimedia + - qml-module-qtquick-controls2 + - qml-module-qtquick-layouts + - qml-module-qtquick-templates2 + - qml-module-qtquick-window2 + - qml-module-qtquick2 + - qt5-image-formats-plugins + exclude: [] + files: exclude: - usr/share/man - usr/share/doc/*/README.* @@ -381,5 +118,5 @@ AppDir: use_host_x: true AppImage: arch: x86_64 - update-information: guess + update-information: None sign-key: None From bfcb659d60dda55f6ba251a0475764fd2a6d25a1 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sat, 26 Dec 2020 03:48:08 +0100 Subject: [PATCH 4/7] Upload appimage to matrix --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d48ead1f..331caa85 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -153,7 +153,7 @@ appimage-amd64: - echo 'deb http://archive.neon.kde.org/user/ bionic main' > /etc/apt/sources.list.d/neon.list - wget -qO - https://archive.neon.kde.org/public.key | apt-key add - - apt-get update - - apt-get install -y git wget + - apt-get install -y git wget curl # update appimage-builder (optional) - pip3 install --upgrade git+https://www.opencode.net/azubieta/appimagecraft.git @@ -184,6 +184,8 @@ appimage-amd64: - DESTDIR=`pwd`/AppDir ninja -C build _deps/cmark-build/src/install - mkdir -p AppDir/usr/lib/x86_64-linux-gnu AppDir/lib/x86_64-linux-gnu - appimage-builder --skip-test + after_script: + - bash ./.ci/upload-nightly-gitlab.sh nheko-latest-x86_64.AppImage artifacts: paths: - '*.AppImage*' From 16bfe2a93051389b503fce5e2bb3dbab63c24966 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sat, 26 Dec 2020 04:23:28 +0100 Subject: [PATCH 5/7] Remove travis --- .travis.yml | 99 ----------------------------------------------------- 1 file changed, 99 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 935e7c6f..00000000 --- a/.travis.yml +++ /dev/null @@ -1,99 +0,0 @@ -language: cpp -sudo: required -dist: xenial - -notifications: - webhooks: - urls: - - https://scalar.vector.im/api/neb/services/hooks/dHJhdmlzLWNpLyU0MHJlZF9za3klM0FuaGVrby5pbS8lMjFVYkNtSWxHVEhOSWdJUlpjcHQlM0FuaGVrby5pbQ - on_success: always - on_failure: always - on_start: never - email: false - -cache: - directories: - - .hunter - -matrix: - include: - - os: linux - compiler: gcc-7 - env: - - CXX=g++-7 - - CC=gcc-7 - - QT_PKG=512 - - DEPLOYMENT=1 - addons: - apt: - sources: - - ubuntu-toolchain-r-test - - sourceline: 'ppa:beineri/opt-qt-5.12.6-xenial' - packages: - - g++-7 - - ninja-build - - qt512base - - qt512tools - - qt512svg - - qt512multimedia - - qt512quickcontrols2 - - qt512graphicaleffects - - liblmdb-dev - - libgl1-mesa-dev # needed for missing gl.h - - os: linux - compiler: clang-6 - env: - - CXX=clang++-6.0 - - CC=clang-6.0 - - QT_PKG=510 - addons: - apt: - sources: - - ubuntu-toolchain-r-test - - llvm-toolchain-xenial-6.0 - - sourceline: 'ppa:beineri/opt-qt-5.10.1-xenial' - packages: - - clang++-6.0 - - g++-7 - - ninja-build - - qt510base - - qt510tools - - qt510svg - - qt510multimedia - - qt510quickcontrols2 - - qt510graphicaleffects - - liblmdb-dev - - libgl1-mesa-dev # needed for missing gl.h - -before_install: - # Use TRAVIS_TAG if defined, or the short commit SHA otherwise - - export VERSION=${TRAVIS_TAG:-$(git rev-parse --short HEAD)} -install: - - ./.ci/install.sh - - export PATH=/usr/local/bin:${PATH} - -script: - - ./.ci/script.sh - - sed -i -e "s/VERSION_NAME_VALUE/${VERSION}/g" ./.ci/bintray-release.json || true - - cp ./.ci/bintray-release.json . -deploy: -- provider: script - script: ./.ci/upload-nightly.sh - skip_cleanup: true - on: - condition: "$DEPLOYMENT == 1" - repo: Nheko-Reborn/nheko - tags: false - all_branches: true -- skip_cleanup: true - overwrite: true - provider: releases - api_key: - secure: "rDFG4DIwIG+A9R8seQ3SIXfWOWhJgJHlNQHtAsnfRrPOSIpI7kMebHLDO5sBPNaJ+9MH9acVTJZOabVLf0DdPqRsDUw/PN28aiiqbaH9+zAGOTxahaQ222Gz/ROf/iXvDoTDUnUzURqQUA0YlHy89Z1CnO7TKwlsYhA5A8n0biG7d8i7vQayvwYXfxlk7CouK+Y86ana4r54j1emGRg97p7BOhORibg54ZD520hN0Iif7EJM2hQDTWKZzTDdBt3mF1kBr7cBbuBHWuvE+eIFO3F3yi+u7ggHzw5FaAv245N4fhkpYUl/mSbhLrQG2NOnkglFCpQ2lLd6mWdXHwUNrxN/j+UPewmLg7CymY25zkiL43deDsT8KmpzYalmdaevCqEaX2VehuBzblmH4Re8wnXqBrab14fq0TNDfPqC+NKxy75mdxszbKBC55nTlTB+hsox43dvfvyXDSON4qAzwe9Q/tfp8mL2mehcM868vhw5cbNIskKT8SrhMwmA+sxoqnqLsmAjNVJVTgg6ppbMhjNMOBTndblRHfH6bxsgpTXPtnzC17o9Mw1WgF63eOWNYBEj2wW5ZvWX95Gvg5YzvsF178ipHZDqZfA62ShB3b89fcqN5SOxBsE8UYoHjQIHxQdWeKv23iFwmT8fWAOD8sKDcRyz0WCgidZ1/RjLqsU=" - file_glob: true - file: - - nheko-${VERSION}-x86_64.AppImage - on: - condition: "$TRAVIS_OS_NAME == linux && $DEPLOYMENT == 1" - repo: Nheko-Reborn/nheko - tags: true From 71aea17ac6dccdacaf20b923477bf0cdcf8af395 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sat, 26 Dec 2020 04:52:03 +0100 Subject: [PATCH 6/7] Expose appimage --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 331caa85..8a6775db 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -188,8 +188,9 @@ appimage-amd64: - bash ./.ci/upload-nightly-gitlab.sh nheko-latest-x86_64.AppImage artifacts: paths: - - '*.AppImage*' + - 'nheko-latest-x86_64.AppImage' expire_in: 1 week + expose_as: 'appimage-amd64' cache: key: "$CI_JOB_NAME" paths: From 391b1b32856a5964e429fd95ab588a5e9e745801 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sun, 27 Dec 2020 22:56:43 +0100 Subject: [PATCH 7/7] Fix #359 Actually store the login details under the selected profile --- src/Cache.cpp | 16 ++++++++-------- src/MainWindow.cpp | 2 +- src/UserSettingsPage.cpp | 34 +++++++++++++++++++++++++++++----- src/UserSettingsPage.h | 9 +++++++-- src/main.cpp | 14 ++++++++------ 5 files changed, 53 insertions(+), 22 deletions(-) diff --git a/src/Cache.cpp b/src/Cache.cpp index 7efae881..dac0b23a 100644 --- a/src/Cache.cpp +++ b/src/Cache.cpp @@ -167,14 +167,14 @@ Cache::Cache(const QString &userId, QObject *parent) void Cache::setup() { - UserSettings settings; + auto settings = UserSettings::instance(); nhlog::db()->debug("setting up cache"); cacheDirectory_ = QString("%1/%2%3") .arg(QStandardPaths::writableLocation(QStandardPaths::CacheLocation)) .arg(QString::fromUtf8(localUserId_.toUtf8().toHex())) - .arg(QString::fromUtf8(settings.profile().toUtf8().toHex())); + .arg(QString::fromUtf8(settings->profile().toUtf8().toHex())); bool isInitial = !QFile::exists(cacheDirectory_); @@ -578,12 +578,12 @@ Cache::restoreOlmAccount() void Cache::storeSecret(const std::string &name, const std::string &secret) { - UserSettings settings; + auto settings = UserSettings::instance(); QKeychain::WritePasswordJob job(QCoreApplication::applicationName()); job.setAutoDelete(false); job.setInsecureFallback(true); job.setKey("matrix." + - QString(QCryptographicHash::hash(settings.profile().toUtf8(), + QString(QCryptographicHash::hash(settings->profile().toUtf8(), QCryptographicHash::Sha256)) + "." + name.c_str()); job.setTextData(QString::fromStdString(secret)); @@ -603,12 +603,12 @@ Cache::storeSecret(const std::string &name, const std::string &secret) void Cache::deleteSecret(const std::string &name) { - UserSettings settings; + auto settings = UserSettings::instance(); QKeychain::DeletePasswordJob job(QCoreApplication::applicationName()); job.setAutoDelete(false); job.setInsecureFallback(true); job.setKey("matrix." + - QString(QCryptographicHash::hash(settings.profile().toUtf8(), + QString(QCryptographicHash::hash(settings->profile().toUtf8(), QCryptographicHash::Sha256)) + "." + name.c_str()); QEventLoop loop; @@ -622,12 +622,12 @@ Cache::deleteSecret(const std::string &name) std::optional Cache::secret(const std::string &name) { - UserSettings settings; + auto settings = UserSettings::instance(); QKeychain::ReadPasswordJob job(QCoreApplication::applicationName()); job.setAutoDelete(false); job.setInsecureFallback(true); job.setKey("matrix." + - QString(QCryptographicHash::hash(settings.profile().toUtf8(), + QString(QCryptographicHash::hash(settings->profile().toUtf8(), QCryptographicHash::Sha256)) + "." + name.c_str()); QEventLoop loop; diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index bf5fd026..77269008 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -57,7 +57,7 @@ MainWindow *MainWindow::instance_ = nullptr; MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) - , userSettings_{QSharedPointer{new UserSettings}} + , userSettings_{UserSettings::instance()} { setWindowTitle(0); setObjectName("MainWindow"); diff --git a/src/UserSettingsPage.cpp b/src/UserSettingsPage.cpp index 55f666c1..4ca3be49 100644 --- a/src/UserSettingsPage.cpp +++ b/src/UserSettingsPage.cpp @@ -50,10 +50,30 @@ #include "config/nheko.h" -UserSettings::UserSettings() { load(); } +QSharedPointer UserSettings::instance_; + +UserSettings::UserSettings() +{ + connect(QCoreApplication::instance(), &QCoreApplication::aboutToQuit, [this]() { + instance_.clear(); + }); +} + +QSharedPointer +UserSettings::instance() +{ + return instance_; +} void -UserSettings::load() +UserSettings::initialize(std::optional profile) +{ + instance_.reset(new UserSettings()); + instance_->load(profile); +} + +void +UserSettings::load(std::optional profile) { QSettings settings; tray_ = settings.value("user/window/tray", false).toBool(); @@ -89,7 +109,11 @@ UserSettings::load() cameraResolution_ = settings.value("user/camera_resolution", QString()).toString(); cameraFrameRate_ = settings.value("user/camera_frame_rate", QString()).toString(); useStunServer_ = settings.value("user/use_stun_server", false).toBool(); - profile_ = settings.value("user/currentProfile", "").toString(); + + if (profile) + profile_ = *profile; + else + profile_ = settings.value("user/currentProfile", "").toString(); QString prefix = (profile_ != "" && profile_ != "default") ? "profile/" + profile_ + "/" : ""; @@ -527,6 +551,8 @@ UserSettings::save() settings.setValue("use_stun_server", useStunServer_); settings.setValue("currentProfile", profile_); + settings.endGroup(); // user + QString prefix = (profile_ != "" && profile_ != "default") ? "profile/" + profile_ + "/" : ""; settings.setValue(prefix + "auth/access_token", accessToken_); @@ -534,8 +560,6 @@ UserSettings::save() settings.setValue(prefix + "auth/user_id", userId_); settings.setValue(prefix + "auth/device_id", deviceId_); - settings.endGroup(); // user - settings.sync(); } diff --git a/src/UserSettingsPage.h b/src/UserSettingsPage.h index dd1e26d9..af73202e 100644 --- a/src/UserSettingsPage.h +++ b/src/UserSettingsPage.h @@ -91,9 +91,12 @@ class UserSettings : public QObject Q_PROPERTY(QString deviceId READ deviceId WRITE setDeviceId NOTIFY deviceIdChanged) Q_PROPERTY(QString homeserver READ homeserver WRITE setHomeserver NOTIFY homeserverChanged) -public: UserSettings(); +public: + static QSharedPointer instance(); + static void initialize(std::optional profile); + enum class Presence { AutomaticPresence, @@ -104,7 +107,7 @@ public: Q_ENUM(Presence) void save(); - void load(); + void load(std::optional profile); void applyTheme(); void setTheme(QString theme); void setMessageHoverHighlight(bool state); @@ -252,6 +255,8 @@ private: QString accessToken_; QString deviceId_; QString homeserver_; + + static QSharedPointer instance_; }; class HorizontalLine : public QFrame diff --git a/src/main.cpp b/src/main.cpp index 58bdda34..a60c66c4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -196,17 +196,19 @@ main(int argc, char *argv[]) std::exit(1); } - UserSettings settings; - if (parser.isSet(configName)) - settings.setProfile(parser.value(configName)); + UserSettings::initialize(parser.value(configName)); + else + UserSettings::initialize(std::nullopt); + + auto settings = UserSettings::instance().toWeakRef(); QFont font; - QString userFontFamily = settings.font(); + QString userFontFamily = settings.lock()->font(); if (!userFontFamily.isEmpty()) { font.setFamily(userFontFamily); } - font.setPointSizeF(settings.fontSize()); + font.setPointSizeF(settings.lock()->fontSize()); app.setFont(font); @@ -226,7 +228,7 @@ main(int argc, char *argv[]) // Move the MainWindow to the center w.move(screenCenter(w.width(), w.height())); - if (!settings.startInTray() && !settings.tray()) + if (!settings.lock()->startInTray() && !settings.lock()->tray()) w.show(); QObject::connect(&app, &QApplication::aboutToQuit, &w, [&w]() {