Get rid of osx and linux32 special targets

This commit is contained in:
Ilya Fedin 2021-08-11 06:27:26 +04:00 committed by John Preston
parent 1d2e34f5e9
commit 97262a99c7
48 changed files with 19 additions and 267 deletions

View File

@ -1317,10 +1317,6 @@ if (build_macstore)
COMMAND mkdir -p $<TARGET_FILE_DIR:Telegram>/../Frameworks
COMMAND cp -a ${libs_loc}/breakpad/src/client/mac/build/Release/Breakpad.framework $<TARGET_FILE_DIR:Telegram>/../Frameworks/Breakpad.framework
)
elseif (build_osx)
set(bundle_identifier "com.tdesktop.Telegram$<$<CONFIG:Debug>:DebugOsx>")
set(bundle_entitlements "Telegram.entitlements")
set(output_name "Telegram")
else()
set(bundle_identifier "com.tdesktop.Telegram$<$<CONFIG:Debug>:Debug>")
set(bundle_entitlements "Telegram.entitlements")

View File

@ -496,11 +496,7 @@ int main(int argc, char *argv[])
#elif defined Q_OS_MAC
QString outName(QString("tmacupd%1").arg(AlphaVersion ? AlphaVersion : version));
#elif defined Q_OS_UNIX
#ifndef _LP64
QString outName(QString("tlinux32upd%1").arg(AlphaVersion ? AlphaVersion : version));
#else
QString outName(QString("tlinuxupd%1").arg(AlphaVersion ? AlphaVersion : version));
#endif
#else
#error Unknown platform!
#endif

View File

