mirror of https://github.com/procxx/kepka.git
Merge branch 'master' of https://github.com/telegramdesktop/tdesktop
This commit is contained in:
commit
d6094baec1
|
@ -22,7 +22,7 @@ Choose a folder for the future build, for example **/home/user/TBuild** There yo
|
||||||
|
|
||||||
By git – in Terminal go to **/home/user/TBuild** and run
|
By git – in Terminal go to **/home/user/TBuild** and run
|
||||||
|
|
||||||
git clone https://github.com/telegramdesktop/tdesktop.git
|
git clone https://github.com/telegramdesktop/tdesktop.git
|
||||||
|
|
||||||
or download in ZIP and extract to **/home/user/TBuild** rename **tdesktop-master** to **tdesktop** to have **/home/user/TBuild/tdesktop/Telegram/Telegram.pro** project
|
or download in ZIP and extract to **/home/user/TBuild** rename **tdesktop-master** to **tdesktop** to have **/home/user/TBuild/tdesktop/Telegram/Telegram.pro** project
|
||||||
|
|
||||||
|
@ -44,11 +44,11 @@ Apply patch – copy (with overwrite!) everything from **/home/user/TBuild/tdesk
|
||||||
|
|
||||||
Install some packages for Qt (see **/home/user/TBuild/Libraries/QtStatic/qtbase/src/plugins/platforms/xcb/README**)
|
Install some packages for Qt (see **/home/user/TBuild/Libraries/QtStatic/qtbase/src/plugins/platforms/xcb/README**)
|
||||||
|
|
||||||
sudo apt-get install libxcb1-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-icccm4-dev libxcb-render-util0-dev libxcb-util0-dev libxrender-dev libpulse-dev libxcb-sync0-dev libxcb-xfixes0-dev libxcb-randr0-dev libx11-xcb-dev
|
sudo apt-get install libxcb1-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-icccm4-dev libxcb-render-util0-dev libxcb-util0-dev libxrender-dev libasound-dev libpulse-dev libxcb-sync0-dev libxcb-xfixes0-dev libxcb-randr0-dev libx11-xcb-dev
|
||||||
|
|
||||||
In Terminal go to **/home/user/TBuild/Libraries/QtStatic** and there run
|
In Terminal go to **/home/user/TBuild/Libraries/QtStatic** and there run
|
||||||
|
|
||||||
./configure -release -opensource -no-opengl -static -nomake examples -skip qtquick1 -skip qtdeclarative
|
./configure -release -opensource -confirm-license -qt-xcb -no-opengl -static -nomake examples -skip qtquick1 -skip qtdeclarative
|
||||||
y
|
y
|
||||||
make
|
make
|
||||||
sudo make install
|
sudo make install
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
AppVersionStr=0.5.9
|
AppVersionStr=0.5.10
|
||||||
AppVersion=5009
|
AppVersion=5010
|
||||||
|
|
||||||
if [ -d "./../Linux/Release/deploy/$AppVersionStr" ]; then
|
if [ -d "./../Linux/Release/deploy/$AppVersionStr" ]; then
|
||||||
echo "Deploy folder for version $AppVersionStr already exists!"
|
echo "Deploy folder for version $AppVersionStr already exists!"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
AppVersionStr=0.5.9
|
AppVersionStr=0.5.10
|
||||||
AppVersion=5009
|
AppVersion=5010
|
||||||
|
|
||||||
if [ -d "./../Linux/Release/deploy/$AppVersionStr" ]; then
|
if [ -d "./../Linux/Release/deploy/$AppVersionStr" ]; then
|
||||||
echo "Deploy folder for version $AppVersionStr already exists!"
|
echo "Deploy folder for version $AppVersionStr already exists!"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
AppVersionStr=0.5.9
|
AppVersionStr=0.5.10
|
||||||
AppVersion=5009
|
AppVersion=5010
|
||||||
|
|
||||||
if [ -d "./../Mac/Release/deploy/$AppVersionStr" ]; then
|
if [ -d "./../Mac/Release/deploy/$AppVersionStr" ]; then
|
||||||
echo "Deploy folder for version $AppVersionStr already exists!"
|
echo "Deploy folder for version $AppVersionStr already exists!"
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
|
|
||||||
#define MyAppShortName "Telegram"
|
#define MyAppShortName "Telegram"
|
||||||
#define MyAppName "Telegram Win (Unofficial)"
|
#define MyAppName "Telegram Win (Unofficial)"
|
||||||
#define MyAppVersion "0.5.9"
|
#define MyAppVersion "0.5.10"
|
||||||
#define MyAppVersionZero "0.5.9"
|
#define MyAppVersionZero "0.5.10"
|
||||||
#define MyAppFullVersion "0.5.9.0"
|
#define MyAppFullVersion "0.5.10.0"
|
||||||
#define MyAppPublisher "Telegram (Unofficial)"
|
#define MyAppPublisher "Telegram (Unofficial)"
|
||||||
#define MyAppURL "https://tdesktop.com"
|
#define MyAppURL "https://tdesktop.com"
|
||||||
#define MyAppExeName "Telegram.exe"
|
#define MyAppExeName "Telegram.exe"
|
||||||
|
|
|
@ -17,8 +17,8 @@ Copyright (c) 2014 John Preston, https://tdesktop.com
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
static const int32 AppVersion = 5009;
|
static const int32 AppVersion = 5010;
|
||||||
static const wchar_t *AppVersionStr = L"0.5.9";
|
static const wchar_t *AppVersionStr = L"0.5.10";
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
static const wchar_t *AppName = L"Telegram Win (Unofficial)";
|
static const wchar_t *AppName = L"Telegram Win (Unofficial)";
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -62,14 +62,36 @@ void filedialogInit() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// multipleFiles: 1 - multi open, 0 - single open, -1 - single save
|
// multipleFiles: 1 - multi open, 0 - single open, -1 - single save, -2 - select dir
|
||||||
bool _filedialogGetFiles(QStringList &files, QByteArray &remoteContent, const QString &caption, const QString &filter, int multipleFiles, const QString &startFile = QString()) {
|
bool _filedialogGetFiles(QStringList &files, QByteArray &remoteContent, const QString &caption, const QString &filter, int multipleFiles, const QString &startFile = QString()) {
|
||||||
filedialogInit();
|
#if defined Q_OS_LINUX || defined Q_OS_MAC // use native
|
||||||
|
remoteContent = QByteArray();
|
||||||
|
QString file;
|
||||||
|
if (multipleFiles >= 0) {
|
||||||
|
files = QFileDialog::getOpenFileNames(App::wnd(), caption, startFile, filter);
|
||||||
|
return !files.isEmpty();
|
||||||
|
} else if (multipleFiles < -1) {
|
||||||
|
file = QFileDialog::getExistingDirectory(App::wnd(), caption);
|
||||||
|
} else if (multipleFiles < 0) {
|
||||||
|
file = QFileDialog::getSaveFileName(App::wnd(), caption, startFile, filter);
|
||||||
|
} else {
|
||||||
|
file = QFileDialog::getOpenFileName(App::wnd(), caption, startFile, filter);
|
||||||
|
}
|
||||||
|
if (file.isEmpty()) {
|
||||||
|
files = QStringList();
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
files = QStringList(file);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
filedialogInit();
|
||||||
|
|
||||||
// hack for fast non-native dialog create
|
// hack for fast non-native dialog create
|
||||||
QFileDialog dialog(App::wnd(), caption, cDialogHelperPathFinal(), filter);
|
QFileDialog dialog(App::wnd(), caption, cDialogHelperPathFinal(), filter);
|
||||||
|
|
||||||
dialog.setModal(true);
|
dialog.setModal(true);
|
||||||
if (multipleFiles >= 0) { // open file or files
|
if (multipleFiles >= 0) { // open file or files
|
||||||
dialog.setFileMode(multipleFiles ? QFileDialog::ExistingFiles : QFileDialog::ExistingFile);
|
dialog.setFileMode(multipleFiles ? QFileDialog::ExistingFiles : QFileDialog::ExistingFile);
|
||||||
dialog.setAcceptMode(QFileDialog::AcceptOpen);
|
dialog.setAcceptMode(QFileDialog::AcceptOpen);
|
||||||
|
|
|
@ -118,12 +118,61 @@ void logWrite(const QString &v) {
|
||||||
void logsInit() {
|
void logsInit() {
|
||||||
static _StreamCreator streamCreator;
|
static _StreamCreator streamCreator;
|
||||||
if (mainLogStream) return;
|
if (mainLogStream) return;
|
||||||
|
|
||||||
#if defined Q_OS_MAC && !defined _DEBUG
|
QString wasDir = cWorkingDir();
|
||||||
cForceWorkingDir(psAppDataPath());
|
#if (defined Q_OS_MAC || defined Q_OS_LINUX) && !defined _DEBUG
|
||||||
|
cForceWorkingDir(psAppDataPath());
|
||||||
|
#ifdef Q_OS_LINUX // fix first version
|
||||||
|
{
|
||||||
|
QFile data(wasDir + "data"), dataConfig(wasDir + "data_config"), tdataConfig(wasDir + "tdata/config");
|
||||||
|
if (data.exists() && dataConfig.exists() && !QFileInfo(cWorkingDir() + "data").exists() && !QFileInfo(cWorkingDir() + "data_config").exists()) { // move to home dir
|
||||||
|
LOG(("Copying data to home dir '%1' from '%2'").arg(cWorkingDir()).arg(wasDir));
|
||||||
|
if (data.copy(cWorkingDir() + "data")) {
|
||||||
|
LOG(("Copied 'data' to home dir"));
|
||||||
|
if (dataConfig.copy(cWorkingDir() + "data_config")) {
|
||||||
|
LOG(("Copied 'data_config' to home dir"));
|
||||||
|
bool tdataGood = true;
|
||||||
|
if (tdataConfig.exists()) {
|
||||||
|
tdataGood = false;
|
||||||
|
QDir().mkpath(cWorkingDir() + "tdata");
|
||||||
|
if (tdataConfig.copy(cWorkingDir() + "tdata/config")) {
|
||||||
|
LOG(("Copied 'tdata/config' to home dir"));
|
||||||
|
tdataGood = true;
|
||||||
|
} else {
|
||||||
|
LOG(("Copied 'data' and 'data_config', but could not copy 'tdata/config'!"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (tdataGood) {
|
||||||
|
if (data.remove()) {
|
||||||
|
LOG(("Removed 'data'"));
|
||||||
|
} else {
|
||||||
|
LOG(("Could not remove 'data'"));
|
||||||
|
}
|
||||||
|
if (dataConfig.remove()) {
|
||||||
|
LOG(("Removed 'data_config'"));
|
||||||
|
} else {
|
||||||
|
LOG(("Could not remove 'data_config'"));
|
||||||
|
}
|
||||||
|
if (!tdataConfig.exists() || tdataConfig.remove()) {
|
||||||
|
LOG(("Removed 'tdata/config'"));
|
||||||
|
LOG(("Could not remove 'tdata/config'"));
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
QDir().rmdir(wasDir + "tdata");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
LOG(("Copied 'data', but could not copy 'data_config'!!"));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
LOG(("Could not copy 'data'!"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QString oldDir = cWorkingDir();
|
QString rightDir = cWorkingDir();
|
||||||
|
cForceWorkingDir(rightDir);
|
||||||
mainLog.setFileName(cWorkingDir() + "log.txt");
|
mainLog.setFileName(cWorkingDir() + "log.txt");
|
||||||
mainLog.open(QIODevice::WriteOnly | QIODevice::Text);
|
mainLog.open(QIODevice::WriteOnly | QIODevice::Text);
|
||||||
if (!mainLog.isOpen()) {
|
if (!mainLog.isOpen()) {
|
||||||
|
@ -141,7 +190,7 @@ void logsInit() {
|
||||||
mainLogStream->setDevice(&mainLog);
|
mainLogStream->setDevice(&mainLog);
|
||||||
mainLogStream->setCodec("UTF-8");
|
mainLogStream->setCodec("UTF-8");
|
||||||
} else {
|
} else {
|
||||||
cForceWorkingDir(oldDir);
|
cForceWorkingDir(rightDir);
|
||||||
}
|
}
|
||||||
cForceWorkingDir(QDir(cWorkingDir()).absolutePath() + '/');
|
cForceWorkingDir(QDir(cWorkingDir()).absolutePath() + '/');
|
||||||
if (cDebug()) logsInitDebug();
|
if (cDebug()) logsInitDebug();
|
||||||
|
|
|
@ -1384,7 +1384,7 @@ void MainWidget::activate() {
|
||||||
} else {
|
} else {
|
||||||
dialogs.activate();
|
dialogs.activate();
|
||||||
}
|
}
|
||||||
} else {
|
} else if (App::wnd() && !App::wnd()->layerShown()) {
|
||||||
if (!cSendPaths().isEmpty()) {
|
if (!cSendPaths().isEmpty()) {
|
||||||
hider = new HistoryHider(this);
|
hider = new HistoryHider(this);
|
||||||
hider->show();
|
hider->show();
|
||||||
|
|
|
@ -27,6 +27,7 @@ Copyright (c) 2014 John Preston, https://tdesktop.com
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
|
#include <pwd.h>
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
bool frameless = true;
|
bool frameless = true;
|
||||||
|
@ -767,7 +768,11 @@ QString psCurrentLanguage() {
|
||||||
}
|
}
|
||||||
|
|
||||||
QString psAppDataPath() {
|
QString psAppDataPath() {
|
||||||
return QString();//objc_appDataPath();
|
struct passwd *pw = getpwuid(getuid());
|
||||||
|
if (pw && pw->pw_dir && strlen(pw->pw_dir)) {
|
||||||
|
return QString::fromLocal8Bit(pw->pw_dir) + qsl("/.TelegramDesktop/");
|
||||||
|
}
|
||||||
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString psCurrentExeDirectory(int argc, char *argv[]) {
|
QString psCurrentExeDirectory(int argc, char *argv[]) {
|
||||||
|
|
|
@ -107,7 +107,7 @@ NotifyWindow::NotifyWindow(HistoryItem *msg, int32 x, int32 y) : history(msg->hi
|
||||||
setGeometry(x, aY.current(), st::notifyWidth, st::notifyHeight);
|
setGeometry(x, aY.current(), st::notifyWidth, st::notifyHeight);
|
||||||
|
|
||||||
aOpacity.start(1);
|
aOpacity.start(1);
|
||||||
setWindowFlags(Qt::Tool | Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint);
|
setWindowFlags(Qt::Tool | Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint | Qt::X11BypassWindowManagerHint);
|
||||||
setAttribute(Qt::WA_MacAlwaysShowToolWindow);
|
setAttribute(Qt::WA_MacAlwaysShowToolWindow);
|
||||||
|
|
||||||
show();
|
show();
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>0.5.9</string>
|
<string>0.5.10</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>NOTE</key>
|
<key>NOTE</key>
|
||||||
|
|
|
@ -251,8 +251,8 @@ INCLUDEPATH += ./../../Libraries/QtStatic/qtbase/include/QtGui/5.3.1/QtGui\
|
||||||
./../../Libraries/QtStatic/qtbase/include\
|
./../../Libraries/QtStatic/qtbase/include\
|
||||||
./SourceFiles\
|
./SourceFiles\
|
||||||
./GeneratedFiles
|
./GeneratedFiles
|
||||||
LIBS += -lcrypto -lssl -lz -ldl -llzma -lpulse -lexif
|
LIBS += -lcrypto -lssl -lz -ldl -llzma -lexif
|
||||||
LIBS += ./../../../Libraries/QtStatic/qtmultimedia/plugins/audio/libqtmedia_pulse.a
|
|
||||||
RESOURCES += \
|
RESOURCES += \
|
||||||
./SourceFiles/telegram_linux.qrc
|
./SourceFiles/telegram_linux.qrc
|
||||||
|
|
||||||
|
@ -260,4 +260,3 @@ OTHER_FILES += \
|
||||||
Resources/style_classes.txt \
|
Resources/style_classes.txt \
|
||||||
Resources/style.txt \
|
Resources/style.txt \
|
||||||
Resources/lang.txt
|
Resources/lang.txt
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -1453,7 +1453,7 @@
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
CURRENT_PROJECT_VERSION = 0.5.9;
|
CURRENT_PROJECT_VERSION = 0.5.10;
|
||||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
||||||
GCC_OPTIMIZATION_LEVEL = 0;
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
|
@ -1471,7 +1471,7 @@
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
COPY_PHASE_STRIP = YES;
|
COPY_PHASE_STRIP = YES;
|
||||||
CURRENT_PROJECT_VERSION = 0.5.9;
|
CURRENT_PROJECT_VERSION = 0.5.10;
|
||||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||||
GCC_OPTIMIZATION_LEVEL = fast;
|
GCC_OPTIMIZATION_LEVEL = fast;
|
||||||
GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h;
|
GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h;
|
||||||
|
@ -1495,9 +1495,9 @@
|
||||||
CLANG_WARN_INT_CONVERSION = YES;
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
COPY_PHASE_STRIP = YES;
|
COPY_PHASE_STRIP = YES;
|
||||||
CURRENT_PROJECT_VERSION = 0.5.9;
|
CURRENT_PROJECT_VERSION = 0.5.10;
|
||||||
DYLIB_COMPATIBILITY_VERSION = 0.5;
|
DYLIB_COMPATIBILITY_VERSION = 0.5;
|
||||||
DYLIB_CURRENT_VERSION = 0.5.9;
|
DYLIB_CURRENT_VERSION = 0.5.10;
|
||||||
FRAMEWORK_SEARCH_PATHS = "";
|
FRAMEWORK_SEARCH_PATHS = "";
|
||||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||||
GCC_OPTIMIZATION_LEVEL = fast;
|
GCC_OPTIMIZATION_LEVEL = fast;
|
||||||
|
@ -1620,10 +1620,10 @@
|
||||||
CLANG_WARN_INT_CONVERSION = YES;
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
CURRENT_PROJECT_VERSION = 0.5.9;
|
CURRENT_PROJECT_VERSION = 0.5.10;
|
||||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
DYLIB_COMPATIBILITY_VERSION = 0.5;
|
DYLIB_COMPATIBILITY_VERSION = 0.5;
|
||||||
DYLIB_CURRENT_VERSION = 0.5.9;
|
DYLIB_CURRENT_VERSION = 0.5.10;
|
||||||
FRAMEWORK_SEARCH_PATHS = "";
|
FRAMEWORK_SEARCH_PATHS = "";
|
||||||
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
||||||
GCC_OPTIMIZATION_LEVEL = 0;
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
TARGET = qtaudio_alsa
|
||||||
|
QT += multimedia-private
|
||||||
|
|
||||||
|
PLUGIN_TYPE = audio
|
||||||
|
PLUGIN_CLASS_NAME = QAlsaPlugin
|
||||||
|
load(qt_plugin)
|
||||||
|
|
||||||
|
LIBS += -lasound
|
||||||
|
CONFIG += static plugin
|
||||||
|
HEADERS += \
|
||||||
|
qalsaplugin.h \
|
||||||
|
qalsaaudiodeviceinfo.h \
|
||||||
|
qalsaaudioinput.h \
|
||||||
|
qalsaaudiooutput.h
|
||||||
|
|
||||||
|
SOURCES += \
|
||||||
|
qalsaplugin.cpp \
|
||||||
|
qalsaaudiodeviceinfo.cpp \
|
||||||
|
qalsaaudioinput.cpp \
|
||||||
|
qalsaaudiooutput.cpp
|
||||||
|
|
||||||
|
OTHER_FILES += \
|
||||||
|
alsa.json
|
Loading…
Reference in New Issue