diff --git a/Telegram/FixMake.sh b/Telegram/FixMake.sh index 104f6a892a..567e7e6723 100755 --- a/Telegram/FixMake.sh +++ b/Telegram/FixMake.sh @@ -8,5 +8,5 @@ sed -i 's/\-lxcb\-shm/\/usr\/lib\/x86_64\-linux\-gnu\/libxcb\-shm\.a/g' Makefile sed -i 's/\-lxcb\-randr/\/usr\/lib\/x86_64\-linux\-gnu\/libxcb\-randr\.a/g' Makefile sed -i 's/\-lxcb\-shape/\/usr\/lib\/x86_64\-linux\-gnu\/libxcb\-shape\.a/g' Makefile sed -i 's/\-llzma/\/usr\/local\/lib\/liblzma\.a/g' Makefile -#sed -i 's/\-lX11\-xcb/\/usr\/lib\/x86_64\-linux\-gnu\/libX11\-xcb\.a/g' Makefile -#sed -i 's/\-lX11/\/usr\/lib\/x86_64\-linux\-gnu\/libX11\.a/g' Makefile +sed -i 's/\-lglib\-2\.0/\/usr\/lib\/x86_64\-linux\-gnu\/libglib\-2\.0\.a/g' Makefile + diff --git a/Telegram/PrepareUbuntu.sh b/Telegram/PrepareUbuntu.sh index f8ca8ec10b..7a74be6700 100755 --- a/Telegram/PrepareUbuntu.sh +++ b/Telegram/PrepareUbuntu.sh @@ -1,39 +1,39 @@ -AppVersionStr=0.5.6 -AppVersion=5006 +AppVersionStr=0.5.7 +AppVersion=5007 -if [ -d "deploy/$AppVersionStr" ]; then +if [ -d "./../Linux/Release/deploy/$AppVersionStr" ]; then echo "Deploy folder for version $AppVersionStr already exists!" exit 1 fi -if [ -f "tlinuxupd$AppVersion" ]; then +if [ -f "./../Linux/Release/tlinuxupd$AppVersion" ]; then echo "Update file for version $AppVersion already exists!" exit 1 fi -if [ ! -f "Telegram" ]; then +if [ ! -f "./../Linux/Release/Telegram" ]; then echo "Telegram not found!" exit 1 fi -if [ ! -f "Updater" ]; then +if [ ! -f "./../Linux/Release/Updater" ]; then echo "Updater not found!" exit 1 fi echo "Preparing version $AppVersionStr, executing Packer.." -./Packer -path Telegram -path Updater -version $AppVersion +cd ./../Linux/Release && ./Packer -path Telegram -path Updater -version $AppVersion && cd ./../../Telegram echo "Packer done!" -if [ ! -d "deploy/" ]; then - mkdir "deploy" +if [ ! -d "./../Linux/Release/deploy" ]; then + mkdir "./../Linux/Release/deploy" fi echo "Copying Telegram, Updater and tlinuxupd$AppVersion to deploy/$AppVersionStr.."; -mkdir "deploy/$AppVersionStr" -mkdir "deploy/$AppVersionStr/Telegram" -mv Telegram deploy/$AppVersionStr/Telegram/ -mv Updater deploy/$AppVersionStr/Telegram/ -mv tlinuxupd$AppVersion deploy/$AppVersionStr/ -cd deploy/$AppVersionStr && tar -czvf tsetup.$AppVersionStr.tar.gz Telegram/ && cd ../.. +mkdir "./../Linux/Release/deploy/$AppVersionStr" +mkdir "./../Linux/Release/deploy/$AppVersionStr/Telegram" +mv ./../Linux/Release/Telegram ./../Linux/Release/deploy/$AppVersionStr/Telegram/ +mv ./../Linux/Release/Updater ./../Linux/Release/deploy/$AppVersionStr/Telegram/ +mv ./../Linux/Release/tlinuxupd$AppVersion ./../Linux/Release/deploy/$AppVersionStr/ +cd ./../Linux/Release/deploy/$AppVersionStr && tar -czvf tsetup.$AppVersionStr.tar.gz Telegram/ && cd ./../../../../Telegram echo "Version $AppVersionStr prepared!"; diff --git a/Telegram/SourceFiles/localimageloader.cpp b/Telegram/SourceFiles/localimageloader.cpp index 494d38c05f..a1e9df5d79 100644 --- a/Telegram/SourceFiles/localimageloader.cpp +++ b/Telegram/SourceFiles/localimageloader.cpp @@ -35,7 +35,7 @@ void LocalImageLoaderPrivate::prepareImages() { QImage img; QByteArray data; PeerId peer; - uint64 id, jpeg_id; + uint64 id, jpeg_id = 0; ToPrepareMediaType type; { QMutexLocker lock(loader->toPrepareMutex()); diff --git a/Telegram/Telegram.pro b/Telegram/Telegram.pro index 0f7372569b..d7f4fac62d 100644 --- a/Telegram/Telegram.pro +++ b/Telegram/Telegram.pro @@ -225,17 +225,24 @@ CONFIG += precompile_header PRECOMPILED_HEADER = ./SourceFiles/stdafx.h -QMAKE_CXXFLAGS += -fno-strict-aliasing QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter -Wno-unused-variable -Wno-switch -Wno-comment -Wno-unused-but-set-variable +CONFIG(release, debug|release) { + QMAKE_CXXFLAGS_RELEASE -= -O2 + QMAKE_CXXFLAGS_RELEASE += -Ofast -flto -fno-strict-aliasing + QMAKE_LFLAGS_RELEASE -= -O1 + QMAKE_LFLAGS_RELEASE += -Ofast -flto +} + INCLUDEPATH += ./../../Libraries/QtStatic/qtbase/include/QtGui/5.3.1/QtGui\ ./../../Libraries/QtStatic/qtbase/include/QtCore/5.3.1/QtCore\ ./../../Libraries/QtStatic/qtbase/include\ ./SourceFiles\ ./GeneratedFiles\ + ./../../Telegram/GeneratedFiles\ # qmake bug?.. Sometimes ./GeneratedFiles does not mean this path :( ./../../Libraries/libexif-0.6.20\ /usr/local/ssl/include -LIBS += -L/usr/local/ssl/lib -lcrypto -lssl -lz -ldl -llzma +LIBS += -L/usr/local/ssl/lib -lcrypto -lssl -lz -ldl -llzma -lpulse LIBS += ./../../../Libraries/libexif-0.6.20/libexif/.libs/libexif.a LIBS += ./../../../Libraries/QtStatic/qtmultimedia/plugins/audio/libqtmedia_pulse.a RESOURCES += \ diff --git a/Telegram/_qt_5_3_1_patch/qtmultimedia/src/plugins/pulseaudio/pulseaudio.pro b/Telegram/_qt_5_3_1_patch/qtmultimedia/src/plugins/pulseaudio/pulseaudio.pro new file mode 100644 index 0000000000..fe8de004ff --- /dev/null +++ b/Telegram/_qt_5_3_1_patch/qtmultimedia/src/plugins/pulseaudio/pulseaudio.pro @@ -0,0 +1,26 @@ +TARGET = qtmedia_pulse +QT += multimedia-private + +PLUGIN_TYPE = audio +PLUGIN_CLASS_NAME = QPulseAudioPlugin +load(qt_plugin) + +CONFIG += link_pkgconfig +PKGCONFIG += libpulse +CONFIG += static plugin +HEADERS += qpulseaudioplugin.h \ + qaudiodeviceinfo_pulse.h \ + qaudiooutput_pulse.h \ + qaudioinput_pulse.h \ + qpulseaudioengine.h \ + qpulsehelpers.h + +SOURCES += qpulseaudioplugin.cpp \ + qaudiodeviceinfo_pulse.cpp \ + qaudiooutput_pulse.cpp \ + qaudioinput_pulse.cpp \ + qpulseaudioengine.cpp \ + qpulsehelpers.cpp + +OTHER_FILES += \ + pulseaudio.json diff --git a/XCODE.md b/XCODE.md index 3c606de057..989b20d063 100644 --- a/XCODE.md +++ b/XCODE.md @@ -91,4 +91,5 @@ building (**make** command) will take really long time. * Open MetaEmoji.xcodeproj and build for Debug (Release optionally) * Open MetaLang.xcodeproj and build for Debug (Release optionally) * Open Telegram.xcodeproj and build for Debug +* Build Updater target as well, it is required for Telegram relaunch * Release Telegram build will require removing **CUSTOM_API_ID** definition in Telegram target settings (Apple LLVM 5.1 - Custom Compiler Flags > Other C / C++ Flags > Release)