@ -49,10 +49,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <QtCore/QBuffer>
#include <QtGui/QFontDatabase>
#ifdef OS_MAC_OLD
#include <libexif/exif-data.h>
#endif // OS_MAC_OLD
namespace {
constexpr auto kImageAreaLimit = 12'032 * 9'024;
@ -180,9 +176,7 @@ namespace App {
}
{
QImageReader reader(&buffer, *format);
#ifndef OS_MAC_OLD
reader.setAutoTransform(true);
#endif // OS_MAC_OLD
if (animated) *animated = reader.supportsAnimation() && reader.imageCount() > 1;
if (!reader.canRead()) {
return QImage();
@ -201,30 +195,7 @@ namespace App {
}
buffer.seek(0);
auto fmt = QString::fromUtf8(*format).toLower();
if (fmt == "jpg" || fmt == "jpeg") {
#ifdef OS_MAC_OLD
if (auto exifData = exif_data_new_from_data((const uchar*)(data.constData()), data.size())) {
auto byteOrder = exif_data_get_byte_order(exifData);
if (auto exifEntry = exif_data_get_entry(exifData, EXIF_TAG_ORIENTATION)) {
auto orientationFix = [exifEntry, byteOrder] {
auto orientation = exif_get_short(exifEntry->data, byteOrder);
switch (orientation) {
case 2: return QTransform(-1, 0, 0, 1, 0, 0);
case 3: return QTransform(-1, 0, 0, -1, 0, 0);
case 4: return QTransform(1, 0, 0, -1, 0, 0);
case 5: return QTransform(0, -1, -1, 0, 0, 0);
case 6: return QTransform(0, 1, -1, 0, 0, 0);
case 7: return QTransform(0, 1, 1, 0, 0, 0);
case 8: return QTransform(0, -1, 1, 0, 0, 0);
}
return QTransform();
};
result = result.transformed(orientationFix());
}
exif_data_free(exifData);
}
#endif // OS_MAC_OLD
} else if (opaque) {
if (opaque) {
result = Images::prepareOpaque(std::move(result));
}
return result;

View File

@ -95,9 +95,7 @@ void AboutBox::showVersionHistory() {
url += qsl("win64/%1.zip");
} else if (Platform::IsMac()) {
url += qsl("mac/%1.zip");
} else if (Platform::IsLinux32Bit()) {
url += qsl("linux32/%1.tar.xz");
} else if (Platform::IsLinux64Bit()) {
} else if (Platform::IsLinux()) {
url += qsl("linux/%1.tar.xz");
} else {
Unexpected("Platform value.");

View File

@ -736,7 +736,7 @@ void Call::createAndStartController(const MTPDphoneCall &call) {
.receiveTimeout = serverConfig.callPacketTimeoutMs / 1000.,
.dataSaving = tgcalls::DataSaving::Never,
.enableP2P = call.is_p2p_allowed(),
.enableAEC = !Platform::IsMac10_7OrGreater(),
.enableAEC = false,
.enableNS = true,
.enableAGC = true,
.enableVolumeControl = true,

View File

@ -299,10 +299,8 @@ QString PlatformString() {
return qsl("MacAppStore");
} else if (Platform::IsMac()) {
return qsl("MacOS");
} else if (Platform::IsLinux32Bit()) {
return qsl("Linux32Bit");
} else if (Platform::IsLinux64Bit()) {
return qsl("Linux64bit");
} else if (Platform::IsLinux()) {
return qsl("Linux");
}
Unexpected("Platform in CrashReports::PlatformString.");
}

View File

@ -286,10 +286,7 @@ void Launcher::init() {
initQtMessageLogging();
QApplication::setApplicationName(qsl("TelegramDesktop"));
#ifndef OS_MAC_OLD
QApplication::setAttribute(Qt::AA_DisableHighDpiScaling, true);
#endif // OS_MAC_OLD
// fallback session management is useless for tdesktop since it doesn't have
// any "are you sure you want to close this window?" dialogs

View File

@ -242,9 +242,7 @@ QString FindUpdateFile() {
"tupdate|"
"tx64upd|"
"tmacupd|"
"tosxupd|"
"tlinuxupd|"
"tlinux32upd"
")\\d+(_[a-z\\d]+)?$",
QRegularExpression::CaseInsensitiveOption
).match(info.fileName()).hasMatch()) {

View File

@ -118,10 +118,7 @@ InnerWidget::InnerWidget(
})
, _cancelSearchInChat(this, st::dialogsCancelSearchInPeer)
, _cancelSearchFromUser(this, st::dialogsCancelSearchInPeer) {
#ifndef OS_MAC_OLD // Qt 5.3.2 build is working with glitches otherwise.
setAttribute(Qt::WA_OpaquePaintEvent, true);
#endif // OS_MAC_OLD
_cancelSearchInChat->setClickedCallback([=] { cancelSearchInChat(); });
_cancelSearchInChat->hide();

View File

@ -6263,11 +6263,7 @@ void HistoryWidget::updatePreview() {
st::msgNameStyle,
tr::lng_preview_loading(tr::now),
Ui::NameTextOptions());
#ifndef OS_MAC_OLD
auto linkText = _previewLinks.splitRef(' ').at(0).toString();
#else // OS_MAC_OLD
auto linkText = _previewLinks.split(' ').at(0);
#endif // OS_MAC_OLD
_previewDescription.setText(
st::messageTextStyle,
TextUtilities::Clean(linkText),

View File

@ -199,11 +199,7 @@ ClickHandlerPtr ItemBase::getResultPreviewHandler() const {
}
QString ItemBase::getResultThumbLetter() const {
#ifndef OS_MAC_OLD
auto parts = _result->_url.splitRef('/');
#else // OS_MAC_OLD
auto parts = _result->_url.split('/');
#endif // OS_MAC_OLD
if (!parts.isEmpty()) {
auto domain = parts.at(0);
if (parts.size() > 2 && domain.endsWith(':') && parts.at(1).isEmpty()) { // http:// and others

View File

@ -434,14 +434,14 @@ OverlayWidget::OverlayWidget()
updateGeometry();
updateControlsGeometry();
#if defined Q_OS_MAC && !defined OS_OSX
#ifdef Q_OS_MAC
TouchBar::SetupMediaViewTouchBar(
_widget->winId(),
static_cast<PlaybackControls::Delegate*>(this),
_touchbarTrackState.events(),
_touchbarDisplay.events(),
_touchbarFullscreenToggled.events());
#endif // Q_OS_MAC && !OS_OSX
#endif // Q_OS_MAC
using namespace rpl::mappers;
rpl::combine(

View File

@ -1552,11 +1552,7 @@ Link::Link(
_title = _page->title;
}
#ifndef OS_MAC_OLD
auto parts = mainUrl.splitRef('/');
#else // OS_MAC_OLD
auto parts = mainUrl.split('/');
#endif // OS_MAC_OLD
if (!parts.isEmpty()) {
auto domain = parts.at(0);
if (parts.size() > 2 && domain.endsWith(':') && parts.at(1).isEmpty()) { // http:// and others

View File

@ -23,10 +23,8 @@ Launcher::Launcher(int argc, char *argv[])
}
void Launcher::initHook() {
#ifndef OS_MAC_OLD
// macOS Retina display support is working fine, others are not.
QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling, false);
#endif // OS_MAC_OLD
}
bool Launcher::launchUpdater(UpdaterLaunch action) {

View File

@ -194,7 +194,6 @@ void MainWindow::Private::initTouchBar(
NSWindow *window,
not_null<Window::Controller*> controller,
rpl::producer<bool> canApplyMarkdown) {
#ifndef OS_OSX
if (!IsMac10_13OrGreater()) {
return;
}
@ -208,7 +207,6 @@ void MainWindow::Private::initTouchBar(
controller:controller
domain:(&Core::App().domain())] autorelease]
waitUntilDone:true];
#endif
}
bool MainWindow::Private::clipboardHasText() {
@ -227,11 +225,7 @@ MainWindow::Private::~Private() {
MainWindow::MainWindow(not_null<Window::Controller*> controller)
: Window::MainWindow(controller)
, _private(std::make_unique<Private>(this)) {
#ifndef OS_MAC_OLD
auto forceOpenGL = std::make_unique<QOpenGLWidget>(this);
#endif // !OS_MAC_OLD
_hideAfterFullScreenTimer.setCallback([this] { hideAndDeactivate(); });
}

View File

@ -154,7 +154,7 @@ bool SkipFlashBounceForCustom() {
}
bool Supported() {
return Platform::IsMac10_8OrGreater();
return true;
}
bool Enforced() {

View File

@ -116,7 +116,6 @@ void WriteCrashDumpDetails() {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunguarded-availability"
PermissionStatus GetPermissionStatus(PermissionType type) {
#ifndef OS_MAC_OLD
switch (type) {
case PermissionType::Microphone:
case PermissionType::Camera:
@ -136,12 +135,10 @@ PermissionStatus GetPermissionStatus(PermissionType type) {
}
break;
}
#endif // OS_MAC_OLD
return PermissionStatus::Granted;
}
void RequestPermission(PermissionType type, Fn<void(PermissionStatus)> resultCallback) {
#ifndef OS_MAC_OLD
switch (type) {
case PermissionType::Microphone:
case PermissionType::Camera:
@ -157,13 +154,11 @@ void RequestPermission(PermissionType type, Fn<void(PermissionStatus)> resultCal
}
break;
}
#endif // OS_MAC_OLD
resultCallback(PermissionStatus::Granted);
}
#pragma clang diagnostic pop // -Wunguarded-availability
void OpenSystemSettingsForPermission(PermissionType type) {
#ifndef OS_MAC_OLD
switch (type) {
case PermissionType::Microphone:
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"x-apple.systempreferences:com.apple.preference.security?Privacy_Microphone"]];
@ -172,7 +167,6 @@ void OpenSystemSettingsForPermission(PermissionType type) {
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"x-apple.systempreferences:com.apple.preference.security?Privacy_Camera"]];
break;
}
#endif // OS_MAC_OLD
}
bool OpenSystemSettings(SystemSettingsType type) {

View File

@ -7,8 +7,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#ifndef OS_OSX
#import <AppKit/NSPopoverTouchBarItem.h>
#import <AppKit/NSTouchBar.h>
@ -16,5 +14,3 @@ API_AVAILABLE(macos(10.12.2))
@interface TextFormatPopover : NSPopoverTouchBarItem
- (id)init:(NSTouchBarItemIdentifier)identifier;
@end
#endif // OS_OSX

View File

@ -7,8 +7,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "platform/mac/touchbar/items/mac_formatter_item.h"
#ifndef OS_OSX
#include "base/platform/mac/base_utilities_mac.h"
#include "lang/lang_keys.h"
#include "platform/mac/touchbar/mac_touchbar_common.h"
@ -138,5 +136,3 @@ void SendKeyEvent(int command) {
}
@end // @implementation TextFormatPopover
#endif // OS_OSX

View File

@ -7,8 +7,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#ifndef OS_OSX
#include <AppKit/NSImageView.h>
namespace Main {
@ -20,5 +18,3 @@ API_AVAILABLE(macos(10.12.2))
- (id)init:(not_null<Main::Session*>)session
destroyEvent:(rpl::producer<>)touchBarSwitches;
@end
#endif // OS_OSX

View File

@ -7,8 +7,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "platform/mac/touchbar/items/mac_pinned_chats_item.h"
#ifndef OS_OSX
#include "apiwrap.h"
#include "base/call_delayed.h"
#include "base/timer.h"
@ -882,5 +880,3 @@ TimeId CalculateOnlineTill(not_null<PeerData*> peer) {
}
@end // @@implementation PinnedDialogsPanel
#endif // OS_OSX

View File

@ -7,8 +7,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#ifndef OS_OSX
#import <AppKit/NSPopoverTouchBarItem.h>
#import <AppKit/NSTouchBar.h>
@ -21,5 +19,3 @@ API_AVAILABLE(macos(10.12.2))
- (id)init:(not_null<Window::Controller*>)controller
identifier:(NSTouchBarItemIdentifier)identifier;
@end
#endif // OS_OSX

View File

@ -7,8 +7,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "platform/mac/touchbar/items/mac_scrubber_item.h"
#ifndef OS_OSX
#include "api/api_common.h"
#include "api/api_sending.h"
#include "base/call_delayed.h"
@ -683,5 +681,3 @@ void AppendEmojiPacks(
}
@end // @implementation StickerEmojiPopover
#endif // OS_OSX

View File

@ -7,13 +7,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#ifndef OS_OSX
#import <AppKit/NSTouchBar.h>
API_AVAILABLE(macos(10.12.2))
@interface TouchBarAudioPlayer : NSTouchBar<NSTouchBarDelegate>
- (rpl::producer<>)closeRequests;
@end
#endif // OS_OSX

View File

@ -7,8 +7,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "platform/mac/touchbar/mac_touchbar_audio.h"
#ifndef OS_OSX
#include "media/audio/media_audio.h"
#include "media/player/media_player_instance.h"
#include "platform/mac/touchbar/mac_touchbar_common.h"
@ -176,5 +174,3 @@ const auto kCurrentPositionItemIdentifier = Format(@"currentPosition");
}
@end // @implementation TouchBarAudioPlayer
#endif // OS_OSX

View File

@ -7,8 +7,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#ifndef OS_OSX
#import <AppKit/NSImage.h>
#import <Foundation/Foundation.h>
@ -32,5 +30,3 @@ int WidthFromString(NSString *s);
NSImage *CreateNSImageFromStyleIcon(const style::icon &icon, int size);
} // namespace TouchBar
#endif // OS_OSX

View File

@ -7,8 +7,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "platform/mac/touchbar/mac_touchbar_common.h"
#ifndef OS_OSX
#include "base/platform/mac/base_utilities_mac.h"
#import <AppKit/NSTextField.h>
@ -29,5 +27,3 @@ NSImage *CreateNSImageFromStyleIcon(const style::icon &icon, int size) {
}
} // namespace TouchBar
#endif // OS_OSX

View File

@ -7,8 +7,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#ifndef OS_OSX
namespace Media {
namespace Player {
struct TrackState;
@ -65,5 +63,3 @@ NSCustomTouchBarItem *CreateTouchBarTrackPosition(
rpl::producer<Media::Player::TrackState> stateChanged);
} // namespace TouchBar
#endif // OS_OSX

View File

@ -7,8 +7,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "platform/mac/touchbar/mac_touchbar_controls.h"
#ifndef OS_OSX
#include "base/platform/mac/base_utilities_mac.h" // Q2NSString()
#include "core/sandbox.h" // Sandbox::customEnterFromEventLoop()
#include "ui/text/format_values.h" // Ui::FormatDurationText()
@ -276,5 +274,3 @@ NSCustomTouchBarItem *CreateTouchBarTrackPosition(
}
} // namespace TouchBar
#endif // OS_OSX

View File

@ -7,8 +7,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#ifndef OS_OSX
#import <AppKit/NSTouchBar.h>
namespace Window {
@ -28,5 +26,3 @@ API_AVAILABLE(macos(10.12.2))
- (id)init:(not_null<Window::Controller*>)controller
touchBarSwitches:(rpl::producer<>)touchBarSwitches;
@end
#endif // OS_OSX

View File

@ -7,8 +7,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "platform/mac/touchbar/mac_touchbar_main.h"
#ifndef OS_OSX
#include "platform/mac/touchbar/items/mac_formatter_item.h"
#include "platform/mac/touchbar/items/mac_pinned_chats_item.h"
#include "platform/mac/touchbar/items/mac_scrubber_item.h"
@ -53,5 +51,3 @@ using namespace TouchBar::Main;
}
@end // @implementation TouchBarMain
#endif // OS_OSX

View File

@ -7,8 +7,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#ifndef OS_OSX
#import <AppKit/NSTouchBar.h>
namespace Main {
@ -25,5 +23,3 @@ API_AVAILABLE(macos(10.12.2))
controller:(not_null<Window::Controller*>)controller
domain:(not_null<Main::Domain*>)domain;
@end
#endif // OS_OSX

View File

@ -7,8 +7,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "platform/mac/touchbar/mac_touchbar_manager.h"
#ifndef OS_OSX
#include "apiwrap.h" // ApiWrap::updateStickers()
#include "core/application.h"
#include "data/data_peer.h" // PeerData::canWrite()
@ -179,5 +177,3 @@ const auto kAudioItemIdentifier = @"touchbarAudio";
}
@end // @implementation RootTouchBar
#endif // OS_OSX

View File

@ -7,8 +7,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#ifndef OS_OSX
#include "media/view/media_view_playback_controls.h"
#include "media/view/media_view_overlay_widget.h"
@ -22,5 +20,3 @@ void SetupMediaViewTouchBar(
rpl::producer<bool> fullscreenToggled);
} // namespace TouchBar
#endif // OS_OSX

View File

@ -7,8 +7,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "platform/mac/touchbar/mac_touchbar_media_view.h"
#ifndef OS_OSX
#include "media/audio/media_audio.h"
#include "platform/mac/touchbar/mac_touchbar_common.h"
#include "platform/mac/touchbar/mac_touchbar_controls.h"
@ -194,5 +192,3 @@ void SetupMediaViewTouchBar(
}
} // namespace TouchBar
#endif // OS_OSX

View File

@ -54,7 +54,6 @@ void PreviewWindowTitle(Painter &p, const style::palette &palette, QRect body, i
auto useSystemFont = false;
QFont font;
#ifndef OS_MAC_OLD
QStringList families = { qsl(".SF NS Text"), qsl("Helvetica Neue") };
for (auto family : families) {
font.setFamily(family);
@ -63,7 +62,6 @@ void PreviewWindowTitle(Painter &p, const style::palette &palette, QRect body, i
break;
}
}
#endif // OS_MAC_OLD
if (useSystemFont) {
font.setPixelSize((titleHeight * 15) / 24);

View File

@ -73,10 +73,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <QtGui/QFontInfo>
#include <QtWidgets/QWidget>
#ifndef OS_MAC_OLD
#include <QtWidgets/QOpenGLWidget>
#endif // OS_MAC_OLD
// Fix Google Breakpad build for Mac App Store and Linux version
#ifdef Q_OS_UNIX

View File

@ -735,9 +735,7 @@ bool readBackground() {
} else {
auto buffer = QBuffer(&imageData);
auto reader = QImageReader(&buffer);
#ifndef OS_MAC_OLD
reader.setAutoTransform(true);
#endif // OS_MAC_OLD
if (!reader.read(&image)) {
image = QImage();
}

View File

@ -177,11 +177,7 @@ uint32 ParseOccupationTag(History *history) {
return 0;
}
const auto &text = draft->textWithTags.text;
#ifndef OS_MAC_OLD
const auto parts = text.splitRef(';');
#else // OS_MAC_OLD
const auto parts = text.split(';');
#endif // OS_MAC_OLD
auto valid = false;
auto result = uint32();
for (const auto &part : parts) {
@ -207,11 +203,7 @@ QString ParseOccupationName(History *history) {
return QString();
}
const auto &text = draft->textWithTags.text;
#ifndef OS_MAC_OLD
const auto parts = text.splitRef(';');
#else // OS_MAC_OLD
const auto parts = text.split(';');
#endif // OS_MAC_OLD
auto valid = false;
auto result = QString();
for (const auto &part : parts) {
@ -222,11 +214,7 @@ QString ParseOccupationName(History *history) {
return 0;
}
} else if (part.startsWith(qstr("n:"))) {
#ifndef OS_MAC_OLD
result = part.mid(2).toString();
#else // OS_MAC_OLD
result = part.mid(2);
#endif // OS_MAC_OLD
}
}
return valid ? result : QString();
@ -241,11 +229,7 @@ TimeId OccupiedBySomeoneTill(History *history) {
return 0;
}
const auto &text = draft->textWithTags.text;
#ifndef OS_MAC_OLD
const auto parts = text.splitRef(';');
#else // OS_MAC_OLD
const auto parts = text.split(';');
#endif // OS_MAC_OLD
auto valid = false;
auto result = TimeId();
for (const auto &part : parts) {

View File

@ -110,11 +110,7 @@ void ContinuousSlider::wheelEvent(QWheelEvent *e) {
if (_mouseDown || !moveByWheel()) {
return;
}
#ifdef OS_MAC_OLD
constexpr auto step = 120;
#else // OS_MAC_OLD
constexpr auto step = static_cast<int>(QWheelEvent::DefaultDeltasPerStep);
#endif // OS_MAC_OLD
constexpr auto coef = 1. / (step * 10.);
auto deltaX = e->angleDelta().x(), deltaY = e->angleDelta().y();

View File

@ -379,9 +379,7 @@ bool InitializeFromCache(
if (!cache.background.isEmpty()) {
QDataStream stream(cache.background);
QImageReader reader(stream.device());
#ifndef OS_MAC_OLD
reader.setAutoTransform(true);
#endif // OS_MAC_OLD
if (!reader.read(&background) || background.isNull()) {
return false;
}

View File

@ -1168,11 +1168,7 @@ void MainMenu::initResetScaleButton() {
return rpl::single(
screen->availableGeometry()
) | rpl::then(
#ifdef OS_MAC_OLD
base::qt_signal_producer(screen, &QScreen::virtualGeometryChanged)
#else // OS_MAC_OLD
base::qt_signal_producer(screen, &QScreen::availableGeometryChanged)
#endif // OS_MAC_OLD
);
}) | rpl::flatten_latest(
) | rpl::map([](QRect available) {

View File

@ -61,13 +61,6 @@ if [ "$BuildTarget" == "linux" ]; then
ProjectPath="$HomePath/../out"
ReleasePath="$ProjectPath/Release"
BinaryName="Telegram"
elif [ "$BuildTarget" == "linux32" ]; then
echo "Building version $AppVersionStrFull for Linux 32bit.."
UpdateFile="tlinux32upd$AppVersion"
SetupFile="tsetup32.$AppVersionStrFull.tar.xz"
ProjectPath="$HomePath/../out"
ReleasePath="$ProjectPath/Release"
BinaryName="Telegram"
elif [ "$BuildTarget" == "mac" ]; then
echo "Building version $AppVersionStrFull for macOS 10.12+.."
if [ "$AC_USERNAME" == "" ]; then
@ -78,13 +71,6 @@ elif [ "$BuildTarget" == "mac" ]; then
ProjectPath="$HomePath/../out"
ReleasePath="$ProjectPath/Release"
BinaryName="Telegram"
elif [ "$BuildTarget" == "osx" ]; then
echo "Building version $AppVersionStrFull for OS X 10.10 and 10.11.."
UpdateFile="tosxupd$AppVersion"
SetupFile="tsetup-osx.$AppVersionStrFull.dmg"
ProjectPath="$HomePath/../out"
ReleasePath="$ProjectPath/Release"
BinaryName="Telegram"
elif [ "$BuildTarget" == "macstore" ]; then
if [ "$AlphaVersion" != "0" ]; then
Error "Can't build macstore alpha version!"
@ -122,7 +108,7 @@ fi
DeployPath="$ReleasePath/deploy/$AppVersionStrMajor/$AppVersionStrFull"
if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then
if [ "$BuildTarget" == "linux" ]; then
DropboxSymbolsPath="/media/psf/Dropbox/Telegram/symbols"
if [ ! -d "$DropboxSymbolsPath" ]; then
@ -201,7 +187,7 @@ if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then
fi
fi
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ] || [ "$BuildTarget" == "macstore" ]; then
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "macstore" ]; then
DropboxSymbolsPath="$HOME/Dropbox/Telegram/symbols"
if [ ! -d "$DropboxSymbolsPath" ]; then
@ -237,7 +223,7 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ] || [ "$BuildTarget
Error "$BinaryName.app.dSYM not found!"
fi
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ]; then
if [ "$BuildTarget" == "mac" ]; then
if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Frameworks/Updater" ]; then
Error "Updater not found!"
fi
@ -260,7 +246,7 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ] || [ "$BuildTarget
echo "Done!"
echo "Signing the application.."
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ]; then
if [ "$BuildTarget" == "mac" ]; 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"
@ -287,7 +273,7 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ] || [ "$BuildTarget
Error "$BinaryName signature not found!"
fi
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ]; then
if [ "$BuildTarget" == "mac" ]; then
if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Frameworks/Updater" ]; then
Error "Updater not found in Frameworks!"
fi
@ -304,7 +290,7 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ] || [ "$BuildTarget
echo "Done!"
fi
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ]; then
if [ "$BuildTarget" == "mac" ]; then
cd "$ReleasePath"
if [ "$NotarizeRequestId" == "" ]; then
@ -434,7 +420,7 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ] || [ "$BuildTarget
mkdir "$ReleasePath/deploy/$AppVersionStrMajor"
fi
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ]; then
if [ "$BuildTarget" == "mac" ]; then
echo "Copying $BinaryName.app and $UpdateFile to deploy/$AppVersionStrMajor/$AppVersionStr..";
mkdir "$DeployPath"
mkdir "$DeployPath/$BinaryName"
@ -456,14 +442,6 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ] || [ "$BuildTarget
cp -v "$DeployPath/$AlphaKeyFile" "$BackupPath/tmac/"
fi
fi
if [ "$BuildTarget" == "osx" ]; then
mkdir -p "$BackupPath/tosx"
cp "$DeployPath/$UpdateFile" "$BackupPath/tosx/"
cp "$DeployPath/$SetupFile" "$BackupPath/tosx/"
if [ "$AlphaVersion" != "0" ]; then
cp -v "$DeployPath/$AlphaKeyFile" "$BackupPath/tosx/"
fi
fi
elif [ "$BuildTarget" == "macstore" ]; then
echo "Copying $BinaryName.app to deploy/$AppVersionStrMajor/$AppVersionStr..";
mkdir "$DeployPath"

View File

@ -47,17 +47,12 @@ fi
echo ""
HomePath="$FullScriptPath/.."
DeployMac="0"
DeployOsx="0"
DeployWin="0"
DeployWin64="0"
DeployLinux="0"
DeployLinux32="0"
if [ "$DeployTarget" == "mac" ]; then
DeployMac="1"
echo "Deploying version $AppVersionStrFull for macOS.."
elif [ "$DeployTarget" == "osx" ]; then
DeployOsx="1"
echo "Deploying version $AppVersionStrFull for OS X 10.10 and 10.11.."
elif [ "$DeployTarget" == "win" ]; then
DeployWin="1"
echo "Deploying version $AppVersionStrFull for Windows 32 bit.."
@ -67,9 +62,6 @@ elif [ "$DeployTarget" == "win64" ]; then
elif [ "$DeployTarget" == "linux" ]; then
DeployLinux="1"
echo "Deploying version $AppVersionStrFull for Linux 64 bit.."
elif [ "$DeployTarget" == "linux32" ]; then
DeployLinux32="1"
echo "Deploying version $AppVersionStrFull for Linux 32 bit.."
else
DeployMac="1"
DeployWin="1"
@ -88,10 +80,6 @@ MacDeployPath="$BackupPath/$AppVersionStrMajor/$AppVersionStrFull/tmac"
MacUpdateFile="tmacupd$AppVersion"
MacSetupFile="tsetup.$AppVersionStrFull.dmg"
MacRemoteFolder="tmac"
OsxDeployPath="$BackupPath/$AppVersionStrMajor/$AppVersionStrFull/tosx"
OsxUpdateFile="tosxupd$AppVersion"
OsxSetupFile="tsetup-osx.$AppVersionStrFull.dmg"
OsxRemoteFolder="tosx"
WinDeployPath="$BackupPath/$AppVersionStrMajor/$AppVersionStrFull/tsetup"
WinUpdateFile="tupdate$AppVersion"
WinSetupFile="tsetup.$AppVersionStrFull.exe"
@ -106,10 +94,6 @@ LinuxDeployPath="$BackupPath/$AppVersionStrMajor/$AppVersionStrFull/tlinux"
LinuxUpdateFile="tlinuxupd$AppVersion"
LinuxSetupFile="tsetup.$AppVersionStrFull.tar.xz"
LinuxRemoteFolder="tlinux"
Linux32DeployPath="$BackupPath/$AppVersionStrMajor/$AppVersionStrFull/tlinux32"
Linux32UpdateFile="tlinux32upd$AppVersion"
Linux32SetupFile="tsetup32.$AppVersionStrFull.tar.xz"
Linux32RemoteFolder="tlinux32"
DeployPath="$BackupPath/$AppVersionStrMajor/$AppVersionStrFull"
if [ "$AlphaVersion" != "0" ]; then
@ -117,12 +101,8 @@ if [ "$AlphaVersion" != "0" ]; then
AlphaFilePath="$WinDeployPath/$AlphaKeyFile"
elif [ "$DeployTarget" == "win64" ]; then
AlphaFilePath="$Win64DeployPath/$AlphaKeyFile"
elif [ "$DeployTarget" == "osx" ]; then
AlphaFilePath="$OsxDeployPath/$AlphaKeyFile"
elif [ "$DeployTarget" == "linux" ]; then
AlphaFilePath="$LinuxDeployPath/$AlphaKeyFile"
elif [ "$DeployTarget" == "linux32" ]; then
AlphaFilePath="$Linux32DeployPath/$AlphaKeyFile"
else
AlphaFilePath="$MacDeployPath/$AlphaKeyFile"
fi
@ -136,16 +116,12 @@ if [ "$AlphaVersion" != "0" ]; then
MacUpdateFile="${MacUpdateFile}_${AlphaSignature}"
MacSetupFile="talpha${AlphaVersion}_${AlphaSignature}.zip"
OsxUpdateFile="${OsxUpdateFile}_${AlphaSignature}"
OsxSetupFile="talpha${AlphaVersion}_${AlphaSignature}.zip"
WinUpdateFile="${WinUpdateFile}_${AlphaSignature}"
WinPortableFile="talpha${AlphaVersion}_${AlphaSignature}.zip"
Win64UpdateFile="${Win64UpdateFile}_${AlphaSignature}"
Win64PortableFile="talpha${AlphaVersion}_${AlphaSignature}.zip"
LinuxUpdateFile="${LinuxUpdateFile}_${AlphaSignature}"
LinuxSetupFile="talpha${AlphaVersion}_${AlphaSignature}.tar.xz"
Linux32UpdateFile="${Linux32UpdateFile}_${AlphaSignature}"
Linux32SetupFile="talpha${AlphaVersion}_${AlphaSignature}.tar.xz"
fi
if [ "$DeployMac" == "1" ]; then
@ -156,14 +132,6 @@ if [ "$DeployMac" == "1" ]; then
Error "$MacDeployPath/$MacSetupFile not found!"
fi
fi
if [ "$DeployOsx" == "1" ]; then
if [ ! -f "$OsxDeployPath/$OsxUpdateFile" ]; then
Error "$OsxUpdateFile not found!"
fi
if [ ! -f "$OsxDeployPath/$OsxSetupFile" ]; then
Error "$OsxSetupFile not found!"
fi
fi
if [ "$DeployWin" == "1" ]; then
if [ ! -f "$WinDeployPath/$WinUpdateFile" ]; then
Error "$WinUpdateFile not found!"
@ -198,14 +166,6 @@ if [ "$DeployLinux" == "1" ]; then
Error "$LinuxDeployPath/$LinuxSetupFile not found!"
fi
fi
if [ "$DeployLinux32" == "1" ]; then
if [ ! -f "$Linux32DeployPath/$Linux32UpdateFile" ]; then
Error "$Linux32DeployPath/$Linux32UpdateFile not found!"
fi
if [ ! -f "$Linux32DeployPath/$Linux32SetupFile" ]; then
Error "$Linux32DeployPath/$Linux32SetupFile not found!"
fi
fi
$FullScriptPath/../../../DesktopPrivate/mount.sh
@ -213,9 +173,6 @@ declare -a Files
if [ "$DeployMac" == "1" ]; then
Files+=("tmac/$MacUpdateFile" "tmac/$MacSetupFile")
fi
if [ "$DeployOsx" == "1" ]; then
Files+=("tosx/$OsxUpdateFile" "tosx/$OsxSetupFile")
fi
if [ "$DeployWin" == "1" ]; then
Files+=("tsetup/$WinUpdateFile" "tsetup/$WinPortableFile")
if [ "$AlphaVersion" == "0" ]; then
@ -231,9 +188,6 @@ fi
if [ "$DeployLinux" == "1" ]; then
Files+=("tlinux/$LinuxUpdateFile" "tlinux/$LinuxSetupFile")
fi
if [ "$DeployLinux32" == "1" ]; then
Files+=("tlinux32/$Linux32UpdateFile" "tlinux32/$Linux32SetupFile")
fi
cd $DeployPath
rsync -avR --progress ${Files[@]} "$FullScriptPath/../../../DesktopPrivate/remote/files"

View File

@ -169,7 +169,7 @@ if (NOT TGVOIP_FOUND)
-Wno-error=sequence-point
-Wno-error=unused-result
)
if (build_linux32 AND CMAKE_SYSTEM_PROCESSOR MATCHES "i686.*|i386.*|x86.*")
if (CMAKE_SIZEOF_VOID_P EQUAL 4 AND CMAKE_SYSTEM_PROCESSOR MATCHES "i686.*|i386.*|x86.*")
target_compile_options(lib_tgvoip_bundled_options INTERFACE -msse2)
endif()
target_link_libraries(lib_tgvoip_bundled

@ -1 +1 @@
Subproject commit a23c05c44e4f01dc4428f4d75d4db98c59d313a6
Subproject commit fc2f6061c65252f0046d276ac8d591bd9dff3b5a

@ -1 +1 @@
Subproject commit 1b590f9e16eb9571a039f072d6fea66c607e419f
Subproject commit a2d1114a93c094f9b4919ddba06d42eca40a8655

2
cmake

@ -1 +1 @@
Subproject commit 4d44d822e01b3b5fbec3ce824e01f56aa35d7f72
Subproject commit b02fc90612b3a22525e47ad4c404a7e432b6803f