From 0de50808743cfeaff0925cf7a63fdda207e29e85 Mon Sep 17 00:00:00 2001
From: John Preston <johnprestonmail@gmail.com>
Date: Fri, 2 Aug 2024 18:12:03 +0300
Subject: [PATCH] Version 5.3.2.

- Fix crash on launch by focing non-LTO jemalloc build.

Fixes #28213, fixes #28221.
---
 Telegram/Resources/uwp/AppX/AppxManifest.xml | 2 +-
 Telegram/Resources/winrc/Telegram.rc         | 8 ++++----
 Telegram/Resources/winrc/Updater.rc          | 8 ++++----
 Telegram/SourceFiles/core/version.h          | 4 ++--
 Telegram/build/version                       | 8 ++++----
 changelog.txt                                | 4 ++++
 cmake                                        | 2 +-
 7 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/Telegram/Resources/uwp/AppX/AppxManifest.xml b/Telegram/Resources/uwp/AppX/AppxManifest.xml
index 261fb0911..89f5f8761 100644
--- a/Telegram/Resources/uwp/AppX/AppxManifest.xml
+++ b/Telegram/Resources/uwp/AppX/AppxManifest.xml
@@ -10,7 +10,7 @@
   <Identity Name="TelegramMessengerLLP.TelegramDesktop"
     ProcessorArchitecture="ARCHITECTURE"
     Publisher="CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A"
-    Version="5.3.1.0" />
+    Version="5.3.2.0" />
   <Properties>
     <DisplayName>Telegram Desktop</DisplayName>
     <PublisherDisplayName>Telegram Messenger LLP</PublisherDisplayName>
diff --git a/Telegram/Resources/winrc/Telegram.rc b/Telegram/Resources/winrc/Telegram.rc
index eb9e2d265..eb4271d8a 100644
--- a/Telegram/Resources/winrc/Telegram.rc
+++ b/Telegram/Resources/winrc/Telegram.rc
@@ -44,8 +44,8 @@ IDI_ICON1               ICON                    "..\\art\\icon256.ico"
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 5,3,1,0
- PRODUCTVERSION 5,3,1,0
+ FILEVERSION 5,3,2,0
+ PRODUCTVERSION 5,3,2,0
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -62,10 +62,10 @@ BEGIN
         BEGIN
             VALUE "CompanyName", "Telegram FZ-LLC"
             VALUE "FileDescription", "Telegram Desktop"
-            VALUE "FileVersion", "5.3.1.0"
+            VALUE "FileVersion", "5.3.2.0"
             VALUE "LegalCopyright", "Copyright (C) 2014-2024"
             VALUE "ProductName", "Telegram Desktop"
-            VALUE "ProductVersion", "5.3.1.0"
+            VALUE "ProductVersion", "5.3.2.0"
         END
     END
     BLOCK "VarFileInfo"
diff --git a/Telegram/Resources/winrc/Updater.rc b/Telegram/Resources/winrc/Updater.rc
index 9e4b2aced..d7e88ba04 100644
--- a/Telegram/Resources/winrc/Updater.rc
+++ b/Telegram/Resources/winrc/Updater.rc
@@ -35,8 +35,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 5,3,1,0
- PRODUCTVERSION 5,3,1,0
+ FILEVERSION 5,3,2,0
+ PRODUCTVERSION 5,3,2,0
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -53,10 +53,10 @@ BEGIN
         BEGIN
             VALUE "CompanyName", "Telegram FZ-LLC"
             VALUE "FileDescription", "Telegram Desktop Updater"
-            VALUE "FileVersion", "5.3.1.0"
+            VALUE "FileVersion", "5.3.2.0"
             VALUE "LegalCopyright", "Copyright (C) 2014-2024"
             VALUE "ProductName", "Telegram Desktop"
-            VALUE "ProductVersion", "5.3.1.0"
+            VALUE "ProductVersion", "5.3.2.0"
         END
     END
     BLOCK "VarFileInfo"
diff --git a/Telegram/SourceFiles/core/version.h b/Telegram/SourceFiles/core/version.h
index 146e4b1f0..9fdc8cf18 100644
--- a/Telegram/SourceFiles/core/version.h
+++ b/Telegram/SourceFiles/core/version.h
@@ -22,7 +22,7 @@ constexpr auto AppId = "{53F49750-6209-4FBF-9CA8-7A333C87D1ED}"_cs;
 constexpr auto AppNameOld = "Telegram Win (Unofficial)"_cs;
 constexpr auto AppName = "Telegram Desktop"_cs;
 constexpr auto AppFile = "Telegram"_cs;
-constexpr auto AppVersion = 5003001;
-constexpr auto AppVersionStr = "5.3.1";
+constexpr auto AppVersion = 5003002;
+constexpr auto AppVersionStr = "5.3.2";
 constexpr auto AppBetaVersion = false;
 constexpr auto AppAlphaVersion = TDESKTOP_ALPHA_VERSION;
diff --git a/Telegram/build/version b/Telegram/build/version
index 928f3047d..37a420e7a 100644
--- a/Telegram/build/version
+++ b/Telegram/build/version
@@ -1,7 +1,7 @@
-AppVersion         5003001
+AppVersion         5003002
 AppVersionStrMajor 5.3
-AppVersionStrSmall 5.3.1
-AppVersionStr      5.3.1
+AppVersionStrSmall 5.3.2
+AppVersionStr      5.3.2
 BetaChannel        0
 AlphaVersion       0
-AppVersionOriginal 5.3.1
+AppVersionOriginal 5.3.2
diff --git a/changelog.txt b/changelog.txt
index cf6616399..e43e0dbe2 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,3 +1,7 @@
+5.3.2 (02.08.24)
+
+- Fix crash on launch in some Linux systems.
+
 5.3.1 (01.08.24)
 
 - Open normal links from tonsite-s in system browser.
diff --git a/cmake b/cmake
index 6a1ac8a4e..08de4f18f 160000
--- a/cmake
+++ b/cmake
@@ -1 +1 @@
-Subproject commit 6a1ac8a4eebb968ff6ca538088006a3d06d47421
+Subproject commit 08de4f18f5e4459689957b3aa115e10d8cbef9d6