From 2534fab7e7ddc67588792c55a426c78135af6bfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Novomesk=C3=BD?= Date: Mon, 17 Jul 2023 17:22:19 +0200 Subject: [PATCH 1/4] Upgrade libjxl in snapcraft.yaml --- snap/snapcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 2251e05483095..693773d0bc141 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -272,7 +272,7 @@ parts: libjxl: source: https://github.com/libjxl/libjxl.git source-depth: 1 - source-tag: v0.8.1 + source-tag: v0.8.2 plugin: cmake build-environment: - LDFLAGS: ${LDFLAGS:+$LDFLAGS} -s From d0e851647a6262e10cdc35f931603e4160ea0fe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Novomesk=C3=BD?= Date: Mon, 17 Jul 2023 17:29:07 +0200 Subject: [PATCH 2/4] Upgrade dav1d, libde265, libheif, libjxl in Linux build --- Telegram/build/docker/centos_env/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Telegram/build/docker/centos_env/Dockerfile b/Telegram/build/docker/centos_env/Dockerfile index e4b9ad10e7986..a7de4ed0d7dd1 100644 --- a/Telegram/build/docker/centos_env/Dockerfile +++ b/Telegram/build/docker/centos_env/Dockerfile @@ -196,7 +196,7 @@ RUN git clone -b v1.3.1 --depth=1 {{ GIT }}/xiph/opus.git \ FROM builder AS dav1d COPY --link --from=nasm {{ LibrariesPath }}/nasm-cache / -RUN git clone -b 1.0.0 --depth=1 {{ GIT }}/videolan/dav1d.git \ +RUN git clone -b 1.2.1 --depth=1 {{ GIT }}/videolan/dav1d.git \ && cd dav1d \ && meson build \ --buildtype=plain \ @@ -209,7 +209,7 @@ RUN git clone -b 1.0.0 --depth=1 {{ GIT }}/videolan/dav1d.git \ && rm -rf dav1d FROM builder AS libde265 -RUN git clone -b v1.0.11 --depth=1 {{ GIT }}/strukturag/libde265.git \ +RUN git clone -b v1.0.12 --depth=1 {{ GIT }}/strukturag/libde265.git \ && cd libde265 \ && cmake -GNinja . \ -DCMAKE_BUILD_TYPE=None \ @@ -254,7 +254,7 @@ RUN git clone -b v0.11.1 --depth=1 {{ GIT }}/AOMediaCodec/libavif.git \ FROM builder AS libheif COPY --link --from=libde265 {{ LibrariesPath }}/libde265-cache / -RUN git clone -b v1.15.1 --depth=1 {{ GIT }}/strukturag/libheif.git \ +RUN git clone -b v1.16.2 --depth=1 {{ GIT }}/strukturag/libheif.git \ && cd libheif \ && cmake -GNinja -B build . \ -DCMAKE_BUILD_TYPE=None \ @@ -279,7 +279,7 @@ COPY --link --from=lcms2 {{ LibrariesPath }}/lcms2-cache / COPY --link --from=brotli {{ LibrariesPath }}/brotli-cache / COPY --link --from=highway {{ LibrariesPath }}/highway-cache / -RUN git clone -b v0.8.1 --depth=1 {{ GIT }}/libjxl/libjxl.git \ +RUN git clone -b v0.8.2 --depth=1 {{ GIT }}/libjxl/libjxl.git \ && cd libjxl \ && cmake -GNinja -B build . \ -DCMAKE_BUILD_TYPE=None \ From 0534a2fb6213a2c05e06c4a1f7668a9c31b6c326 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Thu, 1 Jun 2023 07:20:11 +0400 Subject: [PATCH 3/4] Fix QGuiApplication::desktopFileName usage The Qt documentation says: This is the file name, without the full path or the trailing ".desktop" extension of the desktop entry that represents this application according to the freedesktop desktop entry specification. Qt 6.5.2 also automatically fixes it breaking all the current tdesktop and desktop-app usage expecting the file extension. --- .../platform/linux/integration_linux.cpp | 4 +--- .../platform/linux/main_window_linux.cpp | 7 +++--- .../linux/notifications_manager_linux.cpp | 2 +- .../platform/linux/specific_linux.cpp | 24 ++++++++++--------- Telegram/lib_base | 2 +- Telegram/lib_webview | 2 +- 6 files changed, 20 insertions(+), 21 deletions(-) diff --git a/Telegram/SourceFiles/platform/linux/integration_linux.cpp b/Telegram/SourceFiles/platform/linux/integration_linux.cpp index d69e060300bec..26ed0d9fe17ae 100644 --- a/Telegram/SourceFiles/platform/linux/integration_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/integration_linux.cpp @@ -209,9 +209,7 @@ void LinuxIntegration::initInhibit() { } void LinuxIntegration::LaunchNativeApplication() { - const auto appId = QGuiApplication::desktopFileName() - .chopped(8) - .toStdString(); + const auto appId = QGuiApplication::desktopFileName().toStdString(); const auto app = Glib::wrap( G_APPLICATION( diff --git a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp index 98c6ff40a2bfb..c0b76494e7938 100644 --- a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp @@ -118,9 +118,7 @@ void XCBSetDesktopFileName(QWindow *window) { base::Platform::XCB::GetAtom(connection, "_KDE_NET_WM_DESKTOP_FILE"), }; - const auto filename = QGuiApplication::desktopFileName() - .chopped(8) - .toUtf8(); + const auto filename = QGuiApplication::desktopFileName().toUtf8(); for (const auto atom : filenameAtoms) { if (atom.has_value()) { @@ -244,7 +242,8 @@ void MainWindow::updateUnityCounter() { const auto launcherUrl = Glib::ustring( "application://" - + QGuiApplication::desktopFileName().toStdString()); + + QGuiApplication::desktopFileName().toStdString() + + ".desktop"); const auto counterSlice = std::min(Core::App().unreadBadge(), 9999); std::map dbusUnityProperties; diff --git a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp index 456be21ba43f0..210064ac0d952 100644 --- a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp @@ -591,7 +591,7 @@ bool NotificationData::init( _hints["category"] = Glib::Variant::create("im.received"); _hints["desktop-entry"] = Glib::Variant::create( - QGuiApplication::desktopFileName().chopped(8).toStdString()); + QGuiApplication::desktopFileName().toStdString()); _notificationClosedSignalId = _dbusConnection->signal_subscribe( signalEmitted, diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp index f0f673c7ff5e8..9e9fe63ba491e 100644 --- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp @@ -191,7 +191,9 @@ bool GenerateDesktopFile( if (!QDir(targetPath).exists()) QDir().mkpath(targetPath); const auto sourceFile = kDesktopFile.utf16(); - const auto targetFile = targetPath + QGuiApplication::desktopFileName(); + const auto targetFile = targetPath + + QGuiApplication::desktopFileName() + + u".desktop"_q; const auto sourceText = [&] { QFile source(sourceFile); @@ -332,7 +334,7 @@ bool GenerateServiceFile(bool silent = false) { QStandardPaths::GenericDataLocation) + u"/dbus-1/services/"_q; const auto targetFile = targetPath - + QGuiApplication::desktopFileName().chopped(8) + + QGuiApplication::desktopFileName() + u".service"_q; DEBUG_LOG(("App Info: placing .service file to %1").arg(targetPath)); @@ -344,7 +346,7 @@ bool GenerateServiceFile(bool silent = false) { target->set_string( group, "Name", - QGuiApplication::desktopFileName().chopped(8).toStdString()); + QGuiApplication::desktopFileName().toStdString()); target->set_string( group, @@ -455,7 +457,9 @@ void AutostartToggle(bool enabled, Fn done) { if (!enabled) { return QFile::remove( - autostart + QGuiApplication::desktopFileName()); + autostart + + QGuiApplication::desktopFileName() + + u".desktop"_q); } return GenerateDesktopFile( @@ -557,14 +561,13 @@ void start() { QGuiApplication::setDesktopFileName([&] { if (KSandbox::isFlatpak()) { - return qEnvironmentVariable("FLATPAK_ID") + u".desktop"_q; + return qEnvironmentVariable("FLATPAK_ID"); } if (KSandbox::isSnap()) { return qEnvironmentVariable("SNAP_INSTANCE_NAME") + '_' - + cExeName() - + u".desktop"_q; + + cExeName(); } if (!Core::UpdaterDisabled()) { @@ -579,14 +582,13 @@ void start() { md5Hash.data()); } - return u"org.telegram.desktop._%1.desktop"_q.arg( - md5Hash.constData()); + return u"org.telegram.desktop._%1"_q.arg(md5Hash.constData()); } - return u"org.telegram.desktop.desktop"_q; + return u"org.telegram.desktop"_q; }()); - LOG(("Launcher filename: %1").arg(QGuiApplication::desktopFileName())); + LOG(("App ID: %1").arg(QGuiApplication::desktopFileName())); if (!qEnvironmentVariableIsSet("XDG_ACTIVATION_TOKEN") && qEnvironmentVariableIsSet("DESKTOP_STARTUP_ID")) { diff --git a/Telegram/lib_base b/Telegram/lib_base index 9aaee89076561..4efa613fe3fb5 160000 --- a/Telegram/lib_base +++ b/Telegram/lib_base @@ -1 +1 @@ -Subproject commit 9aaee890765618e9d9ea52fba0a03ab4baa7dfda +Subproject commit 4efa613fe3fb5e1db8a4c53b08852cfe538d2601 diff --git a/Telegram/lib_webview b/Telegram/lib_webview index 5c3e82bfe7162..ec24c7a960362 160000 --- a/Telegram/lib_webview +++ b/Telegram/lib_webview @@ -1 +1 @@ -Subproject commit 5c3e82bfe71627ddeffee6ec44a7215bfb52e38e +Subproject commit ec24c7a96036268b2024ca9765a66c63e6b8396a From 59bb46aa406a0e446aec4984025045e86881b2f7 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Wed, 19 Jul 2023 22:58:22 +0400 Subject: [PATCH 4/4] Update Qt to 6.5.2 on Linux --- Telegram/build/docker/centos_env/Dockerfile | 4 ++-- snap/snapcraft.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Telegram/build/docker/centos_env/Dockerfile b/Telegram/build/docker/centos_env/Dockerfile index a7de4ed0d7dd1..88fe34eb212f9 100644 --- a/Telegram/build/docker/centos_env/Dockerfile +++ b/Telegram/build/docker/centos_env/Dockerfile @@ -1,6 +1,6 @@ {%- set GIT = "https://github.com" -%} {%- set GIT_FREEDESKTOP = GIT ~ "/gitlab-freedesktop-mirrors" -%} -{%- set QT = "6.5.1" -%} +{%- set QT = "6.5.2" -%} {%- set QT_TAG = "v" ~ QT -%} {%- set QT_PREFIX = "/usr/local/desktop-app/Qt-" ~ QT -%} {%- set OPENSSL_VER = "1_1_1" -%} @@ -59,7 +59,7 @@ FROM builder AS patches RUN git init patches \ && cd patches \ && git remote add origin {{ GIT }}/desktop-app/patches.git \ - && git fetch --depth=1 origin 963f5b0c2a57f7e90239e64c9e14ed5f043e637e \ + && git fetch --depth=1 origin 523b061671d4dd2f29979c982a2d03c2cc8eaf4f \ && git reset --hard FETCH_HEAD \ && rm -rf .git diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 693773d0bc141..f6ccbea640962 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -461,7 +461,7 @@ parts: - libxkbcommon-x11-0 - zlib1g override-pull: | - QT=6.5.1 + QT=6.5.2 git clone -b v${QT} --depth=1 https://code.qt.io/qt/qt5.git . git submodule update --init --recursive --depth=1 qtbase qtdeclarative qtwayland qtimageformats qtsvg qtshadertools