From 6d8125be19a131a09cd30ab560c67a8d284dd715 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 23 Jan 2015 18:24:36 +0300 Subject: [PATCH] version 0.7.9 --- Telegram/PrepareWin.bat | 6 +++--- Telegram/SourceFiles/config.h | 6 +++--- Telegram/SourceFiles/logs.cpp | 4 ++++ Telegram/SourceFiles/settings.cpp | 4 ++-- Telegram/SourceFiles/settings.h | 10 +--------- Telegram/Telegram.plist | 2 +- Telegram/Telegram.rc | Bin 5532 -> 5532 bytes Telegram/Telegram.xcodeproj/project.pbxproj | 12 ++++++------ Telegram/Version.sh | 2 +- 9 files changed, 21 insertions(+), 25 deletions(-) diff --git a/Telegram/PrepareWin.bat b/Telegram/PrepareWin.bat index c116da7ef0..981494879a 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 98bb77fbae..e736b7fc1e 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 40c9199ac5..bb0fe21a5d 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 f1766b43ec..2624048c7f 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 11b8189d3f..ee171e7aaf 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 7ca2e3409c..d2dbf32489 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 633d4c91fa81dbb2263dbd13c8206f67ac40ceb8..4da0f0137f6d278473d7a25cc89ba0a158293905 100644 GIT binary patch delta 50 zcmbQEJx6;(0WYKF