mirror of
https://github.com/vale981/tdesktop
synced 2025-03-05 09:41:41 -05:00
Version 1.0.27: Fix launch in Ubuntu 17.04
Ubuntu 17.04 launch results in segfault if the build was done by GCC 6.2 (works fine with GCC 4.9). Backtrace shows that it crashes in gtk_init_check() call somewhere in libmirclient and tests show that it works fine with GDK_BACKEND=x11. So we use gdk_set_allowed_backends() method to explicitly state that we support only "x11" GDK backend, that way it doesn't try to use libmirclient and it does not crash. Fix #3176 #3162
This commit is contained in:
parent
df6972eeba
commit
8884cb190a
8 changed files with 39 additions and 19 deletions
|
@ -9,7 +9,7 @@
|
||||||
<Identity Name="TelegramMessengerLLP.TelegramDesktop"
|
<Identity Name="TelegramMessengerLLP.TelegramDesktop"
|
||||||
ProcessorArchitecture="x64"
|
ProcessorArchitecture="x64"
|
||||||
Publisher="CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A"
|
Publisher="CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A"
|
||||||
Version="1.0.26.0" />
|
Version="1.0.27.0" />
|
||||||
<Properties>
|
<Properties>
|
||||||
<DisplayName>Telegram Desktop</DisplayName>
|
<DisplayName>Telegram Desktop</DisplayName>
|
||||||
<PublisherDisplayName>Telegram Messenger LLP</PublisherDisplayName>
|
<PublisherDisplayName>Telegram Messenger LLP</PublisherDisplayName>
|
||||||
|
|
|
@ -34,8 +34,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico"
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 1,0,26,0
|
FILEVERSION 1,0,27,0
|
||||||
PRODUCTVERSION 1,0,26,0
|
PRODUCTVERSION 1,0,27,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -52,10 +52,10 @@ BEGIN
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "Telegram Messenger LLP"
|
VALUE "CompanyName", "Telegram Messenger LLP"
|
||||||
VALUE "FileDescription", "Telegram Desktop"
|
VALUE "FileDescription", "Telegram Desktop"
|
||||||
VALUE "FileVersion", "1.0.26.0"
|
VALUE "FileVersion", "1.0.27.0"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2014-2017"
|
VALUE "LegalCopyright", "Copyright (C) 2014-2017"
|
||||||
VALUE "ProductName", "Telegram Desktop"
|
VALUE "ProductName", "Telegram Desktop"
|
||||||
VALUE "ProductVersion", "1.0.26.0"
|
VALUE "ProductVersion", "1.0.27.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
|
@ -25,8 +25,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 1,0,26,0
|
FILEVERSION 1,0,27,0
|
||||||
PRODUCTVERSION 1,0,26,0
|
PRODUCTVERSION 1,0,27,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -43,10 +43,10 @@ BEGIN
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "Telegram Messenger LLP"
|
VALUE "CompanyName", "Telegram Messenger LLP"
|
||||||
VALUE "FileDescription", "Telegram Desktop Updater"
|
VALUE "FileDescription", "Telegram Desktop Updater"
|
||||||
VALUE "FileVersion", "1.0.26.0"
|
VALUE "FileVersion", "1.0.27.0"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2014-2017"
|
VALUE "LegalCopyright", "Copyright (C) 2014-2017"
|
||||||
VALUE "ProductName", "Telegram Desktop"
|
VALUE "ProductName", "Telegram Desktop"
|
||||||
VALUE "ProductVersion", "1.0.26.0"
|
VALUE "ProductVersion", "1.0.27.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
|
@ -24,7 +24,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
||||||
|
|
||||||
#define BETA_VERSION_MACRO (0ULL)
|
#define BETA_VERSION_MACRO (0ULL)
|
||||||
|
|
||||||
constexpr int AppVersion = 1000026;
|
constexpr int AppVersion = 1000027;
|
||||||
constexpr str_const AppVersionStr = "1.0.26";
|
constexpr str_const AppVersionStr = "1.0.27";
|
||||||
constexpr bool AppAlphaVersion = false;
|
constexpr bool AppAlphaVersion = false;
|
||||||
constexpr uint64 AppBetaVersion = BETA_VERSION_MACRO;
|
constexpr uint64 AppBetaVersion = BETA_VERSION_MACRO;
|
||||||
|
|
|
@ -111,6 +111,17 @@ bool setupGtkBase(QLibrary &lib_gtk) {
|
||||||
if (!load(lib_gtk, "g_error_free", g_error_free)) return false;
|
if (!load(lib_gtk, "g_error_free", g_error_free)) return false;
|
||||||
if (!load(lib_gtk, "g_slist_free", g_slist_free)) return false;
|
if (!load(lib_gtk, "g_slist_free", g_slist_free)) return false;
|
||||||
|
|
||||||
|
DEBUG_LOG(("Library gtk functions loaded!"));
|
||||||
|
|
||||||
|
if (load(lib_gtk, "gdk_set_allowed_backends", gdk_set_allowed_backends)) {
|
||||||
|
// We work only with X11 GDK backend.
|
||||||
|
// Otherwise we get segfault in Ubuntu 17.04 in gtk_init_check() call.
|
||||||
|
// See https://github.com/telegramdesktop/tdesktop/issues/3176
|
||||||
|
// See https://github.com/telegramdesktop/tdesktop/issues/3162
|
||||||
|
DEBUG_LOG(("Limit allowed GDK backends to x11"));
|
||||||
|
gdk_set_allowed_backends("x11");
|
||||||
|
}
|
||||||
|
|
||||||
DEBUG_LOG(("Library gtk functions loaded!"));
|
DEBUG_LOG(("Library gtk functions loaded!"));
|
||||||
if (!gtk_init_check(0, 0)) {
|
if (!gtk_init_check(0, 0)) {
|
||||||
gtk_init_check = nullptr;
|
gtk_init_check = nullptr;
|
||||||
|
@ -181,6 +192,7 @@ f_gtk_image_set_from_pixbuf gtk_image_set_from_pixbuf = nullptr;
|
||||||
f_gtk_dialog_get_widget_for_response gtk_dialog_get_widget_for_response = nullptr;
|
f_gtk_dialog_get_widget_for_response gtk_dialog_get_widget_for_response = nullptr;
|
||||||
f_gtk_button_set_label gtk_button_set_label = nullptr;
|
f_gtk_button_set_label gtk_button_set_label = nullptr;
|
||||||
f_gtk_button_get_type gtk_button_get_type = nullptr;
|
f_gtk_button_get_type gtk_button_get_type = nullptr;
|
||||||
|
f_gdk_set_allowed_backends gdk_set_allowed_backends = nullptr;
|
||||||
f_gdk_window_set_modal_hint gdk_window_set_modal_hint = nullptr;
|
f_gdk_window_set_modal_hint gdk_window_set_modal_hint = nullptr;
|
||||||
f_gdk_window_focus gdk_window_focus = nullptr;
|
f_gdk_window_focus gdk_window_focus = nullptr;
|
||||||
f_gtk_dialog_get_type gtk_dialog_get_type = nullptr;
|
f_gtk_dialog_get_type gtk_dialog_get_type = nullptr;
|
||||||
|
|
|
@ -44,12 +44,12 @@ bool load(QLibrary &lib, const char *name, Function &func) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
func = reinterpret_cast<Function>(lib.resolve(name));
|
func = reinterpret_cast<Function>(lib.resolve(name));
|
||||||
if (func) {
|
if (func) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
LOG(("Error: failed to load '%1' function!").arg(name));
|
LOG(("Error: failed to load '%1' function!").arg(name));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef gboolean (*f_gtk_init_check)(int *argc, char ***argv);
|
typedef gboolean (*f_gtk_init_check)(int *argc, char ***argv);
|
||||||
|
@ -181,6 +181,9 @@ extern f_gtk_image_new gtk_image_new;
|
||||||
typedef void (*f_gtk_image_set_from_pixbuf)(GtkImage *image, GdkPixbuf *pixbuf);
|
typedef void (*f_gtk_image_set_from_pixbuf)(GtkImage *image, GdkPixbuf *pixbuf);
|
||||||
extern f_gtk_image_set_from_pixbuf gtk_image_set_from_pixbuf;
|
extern f_gtk_image_set_from_pixbuf gtk_image_set_from_pixbuf;
|
||||||
|
|
||||||
|
typedef void (*f_gdk_set_allowed_backends)(const gchar *backends);
|
||||||
|
extern f_gdk_set_allowed_backends gdk_set_allowed_backends;
|
||||||
|
|
||||||
typedef void (*f_gdk_window_set_modal_hint)(GdkWindow *window, gboolean modal);
|
typedef void (*f_gdk_window_set_modal_hint)(GdkWindow *window, gboolean modal);
|
||||||
extern f_gdk_window_set_modal_hint gdk_window_set_modal_hint;
|
extern f_gdk_window_set_modal_hint gdk_window_set_modal_hint;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
AppVersion 1000026
|
AppVersion 1000027
|
||||||
AppVersionStrMajor 1.0
|
AppVersionStrMajor 1.0
|
||||||
AppVersionStrSmall 1.0.26
|
AppVersionStrSmall 1.0.27
|
||||||
AppVersionStr 1.0.26
|
AppVersionStr 1.0.27
|
||||||
AlphaChannel 0
|
AlphaChannel 0
|
||||||
BetaVersion 0
|
BetaVersion 0
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
1.0.27 (31.03.17)
|
||||||
|
|
||||||
|
- Fix launch in Ubuntu 17.04.
|
||||||
|
- Update API scheme.
|
||||||
|
|
||||||
1.0.26 (30.03.17)
|
1.0.26 (30.03.17)
|
||||||
|
|
||||||
— Send MP4/MOV files as videos that will play right inside Telegram.
|
— Send MP4/MOV files as videos that will play right inside Telegram.
|
||||||
|
|
Loading…
Add table
Reference in a new issue