mirror of
https://github.com/telegramdesktop/tdesktop
synced 2024-12-26 00:12:25 +00:00
static linked openssl in Qt, gobject dynamic linked, moved gtk/appindicator init after Qt Application creation, trying to enable rdynamic flag
This commit is contained in:
parent
6a299e32d3
commit
23a8090a73
13
QTCREATOR.md
13
QTCREATOR.md
@ -101,6 +101,17 @@ then go to **/home/user/TBuild/Libraries/openal-soft/build** and run
|
||||
make
|
||||
sudo make install
|
||||
|
||||
####OpenSSL
|
||||
|
||||
In Terminal go to **/home/user/TBuild/Libraries** and run
|
||||
|
||||
git clone https://github.com/openssl/openssl
|
||||
cd openssl
|
||||
git checkout OpenSSL_1_0_1-stable
|
||||
./config
|
||||
make
|
||||
sudo make install
|
||||
|
||||
####libxkbcommon (required for Fcitx Qt plugin)
|
||||
|
||||
In Terminal go to **/home/user/TBuild/Libraries** and run
|
||||
@ -136,7 +147,7 @@ Install some packages for Qt (see **/home/user/TBuild/Libraries/QtStatic/qtbase/
|
||||
|
||||
In Terminal go to **/home/user/TBuild/Libraries/QtStatic** and there run
|
||||
|
||||
./configure -release -opensource -confirm-license -qt-zlib -qt-libpng -qt-libjpeg -qt-freetype -qt-harfbuzz -qt-pcre -qt-xcb -qt-xkbcommon-x11 -no-opengl -static -nomake examples -nomake tests
|
||||
OPENSSL_LIBS='/usr/local/ssl/lib/libssl.a /usr/local/ssl/lib/libcrypto.a' ./configure -release -opensource -confirm-license -qt-zlib -qt-libpng -qt-libjpeg -qt-freetype -qt-harfbuzz -qt-pcre -qt-xcb -qt-xkbcommon-x11 -no-opengl -static -openssl-linked -nomake examples -nomake tests
|
||||
make -j4
|
||||
sudo make -j4 install
|
||||
|
||||
|
@ -111,14 +111,14 @@ if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then
|
||||
|
||||
mkdir -p "$WorkPath/ReleaseIntermediateUpdater"
|
||||
cd "$WorkPath/ReleaseIntermediateUpdater"
|
||||
/usr/local/Qt-5.5.1/bin/qmake "$HomePath/Updater.pro"
|
||||
/usr/local/Qt-5.5.1/bin/qmake "$HomePath/Updater.pro" -r -spec linux-g++
|
||||
make
|
||||
echo "Updater build complete!"
|
||||
cd "$HomePath"
|
||||
|
||||
mkdir -p "$WorkPath/ReleaseIntermediate"
|
||||
cd "$WorkPath/ReleaseIntermediate"
|
||||
/usr/local/Qt-5.5.1/bin/qmake "$HomePath/Telegram.pro"
|
||||
/usr/local/Qt-5.5.1/bin/qmake "$HomePath/Telegram.pro" -r -spec linux-g++
|
||||
eval "$FixScript"
|
||||
make
|
||||
echo "Telegram build complete!"
|
||||
|
@ -11,10 +11,10 @@ Replace () {
|
||||
}
|
||||
|
||||
Replace '\-llzma' '\/usr\/lib\/x86_64\-linux\-gnu\/liblzma\.a'
|
||||
Replace '\-lssl' '\/usr\/lib\/x86_64\-linux\-gnu\/libssl\.a'
|
||||
Replace '\-lcrypto' '\/usr\/lib\/x86_64\-linux\-gnu\/libcrypto\.a'
|
||||
Replace '\-lgobject\-2\.0' '\/usr\/lib\/x86_64\-linux\-gnu\/libgobject\-2\.0\.a \/usr\/lib\/x86_64\-linux\-gnu\/libffi\.a'
|
||||
Replace '\-lXi' '\/usr\/lib\/x86_64\-linux\-gnu\/libXi\.a'
|
||||
#Replace '\-lssl' '\/usr\/lib\/x86_64\-linux\-gnu\/libssl\.a'
|
||||
#Replace '\-lcrypto' '\/usr\/lib\/x86_64\-linux\-gnu\/libcrypto\.a'
|
||||
#Replace '\-lgobject\-2\.0' '\/usr\/lib\/x86_64\-linux\-gnu\/libgobject\-2\.0\.a \/usr\/lib\/x86_64\-linux\-gnu\/libffi\.a'
|
||||
Replace '\-lXi' '\/usr\/lib\/x86_64\-linux\-gnu\/libXi\.a \/usr\/lib\/x86_64\-linux\-gnu\/libXext\.a'
|
||||
Replace '\-lSM' '\/usr\/lib\/x86_64\-linux\-gnu\/libSM\.a'
|
||||
Replace '\-lICE' '\/usr\/lib\/x86_64\-linux\-gnu\/libICE\.a'
|
||||
Replace '\-lfontconfig' '\/usr\/lib\/x86_64\-linux\-gnu\/libfontconfig\.a \/usr\/lib\/x86_64\-linux\-gnu\/libexpat\.a'
|
||||
@ -28,3 +28,4 @@ Replace '\-lswresample' '\/usr\/local\/lib\/libswresample\.a'
|
||||
Replace '\-lswscale' '\/usr\/local\/lib\/libswscale\.a'
|
||||
Replace '\-lavutil' '\/usr\/local\/lib\/libavutil\.a'
|
||||
Replace '\-lva' '\/usr\/local\/lib\/libva\.a'
|
||||
Replace '\-lQt5Network' '\/usr\/local\/Qt-5.5.1\/lib\/libQt5Network.a \/usr\/local\/ssl\/lib\/libssl.a \/usr\/local\/ssl\/lib\/libcrypto.a'
|
||||
|
@ -43,4 +43,9 @@ namespace PlatformSpecific {
|
||||
~Initializer();
|
||||
};
|
||||
|
||||
namespace ThirdParty {
|
||||
void start();
|
||||
void finish();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -752,9 +752,6 @@ void PsMainWindow::psUpdatedPosition() {
|
||||
void PsMainWindow::psCreateTrayIcon() {
|
||||
if (!noQtTrayIcon) {
|
||||
cSetSupportTray(QSystemTrayIcon::isSystemTrayAvailable());
|
||||
if (!noTryUnity) {
|
||||
useUnityCount = false;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1241,16 +1238,6 @@ void psShowInFolder(const QString &name) {
|
||||
namespace PlatformSpecific {
|
||||
|
||||
Initializer::Initializer() {
|
||||
QString cdesktop = QString(getenv("XDG_CURRENT_DESKTOP")).toLower();
|
||||
noQtTrayIcon = (cdesktop == qstr("pantheon")) || (cdesktop == qstr("gnome"));
|
||||
tryAppIndicator = (cdesktop == qstr("xfce"));
|
||||
noTryUnity = (cdesktop != qstr("unity"));
|
||||
|
||||
if (noQtTrayIcon) cSetSupportTray(false);
|
||||
|
||||
DEBUG_LOG(("Loading libraries"));
|
||||
setupGtk();
|
||||
setupUnity();
|
||||
}
|
||||
|
||||
Initializer::~Initializer() {
|
||||
@ -1258,6 +1245,24 @@ namespace PlatformSpecific {
|
||||
_psEventFilter = 0;
|
||||
}
|
||||
|
||||
namespace ThirdParty {
|
||||
void start() {
|
||||
QString cdesktop = QString(getenv("XDG_CURRENT_DESKTOP")).toLower();
|
||||
noQtTrayIcon = (cdesktop == qstr("pantheon")) || (cdesktop == qstr("gnome"));
|
||||
tryAppIndicator = (cdesktop == qstr("xfce"));
|
||||
noTryUnity = (cdesktop != qstr("unity"));
|
||||
|
||||
if (noQtTrayIcon) cSetSupportTray(false);
|
||||
|
||||
DEBUG_LOG(("Loading libraries"));
|
||||
setupGtk();
|
||||
setupUnity();
|
||||
}
|
||||
|
||||
void finish() {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
@ -861,6 +861,14 @@ namespace PlatformSpecific {
|
||||
objc_finish();
|
||||
}
|
||||
|
||||
namespace ThirdParty {
|
||||
void start() {
|
||||
}
|
||||
|
||||
void finish() {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void psNewVersion() {
|
||||
|
@ -2170,6 +2170,14 @@ namespace PlatformSpecific {
|
||||
}
|
||||
}
|
||||
|
||||
namespace ThirdParty {
|
||||
void start() {
|
||||
}
|
||||
|
||||
void finish() {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
@ -267,6 +267,8 @@ namespace {
|
||||
namespace ThirdParty {
|
||||
|
||||
void start() {
|
||||
PlatformSpecific::ThirdParty::start();
|
||||
|
||||
if (!RAND_status()) { // should be always inited in all modern OS
|
||||
char buf[16];
|
||||
memcpy(buf, &_msStart, 8);
|
||||
@ -303,6 +305,8 @@ namespace ThirdParty {
|
||||
|
||||
delete[] _sslLocks;
|
||||
_sslLocks = 0;
|
||||
|
||||
PlatformSpecific::ThirdParty::finish();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -288,10 +288,10 @@ CONFIG(release, debug|release) {
|
||||
QMAKE_CXXFLAGS_RELEASE -= -O2
|
||||
QMAKE_CXXFLAGS_RELEASE += -Ofast -flto -fno-strict-aliasing -g
|
||||
QMAKE_LFLAGS_RELEASE -= -O1
|
||||
QMAKE_LFLAGS_RELEASE += -Ofast -flto -g
|
||||
QMAKE_LFLAGS_RELEASE += -Ofast -flto -g -rdynamic
|
||||
}
|
||||
CONFIG(debug, debug|release) {
|
||||
QMAKE_LFLAGS_DEBUG += -g
|
||||
QMAKE_LFLAGS_DEBUG += -g -rdynamic
|
||||
}
|
||||
|
||||
INCLUDEPATH += ./../../Libraries/QtStatic/qtbase/include/QtGui/5.5.1/QtGui\
|
||||
@ -319,7 +319,7 @@ INCLUDEPATH += "/usr/include/atk-1.0"
|
||||
INCLUDEPATH += "/usr/include/dee-1.0"
|
||||
INCLUDEPATH += "/usr/include/libdbusmenu-glib-0.4"
|
||||
|
||||
LIBS += -lcrypto -lssl -ldl -llzma -lopenal -lavformat -lavcodec -lswresample -lswscale -lavutil -lopus -lva
|
||||
LIBS += -ldl -llzma -lopenal -lavformat -lavcodec -lswresample -lswscale -lavutil -lopus -lva
|
||||
LIBS += ./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.a \
|
||||
./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libibusplatforminputcontextplugin.a \
|
||||
./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.a
|
||||
|
Loading…
Reference in New Issue
Block a user