diff --git a/Telegram/PrepareWin.bat b/Telegram/PrepareWin.bat index c116da7ef..981494879 100644 --- a/Telegram/PrepareWin.bat +++ b/Telegram/PrepareWin.bat @@ -1,8 +1,8 @@ @echo OFF -set "AppVersionStrSmall=0.7.8" -set "AppVersionStr=0.7.8" -set "AppVersionStrFull=0.7.8.0" +set "AppVersionStrSmall=0.7.9" +set "AppVersionStr=0.7.9" +set "AppVersionStrFull=0.7.9.0" echo. echo Preparing version %AppVersionStr%.. diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h index 98bb77fba..e736b7fc1 100644 --- a/Telegram/SourceFiles/config.h +++ b/Telegram/SourceFiles/config.h @@ -17,8 +17,8 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org */ #pragma once -static const int32 AppVersion = 7008; -static const wchar_t *AppVersionStr = L"0.7.8"; +static const int32 AppVersion = 7009; +static const wchar_t *AppVersionStr = L"0.7.9"; static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)"; static const wchar_t *AppName = L"Telegram Desktop"; @@ -165,7 +165,7 @@ static const BuiltInDc _builtInDcs[] = { }; static const BuiltInDc _builtInTestDcs[] = { - { 1, "173.240.5.253", 443 }, + { 1, "149.154.175.10", 443 }, { 2, "149.154.167.40", 443 }, { 3, "174.140.142.5", 443 } }; diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp index 40c9199ac..bb0fe21a5 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp @@ -212,6 +212,10 @@ void logsInit() { } cForceWorkingDir(QDir(cWorkingDir()).absolutePath() + '/'); + if (QFile(cWorkingDir() + qsl("tdata/withtestmode")).exists()) { + cSetTestMode(true); + LOG(("Switched to test mode!")); + } #ifdef Q_OS_WIN if (cWorkingDir() == psAppDataPath()) { // fix old "Telegram Win (Unofficial)" version moveOldDataFiles(psAppDataPathOld()); diff --git a/Telegram/SourceFiles/settings.cpp b/Telegram/SourceFiles/settings.cpp index f1766b43e..2624048c7 100644 --- a/Telegram/SourceFiles/settings.cpp +++ b/Telegram/SourceFiles/settings.cpp @@ -127,8 +127,8 @@ void settingsParseArgs(int argc, char *argv[]) { gExeDir = psCurrentExeDirectory(argc, argv); gExeName = psCurrentExeName(argc, argv); for (int32 i = 0; i < argc; ++i) { - if (string("-release") == argv[i]) { - gTestMode = false; + if (string("-testmode") == argv[i]) { + gTestMode = true; } else if (string("-debug") == argv[i]) { gDebug = true; } else if (string("-many") == argv[i]) { diff --git a/Telegram/SourceFiles/settings.h b/Telegram/SourceFiles/settings.h index 11b8189d3..ee171e7aa 100644 --- a/Telegram/SourceFiles/settings.h +++ b/Telegram/SourceFiles/settings.h @@ -31,15 +31,6 @@ inline void cSetDebug(bool debug) { gDebug = debug; } -extern bool gTestMode; -inline bool cTestMode() { -#ifdef _DEBUG - return gTestMode; -#else - return false; -#endif -} - #define DeclareReadSetting(Type, Name) extern Type g##Name; \ inline const Type &c##Name() { \ return g##Name; \ @@ -50,6 +41,7 @@ inline void cSet##Name(const Type &Name) { \ g##Name = Name; \ } +DeclareSetting(bool, TestMode); DeclareSetting(QString, LoggedPhoneNumber); DeclareReadSetting(uint32, ConnectionsInSession); DeclareSetting(bool, AutoStart); diff --git a/Telegram/Telegram.plist b/Telegram/Telegram.plist index 7ca2e3409..d2dbf3248 100644 --- a/Telegram/Telegram.plist +++ b/Telegram/Telegram.plist @@ -11,7 +11,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.7.8 + 0.7.9 CFBundleSignature ???? CFBundleURLTypes diff --git a/Telegram/Telegram.rc b/Telegram/Telegram.rc index 633d4c91f..4da0f0137 100644 Binary files a/Telegram/Telegram.rc and b/Telegram/Telegram.rc differ diff --git a/Telegram/Telegram.xcodeproj/project.pbxproj b/Telegram/Telegram.xcodeproj/project.pbxproj index 489f86e30..485f36b48 100644 --- a/Telegram/Telegram.xcodeproj/project.pbxproj +++ b/Telegram/Telegram.xcodeproj/project.pbxproj @@ -1627,7 +1627,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.7.8; + CURRENT_PROJECT_VERSION = 0.7.9; DEBUG_INFORMATION_FORMAT = dwarf; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_OPTIMIZATION_LEVEL = 0; @@ -1645,7 +1645,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COPY_PHASE_STRIP = YES; - CURRENT_PROJECT_VERSION = 0.7.8; + CURRENT_PROJECT_VERSION = 0.7.9; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = fast; GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h; @@ -1671,10 +1671,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.7.8; + CURRENT_PROJECT_VERSION = 0.7.9; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DYLIB_COMPATIBILITY_VERSION = 0.7; - DYLIB_CURRENT_VERSION = 0.7.8; + DYLIB_CURRENT_VERSION = 0.7.9; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ""; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; @@ -1814,10 +1814,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.7.8; + CURRENT_PROJECT_VERSION = 0.7.9; DEBUG_INFORMATION_FORMAT = dwarf; DYLIB_COMPATIBILITY_VERSION = 0.7; - DYLIB_CURRENT_VERSION = 0.7.8; + DYLIB_CURRENT_VERSION = 0.7.9; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ""; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; diff --git a/Telegram/Version.sh b/Telegram/Version.sh index 126b22118..22bbf923c 100755 --- a/Telegram/Version.sh +++ b/Telegram/Version.sh @@ -1,2 +1,2 @@ -echo 7008 0.7.8 +echo 7009 0.7.9