version 0.5.11, fixed links

This commit is contained in:
John Preston 2014-07-25 22:34:15 +04:00
parent 320c1f3874
commit a4e49a1f52
10 changed files with 33 additions and 28 deletions

View File

@ -1,5 +1,5 @@
AppVersionStr=0.5.10
AppVersion=5010
AppVersionStr=0.5.11
AppVersion=5011
if [ -d "./../Linux/Release/deploy/$AppVersionStr" ]; then
echo "Deploy folder for version $AppVersionStr already exists!"

View File

@ -1,5 +1,5 @@
AppVersionStr=0.5.10
AppVersion=5010
AppVersionStr=0.5.11
AppVersion=5011
if [ -d "./../Linux/Release/deploy/$AppVersionStr" ]; then
echo "Deploy folder for version $AppVersionStr already exists!"

View File

@ -1,5 +1,5 @@
AppVersionStr=0.5.10
AppVersion=5010
AppVersionStr=0.5.11
AppVersion=5011
if [ -d "./../Mac/Release/deploy/$AppVersionStr" ]; then
echo "Deploy folder for version $AppVersionStr already exists!"

View File

@ -3,9 +3,9 @@
#define MyAppShortName "Telegram"
#define MyAppName "Telegram Win (Unofficial)"
#define MyAppVersion "0.5.10"
#define MyAppVersionZero "0.5.10"
#define MyAppFullVersion "0.5.10.0"
#define MyAppVersion "0.5.11"
#define MyAppVersionZero "0.5.11"
#define MyAppFullVersion "0.5.11.0"
#define MyAppPublisher "Telegram (Unofficial)"
#define MyAppURL "https://tdesktop.com"
#define MyAppExeName "Telegram.exe"

View File

@ -17,14 +17,15 @@ Copyright (c) 2014 John Preston, https://tdesktop.com
*/
#pragma once
static const int32 AppVersion = 5010;
static const wchar_t *AppVersionStr = L"0.5.10";
static const int32 AppVersion = 5011;
static const wchar_t *AppVersionStr = L"0.5.11";
#ifdef Q_OS_WIN
static const wchar_t *AppName = L"Telegram Win (Unofficial)";
#else
static const wchar_t *AppName = L"Telegram Desktop";
#endif
static const wchar_t *AppId = L"{53F49750-6209-4FBF-9CA8-7A333C87D1ED}";
static const wchar_t *AppFile = L"Telegram";
#include "settings.h"

View File

