mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-25 04:38:23 +00:00
Build alphas only for official targets.
This commit is contained in:
parent
ef38572d5a
commit
8b6e24e83d
@ -20,7 +20,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "core/update_checker.h"
|
||||
|
||||
AboutBox::AboutBox(QWidget *parent)
|
||||
: _version(this, lng_about_version(lt_version, QString::fromLatin1(AppVersionStr.c_str()) + (cAlphaVersion() ? qsl(" alpha %1").arg(cAlphaVersion()) : (AppBetaVersion ? " beta" : ""))), st::aboutVersionLink)
|
||||
: _version(this, lng_about_version(lt_version, QString::fromLatin1(AppVersionStr) + (cAlphaVersion() ? qsl(" alpha %1").arg(cAlphaVersion()) : (AppBetaVersion ? " beta" : ""))), st::aboutVersionLink)
|
||||
, _text1(this, lang(lng_about_text_1), Ui::FlatLabel::InitType::Rich, st::aboutLabel)
|
||||
, _text2(this, lang(lng_about_text_2), Ui::FlatLabel::InitType::Rich, st::aboutLabel)
|
||||
, _text3(this, st::aboutLabel) {
|
||||
@ -98,7 +98,7 @@ QString telegramFaqLink() {
|
||||
}
|
||||
|
||||
QString currentVersionText() {
|
||||
auto result = QString::fromLatin1(AppVersionStr.c_str());
|
||||
auto result = QString::fromLatin1(AppVersionStr);
|
||||
if (cAlphaVersion()) {
|
||||
result += qsl(" alpha %1").arg(cAlphaVersion() % 1000);
|
||||
} else if (AppBetaVersion) {
|
||||
|
@ -231,12 +231,11 @@ constexpr auto ApiHash = "344583e45741c457fe1862106095a5eb";
|
||||
#error "Only little endian is supported!"
|
||||
#endif // Q_BYTE_ORDER == Q_BIG_ENDIAN
|
||||
|
||||
#ifndef ALPHA_VERSION_MACRO
|
||||
#error "Alpha version macro is not defined."
|
||||
#endif
|
||||
#if (TDESKTOP_ALPHA_VERSION != 0)
|
||||
|
||||
// Private key for downloading closed alphas.
|
||||
#include "../../../TelegramPrivate/alpha_private.h"
|
||||
|
||||
#if (defined TDESKTOP_OFFICIAL_TARGET) && (ALPHA_VERSION_MACRO > 0ULL)
|
||||
#include "../../../TelegramPrivate/alpha_private.h" // private key for downloading closed alphas
|
||||
#else
|
||||
static const char *AlphaPrivateKey = "";
|
||||
#endif
|
||||
|
@ -141,7 +141,7 @@ void Changelogs::addLocalLogs() {
|
||||
if (!_addedSomeLocal) {
|
||||
const auto text = lng_new_version_wrap(
|
||||
lt_version,
|
||||
str_const_toString(AppVersionStr),
|
||||
QString::fromLatin1(AppVersionStr),
|
||||
lt_changes,
|
||||
lang(lng_new_version_minor),
|
||||
lt_link,
|
||||
|
@ -7,11 +7,15 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "core/utils.h"
|
||||
|
||||
#define ALPHA_VERSION_MACRO (1004004002ULL)
|
||||
|
||||
constexpr int AppVersion = 1004004;
|
||||
constexpr str_const AppVersionStr = "1.4.4";
|
||||
constexpr bool AppBetaVersion = false;
|
||||
constexpr uint64 AppAlphaVersion = ALPHA_VERSION_MACRO;
|
||||
#ifdef TDESKTOP_OFFICIAL_TARGET
|
||||
#define TDESKTOP_ALPHA_VERSION ALPHA_VERSION_MACRO
|
||||
#else // TDESKTOP_OFFICIAL_TARGET
|
||||
#define TDESKTOP_ALPHA_VERSION (0ULL)
|
||||
#endif // TDESKTOP_OFFICIAL_TARGET
|
||||
|
||||
constexpr auto AppVersion = 1004004;
|
||||
constexpr auto AppVersionStr = "1.4.4";
|
||||
constexpr auto AppBetaVersion = false;
|
||||
constexpr auto AppAlphaVersion = TDESKTOP_ALPHA_VERSION;
|
||||
|
@ -411,11 +411,11 @@ bool CheckPortableVersionDir() {
|
||||
const auto portable = cExeDir() + qsl("TelegramForcePortable");
|
||||
QFile key(portable + qsl("/tdata/alpha"));
|
||||
if (cAlphaVersion()) {
|
||||
Assert(*AlphaPrivateKey != 0);
|
||||
|
||||
cForceWorkingDir(portable + '/');
|
||||
QDir().mkpath(cWorkingDir() + qstr("tdata"));
|
||||
if (*AlphaPrivateKey) {
|
||||
cSetAlphaPrivateKey(QByteArray(AlphaPrivateKey));
|
||||
}
|
||||
cSetAlphaPrivateKey(QByteArray(AlphaPrivateKey));
|
||||
if (!key.open(QIODevice::WriteOnly)) {
|
||||
LOG(("FATAL: Could not open '%1' for writing private key!"
|
||||
).arg(key.fileName()));
|
||||
|
@ -24,7 +24,7 @@ namespace Intro {
|
||||
namespace {
|
||||
|
||||
void SendToBannedHelp(const QString &phone) {
|
||||
const auto version = QString::fromLatin1(AppVersionStr.c_str())
|
||||
const auto version = QString::fromLatin1(AppVersionStr)
|
||||
+ (cAlphaVersion()
|
||||
? qsl(" alpha %1").arg(cAlphaVersion())
|
||||
: (AppBetaVersion ? " beta" : ""));
|
||||
|
@ -825,10 +825,10 @@ void ConnectionPrivate::tryToSend() {
|
||||
? "n/a"
|
||||
: Messenger::Instance().launcher()->systemVersion();
|
||||
#if defined OS_MAC_STORE || defined OS_WIN_STORE
|
||||
const auto appVersion = str_const_toString(AppVersionStr)
|
||||
const auto appVersion = QString::fromLatin1(AppVersionStr)
|
||||
+ " store";
|
||||
#else // OS_MAC_STORE || OS_WIN_STORE
|
||||
const auto appVersion = str_const_toString(AppVersionStr);
|
||||
const auto appVersion = QString::fromLatin1(AppVersionStr);
|
||||
#endif // OS_MAC_STORE || OS_WIN_STORE
|
||||
const auto proxyType = _connectionOptions->proxy.type;
|
||||
const auto mtprotoProxy = (proxyType == ProxyData::Type::Mtproto);
|
||||
|
Loading…
Reference in New Issue
Block a user