Merge remote-tracking branch 'tdesktop/dev' into dev

This commit is contained in:
Eric Kotato 2020-05-09 04:03:24 +03:00
commit 21dffaf447
37 changed files with 318 additions and 180 deletions

View file

@ -14,6 +14,22 @@ jobs:
echo $tag
echo ::set-env name=LATEST_TAG::$tag
- name: Get the latest macOS version.
shell: python
run: |
import subprocess;
from xml.dom import minidom;
url = "https://osx.telegram.org/updates/versions.xml";
subprocess.check_call("wget %s" % url, shell=True);
xmldoc = minidom.parse('versions.xml');
itemlist = xmldoc.getElementsByTagName('enclosure');
ver = itemlist[0].attributes['sparkle:shortVersionString'].value;
print(ver);
subprocess.check_call("echo ::set-env name=%s::%s" % ("LATEST_MACOS", ver), shell=True);
- name: Check a version from an issue.
uses: actions/github-script@0.4.0
with:
@ -75,10 +91,20 @@ jobs:
let issueNum = firstNum(issueVer);
let latestNum = firstNum(latestVer);
if (issueNum <= latestNum && issueNum < 5) {
let macos_ver = process.env.LATEST_MACOS;
console.log("Telegram for MacOS version from website: " + macos_ver);
if (issueNum <= latestNum && issueNum < macos_ver) {
console.log("Seems the version of this issue is fine!");
return;
}
if (issueNum > macos_ver) {
let message = `Seems like it's neither the Telegram Desktop\
nor the Telegram for macOS version.
`;
console.log(message);
return;
}
let message = `
Sorry, but according to the version you specify in this issue, \
@ -87,7 +113,7 @@ jobs:
You can report your issue to [the group](https://t.me/macswift) \
or to [the repository of Telegram for macOS](https://github.com/overtake/TelegramSwift).
If I made a mistake and closed your issue wrongly, please reopen it. Thanks!
**If I made a mistake and closed your issue wrongly, please reopen it. Thanks!**
`;
let params = {

View file

@ -338,19 +338,6 @@ jobs:
sudo cp -R ffmpeg-cache/. /
- name: PortAudio.
run: |
cd $LibrariesPath
git clone https://git.assembla.com/portaudio.git
cd portaudio
git checkout 396fe4b669
./configure
make -j$(nproc)
sudo make install
cd ..
rm -rf portaudio
- name: OpenAL Soft.
run: |
cd $LibrariesPath

27
.github/workflows/master_updater.yml vendored Normal file
View file

@ -0,0 +1,27 @@
name: Master branch updater.
on:
release:
types: released
jobs:
updater:
runs-on: ubuntu-latest
env:
SKIP: "0"
to_branch: "master"
steps:
- uses: actions/checkout@v1
- name: Push the code to the master branch.
run: |
url=https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
latest_tag=$(git describe --tags --abbrev=0)
echo "Latest tag: $latest_tag"
git remote set-url origin $url
git remote -v
git checkout master
git merge $latest_tag
git push origin HEAD:refs/heads/$to_branch
echo "Done!"

View file

@ -1057,6 +1057,8 @@ PRIVATE
qrc/emoji_3.qrc
qrc/emoji_4.qrc
qrc/emoji_5.qrc
qrc/emoji_6.qrc
qrc/emoji_7.qrc
qrc/emoji_preview.qrc
qrc/telegram/telegram.qrc
qrc/telegram/sounds.qrc

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 894 KiB

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 862 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

View file

@ -0,0 +1,5 @@
<RCC>
<qresource prefix="/gui">
<file alias="emoji/emoji_6.webp">../emoji/emoji_6.webp</file>
</qresource>
</RCC>

View file

@ -0,0 +1,5 @@
<RCC>
<qresource prefix="/gui">
<file alias="emoji/emoji_7.webp">../emoji/emoji_7.webp</file>
</qresource>
</RCC>

View file

@ -9,7 +9,7 @@
<Identity Name="TelegramMessengerLLP.TelegramDesktop"
ProcessorArchitecture="ARCHITECTURE"
Publisher="CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A"
Version="2.1.2.0" />
Version="2.1.4.0" />
<Properties>
<DisplayName>Telegram Desktop</DisplayName>
<PublisherDisplayName>Telegram FZ-LLC</PublisherDisplayName>

View file

@ -33,8 +33,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico"
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,1,2,0
PRODUCTVERSION 2,1,2,0
FILEVERSION 2,1,4,0
PRODUCTVERSION 2,1,4,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -51,10 +51,10 @@ BEGIN
BEGIN
VALUE "CompanyName", "Telegram FZ-LLC"
VALUE "FileDescription", "Telegram Desktop"
VALUE "FileVersion", "2.1.2.0"
VALUE "FileVersion", "2.1.4.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2020"
VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "2.1.2.0"
VALUE "ProductVersion", "2.1.4.0"
END
END
BLOCK "VarFileInfo"

View file

@ -24,8 +24,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,1,2,0
PRODUCTVERSION 2,1,2,0
FILEVERSION 2,1,4,0
PRODUCTVERSION 2,1,4,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -42,10 +42,10 @@ BEGIN
BEGIN
VALUE "CompanyName", "Telegram FZ-LLC"
VALUE "FileDescription", "Telegram Desktop Updater"
VALUE "FileVersion", "2.1.2.0"
VALUE "FileVersion", "2.1.4.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2020"
VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "2.1.2.0"
VALUE "ProductVersion", "2.1.4.0"
END
END
BLOCK "VarFileInfo"

View file

@ -82,6 +82,7 @@ MTPVector<MTPMessageEntity> EntitiesToMTP(
if (entity.length() <= 0) continue;
if (option == ConvertOption::SkipLocal
&& entity.type() != EntityType::Bold
//&& entity.type() != EntityType::Semibold // Not in API.
&& entity.type() != EntityType::Italic
&& entity.type() != EntityType::Underline
&& entity.type() != EntityType::StrikeOut

View file

@ -584,5 +584,9 @@ void ChooseRecipientBoxController::rowClicked(not_null<PeerListRow*> row) {
auto ChooseRecipientBoxController::createRow(
not_null<History*> history) -> std::unique_ptr<Row> {
return std::make_unique<Row>(history);
const auto peer = history->peer;
const auto skip = peer->isChannel()
&& !peer->isMegagroup()
&& !peer->canWrite();
return skip ? nullptr : std::make_unique<Row>(history);
}

View file

@ -40,15 +40,15 @@ inline auto PreviewPath(int i) {
const auto kSets = {
Set{ {0, 0, 0, "Mac"}, PreviewPath(0) },
Set{ {1, 246, 7'336'383, "Android"}, PreviewPath(1) },
Set{ {2, 206, 5'038'738, "Twemoji"}, PreviewPath(2) },
Set{ {3, 238, 6'992'260, "JoyPixels"}, PreviewPath(3) },
Set{ {1, 713, 7'313'166, "Android"}, PreviewPath(1) },
Set{ {2, 714, 4'690'333, "Twemoji"}, PreviewPath(2) },
Set{ {3, 716, 5'968'021, "JoyPixels"}, PreviewPath(3) },
};
using Loading = MTP::DedicatedLoader::Progress;
using SetState = BlobState;
class Loader : public BlobLoader {
class Loader final : public BlobLoader {
public:
Loader(
QObject *parent,
@ -60,6 +60,9 @@ public:
void destroy() override;
void unpack(const QString &path) override;
private:
void fail() override;
};
class Inner : public Ui::RpWidget {
@ -155,12 +158,14 @@ bool UnpackSet(const QString &path, const QString &folder) {
return UnpackBlob(path, folder, GoodSetPartName);
}
Loader::Loader(
QObject *parent,
int id,
MTP::DedicatedLoader::Location location,
const QString &folder,
int size) : BlobLoader(parent, id, location, folder, size) {
int size)
: BlobLoader(parent, id, location, folder, size) {
}
void Loader::unpack(const QString &path) {
@ -190,6 +195,11 @@ void Loader::destroy() {
SetGlobalLoader(nullptr);
}
void Loader::fail() {
ClearNeedSwitchToId();
BlobLoader::fail();
}
Inner::Inner(QWidget *parent) : RpWidget(parent) {
setupContent();
}
@ -401,12 +411,7 @@ void Row::setupHandler() {
}
void Row::load() {
SetGlobalLoader(base::make_unique_q<Loader>(
App::main(),
_id,
GetDownloadLocation(_id),
internal::SetDataPath(_id),
GetDownloadSize(_id)));
LoadAndSwitchTo(_id);
}
void Row::setupLabels(const Set &set) {
@ -538,5 +543,20 @@ void ManageSetsBox::prepare() {
setDimensionsToContent(st::boxWidth, inner);
}
void LoadAndSwitchTo(int id) {
Expects(App::main() != nullptr);
if (!ranges::contains(kSets, id, &Set::id)) {
ClearNeedSwitchToId();
return;
}
SetGlobalLoader(base::make_unique_q<Loader>(
App::main(),
id,
GetDownloadLocation(id),
internal::SetDataPath(id),
GetDownloadSize(id)));
}
} // namespace Emoji
} // namespace Ui

View file

@ -21,5 +21,7 @@ protected:
};
void LoadAndSwitchTo(int id);
} // namespace Emoji
} // namespace Ui

View file

@ -21,6 +21,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "boxes/connection_box.h"
#include "boxes/sticker_set_box.h"
#include "boxes/sessions_box.h"
#include "boxes/language_box.h"
#include "passport/passport_form_controller.h"
#include "window/window_session_controller.h"
#include "data/data_session.h"
@ -102,12 +103,21 @@ bool ShowTheme(
return true;
}
void ShowLanguagesBox() {
static auto Guard = base::binary_guard();
Guard = LanguageBox::Show();
}
bool SetLanguage(
Main::Session *session,
const Match &match,
const QVariant &context) {
const auto languageId = match->captured(1);
Lang::CurrentCloudManager().switchWithWarning(languageId);
if (match->capturedRef(1).isEmpty()) {
ShowLanguagesBox();
} else {
const auto languageId = match->captured(2);
Lang::CurrentCloudManager().switchWithWarning(languageId);
}
return true;
}
@ -358,6 +368,9 @@ bool ResolveSettings(
if (section == qstr("devices")) {
Ui::show(Box<SessionsBox>(session));
return true;
} else if (section == qstr("language")) {
ShowLanguagesBox();
return true;
}
const auto type = (section == qstr("folders"))
? ::Settings::Type::Folders
@ -450,7 +463,7 @@ const std::vector<LocalUrlHandler> &LocalUrlHandlers() {
ShowTheme
},
{
qsl("^setlanguage/?\\?lang=([a-zA-Z0-9\\.\\_\\-]+)(&|$)"),
qsl("^setlanguage/?(\\?lang=([a-zA-Z0-9\\.\\_\\-]+))?(&|$)"),
SetLanguage
},
{
@ -490,7 +503,7 @@ const std::vector<LocalUrlHandler> &LocalUrlHandlers() {
ResolvePrivatePost
},
{
qsl("^settings(/folders|/devices|/kotato)?$"),
qsl("^settings(/folders|/devices|/language|/kotato?$"),
ResolveSettings
},
{

View file

@ -23,7 +23,7 @@ constexpr auto AppId = "{C4A4AE8F-B9F7-4CC7-8A6C-BF7EEE87ACA5}"_cs;
constexpr auto AppNameOld = "Telegram Win (Unofficial)"_cs;
constexpr auto AppName = "Kotatogram Desktop"_cs;
constexpr auto AppFile = "Kotatogram"_cs;
constexpr auto AppVersion = 2001002;
constexpr auto AppVersionStr = "2.1.2";
constexpr auto AppVersion = 2001004;
constexpr auto AppVersionStr = "2.1.4";
constexpr auto AppBetaVersion = false;
constexpr auto AppAlphaVersion = TDESKTOP_ALPHA_VERSION;

View file

@ -479,7 +479,7 @@ void InnerWidget::updateEmptyText() {
options.flags |= TextParseMarkdown;
auto hasSearch = !_searchQuery.isEmpty();
auto hasFilter = (_filter.flags != 0) || !_filter.allUsers;
auto text = Ui::Text::Bold((hasSearch || hasFilter)
auto text = Ui::Text::Semibold((hasSearch || hasFilter)
? tr::lng_admin_log_no_results_title(tr::now)
: tr::lng_admin_log_no_events_title(tr::now));
auto description = hasSearch

View file

@ -53,7 +53,7 @@ namespace {
auto link = Ui::Text::Link(
tr::lng_about_random_send(tr::now).toUpper());
link.entities.push_back(
EntityInText(EntityType::Bold, 0, link.text.size()));
EntityInText(EntityType::Semibold, 0, link.text.size()));
config.text.append(' ').append(std::move(link));
config.filter = crl::guard(&history->session(), [=](
const ClickHandlerPtr &handler,

View file

@ -269,7 +269,7 @@ void QrWidget::setupControls() {
st::introQrStepMargins);
const auto number = Ui::CreateChild<Ui::FlatLabel>(
steps,
rpl::single(Ui::Text::Bold(QString::number(++index) + ".")),
rpl::single(Ui::Text::Semibold(QString::number(++index) + ".")),
st::defaultFlatLabel);
rpl::combine(
number->widthValue(),

View file

@ -21,6 +21,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/effects/slide_animation.h"
#include "data/data_user.h"
#include "data/data_auto_download.h"
#include "window/window_controller.h"
#include "window/themes/window_theme.h"
#include "facades.h"
#include "app.h"
@ -140,7 +141,7 @@ void Step::finish(const MTPUser &user, QImage &&photo) {
const auto weak = base::make_weak(account.get());
account->createSession(user);
Local::writeMtpData();
App::wnd()->setupMain();
App::wnd()->controller().setupMain();
// "this" is already deleted here by creating the main widget.
if (weak && account->sessionExists()) {

View file

@ -62,13 +62,13 @@ Instance::Instance() : _inner(new Inner(&_thread)) {
void Instance::check() {
_available = false;
if (auto device = alcCaptureOpenDevice(nullptr, kCaptureFrequency, AL_FORMAT_MONO16, kCaptureFrequency / 5)) {
auto error = ErrorHappened(device);
alcCaptureCloseDevice(device);
_available = !error;
} else {
LOG(("Audio Error: Could not open capture device!"));
if (auto device = alcGetString(0, ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER)) {
if (!QString::fromLocal8Bit(device).isEmpty()) {
_available = true;
return;
}
}
LOG(("Audio Error: No capture device found!"));
}
Instance::~Instance() {

View file

@ -544,7 +544,7 @@ void Widget::handleSongChange() {
textWithEntities.text = name + ' ' + date();
textWithEntities.entities.append(EntityInText(
EntityType::Bold,
EntityType::Semibold,
0,
name.size(),
QString()));
@ -565,7 +565,12 @@ void Widget::handleSongChange() {
: TextUtilities::Clean(song->title);
auto dash = QString::fromUtf8(" \xe2\x80\x93 ");
textWithEntities.text = song->performer + dash + title;
textWithEntities.entities.append({ EntityType::Bold, 0, song->performer.size(), QString() });
textWithEntities.entities.append({
EntityType::Semibold,
0,
song->performer.size(),
QString()
});
}
}
_nameLabel->setMarkedText(textWithEntities);

View file

@ -55,13 +55,27 @@ TextWithEntities ComposeNameWithEntities(DocumentData *document) {
result.text = document->filename().isEmpty()
? qsl("Unknown File")
: document->filename();
result.entities.push_back({ EntityType::Bold, 0, result.text.size() });
result.entities.push_back({
EntityType::Semibold,
0,
result.text.size()
});
} else if (song->performer.isEmpty()) {
result.text = song->title;
result.entities.push_back({ EntityType::Bold, 0, result.text.size() });
result.entities.push_back({
EntityType::Semibold,
0,
result.text.size()
});
} else {
result.text = song->performer + QString::fromUtf8(" \xe2\x80\x93 ") + (song->title.isEmpty() ? qsl("Unknown Track") : song->title);
result.entities.push_back({ EntityType::Bold, 0, song->performer.size() });
result.text = song->performer
+ QString::fromUtf8(" \xe2\x80\x93 ")
+ (song->title.isEmpty() ? qsl("Unknown Track") : song->title);
result.entities.push_back({
EntityType::Semibold,
0,
song->performer.size()
});
}
return result;
}

View file

@ -40,9 +40,9 @@ bool ExtractZipFile(zlib::FileToRead &zip, const QString path) {
} // namespace
bool UnpackBlob(
const QString &path,
const QString &folder,
Fn<bool(const QString &)> checkNameCallback) {
const QString &path,
const QString &folder,
Fn<bool(const QString &)> checkNameCallback) {
const auto bytes = ReadFinalFile(path);
if (bytes.isEmpty()) {
return false;

View file

@ -13,6 +13,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/layers/box_content.h"
#include "ui/layers/layer_widget.h"
#include "ui/toast/toast.h"
#include "ui/emoji_config.h"
#include "chat_helpers/emoji_sets_manager.h"
#include "window/window_session_controller.h"
#include "window/themes/window_theme.h"
#include "window/themes/window_theme_editor.h"
@ -82,6 +84,10 @@ void Controller::setupIntro() {
void Controller::setupMain() {
_widget.setupMain();
if (const auto id = Ui::Emoji::NeedToSwitchBackToId()) {
Ui::Emoji::LoadAndSwitchTo(id);
}
}
void Controller::showSettings() {

View file

@ -13,6 +13,12 @@ if [ ! -d "$FullScriptPath/../../../DesktopPrivate" ]; then
exit
fi
if [ "$1" == "request_uuid" ]; then
if [ "$2" != "" ]; then
NotarizeRequestId="$2"
fi
fi
Error () {
cd $FullExecPath
echo "$1"
@ -260,96 +266,102 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ] || [ "$BuildTarget
Error "Backup path not found!"
fi
./configure.sh
if [ "$NotarizeRequestId" == "" ]; then
./configure.sh
cd $ProjectPath
cmake --build . --config Release --target Telegram
cd $ReleasePath
cd $ProjectPath
cmake --build . --config Release --target Telegram
if [ ! -d "$ReleasePath/$BinaryName.app" ]; then
Error "$BinaryName.app not found!"
fi
cd $ReleasePath
if [ ! -d "$ReleasePath/$BinaryName.app.dSYM" ]; then
Error "$BinaryName.app.dSYM not found!"
fi
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ]; then
if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Frameworks/Updater" ]; then
Error "Updater not found!"
if [ ! -d "$ReleasePath/$BinaryName.app" ]; then
Error "$BinaryName.app not found!"
fi
if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Helpers/crashpad_handler" ]; then
Error "crashpad_handler not found!"
if [ ! -d "$ReleasePath/$BinaryName.app.dSYM" ]; then
Error "$BinaryName.app.dSYM not found!"
fi
fi
if [ "$BuildTarget" == "macstore" ]; then
if [ ! -d "$ReleasePath/$BinaryName.app/Contents/Frameworks/Breakpad.framework" ]; then
Error "Breakpad.framework not found!"
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ]; then
if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Frameworks/Updater" ]; then
Error "Updater not found!"
fi
if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Helpers/crashpad_handler" ]; then
Error "crashpad_handler not found!"
fi
fi
fi
echo "Dumping debug symbols.."
"$HomePath/../../Libraries/macos/breakpad/src/tools/mac/dump_syms/build/Release/dump_syms" "$ReleasePath/$BinaryName.app.dSYM" > "$ReleasePath/$BinaryName.sym" 2>/dev/null
echo "Done!"
echo "Stripping the executable.."
strip "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName"
echo "Done!"
echo "Signing the application.."
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ]; then
codesign --force --deep --timestamp --options runtime --sign "Developer ID Application: John Preston" "$ReleasePath/$BinaryName.app" --entitlements "$HomePath/Telegram/Telegram.entitlements"
elif [ "$BuildTarget" == "macstore" ]; then
codesign --force --deep --sign "3rd Party Mac Developer Application: Telegram FZ-LLC (C67CF9S4VU)" "$ReleasePath/$BinaryName.app" --entitlements "$HomePath/Telegram/Telegram Lite.entitlements"
echo "Making an installer.."
productbuild --sign "3rd Party Mac Developer Installer: Telegram FZ-LLC (C67CF9S4VU)" --component "$ReleasePath/$BinaryName.app" /Applications "$ReleasePath/$BinaryName.pkg"
fi
echo "Done!"
AppUUID=`dwarfdump -u "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName" | awk -F " " '{print $2}'`
DsymUUID=`dwarfdump -u "$ReleasePath/$BinaryName.app.dSYM" | awk -F " " '{print $2}'`
if [ "$AppUUID" != "$DsymUUID" ]; then
Error "UUID of binary '$AppUUID' and dSYM '$DsymUUID' differ!"
fi
if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Resources/Icon.icns" ]; then
Error "Icon.icns not found in Resources!"
fi
if [ ! -f "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName" ]; then
Error "$BinaryName not found in MacOS!"
fi
if [ ! -d "$ReleasePath/$BinaryName.app/Contents/_CodeSignature" ]; then
Error "$BinaryName signature not found!"
fi
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ]; then
if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Frameworks/Updater" ]; then
Error "Updater not found in Frameworks!"
if [ "$BuildTarget" == "macstore" ]; then
if [ ! -d "$ReleasePath/$BinaryName.app/Contents/Frameworks/Breakpad.framework" ]; then
Error "Breakpad.framework not found!"
fi
fi
elif [ "$BuildTarget" == "macstore" ]; then
if [ ! -f "$ReleasePath/$BinaryName.pkg" ]; then
Error "$BinaryName.pkg not found!"
fi
fi
SymbolsHash=`head -n 1 "$ReleasePath/$BinaryName.sym" | awk -F " " 'END {print $4}'`
echo "Copying $BinaryName.sym to $DropboxSymbolsPath/$BinaryName/$SymbolsHash"
mkdir -p "$DropboxSymbolsPath/$BinaryName/$SymbolsHash"
cp "$ReleasePath/$BinaryName.sym" "$DropboxSymbolsPath/$BinaryName/$SymbolsHash/"
echo "Done!"
echo "Dumping debug symbols.."
"$HomePath/../../Libraries/macos/breakpad/src/tools/mac/dump_syms/build/Release/dump_syms" "$ReleasePath/$BinaryName.app.dSYM" > "$ReleasePath/$BinaryName.sym" 2>/dev/null
echo "Done!"
echo "Stripping the executable.."
strip "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName"
echo "Done!"
echo "Signing the application.."
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ]; then
codesign --force --deep --timestamp --options runtime --sign "Developer ID Application: John Preston" "$ReleasePath/$BinaryName.app" --entitlements "$HomePath/Telegram/Telegram.entitlements"
elif [ "$BuildTarget" == "macstore" ]; then
codesign --force --deep --sign "3rd Party Mac Developer Application: Telegram FZ-LLC (C67CF9S4VU)" "$ReleasePath/$BinaryName.app" --entitlements "$HomePath/Telegram/Telegram Lite.entitlements"
echo "Making an installer.."
productbuild --sign "3rd Party Mac Developer Installer: Telegram FZ-LLC (C67CF9S4VU)" --component "$ReleasePath/$BinaryName.app" /Applications "$ReleasePath/$BinaryName.pkg"
fi
echo "Done!"
AppUUID=`dwarfdump -u "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName" | awk -F " " '{print $2}'`
DsymUUID=`dwarfdump -u "$ReleasePath/$BinaryName.app.dSYM" | awk -F " " '{print $2}'`
if [ "$AppUUID" != "$DsymUUID" ]; then
Error "UUID of binary '$AppUUID' and dSYM '$DsymUUID' differ!"
fi
if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Resources/Icon.icns" ]; then
Error "Icon.icns not found in Resources!"
fi
if [ ! -f "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName" ]; then
Error "$BinaryName not found in MacOS!"
fi
if [ ! -d "$ReleasePath/$BinaryName.app/Contents/_CodeSignature" ]; then
Error "$BinaryName signature not found!"
fi
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ]; then
if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Frameworks/Updater" ]; then
Error "Updater not found in Frameworks!"
fi
elif [ "$BuildTarget" == "macstore" ]; then
if [ ! -f "$ReleasePath/$BinaryName.pkg" ]; then
Error "$BinaryName.pkg not found!"
fi
fi
SymbolsHash=`head -n 1 "$ReleasePath/$BinaryName.sym" | awk -F " " 'END {print $4}'`
echo "Copying $BinaryName.sym to $DropboxSymbolsPath/$BinaryName/$SymbolsHash"
mkdir -p "$DropboxSymbolsPath/$BinaryName/$SymbolsHash"
cp "$ReleasePath/$BinaryName.sym" "$DropboxSymbolsPath/$BinaryName/$SymbolsHash/"
echo "Done!"
fi
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ]; then
cd "$ReleasePath"
if [ "$AlphaVersion" == "0" ]; then
cp -f tsetup_template.dmg tsetup.temp.dmg
TempDiskPath=`hdiutil attach -nobrowse -noautoopenrw -readwrite tsetup.temp.dmg | awk -F "\t" 'END {print $3}'`
cp -R "./$BinaryName.app" "$TempDiskPath/"
bless --folder "$TempDiskPath/" --openfolder "$TempDiskPath/"
hdiutil detach "$TempDiskPath"
hdiutil convert tsetup.temp.dmg -format UDZO -imagekey zlib-level=9 -ov -o "$SetupFile"
rm tsetup.temp.dmg
if [ "$NotarizeRequestId" == "" ]; then
if [ "$AlphaVersion" == "0" ]; then
cp -f tsetup_template.dmg tsetup.temp.dmg
TempDiskPath=`hdiutil attach -nobrowse -noautoopenrw -readwrite tsetup.temp.dmg | awk -F "\t" 'END {print $3}'`
cp -R "./$BinaryName.app" "$TempDiskPath/"
bless --folder "$TempDiskPath/" --openfolder "$TempDiskPath/"
hdiutil detach "$TempDiskPath"
hdiutil convert tsetup.temp.dmg -format UDZO -imagekey zlib-level=9 -ov -o "$SetupFile"
rm tsetup.temp.dmg
fi
fi
if [ "$AlphaVersion" != "0" ]; then
@ -366,33 +378,40 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ] || [ "$BuildTarget
UpdateFile="${UpdateFile}_${AlphaSignature}"
SetupFile="talpha${AlphaVersion}_${AlphaSignature}.zip"
rm -rf "$ReleasePath/AlphaTemp"
mkdir "$ReleasePath/AlphaTemp"
mkdir "$ReleasePath/AlphaTemp/$BinaryName"
cp -r "$ReleasePath/$BinaryName.app" "$ReleasePath/AlphaTemp/$BinaryName/"
cd "$ReleasePath/AlphaTemp"
zip -r "$SetupFile" "$BinaryName"
mv "$SetupFile" "$ReleasePath/"
cd "$ReleasePath"
if [ "$NotarizeRequestId" == "" ]; then
rm -rf "$ReleasePath/AlphaTemp"
mkdir "$ReleasePath/AlphaTemp"
mkdir "$ReleasePath/AlphaTemp/$BinaryName"
cp -r "$ReleasePath/$BinaryName.app" "$ReleasePath/AlphaTemp/$BinaryName/"
cd "$ReleasePath/AlphaTemp"
zip -r "$SetupFile" "$BinaryName"
mv "$SetupFile" "$ReleasePath/"
cd "$ReleasePath"
fi
fi
if [ "$BuildTarget" == "mac" ]; then
echo "Beginning notarization process."
set +e
xcrun altool --notarize-app --primary-bundle-id "com.tdesktop.Telegram" --username "$AC_USERNAME" --password "@keychain:AC_PASSWORD" --file "$SetupFile" > request_uuid.txt
set -e
while IFS='' read -r line || [[ -n "$line" ]]; do
Prefix=$(echo $line | cut -d' ' -f 1)
Value=$(echo $line | cut -d' ' -f 3)
if [ "$Prefix" == "RequestUUID" ]; then
RequestUUID=$Value
if [ "$NotarizeRequestId" == "" ]; then
echo "Beginning notarization process."
set +e
xcrun altool --notarize-app --primary-bundle-id "com.tdesktop.Telegram" --username "$AC_USERNAME" --password "@keychain:AC_PASSWORD" --file "$SetupFile" > request_uuid.txt
set -e
while IFS='' read -r line || [[ -n "$line" ]]; do
Prefix=$(echo $line | cut -d' ' -f 1)
Value=$(echo $line | cut -d' ' -f 3)
if [ "$Prefix" == "RequestUUID" ]; then
RequestUUID=$Value
fi
done < "request_uuid.txt"
if [ "$RequestUUID" == "" ]; then
cat request_uuid.txt
Error "Could not extract Request UUID."
fi
done < "request_uuid.txt"
if [ "$RequestUUID" == "" ]; then
cat request_uuid.txt
Error "Could not extract Request UUID."
echo "Request UUID: $RequestUUID"
rm request_uuid.txt
else
RequestUUID=$NotarizeRequestId
echo "Continue notarization process with Request UUID: $RequestUUID"
fi
echo "Request UUID: $RequestUUID"
rm request_uuid.txt
RequestStatus=
LogFile=
@ -419,7 +438,7 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ] || [ "$BuildTarget
echo "Notarization problems, response:"
cat request_result.txt
if [ "$LogFile" != "" ]; then
echo "Requesting log..."
echo "Requesting log: $LogFile"
curl $LogFile
fi
Error "Notarization FAILED."
@ -427,7 +446,7 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ] || [ "$BuildTarget
rm request_result.txt
if [ "$LogFile" != "" ]; then
echo "Requesting log..."
echo "Requesting log: $LogFile"
curl $LogFile > request_log.txt
fi

View file

@ -1,7 +1,7 @@
AppVersion 2001002
AppVersion 2001004
AppVersionStrMajor 2.1
AppVersionStrSmall 2.1.2
AppVersionStr 2.1.2
AppVersionStrSmall 2.1.4
AppVersionStr 2.1.4
BetaChannel 0
AlphaVersion 0
AppVersionOriginal 2.1.2
AppVersionOriginal 2.1.4

@ -1 +1 @@
Subproject commit f6431b149b199238b5bd8f315c656780c1e3bcd1
Subproject commit 8b4686f24d80f1f8d6a4ad0d6a55bf1bb701f35a

@ -1 +1 @@
Subproject commit 8bab33ccc92ace699a2a4eef036e179e128bbfd8
Subproject commit 3cca2516c251fbd1fd79ea6c56016acc24a8ea08

View file

@ -1,3 +1,13 @@
2.1.4 (08.05.20)
- Improve bold font selection.
2.1.3 (08.05.20)
- Added support for new emoji.
- Channels to which you can't post will no longer be suggested when forwarding.
- Improved font selection and bold font support for CJK and Farsi.
2.1.2 (05.05.20)
- Fix polls and quizes results viewing.

View file

@ -189,14 +189,6 @@ Go to ***BuildPath*** and run
sudo make install
cd ..
git clone https://git.assembla.com/portaudio.git
cd portaudio
git checkout 396fe4b669
./configure
make $MAKE_THREADS_CNT
sudo make install
cd ..
git clone git://repo.or.cz/openal-soft.git
cd openal-soft
git checkout openal-soft-1.20.1
@ -244,7 +236,6 @@ Go to ***BuildPath*** and run
git submodule update qtsvg
cd qtbase
git apply ../../patches/qtbase_5_12_8.diff
cd src/plugins/platforminputcontexts
cd ..
OPENSSL_DIR=/usr/local/desktop-app/openssl-1.1.1