@ -111,8 +111,8 @@ namespace {
return false;
}
const QRegularExpression reDomain(QString::fromUtf8("(?<![A-Za-z\\$0-9А-Яа-яёЁ\\-\\_%=])(?:([a-zA-Z]+)://)?((?:[A-Za-zА-яА-ЯёЁ0-9\\-\\_]+\\.){1,5}([A-Za-zрф\\-\\d]{2,22}))"));
const QRegularExpression reExplicitDomain(QString::fromUtf8("(?<![A-Za-z\\$0-9А-Яа-яёЁ\\-\\_%=])(?:([a-zA-Z]+)://)((?:[A-Za-zА-яА-ЯёЁ0-9\\-\\_]+\\.){0,5}([A-Za-zрф\\-\\d]{2,22}))"));
const QRegularExpression reDomain(QString::fromUtf8("(?<![A-Za-z\\$0-9А-Яа-яёЁ\\-\\_%=])(?:([a-zA-Z]+)://)?((?:[A-Za-zА-яА-ЯёЁ0-9\\-\\_]+\\.){1,5}([A-Za-zрф\\-\\d]{2,22})(\\:\\d+)?)"));
const QRegularExpression reExplicitDomain(QString::fromUtf8("(?<![A-Za-z\\$0-9А-Яа-яёЁ\\-\\_%=])(?:([a-zA-Z]+)://)((?:[A-Za-zА-яА-ЯёЁ0-9\\-\\_]+\\.){0,5}([A-Za-zрф\\-\\d]{2,22})(\\:\\d+)?)"));
const QRegularExpression reMailName(qsl("[a-zA-Z\\-_\\.0-9]{1,256}$"));
const QRegularExpression reMailStart(qsl("^[a-zA-Z\\-_\\.0-9]{1,256}\\@"));
const QRegularExpression reHashtag(qsl("(^|[\\s\\.,:;<>|'\"\\[\\]\\{\\}`\\~\\!\\%\\^\\*\\(\\)\\-\\+=\\x10])#[A-Za-z_\\.0-9]{4,20}([\\s\\.,:;<>|'\"\\[\\]\\{\\}`\\~\\!\\%\\^\\*\\(\\)\\-\\+=\\x10]|$)"));
@ -387,7 +387,7 @@ public:
link.from = start + domainOffset;
QStack<const QChar*> parenth;
const QChar *p = start + mDomain.capturedEnd();
const QChar *domainEnd = start + mDomain.capturedEnd(), *p = domainEnd;
for (; p < end; ++p) {
QChar ch(*p);
if (chIsLinkEnd(ch)) break; // link finished
@ -413,7 +413,12 @@ public:
}
}
}
if (p > domainEnd) { // check, that domain ended
if (domainEnd->unicode() != '/') {
offset = domainEnd - start;
continue;
}
}
link.len = p - link.from;
}
}
@ -2380,7 +2385,6 @@ void Text::setText(style::font font, const QString &text, const TextParseOptions
if (!_textStyle) _initDefault();
_font = font;
clean();
{
TextParser parser(this, text, options);
}

View File

@ -2209,9 +2209,9 @@ void psExecTelegram() {
if (cDebug()) targs += qsl(" -debug");
if (cDataFile() != (cTestMode() ? qsl("data_test") : qsl("data"))) targs += qsl(" -key \"") + cDataFile() + '"';
QString telegram(QDir::toNativeSeparators(cExeDir() + "Telegram.exe")), wdir(QDir::toNativeSeparators(cWorkingDir()));
QString telegram(QDir::toNativeSeparators(cExeDir() + QString::fromWCharArray(AppFile) + qsl(".exe"))), wdir(QDir::toNativeSeparators(cWorkingDir()));
DEBUG_LOG(("Application Info: executing %1 %2").arg(cExeDir() + "Telegram.exe").arg(targs));
DEBUG_LOG(("Application Info: executing %1 %2").arg(cExeDir() + QString::fromWCharArray(AppFile) + qsl(".exe")).arg(targs));
HINSTANCE r = ShellExecute(0, 0, telegram.toStdWString().c_str(), targs.toStdWString().c_str(), wdir.isEmpty() ? 0 : wdir.toStdWString().c_str(), SW_SHOWNORMAL);
if (long(r) < 32) {
DEBUG_LOG(("Application Error: failed to execute %1, working directory: '%2', result: %3").arg(telegram).arg(wdir).arg(long(r)));
@ -2222,14 +2222,14 @@ void _manageAppLnk(bool create, bool silent, int path_csidl, const wchar_t *args
WCHAR startupFolder[MAX_PATH];
HRESULT hres = SHGetFolderPath(0, path_csidl, 0, SHGFP_TYPE_CURRENT, startupFolder);
if (SUCCEEDED(hres)) {
QString lnk = QString::fromWCharArray(startupFolder) + "\\Telegram.lnk";
QString lnk = QString::fromWCharArray(startupFolder) + '\\' + QString::fromWCharArray(AppFile) + qsl(".lnk");
if (create) {
IShellLink* psl;
hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (LPVOID*)&psl);
if (SUCCEEDED(hres)) {
IPersistFile* ppf;
QString exe = QDir::toNativeSeparators(QDir(cExeDir()).absolutePath() + "//Telegram.exe"), dir = QDir::toNativeSeparators(QDir(cWorkingDir()).absolutePath());
QString exe = QDir::toNativeSeparators(QDir(cExeDir()).absolutePath() + '/' + QString::fromWCharArray(AppFile) + qsl(".exe")), dir = QDir::toNativeSeparators(QDir(cWorkingDir()).absolutePath());
psl->SetArguments(args);
psl->SetPath(exe.toStdWString().c_str());
psl->SetWorkingDirectory(dir.toStdWString().c_str());
@ -2264,7 +2264,7 @@ void psSendToMenu(bool send, bool silent) {
}
#ifdef _NEED_WIN_GENERATE_DUMP
static const WCHAR *_programName = L"Telegram Win (Unofficial)"; // folder in APPDATA, if current path is unavailable for writing
static const WCHAR *_programName = AppName; // folder in APPDATA, if current path is unavailable for writing
static const WCHAR *_exeName = L"Telegram.exe";
LPTOP_LEVEL_EXCEPTION_FILTER _oldWndExceptionFilter = 0;

View File

@ -11,7 +11,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.5.10</string>
<string>0.5.11</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>NOTE</key>

Binary file not shown.

View File

@ -1453,7 +1453,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 0.5.10;
CURRENT_PROJECT_VERSION = 0.5.11;
DEBUG_INFORMATION_FORMAT = dwarf;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
@ -1471,7 +1471,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COPY_PHASE_STRIP = YES;
CURRENT_PROJECT_VERSION = 0.5.10;
CURRENT_PROJECT_VERSION = 0.5.11;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_OPTIMIZATION_LEVEL = fast;
GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h;
@ -1495,9 +1495,9 @@
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
CURRENT_PROJECT_VERSION = 0.5.10;
CURRENT_PROJECT_VERSION = 0.5.11;
DYLIB_COMPATIBILITY_VERSION = 0.5;
DYLIB_CURRENT_VERSION = 0.5.10;
DYLIB_CURRENT_VERSION = 0.5.11;
FRAMEWORK_SEARCH_PATHS = "";
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_OPTIMIZATION_LEVEL = fast;
@ -1620,10 +1620,10 @@
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 0.5.10;
CURRENT_PROJECT_VERSION = 0.5.11;
DEBUG_INFORMATION_FORMAT = dwarf;
DYLIB_COMPATIBILITY_VERSION = 0.5;
DYLIB_CURRENT_VERSION = 0.5.10;
DYLIB_CURRENT_VERSION = 0.5.11;
FRAMEWORK_SEARCH_PATHS = "";
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_OPTIMIZATION_LEVEL = 0;