Skip to content

Commit a4e49a1

Browse files
committed
version 0.5.11, fixed links
1 parent 320c1f3 commit a4e49a1

File tree

10 files changed

+33
-28
lines changed

10 files changed

+33
-28
lines changed

‎Telegram/PrepareLinux.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
AppVersionStr=0.5.10
2-
AppVersion=5010
1+
AppVersionStr=0.5.11
2+
AppVersion=5011
33

44
if [ -d "./../Linux/Release/deploy/$AppVersionStr" ]; then
55
echo "Deploy folder for version $AppVersionStr already exists!"

‎Telegram/PrepareLinux32.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
AppVersionStr=0.5.10
2-
AppVersion=5010
1+
AppVersionStr=0.5.11
2+
AppVersion=5011
33

44
if [ -d "./../Linux/Release/deploy/$AppVersionStr" ]; then
55
echo "Deploy folder for version $AppVersionStr already exists!"

‎Telegram/PrepareMac.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
AppVersionStr=0.5.10
2-
AppVersion=5010
1+
AppVersionStr=0.5.11
2+
AppVersion=5011
33

44
if [ -d "./../Mac/Release/deploy/$AppVersionStr" ]; then
55
echo "Deploy folder for version $AppVersionStr already exists!"

‎Telegram/Setup.iss‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
#define MyAppShortName "Telegram"
55
#define MyAppName "Telegram Win (Unofficial)"
6-
#define MyAppVersion "0.5.10"
7-
#define MyAppVersionZero "0.5.10"
8-
#define MyAppFullVersion "0.5.10.0"
6+
#define MyAppVersion "0.5.11"
7+
#define MyAppVersionZero "0.5.11"
8+
#define MyAppFullVersion "0.5.11.0"
99
#define MyAppPublisher "Telegram (Unofficial)"
1010
#define MyAppURL "https://tdesktop.com"
1111
#define MyAppExeName "Telegram.exe"

‎Telegram/SourceFiles/config.h‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@ Copyright (c) 2014 John Preston, https://tdesktop.com
1717
*/
1818
#pragma once
1919

20-
static const int32 AppVersion = 5010;
21-
static const wchar_t *AppVersionStr = L"0.5.10";
20+
static const int32 AppVersion = 5011;
21+
static const wchar_t *AppVersionStr = L"0.5.11";
2222
#ifdef Q_OS_WIN
2323
static const wchar_t *AppName = L"Telegram Win (Unofficial)";
2424
#else
2525
static const wchar_t *AppName = L"Telegram Desktop";
2626
#endif
2727
static const wchar_t *AppId = L"{53F49750-6209-4FBF-9CA8-7A333C87D1ED}";
28+
static const wchar_t *AppFile = L"Telegram";
2829

2930
#include "settings.h"
3031

‎Telegram/SourceFiles/gui/text.cpp‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ namespace {
111111
return false;
112112
}
113113

