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