mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-03 08:05:12 +00:00
Make alpha branches test
This commit is contained in:
@@ -105,6 +105,7 @@ void AboutBox::resizeEvent(QResizeEvent *e) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AboutBox::showVersionHistory() {
|
void AboutBox::showVersionHistory() {
|
||||||
|
/*
|
||||||
if (cRealAlphaVersion()) {
|
if (cRealAlphaVersion()) {
|
||||||
auto url = qsl("https://tdesktop.com/");
|
auto url = qsl("https://tdesktop.com/");
|
||||||
if (Platform::IsWindows32Bit()) {
|
if (Platform::IsWindows32Bit()) {
|
||||||
@@ -128,8 +129,11 @@ void AboutBox::showVersionHistory() {
|
|||||||
|
|
||||||
Ui::show(Box<InformBox>("The link to the current private alpha version of Telegram Desktop was copied to the clipboard."));
|
Ui::show(Box<InformBox>("The link to the current private alpha version of Telegram Desktop was copied to the clipboard."));
|
||||||
} else {
|
} else {
|
||||||
|
*/
|
||||||
UrlClickHandler::Open(Core::App().changelogLink());
|
UrlClickHandler::Open(Core::App().changelogLink());
|
||||||
|
/*
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void AboutBox::keyPressEvent(QKeyEvent *e) {
|
void AboutBox::keyPressEvent(QKeyEvent *e) {
|
||||||
@@ -160,7 +164,7 @@ QString telegramFaqLink() {
|
|||||||
QString currentVersionText() {
|
QString currentVersionText() {
|
||||||
auto result = QString::fromLatin1(AppKotatoVersionStr);
|
auto result = QString::fromLatin1(AppKotatoVersionStr);
|
||||||
if (cAlphaVersion()) {
|
if (cAlphaVersion()) {
|
||||||
result += qsl(" alpha %1").arg(cAlphaVersion() % 1000);
|
result += qsl("-%1.%2").arg(AppKotatoTestBranch).arg(cAlphaVersion() % 1000);
|
||||||
} else if (AppBetaVersion) {
|
} else if (AppBetaVersion) {
|
||||||
result += " beta";
|
result += " beta";
|
||||||
}
|
}
|
||||||
|
@@ -31,7 +31,7 @@ object_ptr<ConfirmPhoneBox> CurrentConfirmPhoneBox = { nullptr };
|
|||||||
void SendToBannedHelp(const QString &phone) {
|
void SendToBannedHelp(const QString &phone) {
|
||||||
const auto version = QString::fromLatin1(AppVersionStr)
|
const auto version = QString::fromLatin1(AppVersionStr)
|
||||||
+ (cAlphaVersion()
|
+ (cAlphaVersion()
|
||||||
? qsl(" alpha %1").arg(cAlphaVersion())
|
? qsl("-%1.%2").arg(AppKotatoTestBranch).arg(cAlphaVersion() % 1000)
|
||||||
: (AppBetaVersion ? " beta" : ""));
|
: (AppBetaVersion ? " beta" : ""));
|
||||||
|
|
||||||
const auto subject = qsl("Banned phone number: ") + phone;
|
const auto subject = qsl("Banned phone number: ") + phone;
|
||||||
|
@@ -439,7 +439,7 @@ QString LastCrashedWindow::getReportField(const QLatin1String &name, const QLati
|
|||||||
QString data = lines.at(i).trimmed().mid(prefix.size()).trimmed();
|
QString data = lines.at(i).trimmed().mid(prefix.size()).trimmed();
|
||||||
|
|
||||||
if (name == qstr("version")) {
|
if (name == qstr("version")) {
|
||||||
if (data.endsWith(qstr(" alpha"))) {
|
if (data.endsWith(qstr(" %1").arg(AppKotatoTestBranch))) {
|
||||||
data = QString::number(-data.replace(QRegularExpression(qsl("[^\\d]")), "").toLongLong());
|
data = QString::number(-data.replace(QRegularExpression(qsl("[^\\d]")), "").toLongLong());
|
||||||
} else {
|
} else {
|
||||||
data = QString::number(data.replace(QRegularExpression(qsl("[^\\d]")), "").toLongLong());
|
data = QString::number(data.replace(QRegularExpression(qsl("[^\\d]")), "").toLongLong());
|
||||||
|
@@ -346,7 +346,7 @@ void StartCatching(not_null<Core::Launcher*> launcher) {
|
|||||||
#ifndef DESKTOP_APP_DISABLE_CRASH_REPORTS
|
#ifndef DESKTOP_APP_DISABLE_CRASH_REPORTS
|
||||||
ProcessAnnotations["Binary"] = cExeName().toUtf8().constData();
|
ProcessAnnotations["Binary"] = cExeName().toUtf8().constData();
|
||||||
ProcessAnnotations["ApiId"] = QString::number(cApiId()).toUtf8().constData();
|
ProcessAnnotations["ApiId"] = QString::number(cApiId()).toUtf8().constData();
|
||||||
ProcessAnnotations["Version"] = (cAlphaVersion() ? qsl("%1 alpha").arg(cAlphaVersion()) : (AppBetaVersion ? qsl("%1 beta") : qsl("%1")).arg(AppKotatoVersion)).toUtf8().constData();
|
ProcessAnnotations["Version"] = (cAlphaVersion() ? qsl("%1 %2").arg(cAlphaVersion()).arg(AppKotatoTestBranch) : (AppBetaVersion ? qsl("%1 beta") : qsl("%1")).arg(AppKotatoVersion)).toUtf8().constData();
|
||||||
ProcessAnnotations["Launched"] = QDateTime::currentDateTime().toString("dd.MM.yyyy hh:mm:ss").toUtf8().constData();
|
ProcessAnnotations["Launched"] = QDateTime::currentDateTime().toString("dd.MM.yyyy hh:mm:ss").toUtf8().constData();
|
||||||
ProcessAnnotations["Platform"] = PlatformString().toUtf8().constData();
|
ProcessAnnotations["Platform"] = PlatformString().toUtf8().constData();
|
||||||
ProcessAnnotations["UserTag"] = QString::number(launcher->installationTag(), 16).toUtf8().constData();
|
ProcessAnnotations["UserTag"] = QString::number(launcher->installationTag(), 16).toUtf8().constData();
|
||||||
|
@@ -518,7 +518,7 @@ bool ParseCommonMap(
|
|||||||
const auto types = (*it).toObject();
|
const auto types = (*it).toObject();
|
||||||
const auto list = [&]() -> std::vector<QString> {
|
const auto list = [&]() -> std::vector<QString> {
|
||||||
if (cAlphaVersion()) {
|
if (cAlphaVersion()) {
|
||||||
return { "alpha", "beta", "stable" };
|
return { AppKotatoTestBranch };
|
||||||
} else if (cInstallBetaVersion()) {
|
} else if (cInstallBetaVersion()) {
|
||||||
return { "beta", "stable" };
|
return { "beta", "stable" };
|
||||||
}
|
}
|
||||||
@@ -541,7 +541,7 @@ bool ParseCommonMap(
|
|||||||
if (version == map.constEnd()) {
|
if (version == map.constEnd()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const auto isAvailableAlpha = (type == "alpha");
|
const auto isAvailableAlpha = (type == AppKotatoTestBranch);
|
||||||
const auto availableVersion = [&] {
|
const auto availableVersion = [&] {
|
||||||
if ((*version).isString()) {
|
if ((*version).isString()) {
|
||||||
const auto string = (*version).toString();
|
const auto string = (*version).toString();
|
||||||
@@ -1493,7 +1493,7 @@ bool checkReadyUpdate() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!cAlphaVersion() || alphaVersion <= cAlphaVersion()) {
|
if (!cAlphaVersion() || alphaVersion <= cAlphaVersion()) {
|
||||||
LOG(("Update Error: cant install alpha version %1 having alpha version %2").arg(alphaVersion).arg(cAlphaVersion()));
|
LOG(("Update Error: cant install alpha version %1 having %2 version %3").arg(alphaVersion).arg(AppKotatoTestBranch).arg(cAlphaVersion()));
|
||||||
ClearAll();
|
ClearAll();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -11,6 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||||||
//#include "base/const_string.h"
|
//#include "base/const_string.h"
|
||||||
#include "kotato/version.h"
|
#include "kotato/version.h"
|
||||||
|
|
||||||
|
/*
|
||||||
#define TDESKTOP_REQUESTED_ALPHA_VERSION (0ULL)
|
#define TDESKTOP_REQUESTED_ALPHA_VERSION (0ULL)
|
||||||
|
|
||||||
#ifdef TDESKTOP_ALLOW_CLOSED_ALPHA
|
#ifdef TDESKTOP_ALLOW_CLOSED_ALPHA
|
||||||
@@ -18,6 +19,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||||||
#else // TDESKTOP_ALLOW_CLOSED_ALPHA
|
#else // TDESKTOP_ALLOW_CLOSED_ALPHA
|
||||||
#define TDESKTOP_ALPHA_VERSION (0ULL)
|
#define TDESKTOP_ALPHA_VERSION (0ULL)
|
||||||
#endif // TDESKTOP_ALLOW_CLOSED_ALPHA
|
#endif // TDESKTOP_ALLOW_CLOSED_ALPHA
|
||||||
|
*/
|
||||||
|
|
||||||
// used in Updater.cpp and Setup.iss for Windows
|
// used in Updater.cpp and Setup.iss for Windows
|
||||||
//constexpr auto AppId = "{53F49750-6209-4FBF-9CA8-7A333C87D1ED}"_cs;
|
//constexpr auto AppId = "{53F49750-6209-4FBF-9CA8-7A333C87D1ED}"_cs;
|
||||||
|
@@ -15,3 +15,14 @@ constexpr auto AppFile = "Kotatogram"_cs;
|
|||||||
constexpr auto AppKotatoVersion = 1004000;
|
constexpr auto AppKotatoVersion = 1004000;
|
||||||
constexpr auto AppKotatoVersionStr = "1.4";
|
constexpr auto AppKotatoVersionStr = "1.4";
|
||||||
constexpr auto AppBetaVersion = false;
|
constexpr auto AppBetaVersion = false;
|
||||||
|
|
||||||
|
// Test branch related
|
||||||
|
constexpr auto AppKotatoTestBranch = "dev";
|
||||||
|
|
||||||
|
#define TDESKTOP_REQUESTED_ALPHA_VERSION (0ULL)
|
||||||
|
|
||||||
|
#ifdef TDESKTOP_ALLOW_CLOSED_ALPHA
|
||||||
|
#define TDESKTOP_ALPHA_VERSION TDESKTOP_REQUESTED_ALPHA_VERSION
|
||||||
|
#else // TDESKTOP_ALLOW_CLOSED_ALPHA
|
||||||
|
#define TDESKTOP_ALPHA_VERSION (0ULL)
|
||||||
|
#endif // TDESKTOP_ALLOW_CLOSED_ALPHA
|
||||||
|
@@ -414,9 +414,10 @@ void start(not_null<Core::Launcher*> launcher) {
|
|||||||
LogsData = nullptr;
|
LogsData = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG(("Launched version: %1, install beta: %2, alpha: %3, debug mode: %4"
|
LOG(("Launched version: %1, install beta: %2, %3: %4, debug mode: %5"
|
||||||
).arg(AppVersion
|
).arg(AppVersion
|
||||||
).arg(Logs::b(cInstallBetaVersion())
|
).arg(Logs::b(cInstallBetaVersion())
|
||||||
|
).arg(AppKotatoTestBranch
|
||||||
).arg(cAlphaVersion()
|
).arg(cAlphaVersion()
|
||||||
).arg(Logs::b(DebugEnabled())));
|
).arg(Logs::b(DebugEnabled())));
|
||||||
LOG(("Executable dir: %1, name: %2").arg(cExeDir(), cExeName()));
|
LOG(("Executable dir: %1, name: %2").arg(cExeDir(), cExeName()));
|
||||||
|
@@ -98,7 +98,9 @@ using namespace details;
|
|||||||
#else // OS_MAC_STORE || OS_WIN_STORE || (defined Q_OS_UNIX && !defined Q_OS_MAC)
|
#else // OS_MAC_STORE || OS_WIN_STORE || (defined Q_OS_UNIX && !defined Q_OS_MAC)
|
||||||
return Platform::IsWindows64Bit() ? u" x64"_q : QString();
|
return Platform::IsWindows64Bit() ? u" x64"_q : QString();
|
||||||
#endif // OS_MAC_STORE || OS_WIN_STORE || (defined Q_OS_UNIX && !defined Q_OS_MAC)
|
#endif // OS_MAC_STORE || OS_WIN_STORE || (defined Q_OS_UNIX && !defined Q_OS_MAC)
|
||||||
})() + qsl(" (TD %1)").arg(AppVersionStr);
|
})() + (cAlphaVersion()
|
||||||
|
? (qsl("-%1.%2").arg(AppKotatoTestBranch).arg(cAlphaVersion() % 1000))
|
||||||
|
: QString());
|
||||||
}
|
}
|
||||||
|
|
||||||
void WrapInvokeAfter(
|
void WrapInvokeAfter(
|
||||||
|
@@ -25,9 +25,9 @@ if (DESKTOP_APP_DISABLE_AUTOUPDATE)
|
|||||||
target_compile_definitions(Telegram PRIVATE TDESKTOP_DISABLE_AUTOUPDATE)
|
target_compile_definitions(Telegram PRIVATE TDESKTOP_DISABLE_AUTOUPDATE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# if (DESKTOP_APP_SPECIAL_TARGET)
|
if (DESKTOP_APP_SPECIAL_TARGET)
|
||||||
# target_compile_definitions(Telegram PRIVATE TDESKTOP_ALLOW_CLOSED_ALPHA)
|
target_compile_definitions(Telegram PRIVATE TDESKTOP_ALLOW_CLOSED_ALPHA)
|
||||||
# endif()
|
endif()
|
||||||
|
|
||||||
if (NOT TDESKTOP_LAUNCHER_BASENAME)
|
if (NOT TDESKTOP_LAUNCHER_BASENAME)
|
||||||
set(TDESKTOP_LAUNCHER_BASENAME "kotatogramdesktop")
|
set(TDESKTOP_LAUNCHER_BASENAME "kotatogramdesktop")
|
||||||
|
Reference in New Issue
Block a user