mirror of
https://github.com/vale981/tdesktop
synced 2025-03-06 18:21:42 -05:00
Merge pull request #1988 from eegorov/test
Make possible to set a path to the patched Qt and his version during …
This commit is contained in:
commit
7c53105532
7 changed files with 44 additions and 33 deletions
|
@ -20,13 +20,13 @@ downloadLibs() {
|
|||
info_msg "QT-Version: ${_qtver}, SRC-Dir: ${srcdir}"
|
||||
|
||||
echo -e "Clone Qt\n"
|
||||
git clone git://code.qt.io/qt/qt5.git qt5_6_0
|
||||
cd qt5_6_0
|
||||
git checkout 5.6
|
||||
git clone git://code.qt.io/qt/qt5.git qt${_qtver}
|
||||
cd qt${_qtver}
|
||||
git checkout $(echo ${_qtver} | sed -e "s/\..$//")
|
||||
perl init-repository --module-subset=qtbase,qtimageformats
|
||||
git checkout v5.6.0
|
||||
cd qtbase && git checkout v5.6.0 && cd ..
|
||||
cd qtimageformats && git checkout v5.6.0 && cd ..
|
||||
git checkout v${_qtver}
|
||||
cd qtbase && git checkout v${_qtver} && cd ..
|
||||
cd qtimageformats && git checkout v${_qtver} && cd ..
|
||||
cd ..
|
||||
|
||||
echo -e "Clone Breakpad\n"
|
||||
|
@ -48,9 +48,9 @@ prepare() {
|
|||
|
||||
mkdir -p "$srcdir/Libraries"
|
||||
|
||||
ln -s "$srcdir/qt5_6_0" "$srcdir/Libraries/qt5_6_0"
|
||||
cd "$srcdir/Libraries/qt5_6_0/qtbase"
|
||||
git apply "$srcdir/tdesktop/Telegram/Patches/qtbase_5_6_0.diff"
|
||||
ln -s "$srcdir/qt${_qtver}" "$srcdir/Libraries/qt${_qtver}"
|
||||
cd "$srcdir/Libraries/qt${_qtver}/qtbase"
|
||||
git apply "$srcdir/tdesktop/Telegram/Patches/qtbase_$(echo ${_qtver} | sed -e "s/\./_/g").diff"
|
||||
|
||||
if [ ! -h "$srcdir/Libraries/breakpad" ]; then
|
||||
ln -s "$srcdir/breakpad" "$srcdir/Libraries/breakpad"
|
||||
|
@ -60,7 +60,6 @@ prepare() {
|
|||
sed -i 's/CUSTOM_API_ID//g' "$srcdir/tdesktop/Telegram/Telegram.pro"
|
||||
sed -i 's,LIBS += /usr/local/lib/libxkbcommon.a,,g' "$srcdir/tdesktop/Telegram/Telegram.pro"
|
||||
sed -i 's,LIBS += /usr/local/lib/libz.a,LIBS += -lz,g' "$srcdir/tdesktop/Telegram/Telegram.pro"
|
||||
sed -i "s,/usr/local/tdesktop/Qt-5.6.0,$srcdir/qt,g" "$srcdir/tdesktop/Telegram/Telegram.pro"
|
||||
|
||||
local options=""
|
||||
|
||||
|
@ -98,7 +97,7 @@ build() {
|
|||
|
||||
info_msg "Build patched Qt"
|
||||
# Build patched Qt
|
||||
cd "$srcdir/Libraries/qt5_6_0"
|
||||
cd "$srcdir/Libraries/qt${_qtver}"
|
||||
./configure -prefix "$srcdir/qt" -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
|
||||
|
@ -117,21 +116,21 @@ build() {
|
|||
# Build codegen_style
|
||||
mkdir -p "$srcdir/tdesktop/Linux/obj/codegen_style/Debug"
|
||||
cd "$srcdir/tdesktop/Linux/obj/codegen_style/Debug"
|
||||
qmake CONFIG+=debug "../../../../Telegram/build/qmake/codegen_style/codegen_style.pro"
|
||||
qmake QT_TDESKTOP_PATH=${srcdir}/qt QT_TDESKTOP_VERSION=${_qtver} CONFIG+=debug "../../../../Telegram/build/qmake/codegen_style/codegen_style.pro"
|
||||
make --silent -j4
|
||||
|
||||
info_msg "Build codegen_numbers"
|
||||
# Build codegen_numbers
|
||||
mkdir -p "$srcdir/tdesktop/Linux/obj/codegen_numbers/Debug"
|
||||
cd "$srcdir/tdesktop/Linux/obj/codegen_numbers/Debug"
|
||||
qmake CONFIG+=debug "../../../../Telegram/build/qmake/codegen_numbers/codegen_numbers.pro"
|
||||
qmake QT_TDESKTOP_PATH=${srcdir}/qt QT_TDESKTOP_VERSION=${_qtver} CONFIG+=debug "../../../../Telegram/build/qmake/codegen_numbers/codegen_numbers.pro"
|
||||
make --silent -j4
|
||||
|
||||
info_msg "Build MetaLang"
|
||||
# Build MetaLang
|
||||
mkdir -p "$srcdir/tdesktop/Linux/DebugIntermediateLang"
|
||||
cd "$srcdir/tdesktop/Linux/DebugIntermediateLang"
|
||||
qmake CONFIG+=debug "../../Telegram/MetaLang.pro"
|
||||
qmake QT_TDESKTOP_PATH=${srcdir}/qt QT_TDESKTOP_VERSION=${_qtver} CONFIG+=debug "../../Telegram/MetaLang.pro"
|
||||
make --silent -j4
|
||||
|
||||
info_msg "Build Telegram Desktop"
|
||||
|
@ -142,7 +141,7 @@ build() {
|
|||
./../codegen/Debug/codegen_style "-I./../../Telegram/Resources" "-I./../../Telegram/SourceFiles" "-o./GeneratedFiles/styles" all_files.style --rebuild
|
||||
./../codegen/Debug/codegen_numbers "-o./GeneratedFiles" "./../../Telegram/Resources/numbers.txt"
|
||||
./../DebugLang/MetaLang -lang_in ./../../Telegram/Resources/langs/lang.strings -lang_out ./GeneratedFiles/lang_auto
|
||||
qmake CONFIG+=debug "../../Telegram/Telegram.pro"
|
||||
qmake QT_TDESKTOP_PATH=${srcdir}/qt QT_TDESKTOP_VERSION=${_qtver} CONFIG+=debug "../../Telegram/Telegram.pro"
|
||||
make -j4
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ Cya='\e[0;36m'; BCya='\e[1;36m'; UCya='\e[4;36m'; ICya='\e[0;96m';
|
|||
Whi='\e[0;37m'; BWhi='\e[1;37m'; UWhi='\e[4;37m'; IWhi='\e[0;97m'; BIWhi='\e[1;97m'; On_Whi='\e[47m'; On_IWhi='\e[0;107m';
|
||||
|
||||
# Set variables
|
||||
_qtver=5.5.1
|
||||
_qtver=5.6.0
|
||||
srcdir=${PWD}
|
||||
|
||||
start_msg() {
|
||||
|
|
|
@ -27,7 +27,4 @@ HEADERS += \
|
|||
./SourceFiles/_other/memain.h \
|
||||
./SourceFiles/_other/genemoji.h \
|
||||
|
||||
INCLUDEPATH += ./../../Libraries/QtStatic/qtbase/include/QtGui/5.5.1/QtGui\
|
||||
./../../Libraries/QtStatic/qtbase/include/QtCore/5.5.1/QtCore\
|
||||
./../../Libraries/QtStatic/qtbase/include\
|
||||
|
||||
include(qt_static.pri)
|
||||
|
|
|
@ -27,7 +27,4 @@ HEADERS += \
|
|||
./SourceFiles/_other/mlmain.h \
|
||||
./SourceFiles/_other/genlang.h \
|
||||
|
||||
INCLUDEPATH += ./../../Libraries/QtStatic/qtbase/include/QtGui/5.5.1/QtGui\
|
||||
./../../Libraries/QtStatic/qtbase/include/QtCore/5.5.1/QtCore\
|
||||
./../../Libraries/QtStatic/qtbase/include\
|
||||
|
||||
include(qt_static.pri)
|
||||
|
|
|
@ -35,8 +35,6 @@ unix {
|
|||
}
|
||||
}
|
||||
|
||||
INCLUDEPATH += ./../../Libraries/QtStatic/qtbase/include/QtGui/5.5.1/QtGui\
|
||||
./../../Libraries/QtStatic/qtbase/include/QtCore/5.5.1/QtCore\
|
||||
./../../Libraries/QtStatic/qtbase/include
|
||||
include(qt_static.pri)
|
||||
|
||||
LIBS += -lcrypto -lssl -lz -llzma
|
||||
|
|
|
@ -356,9 +356,9 @@ CONFIG(debug, debug|release) {
|
|||
QMAKE_LFLAGS_DEBUG += -g -rdynamic -static-libstdc++
|
||||
}
|
||||
|
||||
INCLUDEPATH += /usr/local/tdesktop/Qt-5.6.0/include/QtGui/5.6.0/QtGui\
|
||||
/usr/local/tdesktop/Qt-5.6.0/include/QtCore/5.6.0/QtCore\
|
||||
/usr/local/tdesktop/Qt-5.6.0/include\
|
||||
include(qt_static.pri)
|
||||
|
||||
INCLUDEPATH += \
|
||||
/usr/local/include\
|
||||
/usr/local/include/opus\
|
||||
./SourceFiles\
|
||||
|
@ -382,9 +382,9 @@ INCLUDEPATH += "/usr/include/dee-1.0"
|
|||
INCLUDEPATH += "/usr/include/libdbusmenu-glib-0.4"
|
||||
|
||||
LIBS += -ldl -llzma -lopenal -lavformat -lavcodec -lswresample -lswscale -lavutil -lopus -lva
|
||||
LIBS += /usr/local/tdesktop/Qt-5.6.0/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.a \
|
||||
/usr/local/tdesktop/Qt-5.6.0/plugins/platforminputcontexts/libibusplatforminputcontextplugin.a \
|
||||
/usr/local/tdesktop/Qt-5.6.0/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.a
|
||||
LIBS += $${QT_TDESKTOP_PATH}/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.a \
|
||||
$${QT_TDESKTOP_PATH}/plugins/platforminputcontexts/libibusplatforminputcontextplugin.a \
|
||||
$${QT_TDESKTOP_PATH}/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.a
|
||||
LIBS += /usr/local/lib/libz.a
|
||||
LIBS += /usr/local/lib/libxkbcommon.a
|
||||
LIBS += ./../../../Libraries/breakpad/src/client/linux/libbreakpad_client.a
|
||||
|
|
20
Telegram/qt_static.pri
Normal file
20
Telegram/qt_static.pri
Normal file
|
@ -0,0 +1,20 @@
|
|||
QT_TDESKTOP_VERSION_DEFAULT = 5.6.0
|
||||
QT_TDESKTOP_PATH_DEFAULT = /usr/local/tdesktop/Qt-$${QT_TDESKTOP_VERSION_DEFAULT}
|
||||
|
||||
QT_TDESKTOP_VERSION = $${QT_TDESKTOP_VERSION}
|
||||
QT_TDESKTOP_PATH = $${QT_TDESKTOP_PATH}
|
||||
|
||||
isEmpty(QT_TDESKTOP_PATH) {
|
||||
message(QT_TDESKTOP_PATH is not set. Using default value $${QT_TDESKTOP_PATH_DEFAULT})
|
||||
QT_TDESKTOP_PATH = $${QT_TDESKTOP_PATH_DEFAULT}
|
||||
|
||||
}
|
||||
isEmpty(QT_TDESKTOP_VERSION) {
|
||||
message(QT_TDESKTOP_VERSION is not set. Using default value $${QT_TDESKTOP_VERSION_DEFAULT})
|
||||
QT_TDESKTOP_VERSION = $${QT_TDESKTOP_VERSION_DEFAULT}
|
||||
}
|
||||
|
||||
INCLUDEPATH += $${QT_TDESKTOP_PATH}/include/QtGui/$${QT_TDESKTOP_VERSION}/QtGui \
|
||||
$${QT_TDESKTOP_PATH}/include/QtCore/$${QT_TDESKTOP_VERSION}/QtCore \
|
||||
$${QT_TDESKTOP_PATH}/include
|
||||
|
Loading…
Add table
Reference in a new issue