Unverified Commit 705dfeeb authored by K900's avatar K900 Committed by GitHub
Browse files

kotatogram-desktop: fix build with GLib 2.86 (#462895)

parents 40d5fe78 c4158e60
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ telegram-desktop.override {

    patches = [
      ./macos-qt5.patch
      ./glib-2.86.patch
      (fetchpatch {
        url = "https://gitlab.com/mnauw/cppgir/-/commit/c8bb1c6017a6f7f2e47bd10543aea6b3ec69a966.patch";
        stripLen = 1;
+37 −0
Original line number Diff line number Diff line
Submodule Telegram/lib_base contains modified content
diff --git a/Telegram/lib_base/base/platform/linux/base_url_scheme_linux.cpp b/Telegram/lib_base/base/platform/linux/base_url_scheme_linux.cpp
index 4197367..f79d2fa 100644
--- a/Telegram/lib_base/base/platform/linux/base_url_scheme_linux.cpp
+++ b/Telegram/lib_base/base/platform/linux/base_url_scheme_linux.cpp
@@ -15,7 +15,7 @@
 #include <kshell.h>
 #include <ksandbox.h>
 
-#include <gio/gio.hpp>
+#include <giounix/giounix.hpp>
 #include <snapcraft/snapcraft.hpp>
 
 namespace base::Platform {
@@ -125,7 +125,7 @@ void RegisterUrlScheme(const UrlSchemeDescriptor &descriptor) {
 
     const auto appId = QGuiApplication::desktopFileName().toStdString();
     if (!appId.empty()) {
-        Gio::AppInfo appInfo = Gio::DesktopAppInfo::new_(appId + ".desktop");
+        Gio::AppInfo appInfo = GioUnix::DesktopAppInfo::new_(appId + ".desktop");
         if (appInfo) {
             if (appInfo.get_commandline() == commandlineForCreator + " %u") {
                 appInfo.set_as_default_for_type(handlerType);
Submodule cmake contains modified content
diff --git a/cmake/external/glib/CMakeLists.txt b/cmake/external/glib/CMakeLists.txt
index 3c6fe4b..6f73dc5 100644
--- a/cmake/external/glib/CMakeLists.txt
+++ b/cmake/external/glib/CMakeLists.txt
@@ -16,7 +16,7 @@ endfunction()
 add_cppgir()
 
 include(generate_cppgir.cmake)
-generate_cppgir(external_glib Gio-2.0)
+generate_cppgir(external_glib GioUnix-2.0)
 
 find_package(PkgConfig REQUIRED)
 pkg_check_modules(GLIB2 REQUIRED IMPORTED_TARGET glib-2.0 gobject-2.0 gio-2.0 gio-unix-2.0)