Telegram: bump version

This commit is contained in:
Gerasim Troeglazov
2018-10-19 19:27:19 +10:00
parent 0562b0b395
commit d7d1374f6e
4 changed files with 49 additions and 69 deletions

View File

@@ -1,6 +1,6 @@
From 68c8bd7d3abacff92bba9157cee42bc29ceef215 Mon Sep 17 00:00:00 2001 From 20fbc592b43f673b3e1fb2a2c2cc9ebe9541567d Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com> From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sun, 30 Sep 2018 12:33:03 +1000 Date: Fri, 19 Oct 2018 19:22:32 +1000
Subject: Add Haiku support Subject: Add Haiku support
@@ -12,30 +12,6 @@ index 0000000..6d80862
@@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
+[Paths] +[Paths]
+Libraries=:/gui/art +Libraries=:/gui/art
diff --git a/Telegram/Resources/qrc/telegram_emoji.qrc b/Telegram/Resources/qrc/telegram_emoji.qrc
index bb9ce0a..47a0c05 100644
--- a/Telegram/Resources/qrc/telegram_emoji.qrc
+++ b/Telegram/Resources/qrc/telegram_emoji.qrc
@@ -2,7 +2,5 @@
<qresource prefix="/gui">
<file alias="art/emoji.webp">../art/emoji.webp</file>
<file alias="art/emoji_125x.webp">../art/emoji_125x.webp</file>
- <file alias="art/emoji_150x.webp">../art/emoji_150x.webp</file>
- <file alias="art/emoji_200x.webp">../art/emoji_200x.webp</file>
</qresource>
</RCC>
diff --git a/Telegram/Resources/qrc/telegram_emoji2.qrc b/Telegram/Resources/qrc/telegram_emoji2.qrc
new file mode 100644
index 0000000..e1ddb8d
--- /dev/null
+++ b/Telegram/Resources/qrc/telegram_emoji2.qrc
@@ -0,0 +1,6 @@
+<RCC>
+ <qresource prefix="/gui">
+ <file alias="art/emoji_150x.webp">../art/emoji_150x.webp</file>
+ <file alias="art/emoji_200x.webp">../art/emoji_200x.webp</file>
+ </qresource>
+</RCC>
diff --git a/Telegram/Resources/qrc/telegram_haiku.qrc b/Telegram/Resources/qrc/telegram_haiku.qrc diff --git a/Telegram/Resources/qrc/telegram_haiku.qrc b/Telegram/Resources/qrc/telegram_haiku.qrc
new file mode 100644 new file mode 100644
index 0000000..33115f9 index 0000000..33115f9
@@ -204,10 +180,10 @@ index 0c71c39..32f29ee 100644
if (!updater.exists()) { if (!updater.exists()) {
QFileInfo current(curUpdater); QFileInfo current(curUpdater);
diff --git a/Telegram/SourceFiles/core/utils.h b/Telegram/SourceFiles/core/utils.h diff --git a/Telegram/SourceFiles/core/utils.h b/Telegram/SourceFiles/core/utils.h
index 0cd4059..1047a5f 100644 index 219dc22..7effe80 100644
--- a/Telegram/SourceFiles/core/utils.h --- a/Telegram/SourceFiles/core/utils.h
+++ b/Telegram/SourceFiles/core/utils.h +++ b/Telegram/SourceFiles/core/utils.h
@@ -411,6 +411,7 @@ enum DBIPlatform { @@ -396,6 +396,7 @@ enum DBIPlatform {
dbipLinux64 = 2, dbipLinux64 = 2,
dbipLinux32 = 3, dbipLinux32 = 3,
dbipMacOld = 4, dbipMacOld = 4,
@@ -216,7 +192,7 @@ index 0cd4059..1047a5f 100644
enum DBIPeerReportSpamStatus { enum DBIPeerReportSpamStatus {
diff --git a/Telegram/SourceFiles/export/data/export_data_types.cpp b/Telegram/SourceFiles/export/data/export_data_types.cpp diff --git a/Telegram/SourceFiles/export/data/export_data_types.cpp b/Telegram/SourceFiles/export/data/export_data_types.cpp
index 5479891..b48fe00 100644 index a2e26ed..f839c43 100644
--- a/Telegram/SourceFiles/export/data/export_data_types.cpp --- a/Telegram/SourceFiles/export/data/export_data_types.cpp
+++ b/Telegram/SourceFiles/export/data/export_data_types.cpp +++ b/Telegram/SourceFiles/export/data/export_data_types.cpp
@@ -225,6 +225,8 @@ Image ParseMaxImage( @@ -225,6 +225,8 @@ Image ParseMaxImage(
@@ -236,15 +212,16 @@ index 5479891..b48fe00 100644
return result; return result;
} }
@@ -406,6 +409,7 @@ Document ParseDocument( @@ -406,6 +409,8 @@ Document ParseDocument(
const QString &suggestedFolder, const QString &suggestedFolder,
TimeId date) { TimeId date) {
auto result = Document(); auto result = Document();
+// GCC7 Segmentation violation for Haiku
+#ifndef __HAIKU__ +#ifndef __HAIKU__
data.match([&](const MTPDdocument &data) { data.match([&](const MTPDdocument &data) {
result.id = data.vid.v; result.id = data.vid.v;
result.date = data.vdate.v; result.date = data.vdate.v;
@@ -442,6 +446,7 @@ Document ParseDocument( @@ -442,6 +447,7 @@ Document ParseDocument(
}, [&](const MTPDdocumentEmpty &data) { }, [&](const MTPDdocumentEmpty &data) {
result.id = data.vid.v; result.id = data.vid.v;
}); });
@@ -252,15 +229,16 @@ index 5479891..b48fe00 100644
return result; return result;
} }
@@ -1043,6 +1048,7 @@ Message ParseMessage( @@ -1043,6 +1049,8 @@ Message ParseMessage(
const MTPMessage &data, const MTPMessage &data,
const QString &mediaFolder) { const QString &mediaFolder) {
auto result = Message(); auto result = Message();
+// GCC7 Segmentation violation for Haiku
+#ifndef __HAIKU__ +#ifndef __HAIKU__
data.match([&](const auto &data) { data.match([&](const auto &data) {
result.id = data.vid.v; result.id = data.vid.v;
if constexpr (!MTPDmessageEmpty::Is<decltype(data)>()) { if constexpr (!MTPDmessageEmpty::Is<decltype(data)>()) {
@@ -1131,6 +1137,7 @@ Message ParseMessage( @@ -1131,6 +1139,7 @@ Message ParseMessage(
}, [&](const MTPDmessageEmpty &data) { }, [&](const MTPDmessageEmpty &data) {
result.id = data.vid.v; result.id = data.vid.v;
}); });
@@ -269,7 +247,7 @@ index 5479891..b48fe00 100644
} }
diff --git a/Telegram/SourceFiles/export/export_api_wrap.cpp b/Telegram/SourceFiles/export/export_api_wrap.cpp diff --git a/Telegram/SourceFiles/export/export_api_wrap.cpp b/Telegram/SourceFiles/export/export_api_wrap.cpp
index dee4a09..efb0ab2 100644 index f183f3b..a9791dc 100644
--- a/Telegram/SourceFiles/export/export_api_wrap.cpp --- a/Telegram/SourceFiles/export/export_api_wrap.cpp
+++ b/Telegram/SourceFiles/export/export_api_wrap.cpp +++ b/Telegram/SourceFiles/export/export_api_wrap.cpp
@@ -719,6 +719,8 @@ void ApiWrap::requestUserpics( @@ -719,6 +719,8 @@ void ApiWrap::requestUserpics(
@@ -289,17 +267,16 @@ index dee4a09..efb0ab2 100644
} }
void ApiWrap::loadUserpicsFiles(Data::UserpicsSlice &&slice) { void ApiWrap::loadUserpicsFiles(Data::UserpicsSlice &&slice) {
@@ -1199,7 +1202,8 @@ void ApiWrap::appendChatsSlice( @@ -1240,6 +1243,8 @@ void ApiWrap::appendChatsSlice(
void ApiWrap::requestMessagesSlice() { void ApiWrap::requestMessagesSlice() {
Expects(_chatProcess != nullptr); Expects(_chatProcess != nullptr);
-
+// GCC7 Segmentation violation for Haiku +// GCC7 Segmentation violation for Haiku
+#ifndef __HAIKU__ +#ifndef __HAIKU__
requestChatMessages( const auto count = _chatProcess->info.messagesCountPerSplit[
_chatProcess->info.splits[_chatProcess->localSplitIndex], _chatProcess->localSplitIndex];
_chatProcess->largestIdPlusOne, if (!count) {
@@ -1222,6 +1226,7 @@ void ApiWrap::requestMessagesSlice() { @@ -1268,6 +1273,7 @@ void ApiWrap::requestMessagesSlice() {
_chatProcess->info.relativePath)); _chatProcess->info.relativePath));
}); });
}); });
@@ -308,18 +285,18 @@ index dee4a09..efb0ab2 100644
void ApiWrap::requestChatMessages( void ApiWrap::requestChatMessages(
diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp
index c09b2ff..4a04e83 100644 index ed2c7ce..1a6d4e1 100644
--- a/Telegram/SourceFiles/logs.cpp --- a/Telegram/SourceFiles/logs.cpp
+++ b/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp
@@ -332,7 +332,7 @@ void start(not_null<Core::Launcher*> launcher) { @@ -333,7 +333,7 @@ void start(not_null<Core::Launcher*> launcher) {
if (cAlphaVersion()) { if (cAlphaVersion()) {
workingDirChosen = true; workingDirChosen = true;
-#if defined Q_OS_MAC || defined Q_OS_LINUX -#if defined Q_OS_MAC || defined Q_OS_LINUX
+#if defined Q_OS_MAC || defined Q_OS_LINUX || defined Q_OS_HAIKU +#if defined Q_OS_MAC || defined Q_OS_LINUX || defined Q_OS_HAIKU
} else { } else {
#ifdef _DEBUG if (!cWorkingDir().isEmpty()) {
cForceWorkingDir(cExeDir()); // This value must come from TelegramForcePortable
diff --git a/Telegram/SourceFiles/media/media_audio.cpp b/Telegram/SourceFiles/media/media_audio.cpp diff --git a/Telegram/SourceFiles/media/media_audio.cpp b/Telegram/SourceFiles/media/media_audio.cpp
index fb46a00..752e7ef 100644 index fb46a00..752e7ef 100644
--- a/Telegram/SourceFiles/media/media_audio.cpp --- a/Telegram/SourceFiles/media/media_audio.cpp
@@ -1070,7 +1047,7 @@ index 0000000..b6f3490
+resource app_signature "application/x-vnd.tg-notify-gate"; +resource app_signature "application/x-vnd.tg-notify-gate";
diff --git a/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.cpp b/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.cpp diff --git a/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.cpp b/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.cpp
new file mode 100644 new file mode 100644
index 0000000..8a75ed7 index 0000000..410bdf9
--- /dev/null --- /dev/null
+++ b/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.cpp +++ b/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.cpp
@@ -0,0 +1,214 @@ @@ -0,0 +1,214 @@
@@ -1154,6 +1131,7 @@ index 0000000..8a75ed7
+ for(;;) { + for(;;) {
+ FILE *in=fopen(NOTIFY_FIFO_NAME, "rt"); + FILE *in=fopen(NOTIFY_FIFO_NAME, "rt");
+ fgets(line, sizeof line, in); + fgets(line, sizeof line, in);
+ fclose(in);
+ if (line[strlen(line)-1] == '\n') { + if (line[strlen(line)-1] == '\n') {
+ uint64 peerid = 0; + uint64 peerid = 0;
+ int32 msgid = 0; + int32 msgid = 0;
@@ -1167,7 +1145,6 @@ index 0000000..8a75ed7
+ notificationActivated(peerid, msgid); + notificationActivated(peerid, msgid);
+ } + }
+ } + }
+ fclose(in);
+ } + }
+} +}
+ +
@@ -1422,10 +1399,10 @@ index 0000000..53491b6
+} // namespace Platform +} // namespace Platform
diff --git a/Telegram/SourceFiles/platform/haiku/specific_haiku.cpp b/Telegram/SourceFiles/platform/haiku/specific_haiku.cpp diff --git a/Telegram/SourceFiles/platform/haiku/specific_haiku.cpp b/Telegram/SourceFiles/platform/haiku/specific_haiku.cpp
new file mode 100644 new file mode 100644
index 0000000..4ce6ac6 index 0000000..143fa79
--- /dev/null --- /dev/null
+++ b/Telegram/SourceFiles/platform/haiku/specific_haiku.cpp +++ b/Telegram/SourceFiles/platform/haiku/specific_haiku.cpp
@@ -0,0 +1,404 @@ @@ -0,0 +1,415 @@
+/* +/*
+This file is part of Telegram Desktop, +This file is part of Telegram Desktop,
+the official desktop version of Telegram messaging app, see https://telegram.org +the official desktop version of Telegram messaging app, see https://telegram.org
@@ -1770,6 +1747,17 @@ index 0000000..4ce6ac6
+void RegisterCustomScheme() { +void RegisterCustomScheme() {
+} +}
+ +
+PermissionStatus GetPermissionStatus(PermissionType type){
+ return PermissionStatus::Granted;
+}
+
+void RequestPermission(PermissionType type, Fn<void(PermissionStatus)> resultCallback){
+ resultCallback(PermissionStatus::Granted);
+}
+
+void OpenSystemSettingsForPermission(PermissionType type){
+}
+
+namespace ThirdParty { +namespace ThirdParty {
+ +
+void start() { +void start() {
@@ -2023,10 +2011,10 @@ index 692f4b4..a40f830 100644
#include "platform/win/notifications_manager_win.h" #include "platform/win/notifications_manager_win.h"
#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WIN #endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WIN
diff --git a/Telegram/SourceFiles/platform/platform_specific.h b/Telegram/SourceFiles/platform/platform_specific.h diff --git a/Telegram/SourceFiles/platform/platform_specific.h b/Telegram/SourceFiles/platform/platform_specific.h
index 92485c7..ebe4a4f 100644 index 03a32b2..1e17970 100644
--- a/Telegram/SourceFiles/platform/platform_specific.h --- a/Telegram/SourceFiles/platform/platform_specific.h
+++ b/Telegram/SourceFiles/platform/platform_specific.h +++ b/Telegram/SourceFiles/platform/platform_specific.h
@@ -36,6 +36,8 @@ void finish(); @@ -49,6 +49,8 @@ void finish();
#include "platform/mac/specific_mac.h" #include "platform/mac/specific_mac.h"
#elif defined Q_OS_LINUX // Q_OS_MAC #elif defined Q_OS_LINUX // Q_OS_MAC
#include "platform/linux/specific_linux.h" #include "platform/linux/specific_linux.h"
@@ -2098,10 +2086,10 @@ index 9c697fc..36ddf56 100644
#include <rpl/rpl.h> #include <rpl/rpl.h>
#include <string> #include <string>
diff --git a/Telegram/SourceFiles/settings.cpp b/Telegram/SourceFiles/settings.cpp diff --git a/Telegram/SourceFiles/settings.cpp b/Telegram/SourceFiles/settings.cpp
index 48c947d..a3784de 100644 index 0ab38d6..82f8a1f 100644
--- a/Telegram/SourceFiles/settings.cpp --- a/Telegram/SourceFiles/settings.cpp
+++ b/Telegram/SourceFiles/settings.cpp +++ b/Telegram/SourceFiles/settings.cpp
@@ -77,6 +77,8 @@ DBIPlatform gPlatform = dbipWindows; @@ -74,6 +74,8 @@ DBIPlatform gPlatform = dbipWindows;
DBIPlatform gPlatform = dbipMacOld; DBIPlatform gPlatform = dbipMacOld;
#elif defined Q_OS_MAC #elif defined Q_OS_MAC
DBIPlatform gPlatform = dbipMac; DBIPlatform gPlatform = dbipMac;
@@ -2157,7 +2145,7 @@ index 7f5c191..649255c 100644
#define FOPEN_FUNC(filename, mode) fopen(filename, mode) #define FOPEN_FUNC(filename, mode) fopen(filename, mode)
#define FTELLO_FUNC(stream) ftello(stream) #define FTELLO_FUNC(stream) ftello(stream)
diff --git a/Telegram/gyp/Telegram.gyp b/Telegram/gyp/Telegram.gyp diff --git a/Telegram/gyp/Telegram.gyp b/Telegram/gyp/Telegram.gyp
index 2c6ef58..73da5e1 100644 index 7ff8dff..301e0f4 100644
--- a/Telegram/gyp/Telegram.gyp --- a/Telegram/gyp/Telegram.gyp
+++ b/Telegram/gyp/Telegram.gyp +++ b/Telegram/gyp/Telegram.gyp
@@ -61,6 +61,7 @@ @@ -61,6 +61,7 @@
@@ -2566,18 +2554,10 @@ index 0000000..171c216
+ }]], + }]],
+} +}
diff --git a/Telegram/gyp/telegram_qrc.gypi b/Telegram/gyp/telegram_qrc.gypi diff --git a/Telegram/gyp/telegram_qrc.gypi b/Telegram/gyp/telegram_qrc.gypi
index 77b126d..6c27563 100644 index a8c936d..86a58d7 100644
--- a/Telegram/gyp/telegram_qrc.gypi --- a/Telegram/gyp/telegram_qrc.gypi
+++ b/Telegram/gyp/telegram_qrc.gypi +++ b/Telegram/gyp/telegram_qrc.gypi
@@ -9,6 +9,7 @@ @@ -24,6 +24,13 @@
'qrc_files': [
'<(res_loc)/qrc/telegram.qrc',
'<(res_loc)/qrc/telegram_emoji.qrc',
+ '<(res_loc)/qrc/telegram_emoji2.qrc',
'<(res_loc)/qrc/telegram_emoji_large.qrc',
'<(res_loc)/qrc/telegram_sounds.qrc',
],
@@ -21,6 +22,13 @@
], ],
} }
}], }],
@@ -2592,10 +2572,10 @@ index 77b126d..6c27563 100644
'variables': { 'variables': {
'qrc_files': [ 'qrc_files': [
diff --git a/Telegram/gyp/telegram_sources.txt b/Telegram/gyp/telegram_sources.txt diff --git a/Telegram/gyp/telegram_sources.txt b/Telegram/gyp/telegram_sources.txt
index 46bd016..f16a2f8 100644 index 3eedaab..1dac791 100644
--- a/Telegram/gyp/telegram_sources.txt --- a/Telegram/gyp/telegram_sources.txt
+++ b/Telegram/gyp/telegram_sources.txt +++ b/Telegram/gyp/telegram_sources.txt
@@ -475,6 +475,18 @@ @@ -473,6 +473,18 @@
<(src_loc)/platform/linux/notifications_manager_linux.h <(src_loc)/platform/linux/notifications_manager_linux.h
<(src_loc)/platform/linux/specific_linux.cpp <(src_loc)/platform/linux/specific_linux.cpp
<(src_loc)/platform/linux/specific_linux.h <(src_loc)/platform/linux/specific_linux.h
@@ -2633,5 +2613,5 @@ index 622462e..e3ba800 100644
'include_dirs': [ 'include_dirs': [
'<(libs_loc)/openssl/include' '<(libs_loc)/openssl/include'
-- --
2.19.0 2.19.1

View File

@@ -5,7 +5,7 @@ COPYRIGHT="2013-2018 Telegram"
LICENSE="GNU GPL v3" LICENSE="GNU GPL v3"
REVISION="1" REVISION="1"
SOURCE_URI="https://github.com/telegramdesktop/tdesktop/archive/v$portVersion.tar.gz" SOURCE_URI="https://github.com/telegramdesktop/tdesktop/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="e3ee54461dae5552b41b6b56f12225a4d546118b2e2d4d864442e4462da97a9b" CHECKSUM_SHA256="1a34737347b0fdd7f935213de9c39f40f7cf161a6cad10cceb1126ff74f7b4a9"
SOURCE_FILENAME="tdesktop-$portVersion.tar.gz" SOURCE_FILENAME="tdesktop-$portVersion.tar.gz"
SOURCE_DIR="tdesktop-$portVersion" SOURCE_DIR="tdesktop-$portVersion"
srcGitRev_2="697eea96aa90205db4fc368df4127eef56b2a5c6" srcGitRev_2="697eea96aa90205db4fc368df4127eef56b2a5c6"