version 0.8.19 with fixed stickerpacks and voice messages changelog

This commit is contained in:
John Preston 2015-06-01 23:24:09 +03:00
parent 67e6d12384
commit 635cae4f94
13 changed files with 29 additions and 45 deletions

View File

@ -111,6 +111,8 @@ http://msys2.github.io/ > Download [msys2-x86_64-20150512.exe](http://sourceforg
#####Building libraries
Download [yasm for Win64](http://www.tortall.net/projects/yasm/releases/yasm-1.3.0-win64.exe) from http://yasm.tortall.net/Download.html, rename **yasm-1.3.0-win64.exe** to **yasm.exe** and place it to your Visual C++ **bin** directory, like **\\Program Files (x86)\\Microsoft Visual Studio 12\\VC\\bin\\**
Open **VS2013 x86 Native Tools Command Prompt.bat** (should be in **\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\Tools\\Shortcuts\\** folder), go to **D:\\msys64\\** and launch **msys2_shell.bat**, there run
PATH="/c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/BIN:$PATH"
@ -119,6 +121,8 @@ Open **VS2013 x86 Native Tools Command Prompt.bat** (should be in **\\Program Fi
pacman -S msys/make
pacman -S mingw64/mingw-w64-x86_64-opus
PKG_CONFIG_PATH="/mingw64/lib/pkgconfig:$PKG_CONFIG_PATH"
./configure --toolchain=msvc --disable-programs --disable-everything --enable-libopus --enable-decoder=aac --enable-decoder=aac_latm --enable-decoder=aasc --enable-decoder=mp1 --enable-decoder=mp1float --enable-decoder=mp2 --enable-decoder=mp2float --enable-decoder=mp3 --enable-decoder=mp3adu --enable-decoder=mp3adufloat --enable-decoder=mp3float --enable-decoder=mp3on4 --enable-decoder=mp3on4float --enable-decoder=wavpack --enable-decoder=opus --enable-decoder=vorbis --enable-decoder=wmalossless --enable-decoder=wmapro --enable-decoder=wmav1 --enable-decoder=wmav2 --enable-decoder=wmavoice --enable-encoder=libopus --enable-parser=aac --enable-parser=aac_latm --enable-parser=mpegaudio --enable-parser=opus --enable-parser=vorbis --enable-demuxer=aac --enable-demuxer=wav --enable-demuxer=mp3 --enable-demuxer=ogg --enable-demuxer=mov --enable-muxer=ogg --enable-muxer=opus --extra-ldflags="-libpath:/d/TBuild/Libraries/opus/win32/VS2010/Win32/Release celt.lib silk_common.lib silk_float.lib"
make

View File

@ -1,9 +1,9 @@
@echo OFF
set "AppVersion=8018"
set "AppVersionStrSmall=0.8.18"
set "AppVersionStr=0.8.18"
set "AppVersionStrFull=0.8.18.0"
set "AppVersion=8019"
set "AppVersionStrSmall=0.8.19"
set "AppVersionStr=0.8.19"
set "AppVersionStrFull=0.8.19.0"
set "DevChannel=1"
if %DevChannel% neq 0 goto preparedev

View File

@ -585,7 +585,7 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
"lng_new_version_wrap" = "Telegram Desktop was updated to version {version}\n\n{changes}\n\nFull version history is available here:\n{link}";
"lng_new_version_minor" = "— Bug fixes and other minor improvements";
"lng_new_version_text" = "— Added support for sticker packs\n— New emoji and sticker panel";
"lng_new_version_text" = "— Added sending voice messages\n— Fixed disappearing stickers";
"lng_menu_insert_unicode" = "Insert Unicode control character";

View File

@ -1543,7 +1543,6 @@ namespace App {
cSetStickerSets(StickerSets());
cSetStickerSetsOrder(StickerSetsOrder());
cSetLastStickersUpdate(0);
LOG(("Stickers: cleared everything!"));
::videoItems.clear();
::audioItems.clear();
::documentItems.clear();

View File

@ -662,8 +662,8 @@ void Application::checkMapVersion() {
psRegisterCustomScheme();
if (Local::oldMapVersion()) {
QString versionFeatures;
if (DevChannel && Local::oldMapVersion() < 8015) {
versionFeatures = QString::fromUtf8("\xe2\x80\x94 Video captions are displayed\n\xe2\x80\x94 Photo captions are displayed in photo viewer\n\xe2\x80\x94 Round corners for messages").replace('@', qsl("@") + QChar(0x200D));
if (DevChannel && Local::oldMapVersion() < 8019) {
versionFeatures = lang(lng_new_version_text).trimmed();// QString::fromUtf8("\xe2\x80\x94 Video captions are displayed\n\xe2\x80\x94 Photo captions are displayed in photo viewer\n\xe2\x80\x94 Round corners for messages").replace('@', qsl("@") + QChar(0x200D));
} else if (!DevChannel && Local::oldMapVersion() < 8016) {
versionFeatures = lang(lng_new_version_text).trimmed();
} else if (!DevChannel && Local::oldMapVersion() < 8017) {

View File

@ -17,8 +17,8 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
*/
#pragma once
static const int32 AppVersion = 8018;
static const wchar_t *AppVersionStr = L"0.8.18";
static const int32 AppVersion = 8019;
static const wchar_t *AppVersionStr = L"0.8.19";
static const bool DevChannel = true;
static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)";

View File

@ -1384,8 +1384,6 @@ void StickerPanInner::refreshStickers() {
_hovers.clear(); _hovers.reserve(sets.size() + 1);
_titles.clear(); _titles.reserve(sets.size() + 1);
LOG(("Stickers: refreshing pan, sets size: %1").arg(sets.size()));
refreshRecent(false);
appendSet(CustomStickerSetId);
@ -1431,12 +1429,10 @@ void StickerPanInner::preloadImages() {
}
void StickerPanInner::appendSet(uint64 setId) {
LOG(("Stickers: appending set %1..").arg(setId));
const StickerSets &sets(cStickerSets());
StickerSets::const_iterator it = sets.constFind(setId);
if (it == sets.cend() || it->stickers.isEmpty()) return;
LOG(("Stickers: set %1 found! %2 stickers there.").arg(setId).arg(it->stickers.size()));
StickerPack pack;
pack.reserve(it->stickers.size());
for (int32 i = 0, l = it->stickers.size(); i < l; ++i) {
@ -1452,7 +1448,6 @@ void StickerPanInner::appendSet(uint64 setId) {
void StickerPanInner::refreshRecent(bool performResize) {
clearSelection(true);
if (cGetRecentStickers().isEmpty()) {
LOG(("Stickers: no recent!"));
if (!_setIds.isEmpty() && _setIds.at(0) == RecentStickerSetId) {
_setIds.pop_front();
_sets.pop_front();
@ -1460,7 +1455,6 @@ void StickerPanInner::refreshRecent(bool performResize) {
_titles.pop_front();
}
} else {
LOG(("Stickers: %1 recent stickers!").arg(cGetRecentStickers().size()));
StickerPack recent;
recent.reserve(cGetRecentStickers().size());
for (int32 i = 0, l = cGetRecentStickers().size(); i < l; ++i) {
@ -2050,7 +2044,6 @@ void EmojiPan::onRemoveSetSure() {
++i;
}
}
LOG(("Stickers: removed one set, %1.").arg(_removingSetId));
cRefStickerSets().erase(it);
cRefStickerSetsOrder().removeOne(_removingSetId);
cSetStickersHash(QByteArray());

View File

@ -1851,8 +1851,6 @@ void HistoryWidget::stickersGot(const MTPmessages_AllStickers &stickers) {
cSetLastStickersUpdate(getms(true));
_stickersUpdateRequest = 0;
LOG(("Stickers: got from server!"));
if (stickers.type() != mtpc_messages_allStickers) return;
const MTPDmessages_allStickers &d(stickers.c_messages_allStickers());
@ -1861,8 +1859,6 @@ void HistoryWidget::stickersGot(const MTPmessages_AllStickers &stickers) {
const QVector<MTPDocument> &d_docs(d.vdocuments.c_vector().v);
const QVector<MTPStickerSet> &d_sets(d.vsets.c_vector().v);
LOG(("Stickers: clearing everything, got all stickers"));
QByteArray wasHash = cStickersHash();
cSetStickersHash(qba(d.vhash));
@ -2001,13 +1997,10 @@ void HistoryWidget::stickersGot(const MTPmessages_AllStickers &stickers) {
}
}
}
LOG(("Stickers: now %1 sets, %2 recent").arg(sets.size()).arg(recent.size()));
if (added || removed || cStickersHash() != wasHash) {
LOG(("Stickers: writing stickers from gotAll!"));
Local::writeStickers();
}
if (writeRecent) {
LOG(("Stickers: writing recent stickers from gotAll!"));
Local::writeUserSettings();
}

View File

@ -2266,7 +2266,7 @@ namespace Local {
}
}
EncryptedDescriptor data(size);
data.stream << quint32(cStickerSetsOrder().size()) << cStickersHash();
data.stream << quint32(cStickerSets().size()) << cStickersHash();
_writeStickerSet(data.stream, DefaultStickerSetId);
_writeStickerSet(data.stream, CustomStickerSetId);
for (StickerSetsOrder::const_iterator i = cStickerSetsOrder().cbegin(), e = cStickerSetsOrder().cend(); i != e; ++i) {
@ -2278,19 +2278,15 @@ namespace Local {
}
void importOldRecentStickers() {
LOG(("Stickers: importOldStickers()"));
if (!_recentStickersKeyOld) return;
FileReadDescriptor stickers;
if (!readEncryptedFile(stickers, _recentStickersKeyOld)) {
LOG(("Stickers: could not readEncryptedFile(_recentStickersKeyOld)!"));
clearKey(_recentStickersKeyOld);
_recentStickersKeyOld = 0;
_writeMap();
return;
}
LOG(("Stickers: clearing everything in import-old!"));
StickerSets &sets(cRefStickerSets());
sets.clear();
@ -2338,7 +2334,6 @@ namespace Local {
}
if (recent.size() < StickerPanPerRow * StickerPanRowsPerPage && qAbs(value) > 1) recent.push_back(qMakePair(doc, qAbs(value)));
}
LOG(("Stickers: read %1 default stickers and %2 custom stickers").arg(def.stickers.size()).arg(custom.stickers.size()));
if (def.stickers.isEmpty()) sets.remove(DefaultStickerSetId);
if (custom.stickers.isEmpty()) sets.remove(CustomStickerSetId);
@ -2348,25 +2343,21 @@ namespace Local {
clearKey(_recentStickersKeyOld);
_recentStickersKeyOld = 0;
_writeMap();
LOG(("Stickers: writing stickers and clearing old-stickers"));
}
void readStickers() {
LOG(("Stickers: readStickers()"));
if (!_stickersKey) {
return importOldRecentStickers();
}
FileReadDescriptor stickers;
if (!readEncryptedFile(stickers, _stickersKey)) {
LOG(("Stickers: could not readEncryptedFile(_stickersKey)!"));
clearKey(_stickersKey);
_stickersKey = 0;
_writeMap();
return;
}
LOG(("Stickers: clearing everything in read"));
StickerSets &sets(cRefStickerSets());
sets.clear();
@ -2376,6 +2367,10 @@ namespace Local {
quint32 cnt;
QByteArray hash;
stickers.stream >> cnt >> hash;
if (stickers.version < 8019) {
hash.clear(); // bad data in old caches
cnt += 2; // try to read at least something
}
for (uint32 i = 0; i < cnt; ++i) {
quint64 setId = 0, setAccess = 0;
QString setTitle, setShortName;
@ -2386,8 +2381,10 @@ namespace Local {
setTitle = lang(lng_stickers_default_set);
} else if (setId == CustomStickerSetId) {
setTitle = lang(lng_custom_stickers);
} else {
} else if (setId) {
order.push_back(setId);
} else {
continue;
}
StickerSet &set(sets.insert(setId, StickerSet(setId, setAccess, setTitle, setShortName)).value());
set.stickers.reserve(scnt);
@ -2441,8 +2438,6 @@ namespace Local {
}
cSetStickersHash(hash);
LOG(("Stickers: read %1 sets").arg(sets.size()));
}
void writeBackground(int32 id, const QImage &img) {

View File

@ -11,7 +11,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.8.18</string>
<string>0.8.19</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>

Binary file not shown.

View File

@ -1693,7 +1693,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 0.8.18;
CURRENT_PROJECT_VERSION = 0.8.19;
DEBUG_INFORMATION_FORMAT = dwarf;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
@ -1711,7 +1711,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COPY_PHASE_STRIP = YES;
CURRENT_PROJECT_VERSION = 0.8.18;
CURRENT_PROJECT_VERSION = 0.8.19;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_OPTIMIZATION_LEVEL = fast;
GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h;
@ -1737,10 +1737,10 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 0.8.18;
CURRENT_PROJECT_VERSION = 0.8.19;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DYLIB_COMPATIBILITY_VERSION = 0.8;
DYLIB_CURRENT_VERSION = 0.8.18;
DYLIB_CURRENT_VERSION = 0.8.19;
ENABLE_STRICT_OBJC_MSGSEND = YES;
FRAMEWORK_SEARCH_PATHS = "";
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
@ -1880,10 +1880,10 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 0.8.18;
CURRENT_PROJECT_VERSION = 0.8.19;
DEBUG_INFORMATION_FORMAT = dwarf;
DYLIB_COMPATIBILITY_VERSION = 0.8;
DYLIB_CURRENT_VERSION = 0.8.18;
DYLIB_CURRENT_VERSION = 0.8.19;
ENABLE_STRICT_OBJC_MSGSEND = YES;
FRAMEWORK_SEARCH_PATHS = "";
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;

View File

@ -1,2 +1,2 @@
echo 8018 0.8.18 1
echo 8019 0.8.19 1
# AppVersion AppVersionStr DevChannel