From 8552b8421bd96be46daa309ec523f49648f62232 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 4 Dec 2015 14:25:29 +0300 Subject: [PATCH] fixed autoupdate and scripts for beta, new beta version 9014001 --- Telegram/Build.bat | 3 +++ Telegram/SourceFiles/autoupdater.cpp | 2 +- Telegram/SourceFiles/config.h | 2 +- Telegram/Version | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Telegram/Build.bat b/Telegram/Build.bat index b1ca2c183a..ed0b4f3b2d 100644 --- a/Telegram/Build.bat +++ b/Telegram/Build.bat @@ -95,7 +95,10 @@ if %BetaVersion% neq 0 ( ) FOR /F "tokens=1* delims= " %%i in (%ReleasePath%\%BetaKeyFile%) do set "BetaSignature=%%i" +) +if %errorlevel% neq 0 goto error +if %BetaVersion% neq 0 ( set "UpdateFile=%UpdateFile%_%BetaSignature%" set "PortableFile=tbeta%BetaVersion%_%BetaSignature%.zip" ) diff --git a/Telegram/SourceFiles/autoupdater.cpp b/Telegram/SourceFiles/autoupdater.cpp index 0a6c7a38ba..d560cfbc60 100644 --- a/Telegram/SourceFiles/autoupdater.cpp +++ b/Telegram/SourceFiles/autoupdater.cpp @@ -497,7 +497,6 @@ bool checkReadyUpdate() { UpdateDownloader::clearAll(); return false; } - fVersion.close(); if (versionNum == 0x7FFFFFFF) { // beta version quint64 betaVersion = 0; if (fVersion.read((char*)&betaVersion, sizeof(quint64)) != sizeof(quint64)) { @@ -515,6 +514,7 @@ bool checkReadyUpdate() { UpdateDownloader::clearAll(); return false; } + fVersion.close(); } #ifdef Q_OS_WIN diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h index 3863763299..52f7b0581f 100644 --- a/Telegram/SourceFiles/config.h +++ b/Telegram/SourceFiles/config.h @@ -23,7 +23,7 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org static const int32 AppVersion = 9014; static const wchar_t *AppVersionStr = L"0.9.14"; static const bool DevVersion = true; -#define BETA_VERSION (9014002ULL) // just comment this line to build public version +#define BETA_VERSION (9014001ULL) // just comment this line to build public version static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)"; static const wchar_t *AppName = L"Telegram Desktop"; diff --git a/Telegram/Version b/Telegram/Version index 38617321a9..df787d6d36 100644 --- a/Telegram/Version +++ b/Telegram/Version @@ -3,4 +3,4 @@ AppVersionStrMajor 0.9 AppVersionStrSmall 0.9.14 AppVersionStr 0.9.14 DevChannel 1 -BetaVersion 9014002 +BetaVersion 9014001