114-
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}))"));
115-
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}))"));
114+
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+)?)"));
115+
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+)?)"));
116116
const QRegularExpression reMailName(qsl("[a-zA-Z\\-_\\.0-9]{1,256}$"));
117117
const QRegularExpression reMailStart(qsl("^[a-zA-Z\\-_\\.0-9]{1,256}\\@"));
118118
const QRegularExpression reHashtag(qsl("(^|[\\s\\.,:;<>|'\"\\[\\]\\{\\}`\\~\\!\\%\\^\\*\\(\\)\\-\\+=\\x10])#[A-Za-z_\\.0-9]{4,20}([\\s\\.,:;<>|'\"\\[\\]\\{\\}`\\~\\!\\%\\^\\*\\(\\)\\-\\+=\\x10]|$)"));
@@ -387,7 +387,7 @@ class TextParser {
387387
link.from = start + domainOffset;
388388

389389
QStack<const QChar*> parenth;
390-
const QChar *p = start + mDomain.capturedEnd();
390+
const QChar *domainEnd = start + mDomain.capturedEnd(), *p = domainEnd;
391391
for (; p < end; ++p) {
392392
QChar ch(*p);
393393
if (chIsLinkEnd(ch)) break; // link finished
@@ -413,7 +413,12 @@ class TextParser {
413413
}
414414
}
415415
}
416-
416+
if (p > domainEnd) { // check, that domain ended
417+
if (domainEnd->unicode() != '/') {
418+
offset = domainEnd - start;
419+
continue;
420+
}
421+
}
417422
link.len = p - link.from;
418423
}
419424
}
@@ -2380,7 +2385,6 @@ void Text::setText(style::font font, const QString &text, const TextParseOptions
23802385
if (!_textStyle) _initDefault();
23812386
_font = font;
23822387
clean();
2383-
23842388
{
23852389
TextParser parser(this, text, options);
23862390
}

‎Telegram/SourceFiles/pspecific_wnd.cpp‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2209,9 +2209,9 @@ void psExecTelegram() {
22092209
if (cDebug()) targs += qsl(" -debug");
22102210
if (cDataFile() != (cTestMode() ? qsl("data_test") : qsl("data"))) targs += qsl(" -key \"") + cDataFile() + '"';
22112211

2212-
QString telegram(QDir::toNativeSeparators(cExeDir() + "Telegram.exe")), wdir(QDir::toNativeSeparators(cWorkingDir()));
2212+
QString telegram(QDir::toNativeSeparators(cExeDir() + QString::fromWCharArray(AppFile) + qsl(".exe"))), wdir(QDir::toNativeSeparators(cWorkingDir()));
22132213

2214-
DEBUG_LOG(("Application Info: executing %1 %2").arg(cExeDir() + "Telegram.exe").arg(targs));
2214+
DEBUG_LOG(("Application Info: executing %1 %2").arg(cExeDir() + QString::fromWCharArray(AppFile) + qsl(".exe")).arg(targs));
22152215
HINSTANCE r = ShellExecute(0, 0, telegram.toStdWString().c_str(), targs.toStdWString().c_str(), wdir.isEmpty() ? 0 : wdir.toStdWString().c_str(), SW_SHOWNORMAL);
22162216
if (long(r) < 32) {
22172217
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
22222222
WCHAR startupFolder[MAX_PATH];
22232223
HRESULT hres = SHGetFolderPath(0, path_csidl, 0, SHGFP_TYPE_CURRENT, startupFolder);
22242224
if (SUCCEEDED(hres)) {
2225-
QString lnk = QString::fromWCharArray(startupFolder) + "\\Telegram.lnk";
2225+
QString lnk = QString::fromWCharArray(startupFolder) + '\\' + QString::fromWCharArray(AppFile) + qsl(".lnk");
22262226
if (create) {
22272227
IShellLink* psl;
22282228
hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (LPVOID*)&psl);
22292229
if (SUCCEEDED(hres)) {
22302230
IPersistFile* ppf;
22312231

2232-
QString exe = QDir::toNativeSeparators(QDir(cExeDir()).absolutePath() + "//Telegram.exe"), dir = QDir::toNativeSeparators(QDir(cWorkingDir()).absolutePath());
2232+
QString exe = QDir::toNativeSeparators(QDir(cExeDir()).absolutePath() + '/' + QString::fromWCharArray(AppFile) + qsl(".exe")), dir = QDir::toNativeSeparators(QDir(cWorkingDir()).absolutePath());
22332233
psl->SetArguments(args);
22342234
psl->SetPath(exe.toStdWString().c_str());
22352235
psl->SetWorkingDirectory(dir.toStdWString().c_str());
@@ -2264,7 +2264,7 @@ void psSendToMenu(bool send, bool silent) {
22642264
}
22652265

22662266
#ifdef _NEED_WIN_GENERATE_DUMP
2267-
static const WCHAR *_programName = L"Telegram Win (Unofficial)"; // folder in APPDATA, if current path is unavailable for writing
2267+
static const WCHAR *_programName = AppName; // folder in APPDATA, if current path is unavailable for writing
22682268
static const WCHAR *_exeName = L"Telegram.exe";
22692269

22702270
LPTOP_LEVEL_EXCEPTION_FILTER _oldWndExceptionFilter = 0;

‎Telegram/Telegram.plist‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<key>CFBundlePackageType</key>
1212
<string>APPL</string>
1313
<key>CFBundleShortVersionString</key>
14-
<string>0.5.10</string>
14+
<string>0.5.11</string>
1515
<key>CFBundleSignature</key>
1616
<string>????</string>
1717
<key>NOTE</key>

‎Telegram/Telegram.rc‎

0 Bytes
Binary file not shown.

‎Telegram/Telegram.xcodeproj/project.pbxproj‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1453,7 +1453,7 @@
14531453
buildSettings = {
14541454
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
14551455
COPY_PHASE_STRIP = NO;
1456-
CURRENT_PROJECT_VERSION = 0.5.10;
1456+
CURRENT_PROJECT_VERSION = 0.5.11;
14571457
DEBUG_INFORMATION_FORMAT = dwarf;
14581458
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
14591459
GCC_OPTIMIZATION_LEVEL = 0;
@@ -1471,7 +1471,7 @@
14711471
buildSettings = {
14721472
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
14731473
COPY_PHASE_STRIP = YES;
1474-
CURRENT_PROJECT_VERSION = 0.5.10;
1474+
CURRENT_PROJECT_VERSION = 0.5.11;
14751475
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
14761476
GCC_OPTIMIZATION_LEVEL = fast;
14771477
GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h;
@@ -1495,9 +1495,9 @@
14951495
CLANG_WARN_INT_CONVERSION = YES;
14961496
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
14971497
COPY_PHASE_STRIP = YES;
1498-
CURRENT_PROJECT_VERSION = 0.5.10;
1498+
CURRENT_PROJECT_VERSION = 0.5.11;
14991499
DYLIB_COMPATIBILITY_VERSION = 0.5;
1500-
DYLIB_CURRENT_VERSION = 0.5.10;
1500+
DYLIB_CURRENT_VERSION = 0.5.11;
15011501
FRAMEWORK_SEARCH_PATHS = "";
15021502
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
15031503
GCC_OPTIMIZATION_LEVEL = fast;
@@ -1620,10 +1620,10 @@
16201620
CLANG_WARN_INT_CONVERSION = YES;
16211621
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
16221622
COPY_PHASE_STRIP = NO;
1623-
CURRENT_PROJECT_VERSION = 0.5.10;
1623+
CURRENT_PROJECT_VERSION = 0.5.11;
16241624
DEBUG_INFORMATION_FORMAT = dwarf;
16251625
DYLIB_COMPATIBILITY_VERSION = 0.5;
1626-
DYLIB_CURRENT_VERSION = 0.5.10;
1626+
DYLIB_CURRENT_VERSION = 0.5.11;
16271627
FRAMEWORK_SEARCH_PATHS = "";
16281628
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
16291629
GCC_OPTIMIZATION_LEVEL = 0;

0 commit comments

Comments
 (0)