Merge branch 'dev'

This commit is contained in:
John Preston 2016-05-10 11:58:21 +03:00
commit fd7f618fd2
96 changed files with 13911 additions and 4103 deletions

5
.gitignore vendored
View File

@ -1,4 +1,4 @@
/Telegram/Target /Telegram/build/target
/Telegram/GeneratedFiles/ /Telegram/GeneratedFiles/
/Telegram/SourceFiles/art/grid.png /Telegram/SourceFiles/art/grid.png
/Telegram/SourceFiles/art/grid_125x.png /Telegram/SourceFiles/art/grid_125x.png
@ -18,7 +18,8 @@
*.sdf *.sdf
*.opensdf *.opensdf
*.opendb *.opendb
/Telegram/*.aps *.VC.db
*.aps
/Win32/ /Win32/
ipch/ ipch/

View File

@ -19,21 +19,23 @@ downloadLibs() {
# Download libraries # Download libraries
info_msg "QT-Version: ${_qtver}, SRC-Dir: ${srcdir}" info_msg "QT-Version: ${_qtver}, SRC-Dir: ${srcdir}"
echo -e "\nDownload and extract qt" echo -e "Clone Qt\n"
qt_file=qt-everywhere-opensource-src-$_qtver.tar.xz git clone git://code.qt.io/qt/qt5.git qt5_6_0
echo -e "QT-File: ${qt_file}" cd qt5_6_0
git checkout 5.6
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 ..
cd ..
wget "http://download.qt.io/official_releases/qt/${_qtver%.*}/$_qtver/single/$qt_file" echo -e "Clone Breakpad\n"
tar xf $qt_file
rm $qt_file
echo -e "Clone Breakpad"
git clone https://chromium.googlesource.com/breakpad/breakpad breakpad git clone https://chromium.googlesource.com/breakpad/breakpad breakpad
echo -e "\nClone Linux Syscall Support" echo -e "Clone Linux Syscall Support\n"
git clone https://chromium.googlesource.com/linux-syscall-support breakpad-lss git clone https://chromium.googlesource.com/linux-syscall-support breakpad-lss
echo -e "\nLets view the folder content" echo -e "Lets view the folder content\n"
ls ls
travis_fold_end "download_libs" travis_fold_end "download_libs"
} }
@ -46,13 +48,9 @@ prepare() {
mkdir -p "$srcdir/Libraries" mkdir -p "$srcdir/Libraries"
local qt_patch_file="$srcdir/tdesktop/Telegram/_qtbase_${_qtver//./_}_patch.diff" ln -s "$srcdir/qt5_6_0" "$srcdir/Libraries/qt5_6_0"
if [ "$qt_patch_file" -nt "$srcdir/Libraries/QtStatic" ]; then cd "$srcdir/Libraries/qt5_6_0/qtbase"
rm -rf "$srcdir/Libraries/QtStatic" git apply "$srcdir/tdesktop/Telegram/Patches/qtbase_5_6_0.diff"
mv "$srcdir/qt-everywhere-opensource-src-$_qtver" "$srcdir/Libraries/QtStatic"
cd "$srcdir/Libraries/QtStatic/qtbase"
patch -p1 -i "$qt_patch_file"
fi
if [ ! -h "$srcdir/Libraries/breakpad" ]; then if [ ! -h "$srcdir/Libraries/breakpad" ]; then
ln -s "$srcdir/breakpad" "$srcdir/Libraries/breakpad" ln -s "$srcdir/breakpad" "$srcdir/Libraries/breakpad"
@ -62,9 +60,10 @@ prepare() {
sed -i 's/CUSTOM_API_ID//g' "$srcdir/tdesktop/Telegram/Telegram.pro" 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/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,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="" local options=""
if [[ $BUILD_VERSION == *"disable_autoupdate"* ]]; then if [[ $BUILD_VERSION == *"disable_autoupdate"* ]]; then
options+="\nDEFINES += TDESKTOP_DISABLE_AUTOUPDATE" options+="\nDEFINES += TDESKTOP_DISABLE_AUTOUPDATE"
fi fi
@ -85,9 +84,9 @@ prepare() {
options+='\nINCLUDEPATH += "/usr/lib/gtk-2.0/include"' options+='\nINCLUDEPATH += "/usr/lib/gtk-2.0/include"'
options+='\nINCLUDEPATH += "/usr/include/opus"' options+='\nINCLUDEPATH += "/usr/include/opus"'
options+='\nLIBS += -lcrypto -lssl' options+='\nLIBS += -lcrypto -lssl'
info_msg "Build options: ${options}" info_msg "Build options: ${options}"
echo -e "${options}" >> "$srcdir/tdesktop/Telegram/Telegram.pro" echo -e "${options}" >> "$srcdir/tdesktop/Telegram/Telegram.pro"
success_msg "Prepare done! :)" success_msg "Prepare done! :)"
@ -99,12 +98,12 @@ build() {
info_msg "Build patched Qt" info_msg "Build patched Qt"
# Build patched Qt # Build patched Qt
cd "$srcdir/Libraries/QtStatic" cd "$srcdir/Libraries/qt5_6_0"
./configure -prefix "$srcdir/qt" -release -opensource -confirm-license -qt-zlib \ ./configure -prefix "$srcdir/qt" -release -opensource -confirm-license -qt-zlib \
-qt-libpng -qt-libjpeg -qt-freetype -qt-harfbuzz -qt-pcre -qt-xcb \ -qt-libpng -qt-libjpeg -qt-freetype -qt-harfbuzz -qt-pcre -qt-xcb \
-qt-xkbcommon-x11 -no-opengl -static -nomake examples -nomake tests -qt-xkbcommon-x11 -no-opengl -static -nomake examples -nomake tests
make --silent module-qtbase module-qtimageformats make --silent -j4
make --silent module-qtbase-install_subtargets module-qtimageformats-install_subtargets make --silent -j4 install
export PATH="$srcdir/qt/bin:$PATH" export PATH="$srcdir/qt/bin:$PATH"
@ -112,44 +111,43 @@ build() {
# Build breakpad # Build breakpad
cd "$srcdir/Libraries/breakpad" cd "$srcdir/Libraries/breakpad"
./configure ./configure
make --silent make --silent -j4
info_msg "Build codegen_style" info_msg "Build codegen_style"
# Build codegen_style # Build codegen_style
mkdir -p "$srcdir/tdesktop/Linux/obj/codegen_style/Debug" mkdir -p "$srcdir/tdesktop/Linux/obj/codegen_style/Debug"
cd "$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 CONFIG+=debug "../../../../Telegram/build/qmake/codegen_style/codegen_style.pro"
make --silent make --silent -j4
info_msg "Build codegen_numbers" info_msg "Build codegen_numbers"
# Build codegen_numbers # Build codegen_numbers
mkdir -p "$srcdir/tdesktop/Linux/obj/codegen_numbers/Debug" mkdir -p "$srcdir/tdesktop/Linux/obj/codegen_numbers/Debug"
cd "$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 CONFIG+=debug "../../../../Telegram/build/qmake/codegen_numbers/codegen_numbers.pro"
make --silent make --silent -j4
info_msg "Build MetaLang" info_msg "Build MetaLang"
# Build MetaLang # Build MetaLang
mkdir -p "$srcdir/tdesktop/Linux/DebugIntermediateLang" mkdir -p "$srcdir/tdesktop/Linux/DebugIntermediateLang"
cd "$srcdir/tdesktop/Linux/DebugIntermediateLang" cd "$srcdir/tdesktop/Linux/DebugIntermediateLang"
qmake CONFIG+=debug "../../Telegram/MetaLang.pro" qmake CONFIG+=debug "../../Telegram/MetaLang.pro"
make --silent make --silent -j4
info_msg "Build Telegram Desktop" info_msg "Build Telegram Desktop"
# Build Telegram Desktop # Build Telegram Desktop
mkdir -p "$srcdir/tdesktop/Linux/ReleaseIntermediate" mkdir -p "$srcdir/tdesktop/Linux/DebugIntermediate"
cd "$srcdir/tdesktop/Linux/ReleaseIntermediate" cd "$srcdir/tdesktop/Linux/DebugIntermediate"
qmake CONFIG+=release "../../Telegram/Telegram.pro" ./../codegen/Debug/codegen_style "-I./../../Telegram/Resources" "-I./../../Telegram/SourceFiles" "-o./GeneratedFiles/styles" all_files.style --rebuild
local pattern="^PRE_TARGETDEPS +=" ./../codegen/Debug/codegen_numbers "-o./GeneratedFiles" "./../../Telegram/Resources/numbers.txt"
grep "$pattern" "$srcdir/tdesktop/Telegram/Telegram.pro" | sed "s/$pattern//g" | xargs make ./../DebugLang/MetaLang -lang_in ./../../Telegram/Resources/langs/lang.strings -lang_out ./GeneratedFiles/lang_auto
qmake CONFIG+=debug "../../Telegram/Telegram.pro"
qmake CONFIG+=release "../../Telegram/Telegram.pro" make -j4
make
} }
check() { check() {
local filePath="$srcdir/tdesktop/Linux/Release/Telegram" local filePath="$srcdir/tdesktop/Linux/Debug/Telegram"
if test -f "$filePath"; then if test -f "$filePath"; then
success_msg "Build successful done! :)" success_msg "Build successful done! :)"

View File

@ -16,7 +16,7 @@ The source code is published under GPLv3 with OpenSSL exception, the license is
## Third-party libraries ## Third-party libraries
* Qt 5.3.2 and 5.5.1, slightly patched ([LGPL](http://doc.qt.io/qt-5/lgpl.html)) * Qt 5.3.2 and 5.6.0, slightly patched ([LGPL](http://doc.qt.io/qt-5/lgpl.html))
* OpenSSL 1.0.1g ([OpenSSL License](https://www.openssl.org/source/license.html)) * OpenSSL 1.0.1g ([OpenSSL License](https://www.openssl.org/source/license.html))
* zlib 1.2.8 ([zlib License](http://www.zlib.net/zlib_license.html)) * zlib 1.2.8 ([zlib License](http://www.zlib.net/zlib_license.html))
* libexif 0.6.20 ([LGPL](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html)) * libexif 0.6.20 ([LGPL](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html))

View File

@ -1,13 +1,12 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14 # Visual Studio 14
VisualStudioVersion = 14.0.24720.0 VisualStudioVersion = 14.0.25123.0
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Telegram", "Telegram\Telegram.vcxproj", "{B12702AD-ABFB-343A-A199-8E24837244A3}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Telegram", "Telegram\Telegram.vcxproj", "{B12702AD-ABFB-343A-A199-8E24837244A3}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{E4DF8176-4DEF-4859-962F-B497E3E7A323} = {E4DF8176-4DEF-4859-962F-B497E3E7A323} {E4DF8176-4DEF-4859-962F-B497E3E7A323} = {E4DF8176-4DEF-4859-962F-B497E3E7A323}
{E417CAA4-259B-4C99-88E3-805F1300E8EB} = {E417CAA4-259B-4C99-88E3-805F1300E8EB} {E417CAA4-259B-4C99-88E3-805F1300E8EB} = {E417CAA4-259B-4C99-88E3-805F1300E8EB}
{EB7D16AC-EACF-4577-B05A-F28E5F356794} = {EB7D16AC-EACF-4577-B05A-F28E5F356794}
{7C25BFBD-7930-4DE2-AF33-27CE1CC521E6} = {7C25BFBD-7930-4DE2-AF33-27CE1CC521E6} {7C25BFBD-7930-4DE2-AF33-27CE1CC521E6} = {7C25BFBD-7930-4DE2-AF33-27CE1CC521E6}
EndProjectSection EndProjectSection
EndProject EndProject
@ -79,8 +78,8 @@ Global
{E4DF8176-4DEF-4859-962F-B497E3E7A323}.Debug|Win32.ActiveCfg = Debug|Win32 {E4DF8176-4DEF-4859-962F-B497E3E7A323}.Debug|Win32.ActiveCfg = Debug|Win32
{E4DF8176-4DEF-4859-962F-B497E3E7A323}.Debug|Win32.Build.0 = Debug|Win32 {E4DF8176-4DEF-4859-962F-B497E3E7A323}.Debug|Win32.Build.0 = Debug|Win32
{E4DF8176-4DEF-4859-962F-B497E3E7A323}.Debug|x64.ActiveCfg = Debug|Win32 {E4DF8176-4DEF-4859-962F-B497E3E7A323}.Debug|x64.ActiveCfg = Debug|Win32
{E4DF8176-4DEF-4859-962F-B497E3E7A323}.Deploy|Win32.ActiveCfg = Debug|Win32 {E4DF8176-4DEF-4859-962F-B497E3E7A323}.Deploy|Win32.ActiveCfg = Deploy|Win32
{E4DF8176-4DEF-4859-962F-B497E3E7A323}.Deploy|Win32.Build.0 = Debug|Win32 {E4DF8176-4DEF-4859-962F-B497E3E7A323}.Deploy|Win32.Build.0 = Deploy|Win32
{E4DF8176-4DEF-4859-962F-B497E3E7A323}.Deploy|x64.ActiveCfg = Release|Win32 {E4DF8176-4DEF-4859-962F-B497E3E7A323}.Deploy|x64.ActiveCfg = Release|Win32
{E4DF8176-4DEF-4859-962F-B497E3E7A323}.Deploy|x64.Build.0 = Release|Win32 {E4DF8176-4DEF-4859-962F-B497E3E7A323}.Deploy|x64.Build.0 = Release|Win32
{E4DF8176-4DEF-4859-962F-B497E3E7A323}.Release|Win32.ActiveCfg = Release|Win32 {E4DF8176-4DEF-4859-962F-B497E3E7A323}.Release|Win32.ActiveCfg = Release|Win32
@ -89,8 +88,8 @@ Global
{7C25BFBD-7930-4DE2-AF33-27CE1CC521E6}.Debug|Win32.ActiveCfg = Debug|Win32 {7C25BFBD-7930-4DE2-AF33-27CE1CC521E6}.Debug|Win32.ActiveCfg = Debug|Win32
{7C25BFBD-7930-4DE2-AF33-27CE1CC521E6}.Debug|Win32.Build.0 = Debug|Win32 {7C25BFBD-7930-4DE2-AF33-27CE1CC521E6}.Debug|Win32.Build.0 = Debug|Win32
{7C25BFBD-7930-4DE2-AF33-27CE1CC521E6}.Debug|x64.ActiveCfg = Debug|Win32 {7C25BFBD-7930-4DE2-AF33-27CE1CC521E6}.Debug|x64.ActiveCfg = Debug|Win32
{7C25BFBD-7930-4DE2-AF33-27CE1CC521E6}.Deploy|Win32.ActiveCfg = Debug|Win32 {7C25BFBD-7930-4DE2-AF33-27CE1CC521E6}.Deploy|Win32.ActiveCfg = Deploy|Win32
{7C25BFBD-7930-4DE2-AF33-27CE1CC521E6}.Deploy|Win32.Build.0 = Debug|Win32 {7C25BFBD-7930-4DE2-AF33-27CE1CC521E6}.Deploy|Win32.Build.0 = Deploy|Win32
{7C25BFBD-7930-4DE2-AF33-27CE1CC521E6}.Deploy|x64.ActiveCfg = Release|Win32 {7C25BFBD-7930-4DE2-AF33-27CE1CC521E6}.Deploy|x64.ActiveCfg = Release|Win32
{7C25BFBD-7930-4DE2-AF33-27CE1CC521E6}.Deploy|x64.Build.0 = Release|Win32 {7C25BFBD-7930-4DE2-AF33-27CE1CC521E6}.Deploy|x64.Build.0 = Release|Win32
{7C25BFBD-7930-4DE2-AF33-27CE1CC521E6}.Release|Win32.ActiveCfg = Release|Win32 {7C25BFBD-7930-4DE2-AF33-27CE1CC521E6}.Release|Win32.ActiveCfg = Release|Win32

View File

@ -1,28 +0,0 @@
Replace () {
CheckCommand="grep -ci '$1' Makefile"
CheckCount=$(eval $CheckCommand)
if [ "$CheckCount" -gt 0 ]; then
echo "Requested '$1' to '$2', found - replacing.."
ReplaceCommand="sed -i 's/$1/$2/g' Makefile"
eval $ReplaceCommand
else
echo "Skipping '$1' to '$2'"
fi
}
Replace '\-llzma' '\/usr\/lib\/x86_64\-linux\-gnu\/liblzma\.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'
Replace '\-lfreetype' '\/usr\/lib\/x86_64\-linux\-gnu\/libfreetype\.a'
Replace '\-lXext' '\/usr\/lib\/x86_64\-linux\-gnu\/libXext\.a'
Replace '\-lopus' '\/usr\/local\/lib\/libopus\.a'
Replace '\-lopenal' '\/usr\/local\/lib\/libopenal\.a'
Replace '\-lavformat' '\/usr\/local\/lib\/libavformat\.a'
Replace '\-lavcodec' '\/usr\/local\/lib\/libavcodec\.a'
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'

View File

@ -1,28 +0,0 @@
Replace () {
CheckCommand="grep -ci '$1' Makefile"
CheckCount=$(eval $CheckCommand)
if [ "$CheckCount" -gt 0 ]; then
echo "Requested '$1' to '$2', found - replacing.."
ReplaceCommand="sed -i 's/$1/$2/g' Makefile"
eval $ReplaceCommand
else
echo "Skipping '$1' to '$2'"
fi
}
Replace '\-llzma' '\/usr\/lib\/i386\-linux\-gnu\/liblzma\.a'
Replace '\-lXi' '\/usr\/lib\/i386\-linux\-gnu\/libXi\.a \/usr\/lib\/i386\-linux\-gnu\/libXext\.a'
Replace '\-lSM' '\/usr\/lib\/i386\-linux\-gnu\/libSM\.a'
Replace '\-lICE' '\/usr\/lib\/i386\-linux\-gnu\/libICE\.a'
Replace '\-lfontconfig' '\/usr\/lib\/i386\-linux\-gnu\/libfontconfig\.a \/usr\/lib\/i386\-linux\-gnu\/libexpat\.a'
Replace '\-lfreetype' '\/usr\/lib\/i386\-linux\-gnu\/libfreetype\.a'
Replace '\-lXext' '\/usr\/lib\/i386\-linux\-gnu\/libXext\.a'
Replace '\-lopus' '\/usr\/local\/lib\/libopus\.a'
Replace '\-lopenal' '\/usr\/local\/lib\/libopenal\.a'
Replace '\-lavformat' '\/usr\/local\/lib\/libavformat\.a'
Replace '\-lavcodec' '\/usr\/local\/lib\/libavcodec\.a'
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'

View File

@ -1,19 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup> <ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;cxx;c;def</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E}</UniqueIdentifier>
<Extensions>qrc;*</Extensions>
<ParseFiles>false</ParseFiles>
</Filter>
<Filter Include="Generated Files"> <Filter Include="Generated Files">
<UniqueIdentifier>{71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11}</UniqueIdentifier> <UniqueIdentifier>{71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11}</UniqueIdentifier>
<Extensions>moc;h;cpp</Extensions> <Extensions>moc;h;cpp</Extensions>
@ -34,13 +21,17 @@
<Extensions>cpp;moc</Extensions> <Extensions>cpp;moc</Extensions>
<SourceControlFiles>False</SourceControlFiles> <SourceControlFiles>False</SourceControlFiles>
</Filter> </Filter>
<Filter Include="src">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;cxx;c;def</Extensions>
</Filter>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="SourceFiles\_other\mlmain.cpp"> <ClCompile Include="SourceFiles\_other\mlmain.cpp">
<Filter>Source Files</Filter> <Filter>src</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="SourceFiles\_other\genlang.cpp"> <ClCompile Include="SourceFiles\_other\genlang.cpp">
<Filter>Source Files</Filter> <Filter>src</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="GeneratedFiles\Deploy\moc_genlang.cpp"> <ClCompile Include="GeneratedFiles\Deploy\moc_genlang.cpp">
<Filter>Generated Files\Deploy</Filter> <Filter>Generated Files\Deploy</Filter>
@ -52,14 +43,14 @@
<Filter>Generated Files\Release</Filter> <Filter>Generated Files\Release</Filter>
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ClInclude Include="SourceFiles\_other\mlmain.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup> <ItemGroup>
<CustomBuild Include="SourceFiles\_other\genlang.h"> <CustomBuild Include="SourceFiles\_other\genlang.h">
<Filter>Header Files</Filter> <Filter>src</Filter>
</CustomBuild> </CustomBuild>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ClInclude Include="SourceFiles\_other\mlmain.h">
<Filter>src</Filter>
</ClInclude>
</ItemGroup>
</Project> </Project>

View File

@ -71,14 +71,14 @@
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalIncludeDirectories>.\..\..\Libraries\lzma\C;.;$(QTDIR)\include;.\..\..\Libraries\zlib-1.2.8;.\..\..\Libraries\OpenSSL-Win32\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(QTDIR)\include;$(QTDIR)\include\QtCore;.\..\..\Libraries\lzma\C;.\..\..\Libraries\zlib-1.2.8;.\..\..\Libraries\openssl_debug\Debug\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType> <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
<OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile> <OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
<AdditionalLibraryDirectories>.\..\..\Libraries\lzma\C\Util\LzmaLib\Debug;$(QTDIR)\lib;.\..\..\Libraries\zlib-1.2.8\contrib\vstudio\vc11\x86\ZlibStatDebug;.\..\..\Libraries\OpenSSL-Win32\lib\VC\static;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>.\..\..\Libraries\lzma\C\Util\LzmaLib\Debug;$(QTDIR)\lib;.\..\..\Libraries\zlib-1.2.8\contrib\vstudio\vc11\x86\ZlibStatDebug;.\..\..\Libraries\openssl_debug\Debug\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>kernel32.lib;user32.lib;shell32.lib;uuid.lib;ole32.lib;advapi32.lib;ws2_32.lib;qtmaind.lib;zlibstat.lib;libeay32MTd.lib;Qt5Cored.lib;LzmaLib.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>kernel32.lib;user32.lib;shell32.lib;uuid.lib;ole32.lib;advapi32.lib;ws2_32.lib;zlibstat.lib;libeay32.lib;LzmaLib.lib;qtmaind.lib;qtpcred.lib;Qt5Cored.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<ImageHasSafeExceptionHandlers /> <ImageHasSafeExceptionHandlers />
</Link> </Link>
@ -88,14 +88,14 @@
<PreprocessorDefinitions>UNICODE;WIN32;WIN64;QT_NO_DEBUG;ZLIB_WINAPI;NDEBUG;QT_CORE_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>UNICODE;WIN32;WIN64;QT_NO_DEBUG;ZLIB_WINAPI;NDEBUG;QT_CORE_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat /> <DebugInformationFormat />
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalIncludeDirectories>.\..\..\Libraries\lzma\C;.;$(QTDIR)\include;.\..\..\Libraries\zlib-1.2.8;.\..\..\Libraries\OpenSSL-Win32\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(QTDIR)\include;$(QTDIR)\include\QtCore;.\..\..\Libraries\lzma\C;.\..\..\Libraries\zlib-1.2.8;.\..\..\Libraries\openssl\Release\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType> <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
<OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile> <OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
<AdditionalLibraryDirectories>.\..\..\Libraries\lzma\C\Util\LzmaLib\Release;$(QTDIR)\lib;.\..\..\Libraries\zlib-1.2.8\contrib\vstudio\vc11\x86\ZlibStatRelease;.\..\..\Libraries\OpenSSL-Win32\lib\VC\static;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>.\..\..\Libraries\lzma\C\Util\LzmaLib\Release;$(QTDIR)\lib;.\..\..\Libraries\zlib-1.2.8\contrib\vstudio\vc11\x86\ZlibStatRelease;.\..\..\Libraries\openssl\Release\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>kernel32.lib;user32.lib;shell32.lib;uuid.lib;ole32.lib;advapi32.lib;ws2_32.lib;qtmain.lib;zlibstat.lib;libeay32MT.lib;Qt5Core.lib;LzmaLib.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>kernel32.lib;user32.lib;shell32.lib;uuid.lib;ole32.lib;advapi32.lib;ws2_32.lib;zlibstat.lib;libeay32.lib;LzmaLib.lib;qtmain.lib;qtpcre.lib;Qt5Core.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>false</GenerateDebugInformation> <GenerateDebugInformation>false</GenerateDebugInformation>
<ImageHasSafeExceptionHandlers /> <ImageHasSafeExceptionHandlers />
</Link> </Link>
@ -106,14 +106,14 @@
<DebugInformationFormat> <DebugInformationFormat>
</DebugInformationFormat> </DebugInformationFormat>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalIncludeDirectories>.\..\..\Libraries\lzma\C;.;$(QTDIR)\include;.\..\..\Libraries\zlib-1.2.8;.\..\..\Libraries\openssl\Release\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(QTDIR)\include;$(QTDIR)\include\QtCore;.\..\..\Libraries\lzma\C;.\..\..\Libraries\zlib-1.2.8;.\..\..\Libraries\openssl\Release\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType> <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
<OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile> <OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
<AdditionalLibraryDirectories>.\..\..\Libraries\lzma\C\Util\LzmaLib\Release;$(QTDIR)\lib;.\..\..\Libraries\zlib-1.2.8\contrib\vstudio\vc11\x86\ZlibStatRelease;.\..\..\Libraries\openssl\Release\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>.\..\..\Libraries\lzma\C\Util\LzmaLib\Release;$(QTDIR)\lib;.\..\..\Libraries\zlib-1.2.8\contrib\vstudio\vc11\x86\ZlibStatRelease;.\..\..\Libraries\openssl\Release\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>kernel32.lib;user32.lib;shell32.lib;uuid.lib;ole32.lib;advapi32.lib;ws2_32.lib;qtmain.lib;zlibstat.lib;libeay32.lib;Qt5Core.lib;qtpcre.lib;LzmaLib.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>kernel32.lib;user32.lib;shell32.lib;uuid.lib;ole32.lib;advapi32.lib;ws2_32.lib;zlibstat.lib;libeay32.lib;LzmaLib.lib;qtmain.lib;qtpcre.lib;Qt5Core.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>false</GenerateDebugInformation> <GenerateDebugInformation>false</GenerateDebugInformation>
<ImageHasSafeExceptionHandlers> <ImageHasSafeExceptionHandlers>
</ImageHasSafeExceptionHandlers> </ImageHasSafeExceptionHandlers>

View File

@ -1,16 +1,18 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup> <ItemGroup>
<Filter Include="Generated Files"> <Filter Include="src">
<UniqueIdentifier>{71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11}</UniqueIdentifier> <UniqueIdentifier>{fb58185d-85da-49e6-abad-efe7abf6c475}</UniqueIdentifier>
<Extensions>moc;h;cpp</Extensions>
<SourceControlFiles>False</SourceControlFiles>
</Filter> </Filter>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="SourceFiles\_other\packer.h" /> <ClCompile Include="SourceFiles\_other\packer.cpp">
<Filter>src</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="SourceFiles\_other\packer.cpp" /> <ClInclude Include="SourceFiles\_other\packer.h">
<Filter>src</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
</Project> </Project>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,34 @@
set -e
FullExecPath=$PWD
pushd `dirname $0` > /dev/null
FullScriptPath=`pwd`
popd > /dev/null
if [ ! -d "$FullScriptPath/../../../../TelegramPrivate" ]; then
echo ""
echo "This script is for building the production version of Telegram Desktop."
echo ""
echo "For building custom versions please visit the build instructions page at:"
echo "https://github.com/telegramdesktop/tdesktop/#build-instructions"
exit
fi
Error () {
cd $FullExecPath
echo "$1"
exit 1
}
cd $FullScriptPath/../../../../
while IFS='' read -r line || [[ -n "$line" ]]; do
tx pull -f -l $line --minimum-perc=100
done < tdesktop/Telegram/Resources/langs/list
cd translations/telegram-desktop.langstrings/
for file in *.strings; do
iconv -f "UTF-16LE" -t "UTF-8" "$file" > "../../tdesktop/Telegram/Resources/langs/lang_$file.tmp"
awk '{ if (NR==1) sub(/^\xef\xbb\xbf/,""); sub(/ /,""); print }' "../../tdesktop/Telegram/Resources/langs/lang_$file.tmp" > "../../tdesktop/Telegram/Resources/langs/lang_$file"
rm "../../tdesktop/Telegram/Resources/langs/lang_$file.tmp"
done
touch $FullScriptPath/../telegram.qrc
cd $FullExecPath

View File

@ -599,6 +599,11 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
"lng_forwarded_channel_via" = "Forwarded from {channel} via {inline_bot}"; "lng_forwarded_channel_via" = "Forwarded from {channel} via {inline_bot}";
"lng_forwarded_signed" = "{channel} ({user})"; "lng_forwarded_signed" = "{channel} ({user})";
"lng_in_reply_to" = "In reply to"; "lng_in_reply_to" = "In reply to";
"lng_edited" = "Edited";
"lng_edited_date" = "Edited: {date}";
"lng_cancel_edit_post_sure" = "Cancel editing?";
"lng_cancel_edit_post_yes" = "Yes";
"lng_cancel_edit_post_no" = "No";
"lng_bot_share_location_unavailable" = "Sorry, the location sharing is currently unavailable in Telegram Desktop."; "lng_bot_share_location_unavailable" = "Sorry, the location sharing is currently unavailable in Telegram Desktop.";
"lng_bot_inline_geo_unavailable" = "Sorry, this bot requires location sharing.\nIt is not available in Telegram Desktop."; "lng_bot_inline_geo_unavailable" = "Sorry, this bot requires location sharing.\nIt is not available in Telegram Desktop.";

View File

@ -893,7 +893,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
"lng_new_version_wrap" = "Telegram Desktop wurde aktualisiert auf Version {version}\n\n{changes}\n\nGesamter Versionsverlauf:\n{link}"; "lng_new_version_wrap" = "Telegram Desktop wurde aktualisiert auf Version {version}\n\n{changes}\n\nGesamter Versionsverlauf:\n{link}";
"lng_new_version_minor" = "— Fehlerbehebungen und Softwareoptimierungen"; "lng_new_version_minor" = "— Fehlerbehebungen und Softwareoptimierungen";
"lng_new_version_text" = "BOTS 2.0\n\n— Bot API 2.0: Das größte Update unserer Bot-Plattform seit Juni 2015.\n— Bots können vorhandene Nachrichten aktualisieren, während du mit dem Bot schreibst.\n— Neue Inline-Tastaturen mit 'Callback', 'URL öffnen' oder 'in den Inline-Modus wechseln'-Knöpfen, für eine noch bessere Integration.\n— Inline-Bots dürfen nun alle erlaubten Anhänge senden (Videos, Musik, Sticker, Dateien, etc.).\n— Probiere doch mal einen der folgenden Beispielbots aus: @music, @sticker, @youtube, @foursquare\n\nMehr Infos: {link}"; "lng_new_version_text" = "— Optische Verbesserungen (u.a. runde Profilbilder)";
"lng_menu_insert_unicode" = "Unicode-Steuerzeichen einfügen"; "lng_menu_insert_unicode" = "Unicode-Steuerzeichen einfügen";

View File

@ -893,7 +893,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
"lng_new_version_wrap" = "Telegram Desktop ha sido actualizada a la versión {version}\n\n{changes}\n\nEl historial completo está disponible aquí:\n{link}"; "lng_new_version_wrap" = "Telegram Desktop ha sido actualizada a la versión {version}\n\n{changes}\n\nEl historial completo está disponible aquí:\n{link}";
"lng_new_version_minor" = "— Corrección de errores y otras mejoras menores"; "lng_new_version_minor" = "— Corrección de errores y otras mejoras menores";
"lng_new_version_text" = "BOTS 2.0\n\n— Presentamos la API para bots 2.0, la actualización más grande en nuestra plataforma para bots desde junio de 2015.\n— Desde ahora, los bots pueden actualizar los mensajes existentes sobre la marcha, al interactuar con ellos.\n— Los nuevos teclados integrados con retrollamada, botones para abrir URL o cambiar al modo integrado, ayudan a crear una interfaz fluida.\n— Ahora los bots integrados pueden enviar todos los adjuntos soportados en Telegram (vídeos, música, stickers, archivos, etc.).\n— Prueba estos ejemplos de bots para que veas lo que viene: @music, @sticker, @youtube, @foursquare\n\nMás en: {link}"; "lng_new_version_text" = "— Mejoras visuales";
"lng_menu_insert_unicode" = "Insertar caracteres de control Unicode"; "lng_menu_insert_unicode" = "Insertar caracteres de control Unicode";

View File

@ -190,7 +190,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
"lng_signin_sure_reset" = "Attenzione!\n\nPerderai tutte le chat e i messaggi, insieme a tutti i media e i file condivisi!\n\nVuoi ripristinare il tuo account?"; "lng_signin_sure_reset" = "Attenzione!\n\nPerderai tutte le chat e i messaggi, insieme a tutti i media e i file condivisi!\n\nVuoi ripristinare il tuo account?";
"lng_signin_reset" = "Ripristina"; "lng_signin_reset" = "Ripristina";
"lng_signup_title" = "Informazioni e foto"; "lng_signup_title" = "Info e foto";
"lng_signup_desc" = "Inserisci il tuo nome e\ncarica una foto."; "lng_signup_desc" = "Inserisci il tuo nome e\ncarica una foto.";
"lng_signup_firstname" = "Nome"; "lng_signup_firstname" = "Nome";
@ -225,7 +225,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
"lng_username_link" = "Questo link apre una chat con te:"; "lng_username_link" = "Questo link apre una chat con te:";
"lng_username_copied" = "Link copiato negli appunti."; "lng_username_copied" = "Link copiato negli appunti.";
"lng_settings_section_contact_info" = "Informazioni di contatto"; "lng_settings_section_contact_info" = "Info contatto";
"lng_settings_phone_number" = "Numero di telefono:"; "lng_settings_phone_number" = "Numero di telefono:";
"lng_settings_username" = "Username:"; "lng_settings_username" = "Username:";
"lng_settings_choose_username" = "Scegli username"; "lng_settings_choose_username" = "Scegli username";
@ -410,7 +410,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
"lng_profile_edit_public_link" = "Modifica link pubblico"; "lng_profile_edit_public_link" = "Modifica link pubblico";
"lng_profile_participants_section" = "Membri"; "lng_profile_participants_section" = "Membri";
"lng_profile_info" = "Info contatto"; "lng_profile_info" = "Info contatto";
"lng_profile_group_info" = "Nome gruppo"; "lng_profile_group_info" = "Info gruppo";
"lng_profile_channel_info" = "Info canale"; "lng_profile_channel_info" = "Info canale";
"lng_profile_add_contact" = "Aggiungi contatto"; "lng_profile_add_contact" = "Aggiungi contatto";
"lng_profile_edit_contact" = "Modifica"; "lng_profile_edit_contact" = "Modifica";
@ -688,7 +688,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
"lng_cant_send_to_not_contact" = "Spiacenti, ma al momento puoi scrivere\nsolo ai contatti reciproci.\n{more_info}"; "lng_cant_send_to_not_contact" = "Spiacenti, ma al momento puoi scrivere\nsolo ai contatti reciproci.\n{more_info}";
"lng_cant_invite_not_contact" = "Spiacenti, ma al momento puoi aggiungere\nai gruppi solo contatti reciproci.\n{more_info}"; "lng_cant_invite_not_contact" = "Spiacenti, ma al momento puoi aggiungere\nai gruppi solo contatti reciproci.\n{more_info}";
"lng_cant_invite_not_contact_channel" = "Spiacenti, ma al momento puoi aggiungere\nai canali solo contatti reciproci.\n{more_info}"; "lng_cant_invite_not_contact_channel" = "Spiacenti, ma al momento puoi aggiungere\nai canali solo contatti reciproci.\n{more_info}";
"lng_cant_more_info" = "Più info »"; "lng_cant_more_info" = "Maggiori info »";
"lng_cant_invite_banned" = "Spiacenti, solo l'amministratore può aggiungere questo utente."; "lng_cant_invite_banned" = "Spiacenti, solo l'amministratore può aggiungere questo utente.";
"lng_cant_invite_privacy" = "Spiacenti, non puoi aggiungere questo utente ai gruppi a causa delle sue impostazioni di privacy."; "lng_cant_invite_privacy" = "Spiacenti, non puoi aggiungere questo utente ai gruppi a causa delle sue impostazioni di privacy.";
"lng_cant_invite_privacy_channel" = "Spiacenti, non puoi aggiungere questo utente ai canali a causa delle sue impostazioni di privacy."; "lng_cant_invite_privacy_channel" = "Spiacenti, non puoi aggiungere questo utente ai canali a causa delle sue impostazioni di privacy.";
@ -893,7 +893,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
"lng_new_version_wrap" = "Telegram Desktop si è aggiornato alla versione {version}\n\n{changes}\n\nLa cronologia degli aggiornamenti è disponibile qui:\n{link}"; "lng_new_version_wrap" = "Telegram Desktop si è aggiornato alla versione {version}\n\n{changes}\n\nLa cronologia degli aggiornamenti è disponibile qui:\n{link}";
"lng_new_version_minor" = "— Risoluzione di problemi e altri miglioramenti minori"; "lng_new_version_minor" = "— Risoluzione di problemi e altri miglioramenti minori";
"lng_new_version_text" = "BOT 2.0,\n\n— Introdotta l'API dei Bot 2.0, il più grande aggiornamento della nostra piattaforma da Giugno 2015.\n— I bot possono ora aggiornare i messaggi esistenti quando interagisci con loro.\n— Nuove tastiere per i bot inline con pulsanti callback (per non far inviare nuovi messaggi al bot), 'apri URL' o 'passa a modalità inline' per creare un'interfaccia senza interruzioni.\n— I bot inline possono ora inviare qualsiasi tipo di allegato supportato su Telegram (video,musica,sticker,file,etc.).\n— Prova questi bot di esempio per vedere cosa è in arrivo a breve: @music, @sticker, @youtube, @foursquare\n\nPiù informazioni: {link}"; "lng_new_version_text" = "— Miglioramenti visivi";
"lng_menu_insert_unicode" = "Inserisci carattere di controllo Unicode"; "lng_menu_insert_unicode" = "Inserisci carattere di controllo Unicode";

View File

@ -400,7 +400,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
"lng_profile_chat_unaccessible" = "그룹에 접근할 수 없습니다."; "lng_profile_chat_unaccessible" = "그룹에 접근할 수 없습니다.";
"lng_topbar_info" = "정보"; "lng_topbar_info" = "정보";
"lng_profile_about_section" = "취소"; "lng_profile_about_section" = "정보";
"lng_profile_description_section" = "설명"; "lng_profile_description_section" = "설명";
"lng_profile_settings_section" = "환경설정"; "lng_profile_settings_section" = "환경설정";
"lng_profile_actions_section" = "동작"; "lng_profile_actions_section" = "동작";
@ -730,7 +730,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
"lng_user_action_record_video" = "{user}님이 녹화중입니다"; "lng_user_action_record_video" = "{user}님이 녹화중입니다";
"lng_send_action_upload_video" = "비디오 전송 중"; "lng_send_action_upload_video" = "비디오 전송 중";
"lng_user_action_upload_video" = "{user}님이 비디오를 전송 중입니다."; "lng_user_action_upload_video" = "{user}님이 비디오를 전송 중입니다.";
"lng_send_action_record_audio" = "음 메시지 녹음 중"; "lng_send_action_record_audio" = "음 메시지 녹음 중";
"lng_user_action_record_audio" = "{user}님이 오디오를 녹음 중입니다"; "lng_user_action_record_audio" = "{user}님이 오디오를 녹음 중입니다";
"lng_send_action_upload_audio" = "음성 메시지 전송 중"; "lng_send_action_upload_audio" = "음성 메시지 전송 중";
"lng_user_action_upload_audio" = "{user}님이 음성 메시지는 전송 중입니다"; "lng_user_action_upload_audio" = "{user}님이 음성 메시지는 전송 중입니다";
@ -893,7 +893,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
"lng_new_version_wrap" = "텔레그램 데스크탑은 {version} 버전으로 업데이트 되었습니다.\n\n{changes}\n\n전체 버전 히스토리는 아래에서 확인 가능합니다:\n{link}"; "lng_new_version_wrap" = "텔레그램 데스크탑은 {version} 버전으로 업데이트 되었습니다.\n\n{changes}\n\n전체 버전 히스토리는 아래에서 확인 가능합니다:\n{link}";
"lng_new_version_minor" = "— 버그 수정 및 일부 기능 향상"; "lng_new_version_minor" = "— 버그 수정 및 일부 기능 향상";
"lng_new_version_text" = "봇 API 2.0\n\n— 봇 API 2.0을 소개합니다, 2015년 6월 이후로 가장 큰 봇 플랫폼 업데이트입니다.\n— 봇을 활용하여 기존 송신한 메시지에 대한 업데이트가 가능합니다.\n— 새로운 Inline 키보드를 소개합니다, 콜백, URL열기 혹은 inline모드 전환 버튼으로 매끄러운 인터페이스를 도와줍니다.\n— Inline 봇은 텔레그램에서 활용 가능한 모든 첨부파일을 전송 할 수 있습니다. (비디오, 음악, 스티커, 파일등)\n— 샘플 봇을 활용하여 미리 업데이트 기능을 활용해보세요 : @music, @sticker, @youtoube, @foursquare\n\n봇에 대한 자세한 설명: {link}"; "lng_new_version_text" = "— 비주얼 향상";
"lng_menu_insert_unicode" = "유니코드 문자를 입력하세요."; "lng_menu_insert_unicode" = "유니코드 문자를 입력하세요.";

View File

@ -893,7 +893,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
"lng_new_version_wrap" = "Telegram is bijgewerkt naar versie {version}\n\n{changes} \n\nVolledige versiegeschiedenis is hier te vinden:\n{link}"; "lng_new_version_wrap" = "Telegram is bijgewerkt naar versie {version}\n\n{changes} \n\nVolledige versiegeschiedenis is hier te vinden:\n{link}";
"lng_new_version_minor" = "— Probleemoplossing en andere kleine verbeteringen"; "lng_new_version_minor" = "— Probleemoplossing en andere kleine verbeteringen";
"lng_new_version_text" = "BOTS 2.0\n\n— Maak kennis met BOT API 2.0, onze grootste update voor het bot-platform sinds juni 2015.\n— Nieuwe Inline-keyboards met terugroep-functie, 'Open URL' of 'omschakelen naar inline'-knoppen voor een nog betere integratie.\n— Bots kunnen nu berichten bijwerken, direct tijdens je interactie met hen.\n— Inline-bots kunnen nu alle bijlagen sturen die worden ondersteund door Telegram (video's, muziek, stickers, bestanden, etc.).\n— Probeer deze voorbeeldbots uit voor een voorproefje: @music, @sticker, @youtube, @foursquare\n\nMeer over de nieuwe bots: {link}"; "lng_new_version_text" = "— Visuele verbeteringen";
"lng_menu_insert_unicode" = "Unicode-besturingsteken invoegen"; "lng_menu_insert_unicode" = "Unicode-besturingsteken invoegen";

View File

@ -893,7 +893,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
"lng_new_version_wrap" = "Telegram Desktop foi atualizado para a versão {version}\n\n{changes}\n\nHistórico completo de mudanças disponível aqui:\n{link}"; "lng_new_version_wrap" = "Telegram Desktop foi atualizado para a versão {version}\n\n{changes}\n\nHistórico completo de mudanças disponível aqui:\n{link}";
"lng_new_version_minor" = "— Resolução de bugs e outras melhorias menores"; "lng_new_version_minor" = "— Resolução de bugs e outras melhorias menores";
"lng_new_version_text" = "BOTS 2.0\n\n— Apresentamos a API para bots 2.0, a maior atualização de nossa plataforma para bots desde junho de 2015.\n— A partir de agora, os bots podem atualizar as mensagens existentes em tempo real, assim como interagir com elas.\n— Os novos teclados integrados com callback, botões para 'Abrir URL' ou 'Alterar para modo integrado', ajudam a criar uma interface fluída.\n— Os bots integrados agora podem enviar qualquer tipo de anexo suportado no Telegram (vídeos, músicas, stickers, arquivos, etc.).\n— Tente usar os bots de exemplos para ver o que está por vir: @music, @sticker, @youtube, @foursquare\n\nMais em: {link}"; "lng_new_version_text" = "— Melhorias no visual";
"lng_menu_insert_unicode" = "Inserir caractere de controle Unicode"; "lng_menu_insert_unicode" = "Inserir caractere de controle Unicode";

View File

@ -0,0 +1,28 @@
set -e
FullExecPath=$PWD
pushd `dirname $0` > /dev/null
FullScriptPath=`pwd`
popd > /dev/null
if [ ! -d "$FullScriptPath/../../../../TelegramPrivate" ]; then
echo ""
echo "This script is for building the production version of Telegram Desktop."
echo ""
echo "For building custom versions please visit the build instructions page at:"
echo "https://github.com/telegramdesktop/tdesktop/#build-instructions"
exit
fi
Error () {
cd $FullExecPath
echo "$1"
exit 1
}
cd $FullScriptPath/../../../../
while IFS='' read -r line || [[ -n "$line" ]]; do
tx pull -f -l $line
done < tdesktop/Telegram/Resources/langs/list
tx push -s
cd $FullExecPath

File diff suppressed because it is too large Load Diff

View File

@ -1,412 +0,0 @@
/*
This file is part of Telegram Desktop,
the official desktop version of Telegram messaging app, see https://telegram.org
Telegram Desktop is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
It is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
In addition, as a special exception, the copyright holders give permission
to link the code of portions of this program with the OpenSSL library.
Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
*/
textStyle {
linkFlags: font;
linkFlagsOver: font;
linkFg: color;
linkFgDown: color;
monoFg: color;
selectBg: color;
selectOverlay: color;
lineHeight: number;
}
linkButton {
color: color;
overColor: color;
downColor: color;
font: font;
overFont: font;
}
sysButton {
size: size;
img: sprite;
color: color;
overColor: color;
duration: number;
}
flatButton {
color: color;
overColor: color;
downColor: color;
bgColor: color;
overBgColor: color;
downBgColor: color;
width: number;
height: number;
textTop: number;
overTextTop: number;
downTextTop: number;
font: font;
overFont: font;
duration: number;
cursor: cursor;
}
iconedButton {
icon: sprite;
iconPos: point;
downIcon: sprite;
downIconPos: point;
color: color;
bgColor: color;
overBgColor: color;
width: number;
height: number;
font: font;
opacity: number;
overOpacity: number;
textPos: point;
downTextPos: point;
duration: number;
cursor: cursor;
}
flatCheckbox {
textColor: color;
bgColor: color;
disColor: color;
width: number;
height: number;
textTop: number;
textLeft: number;
font: font;
duration: number;
bgFunc: transition;
cursor: cursor;
disabledCursor: cursor;
imageRect: sprite;
chkImageRect: sprite;
overImageRect: sprite;
chkOverImageRect: sprite;
disImageRect: sprite;
chkDisImageRect: sprite;
imagePos: point;
}
flatInput {
textColor: color;
bgColor: color;
bgActive: color;
width: number;
height: number;
textMrg: margins;
align: align;
font: font;
cursor: cursor;
imgRect: sprite;
imgPos: point;
borderWidth: number;
borderColor: color;
borderActive: color;
borderError: color;
phColor: color;
phFocusColor: color;
phPos: point;
phAlign: align;
phShift: number;
phDuration: number;
phLeftFunc: transition;
phAlphaFunc: transition;
phColorFunc: transition;
}
flatTextarea {
textColor: color;
bgColor: color;
width: number;
textMrg: margins;
align: align;
font: font;
cursor: cursor;
phColor: color;
phFocusColor: color;
phPos: point;
phAlign: align;
phShift: number;
phDuration: number;
phLeftFunc: transition;
phAlphaFunc: transition;
phColorFunc: transition;
}
flatScroll {
barColor: color;
bgColor: color;
barOverColor: color;
bgOverColor: color;
round: number;
width: number;
minHeight: number;
deltax: number;
deltat: number;
deltab: number;
topsh: number;
bottomsh: number;
shColor: color;
duration: number;
hiding: number;
}
countryInput {
width: number;
height: number;
top: number;
bgColor: color;
ptrSize: size;
textMrg: margins;
font: font;
align: align;
}
slider {
color: color;
thikness: number;
width: number;
bar: sprite;
}
flatLabel {
font: font;
minWidth: number;
width: number;
align: align;
}
switcher {
border: number;
borderColor: color;
bgColor: color;
bgHovered: color;
bgActive: color;
height: number;
font: font;
textColor: color;
activeColor: color;
duration: number;
}
dropdown {
border: number;
borderColor: color;
padding: margins;
shadow: sprite;
shadowShift: number;
duration: number;
width: number;
}
PopupMenu {
skip: number;
shadow: sprite;
shadowShift: number;
itemBg: color;
itemBgOver: color;
itemFg: color;
itemFgOver: color;
itemFgDisabled: color;
itemFgShortcut: color;
itemFgShortcutOver: color;
itemFgShortcutDisabled: color;
itemPadding: margins;
itemFont: font;
separatorPadding: margins;
separatorWidth: number;
separatorFg: color;
arrow: sprite;
duration: number;
widthMin: number;
widthMax: number;
}
Tooltip {
textBg: color;
textFg: color;
textFont: font;
textBorder: color;
textPadding: margins;
shift: point;
skip: number;
widthMax: number;
linesMax: number;
}
botKeyboardButton {
margin: number;
padding: number;
height: number;
textTop: number;
downTextTop: number;
}
BoxButton {
textFg: color;
textFgOver: color;
textBg: color; // rect of textBg with rounded rect of textBgOver upon it
textBgOver: color;
width: number;
height: number;
textTop: number;
font: font;
duration: number;
}
Checkbox {
textFg: color;
textBg: color;
checkFg: color;
checkFgOver: color;
checkFgActive: color;
width: number;
height: number;
textPosition: point;
diameter: number;
thickness: number;
checkIcon: sprite;
font: font;
duration: number;
}
Radiobutton {
textFg: color;
textBg: color;
checkFg: color;
checkFgOver: color;
checkFgActive: color;
width: number;
height: number;
textPosition: point;
diameter: number;
thickness: number;
checkSkip: number;
font: font;
duration: number;
}
InputArea {
textFg: color;
textMargins: margins;
placeholderFg: color;
placeholderFgActive: color;
placeholderMargins: margins;
placeholderAlign: align;
placeholderShift: number;
duration: number;
borderFg: color;
borderFgActive: color;
borderFgError: color;
border: number;
borderActive: number;
borderError: number;
font: font;
width: number;
heightMin: number;
heightMax: number;
}
InputField {
textFg: color;
textMargins: margins;
textAlign: align;
placeholderFg: color;
placeholderFgActive: color;
placeholderMargins: margins;
placeholderAlign: align;
placeholderShift: number;
duration: number;
borderFg: color;
borderFgActive: color;
borderFgError: color;
border: number;
borderActive: number;
borderError: number;
font: font;
width: number;
height: number;
iconSprite: sprite;
iconPosition: point;
}
PeerAvatarButton {
size: number;
photoSize: number;
}

View File

@ -1,80 +1,80 @@
// Microsoft Visual C++ generated resource script. // Microsoft Visual C++ generated resource script.
// //
#include "resource.h" #include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS #define APSTUDIO_READONLY_SYMBOLS
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
// Generated from the TEXTINCLUDE 2 resource. // Generated from the TEXTINCLUDE 2 resource.
// //
#include "winres.h" #include "winres.h"
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS #undef APSTUDIO_READONLY_SYMBOLS
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// English (United States) resources // English (United States) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252) #pragma code_page(1252)
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
// Icon // Icon
// //
// Icon with lowest ID value placed first to ensure application icon // Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems. // remains consistent on all systems.
IDI_ICON1 ICON "Resources\\art\\icon256.ico" IDI_ICON1 ICON "..\\art\\icon256.ico"
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
// Version // Version
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,9,45,0 FILEVERSION 0,9,48,0
PRODUCTVERSION 0,9,45,0 PRODUCTVERSION 0,9,48,0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
#else #else
FILEFLAGS 0x0L FILEFLAGS 0x0L
#endif #endif
FILEOS 0x40004L FILEOS 0x40004L
FILETYPE 0x0L FILETYPE 0x0L
FILESUBTYPE 0x0L FILESUBTYPE 0x0L
BEGIN BEGIN
BLOCK "StringFileInfo" BLOCK "StringFileInfo"
BEGIN BEGIN
BLOCK "040904b0" BLOCK "040904b0"
BEGIN BEGIN
VALUE "CompanyName", "Telegram Messenger LLP" VALUE "CompanyName", "Telegram Messenger LLP"
VALUE "FileVersion", "0.9.45.0" VALUE "FileVersion", "0.9.48.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2016" VALUE "LegalCopyright", "Copyright (C) 2014-2016"
VALUE "ProductName", "Telegram Desktop" VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "0.9.45.0" VALUE "ProductVersion", "0.9.48.0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"
BEGIN BEGIN
VALUE "Translation", 0x409, 1200 VALUE "Translation", 0x409, 1200
END END
END END
#endif // English (United States) resources #endif // English (United States) resources
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED #ifndef APSTUDIO_INVOKED
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
// Generated from the TEXTINCLUDE 3 resource. // Generated from the TEXTINCLUDE 3 resource.
// //
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED #endif // not APSTUDIO_INVOKED

View File

@ -0,0 +1,72 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource1.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (United States) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,9,48,0
PRODUCTVERSION 0,9,48,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x0L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Telegram Messenger LLP"
VALUE "FileDescription", "Telegram Updater"
VALUE "FileVersion", "0.9.48.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2016"
VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "0.9.48.0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@ -391,7 +391,7 @@ bool genLang(const QString &lang_in, const QString &lang_out) {
th.setCodec("ISO 8859-1"); th.setCodec("ISO 8859-1");
th << "\ th << "\
/*\n\ /*\n\
Created from \'/Resources/lang.strings\' by \'/MetaLang\' project\n\ Created from \'/Resources/langs/lang.strings\' by \'/MetaLang\' project\n\
\n\ \n\
WARNING! All changes made in this file will be lost!\n\ WARNING! All changes made in this file will be lost!\n\
\n\ \n\
@ -475,7 +475,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org\n\
tcpp << "\ tcpp << "\
/*\n\ /*\n\
Created from \'/Resources/lang.strings\' by \'/MetaLang\' project\n\ Created from \'/Resources/langs/lang.strings\' by \'/MetaLang\' project\n\
\n\ \n\
WARNING! All changes made in this file will be lost!\n\ WARNING! All changes made in this file will be lost!\n\
\n\ \n\

View File

@ -35,7 +35,7 @@ Q_IMPORT_PLUGIN(QWbmpPlugin)
Q_IMPORT_PLUGIN(QWebpPlugin) Q_IMPORT_PLUGIN(QWebpPlugin)
#endif #endif
bool DevChannel = false; bool AlphaChannel = false;
quint64 BetaVersion = 0; quint64 BetaVersion = 0;
const char *PublicKey = "\ const char *PublicKey = "\
@ -46,7 +46,7 @@ BZpkIfKaRcl6XzNJiN28cVwO1Ui5JSa814UAiDHzWUqCaXUiUEQ6NmNTneiGx2sQ\n\
-----END RSA PUBLIC KEY-----\ -----END RSA PUBLIC KEY-----\
"; ";
const char *PublicDevKey = "\ const char *PublicAlphaKey = "\
-----BEGIN RSA PUBLIC KEY-----\n\ -----BEGIN RSA PUBLIC KEY-----\n\
MIGJAoGBALWu9GGs0HED7KG7BM73CFZ6o0xufKBRQsdnq3lwA8nFQEvmdu+g/I1j\n\ MIGJAoGBALWu9GGs0HED7KG7BM73CFZ6o0xufKBRQsdnq3lwA8nFQEvmdu+g/I1j\n\
0LQ+0IQO7GW4jAgzF/4+soPDb6uHQeNFrlVx1JS9DZGhhjZ5rf65yg11nTCIHZCG\n\ 0LQ+0IQO7GW4jAgzF/4+soPDb6uHQeNFrlVx1JS9DZGhhjZ5rf65yg11nTCIHZCG\n\
@ -55,7 +55,7 @@ w/CVnbwQOw0g5GBwwFV3r0uTTvy44xx8XXxk+Qknu4eBCsmrAFNnAgMBAAE=\n\
"; ";
extern const char *PrivateKey; extern const char *PrivateKey;
extern const char *PrivateDevKey; extern const char *PrivateAlphaKey;
#include "../../../../TelegramPrivate/packer_private.h" // RSA PRIVATE KEYS for update signing #include "../../../../TelegramPrivate/packer_private.h" // RSA PRIVATE KEYS for update signing
#include "../../../../TelegramPrivate/beta_private.h" // private key for beta version file generation #include "../../../../TelegramPrivate/beta_private.h" // private key for beta version file generation
@ -171,12 +171,12 @@ int main(int argc, char *argv[])
if (remove.isEmpty()) remove = info.canonicalPath() + "/"; if (remove.isEmpty()) remove = info.canonicalPath() + "/";
} else if (string("-version") == argv[i] && i + 1 < argc) { } else if (string("-version") == argv[i] && i + 1 < argc) {
version = QString(argv[i + 1]).toInt(); version = QString(argv[i + 1]).toInt();
} else if (string("-dev") == argv[i]) { } else if (string("-alpha") == argv[i]) {
DevChannel = true; AlphaChannel = true;
} else if (string("-beta") == argv[i] && i + 1 < argc) { } else if (string("-beta") == argv[i] && i + 1 < argc) {
BetaVersion = QString(argv[i + 1]).toULongLong(); BetaVersion = QString(argv[i + 1]).toULongLong();
if (BetaVersion > version * 1000ULL && BetaVersion < (version + 1) * 1000ULL) { if (BetaVersion > version * 1000ULL && BetaVersion < (version + 1) * 1000ULL) {
DevChannel = false; AlphaChannel = false;
BetaSignature = countBetaVersionSignature(BetaVersion); BetaSignature = countBetaVersionSignature(BetaVersion);
if (BetaSignature.isEmpty()) { if (BetaSignature.isEmpty()) {
return -1; return -1;
@ -434,7 +434,7 @@ int main(int argc, char *argv[])
uint32 siglen = 0; uint32 siglen = 0;
cout << "Signing..\n"; cout << "Signing..\n";
RSA *prKey = PEM_read_bio_RSAPrivateKey(BIO_new_mem_buf(const_cast<char*>((DevChannel || BetaVersion) ? PrivateDevKey : PrivateKey), -1), 0, 0, 0); RSA *prKey = PEM_read_bio_RSAPrivateKey(BIO_new_mem_buf(const_cast<char*>((AlphaChannel || BetaVersion) ? PrivateAlphaKey : PrivateKey), -1), 0, 0, 0);
if (!prKey) { if (!prKey) {
cout << "Could not read RSA private key!\n"; cout << "Could not read RSA private key!\n";
return -1; return -1;
@ -457,7 +457,7 @@ int main(int argc, char *argv[])
} }
cout << "Checking signature..\n"; cout << "Checking signature..\n";
RSA *pbKey = PEM_read_bio_RSAPublicKey(BIO_new_mem_buf(const_cast<char*>((DevChannel || BetaVersion) ? PublicDevKey : PublicKey), -1), 0, 0, 0); RSA *pbKey = PEM_read_bio_RSAPublicKey(BIO_new_mem_buf(const_cast<char*>((AlphaChannel || BetaVersion) ? PublicAlphaKey : PublicKey), -1), 0, 0, 0);
if (!pbKey) { if (!pbKey) {
cout << "Could not read RSA public key!\n"; cout << "Could not read RSA public key!\n";
return -1; return -1;

View File

@ -174,12 +174,15 @@ void Application::socketError(QLocalSocket::LocalSocketError e) {
} }
_localSocket.close(); _localSocket.close();
// Local server does not work in WinRT build.
#ifndef Q_OS_WINRT
psCheckLocalSocket(_localServerName); psCheckLocalSocket(_localServerName);
if (!_localServer.listen(_localServerName)) { if (!_localServer.listen(_localServerName)) {
LOG(("Failed to start listening to %1 server, error %2").arg(_localServerName).arg(int(_localServer.serverError()))); LOG(("Failed to start listening to %1 server, error %2").arg(_localServerName).arg(int(_localServer.serverError())));
return App::quit(); return App::quit();
} }
#endif // !Q_OS_WINRT
#ifndef TDESKTOP_DISABLE_AUTOUPDATE #ifndef TDESKTOP_DISABLE_AUTOUPDATE
if (!cNoStartUpdate() && checkReadyUpdate()) { if (!cNoStartUpdate() && checkReadyUpdate()) {
@ -464,8 +467,8 @@ void Application::startUpdateCheck(bool forceWait) {
QUrl url(cUpdateURL()); QUrl url(cUpdateURL());
if (cBetaVersion()) { if (cBetaVersion()) {
url.setQuery(qsl("version=%1&beta=%2").arg(AppVersion).arg(cBetaVersion())); url.setQuery(qsl("version=%1&beta=%2").arg(AppVersion).arg(cBetaVersion()));
} else if (cDevVersion()) { } else if (cAlphaVersion()) {
url.setQuery(qsl("version=%1&dev=1").arg(AppVersion)); url.setQuery(qsl("version=%1&alpha=1").arg(AppVersion));
} else { } else {
url.setQuery(qsl("version=%1").arg(AppVersion)); url.setQuery(qsl("version=%1").arg(AppVersion));
} }
@ -1028,7 +1031,7 @@ void AppClass::checkMapVersion() {
if (Local::oldMapVersion() < AppVersion) { if (Local::oldMapVersion() < AppVersion) {
if (Local::oldMapVersion()) { if (Local::oldMapVersion()) {
QString versionFeatures; QString versionFeatures;
if ((cDevVersion() || cBetaVersion()) && Local::oldMapVersion() < 9041) { if ((cAlphaVersion() || cBetaVersion()) && Local::oldMapVersion() < 9041) {
versionFeatures = QString::fromUtf8("\xe2\x80\x94 Select and copy text in photo / video captions and web page previews\n\xe2\x80\x94 Media player shortcuts are enabled only when player is opened"); versionFeatures = QString::fromUtf8("\xe2\x80\x94 Select and copy text in photo / video captions and web page previews\n\xe2\x80\x94 Media player shortcuts are enabled only when player is opened");
// versionFeatures = langNewVersionText(); // versionFeatures = langNewVersionText();
} else if (Local::oldMapVersion() < 9041) { } else if (Local::oldMapVersion() < 9041) {
@ -1037,7 +1040,7 @@ void AppClass::checkMapVersion() {
versionFeatures = lang(lng_new_version_minor).trimmed(); versionFeatures = lang(lng_new_version_minor).trimmed();
} }
if (!versionFeatures.isEmpty()) { if (!versionFeatures.isEmpty()) {
versionFeatures = lng_new_version_wrap(lt_version, QString::fromStdWString(AppVersionStr), lt_changes, versionFeatures, lt_link, qsl("https://desktop.telegram.org/#changelog")); versionFeatures = lng_new_version_wrap(lt_version, QString::fromLatin1(AppVersionStr.c_str()), lt_changes, versionFeatures, lt_link, qsl("https://desktop.telegram.org/#changelog"));
_window->serviceNotification(versionFeatures); _window->serviceNotification(versionFeatures);
} }
} }

View File

@ -779,9 +779,9 @@ void AudioCapture::stop(bool needResult) {
} }
bool AudioCapture::check() { bool AudioCapture::check() {
if (const ALCchar *def = alcGetString(0, ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER)) { if (auto defaultDevice = alcGetString(0, ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER)) {
if (ALCdevice *dev = alcCaptureOpenDevice(def, AudioVoiceMsgFrequency, AL_FORMAT_MONO16, AudioVoiceMsgFrequency / 5)) { if (auto device = alcCaptureOpenDevice(defaultDevice, AudioVoiceMsgFrequency, AL_FORMAT_MONO16, AudioVoiceMsgFrequency / 5)) {
alcCaptureCloseDevice(dev); alcCaptureCloseDevice(device);
return _checkALCError(); return _checkALCError();
} }
} }

View File

@ -276,15 +276,15 @@ void UpdateChecker::unpackUpdate() {
return fatalFail(); return fatalFail();
} }
RSA *pbKey = PEM_read_bio_RSAPublicKey(BIO_new_mem_buf(const_cast<char*>(DevVersion ? UpdatesPublicDevKey : UpdatesPublicKey), -1), 0, 0, 0); RSA *pbKey = PEM_read_bio_RSAPublicKey(BIO_new_mem_buf(const_cast<char*>(AppAlphaVersion ? UpdatesPublicAlphaKey : UpdatesPublicKey), -1), 0, 0, 0);
if (!pbKey) { if (!pbKey) {
LOG(("Update Error: cant read public rsa key!")); LOG(("Update Error: cant read public rsa key!"));
return fatalFail(); return fatalFail();
} }
if (RSA_verify(NID_sha1, (const uchar*)(compressed.constData() + hSigLen), hShaLen, (const uchar*)(compressed.constData()), hSigLen, pbKey) != 1) { // verify signature if (RSA_verify(NID_sha1, (const uchar*)(compressed.constData() + hSigLen), hShaLen, (const uchar*)(compressed.constData()), hSigLen, pbKey) != 1) { // verify signature
RSA_free(pbKey); RSA_free(pbKey);
if (cDevVersion() || cBetaVersion()) { // try other public key, if we are in dev or beta version if (cAlphaVersion() || cBetaVersion()) { // try other public key, if we are in alpha or beta version
pbKey = PEM_read_bio_RSAPublicKey(BIO_new_mem_buf(const_cast<char*>(DevVersion ? UpdatesPublicKey : UpdatesPublicDevKey), -1), 0, 0, 0); pbKey = PEM_read_bio_RSAPublicKey(BIO_new_mem_buf(const_cast<char*>(AppAlphaVersion ? UpdatesPublicKey : UpdatesPublicAlphaKey), -1), 0, 0, 0);
if (!pbKey) { if (!pbKey) {
LOG(("Update Error: cant read public rsa key!")); LOG(("Update Error: cant read public rsa key!"));
return fatalFail(); return fatalFail();

View File

@ -31,7 +31,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#include "application.h" #include "application.h"
AboutBox::AboutBox() : AbstractBox(st::aboutWidth) AboutBox::AboutBox() : AbstractBox(st::aboutWidth)
, _version(this, lng_about_version(lt_version, QString::fromWCharArray(AppVersionStr) + (cDevVersion() ? " dev" : "") + (cBetaVersion() ? qsl(" beta %1").arg(cBetaVersion()) : QString())), st::aboutVersionLink) , _version(this, lng_about_version(lt_version, QString::fromLatin1(AppVersionStr.c_str()) + (cAlphaVersion() ? " alpha" : "") + (cBetaVersion() ? qsl(" beta %1").arg(cBetaVersion()) : QString())), st::aboutVersionLink)
, _text1(this, lang(lng_about_text_1), st::aboutLabel, st::aboutTextStyle) , _text1(this, lang(lng_about_text_1), st::aboutLabel, st::aboutTextStyle)
, _text2(this, lang(lng_about_text_2), st::aboutLabel, st::aboutTextStyle) , _text2(this, lang(lng_about_text_2), st::aboutLabel, st::aboutTextStyle)
, _text3(this, QString(), st::aboutLabel, st::aboutTextStyle) , _text3(this, QString(), st::aboutLabel, st::aboutTextStyle)

View File

@ -20,19 +20,15 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
static const int32 AppVersion = 9045; #include "core/version.h"
static const wchar_t *AppVersionStr = L"0.9.45";
static const bool DevVersion = true;
//#define BETA_VERSION (9044000ULL) // just comment this line to build public version
static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)";
static const wchar_t *AppName = L"Telegram Desktop";
static const wchar_t *AppId = L"{53F49750-6209-4FBF-9CA8-7A333C87D1ED}"; // used in updater.cpp and Setup.iss for Windows
static const wchar_t *AppFile = L"Telegram";
#include "settings.h" #include "settings.h"
constexpr str_const AppNameOld = "Telegram Win (Unofficial)";
constexpr str_const AppName = "Telegram Desktop";
constexpr str_const AppId = "{53F49750-6209-4FBF-9CA8-7A333C87D1ED}"; // used in updater.cpp and Setup.iss for Windows
constexpr str_const AppFile = "Telegram";
enum { enum {
MTPShortBufferSize = 65535, // of ints, 256 kb MTPShortBufferSize = 65535, // of ints, 256 kb
MTPPacketSizeMax = 67108864, // 64 mb MTPPacketSizeMax = 67108864, // 64 mb
@ -271,7 +267,7 @@ BZpkIfKaRcl6XzNJiN28cVwO1Ui5JSa814UAiDHzWUqCaXUiUEQ6NmNTneiGx2sQ\n\
-----END RSA PUBLIC KEY-----\ -----END RSA PUBLIC KEY-----\
"; ";
static const char *UpdatesPublicDevKey = "\ static const char *UpdatesPublicAlphaKey = "\
-----BEGIN RSA PUBLIC KEY-----\n\ -----BEGIN RSA PUBLIC KEY-----\n\
MIGJAoGBALWu9GGs0HED7KG7BM73CFZ6o0xufKBRQsdnq3lwA8nFQEvmdu+g/I1j\n\ MIGJAoGBALWu9GGs0HED7KG7BM73CFZ6o0xufKBRQsdnq3lwA8nFQEvmdu+g/I1j\n\
0LQ+0IQO7GW4jAgzF/4+soPDb6uHQeNFrlVx1JS9DZGhhjZ5rf65yg11nTCIHZCG\n\ 0LQ+0IQO7GW4jAgzF/4+soPDb6uHQeNFrlVx1JS9DZGhhjZ5rf65yg11nTCIHZCG\n\
@ -286,16 +282,14 @@ static const int32 ApiId = 17349;
static const char *ApiHash = "344583e45741c457fe1862106095a5eb"; static const char *ApiHash = "344583e45741c457fe1862106095a5eb";
#endif #endif
#ifndef BETA_VERSION #ifndef BETA_VERSION_MACRO
#define BETA_VERSION (0) #error "Beta version macro is not defined."
#endif #endif
#if (defined CUSTOM_API_ID) && (BETA_VERSION > 0) #if (defined CUSTOM_API_ID) && (BETA_VERSION_MACRO > 0ULL)
#include "../../../TelegramPrivate/beta_private.h" // private key for downloading closed betas #include "../../../TelegramPrivate/beta_private.h" // private key for downloading closed betas
#else #else
static const char *BetaPrivateKey = ""; static const char *BetaPrivateKey = "";
#undef BETA_VERSION
#define BETA_VERSION (0)
#endif #endif
inline const char *cApiDeviceModel() { inline const char *cApiDeviceModel() {

View File

@ -213,6 +213,10 @@ private:
}; };
inline QString str_const_toString(const str_const &str) {
return QString::fromUtf8(str.c_str(), str.size());
}
template <typename T> template <typename T>
inline void accumulate_max(T &a, const T &b) { if (a < b) a = b; } inline void accumulate_max(T &a, const T &b) { if (a < b) a = b; }
@ -996,7 +1000,7 @@ public:
ComposerMetadata(uint64 mask) : size(0), last(64), _mask(mask) { ComposerMetadata(uint64 mask) : size(0), last(64), _mask(mask) {
for (int i = 0; i < 64; ++i) { for (int i = 0; i < 64; ++i) {
uint64 m = (1 << i); uint64 m = (1ULL << i);
if (_mask & m) { if (_mask & m) {
int s = ComponentWraps[i].Size; int s = ComponentWraps[i].Size;
if (s) { if (s) {

View File

@ -0,0 +1,30 @@
/*
This file is part of Telegram Desktop,
the official desktop version of Telegram messaging app, see https://telegram.org
Telegram Desktop is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
It is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
In addition, as a special exception, the copyright holders give permission
to link the code of portions of this program with the OpenSSL library.
Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
*/
#pragma once
#include "core/basic_types.h"
#define BETA_VERSION_MACRO (0ULL)
constexpr int AppVersion = 9048;
constexpr str_const AppVersionStr = "0.9.48";
constexpr bool AppAlphaVersion = false;
constexpr uint64 AppBetaVersion = BETA_VERSION_MACRO;

View File

@ -427,10 +427,10 @@ void WorkingDirReady() {
cSetDebug(true); cSetDebug(true);
} }
if (cBetaVersion()) { if (cBetaVersion()) {
cSetDevVersion(false); cSetAlphaVersion(false);
} else if (!cDevVersion() && QFile(cWorkingDir() + qsl("tdata/devversion")).exists()) { } else if (!cAlphaVersion() && QFile(cWorkingDir() + qsl("tdata/devversion")).exists()) {
cSetDevVersion(true); cSetAlphaVersion(true);
} else if (DevVersion) { } else if (AppAlphaVersion) {
QFile f(cWorkingDir() + qsl("tdata/devversion")); QFile f(cWorkingDir() + qsl("tdata/devversion"));
if (!f.exists() && f.open(QIODevice::WriteOnly)) { if (!f.exists() && f.open(QIODevice::WriteOnly)) {
f.write("1"); f.write("1");

View File

@ -1705,7 +1705,7 @@ MsgId History::inboxRead(MsgId upTo) {
} }
} }
showFrom = 0; showFrom = nullptr;
App::wnd()->notifyClear(this); App::wnd()->notifyClear(this);
clearNotifications(); clearNotifications();
@ -2177,6 +2177,9 @@ void History::clear(bool leaveItems) {
if (showFrom) { if (showFrom) {
showFrom = nullptr; showFrom = nullptr;
} }
if (lastSentMsg) {
lastSentMsg = nullptr;
}
if (scrollTopItem) { if (scrollTopItem) {
forgetScrollState(); forgetScrollState();
} }
@ -2447,6 +2450,9 @@ void HistoryBlock::removeItem(HistoryItem *item) {
if (history->showFrom == item) { if (history->showFrom == item) {
history->getNextShowFrom(this, itemIndex); history->getNextShowFrom(this, itemIndex);
} }
if (history->lastSentMsg == item) {
history->lastSentMsg = nullptr;
}
if (history->unreadBar == item) { if (history->unreadBar == item) {
history->unreadBar = nullptr; history->unreadBar = nullptr;
} }
@ -3088,8 +3094,8 @@ void HistoryItem::setId(MsgId newId) {
} }
bool HistoryItem::canEdit(const QDateTime &cur) const { bool HistoryItem::canEdit(const QDateTime &cur) const {
ChannelData *channel = _history->peer->asChannel();
int32 s = date.secsTo(cur); int32 s = date.secsTo(cur);
auto channel = _history->peer->asChannel();
if (!channel || id < 0 || date.secsTo(cur) >= Global::EditTimeLimit()) return false; if (!channel || id < 0 || date.secsTo(cur) >= Global::EditTimeLimit()) return false;
if (const HistoryMessage *msg = toHistoryMessage()) { if (const HistoryMessage *msg = toHistoryMessage()) {
@ -6458,6 +6464,17 @@ int HistoryMessageSigned::maxWidth() const {
return _signature.maxWidth(); return _signature.maxWidth();
} }
void HistoryMessageEdited::create(const QDateTime &editDate, const QDateTime &date) {
_editDate = editDate;
QString time = date.toString(cTimeFormat());
_edited.setText(st::msgDateFont, time, _textNameOptions);
}
int HistoryMessageEdited::maxWidth() const {
return _edited.maxWidth();
}
void HistoryMessageForwarded::create(const HistoryMessageVia *via) const { void HistoryMessageForwarded::create(const HistoryMessageVia *via) const {
QString text; QString text;
if (_authorOriginal != _fromOriginal) { if (_authorOriginal != _fromOriginal) {
@ -6705,6 +6722,7 @@ HistoryMessage::HistoryMessage(History *history, const MTPDmessage &msg)
if (msg.has_via_bot_id()) config.viaBotId = msg.vvia_bot_id.v; if (msg.has_via_bot_id()) config.viaBotId = msg.vvia_bot_id.v;
if (msg.has_views()) config.viewsCount = msg.vviews.v; if (msg.has_views()) config.viewsCount = msg.vviews.v;
if (msg.has_reply_markup()) config.markup = &msg.vreply_markup; if (msg.has_reply_markup()) config.markup = &msg.vreply_markup;
if (msg.has_edit_date()) config.editDate = ::date(msg.vedit_date);
createComponents(config); createComponents(config);
@ -6787,6 +6805,9 @@ void HistoryMessage::createComponents(const CreateConfig &config) {
if (isPost() && _from->isUser()) { if (isPost() && _from->isUser()) {
mask |= HistoryMessageSigned::Bit(); mask |= HistoryMessageSigned::Bit();
} }
if (wasEdited()) {
mask |= HistoryMessageEdited::Bit();
}
if (config.authorIdOriginal && config.fromIdOriginal) { if (config.authorIdOriginal && config.fromIdOriginal) {
mask |= HistoryMessageForwarded::Bit(); mask |= HistoryMessageForwarded::Bit();
} }
@ -6813,6 +6834,9 @@ void HistoryMessage::createComponents(const CreateConfig &config) {
if (auto msgsigned = Get<HistoryMessageSigned>()) { if (auto msgsigned = Get<HistoryMessageSigned>()) {
msgsigned->create(_from->asUser(), date); msgsigned->create(_from->asUser(), date);
} }
if (auto edited = Get<HistoryMessageEdited>()) {
edited->create(config.editDate, date);
}
if (auto fwd = Get<HistoryMessageForwarded>()) { if (auto fwd = Get<HistoryMessageForwarded>()) {
fwd->_authorOriginal = App::peer(config.authorIdOriginal); fwd->_authorOriginal = App::peer(config.authorIdOriginal);
fwd->_fromOriginal = App::peer(config.fromIdOriginal); fwd->_fromOriginal = App::peer(config.fromIdOriginal);
@ -6849,6 +6873,8 @@ QString formatViewsCount(int32 views) {
void HistoryMessage::initTime() { void HistoryMessage::initTime() {
if (auto msgsigned = Get<HistoryMessageSigned>()) { if (auto msgsigned = Get<HistoryMessageSigned>()) {
_timeWidth = msgsigned->maxWidth(); _timeWidth = msgsigned->maxWidth();
} else if (auto edited = Get<HistoryMessageEdited>()) {
_timeWidth = edited->maxWidth();
} else { } else {
_timeText = date.toString(cTimeFormat()); _timeText = date.toString(cTimeFormat());
_timeWidth = st::msgDateFont->width(_timeText); _timeWidth = st::msgDateFont->width(_timeText);
@ -7046,6 +7072,16 @@ void HistoryMessage::applyEdition(const MTPDmessage &message) {
if (message.has_entities()) { if (message.has_entities()) {
entities = entitiesFromMTP(message.ventities.c_vector().v); entities = entitiesFromMTP(message.ventities.c_vector().v);
} }
if (message.has_edit_date()) {
_flags |= MTPDmessage::Flag::f_edit_date;
if (!Has<HistoryMessageEdited>()) {
AddComponents(HistoryMessageEdited::Bit());
}
Get<HistoryMessageEdited>()->create(::date(message.vedit_date), date);
initTime();
}
setText(qs(message.vmessage), entities); setText(qs(message.vmessage), entities);
setMedia(message.has_media() ? (&message.vmedia) : nullptr); setMedia(message.has_media() ? (&message.vmedia) : nullptr);
setReplyMarkup(message.has_reply_markup() ? (&message.vreply_markup) : nullptr); setReplyMarkup(message.has_reply_markup() ? (&message.vreply_markup) : nullptr);
@ -7298,6 +7334,8 @@ void HistoryMessage::drawInfo(Painter &p, int32 right, int32 bottom, int32 width
if (auto msgsigned = Get<HistoryMessageSigned>()) { if (auto msgsigned = Get<HistoryMessageSigned>()) {
msgsigned->_signature.drawElided(p, dateX, dateY, _timeWidth); msgsigned->_signature.drawElided(p, dateX, dateY, _timeWidth);
} else if (auto edited = Get<HistoryMessageEdited>()) {
edited->_edited.drawElided(p, dateX, dateY, _timeWidth);
} else { } else {
p.drawText(dateX, dateY + st::msgDateFont->ascent, _timeText); p.drawText(dateX, dateY + st::msgDateFont->ascent, _timeText);
} }

View File

@ -356,6 +356,7 @@ public:
bool oldLoaded = false; bool oldLoaded = false;
bool newLoaded = true; bool newLoaded = true;
HistoryItem *lastMsg = nullptr; HistoryItem *lastMsg = nullptr;
HistoryItem *lastSentMsg = nullptr;
QDateTime lastMsgDate; QDateTime lastMsgDate;
typedef QList<HistoryItem*> NotifyQueue; typedef QList<HistoryItem*> NotifyQueue;
@ -809,6 +810,14 @@ struct HistoryMessageSigned : public BaseComponent<HistoryMessageSigned> {
Text _signature; Text _signature;
}; };
struct HistoryMessageEdited : public BaseComponent<HistoryMessageEdited> {
void create(const QDateTime &editDate, const QDateTime &date);
int maxWidth() const;
QDateTime _editDate;
Text _edited;
};
struct HistoryMessageForwarded : public BaseComponent<HistoryMessageForwarded> { struct HistoryMessageForwarded : public BaseComponent<HistoryMessageForwarded> {
void create(const HistoryMessageVia *via) const; void create(const HistoryMessageVia *via) const;
@ -1322,6 +1331,9 @@ public:
} }
bool canEdit(const QDateTime &cur) const; bool canEdit(const QDateTime &cur) const;
bool wasEdited() const {
return _flags & MTPDmessage::Flag::f_edit_date;
}
bool suggestBanReportDeleteAll() const { bool suggestBanReportDeleteAll() const {
ChannelData *channel = history()->peer->asChannel(); ChannelData *channel = history()->peer->asChannel();
@ -2774,6 +2786,7 @@ private:
PeerId authorIdOriginal = 0; PeerId authorIdOriginal = 0;
PeerId fromIdOriginal = 0; PeerId fromIdOriginal = 0;
MsgId originalId = 0; MsgId originalId = 0;
QDateTime editDate;
const MTPReplyMarkup *markup = nullptr; const MTPReplyMarkup *markup = nullptr;
}; };
void createComponentsHelper(MTPDmessage::Flags flags, MsgId replyTo, int32 viaBotId, const MTPReplyMarkup &markup); void createComponentsHelper(MTPDmessage::Flags flags, MsgId replyTo, int32 viaBotId, const MTPReplyMarkup &markup);

View File

@ -2018,7 +2018,11 @@ void HistoryInner::applyDragSelection(SelectedItems *toItems) const {
QString HistoryInner::tooltipText() const { QString HistoryInner::tooltipText() const {
if (_dragCursorState == HistoryInDateCursorState && _dragAction == NoDrag) { if (_dragCursorState == HistoryInDateCursorState && _dragAction == NoDrag) {
if (App::hoveredItem()) { if (App::hoveredItem()) {
return App::hoveredItem()->date.toString(QLocale::system().dateTimeFormat(QLocale::LongFormat)); QString dateText = App::hoveredItem()->date.toString(QLocale::system().dateTimeFormat(QLocale::LongFormat));
//if (auto edited = App::hoveredItem()->Get<HistoryMessageEdited>()) {
// dateText += '\n' + lng_edited_date(lt_date, edited->_editDate.toString(QLocale::system().dateTimeFormat(QLocale::LongFormat)));
//}
return dateText;
} }
} else if (_dragCursorState == HistoryInForwardedCursorState && _dragAction == NoDrag) { } else if (_dragCursorState == HistoryInForwardedCursorState && _dragAction == NoDrag) {
if (App::hoveredItem()) { if (App::hoveredItem()) {
@ -6916,7 +6920,13 @@ void HistoryWidget::keyPressEvent(QKeyEvent *e) {
} }
} else if (e->key() == Qt::Key_Up) { } else if (e->key() == Qt::Key_Up) {
if (!(e->modifiers() & (Qt::ShiftModifier | Qt::MetaModifier | Qt::ControlModifier))) { if (!(e->modifiers() & (Qt::ShiftModifier | Qt::MetaModifier | Qt::ControlModifier))) {
_scroll.keyPressEvent(e); if (_history && _history->lastSentMsg && _history->lastSentMsg->canEdit(::date(unixtime()))) {
if (_field.getLastText().isEmpty() && !_editMsgId && !_replyToId) {
App::contextItem(_history->lastSentMsg);
onEditMessage();
}
}
// _scroll.keyPressEvent(e);
} }
} else { } else {
e->ignore(); e->ignore();
@ -7485,6 +7495,7 @@ void HistoryWidget::cancelForwarding() {
} }
void HistoryWidget::onFieldBarCancel() { void HistoryWidget::onFieldBarCancel() {
Ui::hideLayer();
_replyForwardPressed = false; _replyForwardPressed = false;
if (_previewData && _previewData->pendingTill >= 0) { if (_previewData && _previewData->pendingTill >= 0) {
_previewCancelled = true; _previewCancelled = true;
@ -7640,6 +7651,14 @@ void HistoryWidget::updatePreview() {
void HistoryWidget::onCancel() { void HistoryWidget::onCancel() {
if (_inlineBotCancel) { if (_inlineBotCancel) {
onInlineBotCancel(); onInlineBotCancel();
} else if (_editMsgId) {
if (_replyEditMsg && textApplyEntities(_replyEditMsg->originalText(), _replyEditMsg->originalEntities()) != _field.getLastText()) {
auto box = new ConfirmBox(lang(lng_cancel_edit_post_sure), lang(lng_cancel_edit_post_yes), st::defaultBoxButton, lang(lng_cancel_edit_post_no));
connect(box, SIGNAL(confirmed()), this, SLOT(onFieldBarCancel()));
Ui::showLayer(box);
} else {
onFieldBarCancel();
}
} else if (!_attachMention.isHidden()) { } else if (!_attachMention.isHidden()) {
_attachMention.hideStart(); _attachMention.hideStart();
} else { } else {

View File

@ -2301,8 +2301,10 @@ namespace Local {
EncryptedDescriptor data(sizeof(quint64) + Serialize::stringSize(msgDraft.text) + 2 * sizeof(qint32) + Serialize::stringSize(editDraft.text) + 2 * sizeof(qint32)); EncryptedDescriptor data(sizeof(quint64) + Serialize::stringSize(msgDraft.text) + 2 * sizeof(qint32) + Serialize::stringSize(editDraft.text) + 2 * sizeof(qint32));
data.stream << quint64(peer); data.stream << quint64(peer);
data.stream << msgDraft.text << qint32(msgDraft.msgId) << qint32(msgDraft.previewCancelled ? 1 : 0); data.stream << msgDraft.text << QByteArray();
data.stream << editDraft.text << qint32(editDraft.msgId) << qint32(editDraft.previewCancelled ? 1 : 0); data.stream << qint32(msgDraft.msgId) << qint32(msgDraft.previewCancelled ? 1 : 0);
data.stream << editDraft.text << QByteArray();
data.stream << qint32(editDraft.msgId) << qint32(editDraft.previewCancelled ? 1 : 0);
FileWriteDescriptor file(i.value()); FileWriteDescriptor file(i.value());
file.writeEncrypted(data); file.writeEncrypted(data);
@ -2371,14 +2373,22 @@ namespace Local {
quint64 draftPeer = 0; quint64 draftPeer = 0;
QString msgText, editText; QString msgText, editText;
QByteArray msgTagsSerialized, editTagsSerialized;
qint32 msgReplyTo = 0, msgPreviewCancelled = 0, editMsgId = 0, editPreviewCancelled = 0; qint32 msgReplyTo = 0, msgPreviewCancelled = 0, editMsgId = 0, editPreviewCancelled = 0;
draft.stream >> draftPeer >> msgText; draft.stream >> draftPeer >> msgText;
if (draft.version >= 9048) {
draft.stream >> msgTagsSerialized;
}
if (draft.version >= 7021) { if (draft.version >= 7021) {
draft.stream >> msgReplyTo; draft.stream >> msgReplyTo;
if (draft.version >= 8001) { if (draft.version >= 8001) {
draft.stream >> msgPreviewCancelled; draft.stream >> msgPreviewCancelled;
if (!draft.stream.atEnd()) { if (!draft.stream.atEnd()) {
draft.stream >> editText >> editMsgId >> editPreviewCancelled; draft.stream >> editText;
if (draft.version >= 9048) {
draft.stream >> editTagsSerialized;
}
draft.stream >> editMsgId >> editPreviewCancelled;
} }
} }
} }

View File

@ -326,7 +326,11 @@ namespace Logs {
moveOldDataFrom = initialWorkingDir; moveOldDataFrom = initialWorkingDir;
#endif // Q_OS_LINUX && !_DEBUG #endif // Q_OS_LINUX && !_DEBUG
#endif // Q_OS_MAC || Q_OS_LINUX #elif defined Q_OS_WINRT // Q_OS_MAC || Q_OS_LINUX
} else {
cForceWorkingDir(psAppDataPath());
workingDirChosen = true;
#endif // Q_OS_WINRT
} }
LogsData = new LogsDataFields(); LogsData = new LogsDataFields();
@ -341,7 +345,10 @@ namespace Logs {
} }
cForceWorkingDir(QDir(cWorkingDir()).absolutePath() + '/'); cForceWorkingDir(QDir(cWorkingDir()).absolutePath() + '/');
// WinRT build requires the working dir to stay the same for plugin loading.
#ifndef Q_OS_WINRT
QDir().setCurrent(cWorkingDir()); QDir().setCurrent(cWorkingDir());
#endif // !Q_OS_WINRT
QDir().mkpath(cWorkingDir() + qstr("tdata")); QDir().mkpath(cWorkingDir() + qstr("tdata"));
Sandbox::WorkingDirReady(); Sandbox::WorkingDirReady();
@ -352,7 +359,7 @@ namespace Logs {
LogsData = 0; LogsData = 0;
} }
LOG(("Launched version: %1, dev: %2, beta: %3, debug mode: %4, test dc: %5").arg(AppVersion).arg(Logs::b(cDevVersion())).arg(cBetaVersion()).arg(Logs::b(cDebug())).arg(Logs::b(cTestMode()))); LOG(("Launched version: %1, alpha: %2, beta: %3, debug mode: %4, test dc: %5").arg(AppVersion).arg(Logs::b(cAlphaVersion())).arg(cBetaVersion()).arg(Logs::b(cDebug())).arg(Logs::b(cTestMode())));
LOG(("Executable dir: %1, name: %2").arg(cExeDir()).arg(cExeName())); LOG(("Executable dir: %1, name: %2").arg(cExeDir()).arg(cExeName()));
LOG(("Initial working dir: %1").arg(initialWorkingDir)); LOG(("Initial working dir: %1").arg(initialWorkingDir));
LOG(("Working dir: %1").arg(cWorkingDir())); LOG(("Working dir: %1").arg(cWorkingDir()));
@ -926,7 +933,7 @@ namespace internal {
ProcessAnnotations["Binary"] = cExeName().toUtf8().constData(); ProcessAnnotations["Binary"] = cExeName().toUtf8().constData();
ProcessAnnotations["ApiId"] = QString::number(ApiId).toUtf8().constData(); ProcessAnnotations["ApiId"] = QString::number(ApiId).toUtf8().constData();
ProcessAnnotations["Version"] = (cBetaVersion() ? qsl("%1 beta").arg(cBetaVersion()) : (cDevVersion() ? qsl("%1 dev") : qsl("%1")).arg(AppVersion)).toUtf8().constData(); ProcessAnnotations["Version"] = (cBetaVersion() ? qsl("%1 beta").arg(cBetaVersion()) : (cAlphaVersion() ? qsl("%1 alpha") : qsl("%1")).arg(AppVersion)).toUtf8().constData();
ProcessAnnotations["Launched"] = QDateTime::currentDateTime().toString("dd.MM.yyyy hh:mm:ss").toUtf8().constData(); ProcessAnnotations["Launched"] = QDateTime::currentDateTime().toString("dd.MM.yyyy hh:mm:ss").toUtf8().constData();
ProcessAnnotations["Platform"] = cPlatformString().toUtf8().constData(); ProcessAnnotations["Platform"] = cPlatformString().toUtf8().constData();
ProcessAnnotations["UserTag"] = QString::number(Sandbox::UserTag(), 16).toUtf8().constData(); ProcessAnnotations["UserTag"] = QString::number(Sandbox::UserTag(), 16).toUtf8().constData();
@ -937,10 +944,14 @@ namespace internal {
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
internal::BreakpadExceptionHandler = new google_breakpad::ExceptionHandler( internal::BreakpadExceptionHandler = new google_breakpad::ExceptionHandler(
dumpspath.toStdWString(), dumpspath.toStdWString(),
/*FilterCallback*/ 0, google_breakpad::ExceptionHandler::FilterCallback(nullptr),
internal::DumpCallback, internal::DumpCallback,
/*context*/ 0, (void*)nullptr, // callback_context
true google_breakpad::ExceptionHandler::HANDLER_ALL,
MINIDUMP_TYPE(MiniDumpNormal),
// MINIDUMP_TYPE(MiniDumpWithFullMemory | MiniDumpWithHandleData | MiniDumpWithThreadInfo | MiniDumpWithProcessThreadData | MiniDumpWithFullMemoryInfo | MiniDumpWithUnloadedModules | MiniDumpWithFullAuxiliaryState | MiniDumpIgnoreInaccessibleMemory | MiniDumpWithTokenInformation),
(const wchar_t*)nullptr, // pipe_name
(const google_breakpad::CustomClientInfo*)nullptr
); );
#elif defined Q_OS_MAC // Q_OS_WIN #elif defined Q_OS_MAC // Q_OS_WIN
@ -961,11 +972,11 @@ namespace internal {
std::string handler = (cExeDir() + cExeName() + qsl("/Contents/Helpers/crashpad_handler")).toUtf8().constData(); std::string handler = (cExeDir() + cExeName() + qsl("/Contents/Helpers/crashpad_handler")).toUtf8().constData();
std::string database = QFile::encodeName(dumpspath).constData(); std::string database = QFile::encodeName(dumpspath).constData();
if (crashpad_client.StartHandler(base::FilePath(handler), if (crashpad_client.StartHandler(base::FilePath(handler),
base::FilePath(database), base::FilePath(database),
std::string(), std::string(),
ProcessAnnotations, ProcessAnnotations,
std::vector<std::string>(), std::vector<std::string>(),
false)) { false)) {
crashpad_client.UseHandler(); crashpad_client.UseHandler();
} }
#endif // else for MAC_USE_BREAKPAD #endif // else for MAC_USE_BREAKPAD

View File

@ -1098,6 +1098,7 @@ void MainWidget::sendMessage(History *hist, const QString &text, MsgId replyTo,
QString sendingText, leftText = prepareTextWithEntities(text, leftEntities, itemTextOptions(hist, App::self()).flags); QString sendingText, leftText = prepareTextWithEntities(text, leftEntities, itemTextOptions(hist, App::self()).flags);
QString command = parseCommandFromMessage(hist, text); QString command = parseCommandFromMessage(hist, text);
HistoryItem *lastMessage = nullptr;
if (replyTo < 0) replyTo = _history->replyToId(); if (replyTo < 0) replyTo = _history->replyToId();
while (command.isEmpty() && textSplit(sendingText, sendingEntities, leftText, leftEntities, MaxMessageSize)) { while (command.isEmpty() && textSplit(sendingText, sendingEntities, leftText, leftEntities, MaxMessageSize)) {
@ -1142,10 +1143,12 @@ void MainWidget::sendMessage(History *hist, const QString &text, MsgId replyTo,
if (!sentEntities.c_vector().v.isEmpty()) { if (!sentEntities.c_vector().v.isEmpty()) {
sendFlags |= MTPmessages_SendMessage::Flag::f_entities; sendFlags |= MTPmessages_SendMessage::Flag::f_entities;
} }
hist->addNewMessage(MTP_message(MTP_flags(flags), MTP_int(newId.msg), MTP_int(showFromName ? MTP::authedId() : 0), peerToMTP(hist->peer->id), MTPnullFwdHeader, MTPint(), MTP_int(replyTo), MTP_int(unixtime()), msgText, media, MTPnullMarkup, localEntities, MTP_int(1), MTPint()), NewMessageUnread); lastMessage = hist->addNewMessage(MTP_message(MTP_flags(flags), MTP_int(newId.msg), MTP_int(showFromName ? MTP::authedId() : 0), peerToMTP(hist->peer->id), MTPnullFwdHeader, MTPint(), MTP_int(replyTo), MTP_int(unixtime()), msgText, media, MTPnullMarkup, localEntities, MTP_int(1), MTPint()), NewMessageUnread);
hist->sendRequestId = MTP::send(MTPmessages_SendMessage(MTP_flags(sendFlags), hist->peer->input, MTP_int(replyTo), msgText, MTP_long(randomId), MTPnullMarkup, sentEntities), rpcDone(&MainWidget::sentUpdatesReceived, randomId), rpcFail(&MainWidget::sendMessageFail), 0, 0, hist->sendRequestId); hist->sendRequestId = MTP::send(MTPmessages_SendMessage(MTP_flags(sendFlags), hist->peer->input, MTP_int(replyTo), msgText, MTP_long(randomId), MTPnullMarkup, sentEntities), rpcDone(&MainWidget::sentUpdatesReceived, randomId), rpcFail(&MainWidget::sendMessageFail), 0, 0, hist->sendRequestId);
} }
hist->lastSentMsg = lastMessage;
finishForwarding(hist, broadcast, silent); finishForwarding(hist, broadcast, silent);
executeParsedCommand(command); executeParsedCommand(command);

View File

@ -1110,7 +1110,7 @@ bool MainWindow::minimizeToTray() {
hide(); hide();
if (cPlatform() == dbipWindows && trayIcon && !cSeenTrayTooltip()) { if (cPlatform() == dbipWindows && trayIcon && !cSeenTrayTooltip()) {
trayIcon->showMessage(QString::fromStdWString(AppName), lang(lng_tray_icon_text), QSystemTrayIcon::Information, 10000); trayIcon->showMessage(str_const_toString(AppName), lang(lng_tray_icon_text), QSystemTrayIcon::Information, 10000);
cSetSeenTrayTooltip(true); cSetSeenTrayTooltip(true);
Local::writeSettings(); Local::writeSettings();
} }
@ -2134,7 +2134,7 @@ LastCrashedWindow::LastCrashedWindow()
{ {
excludeReportUsername(); excludeReportUsername();
if (!cDevVersion() && !cBetaVersion()) { // currently accept crash reports only from testers if (!cAlphaVersion() && !cBetaVersion()) { // currently accept crash reports only from testers
_sendingState = SendingNoReport; _sendingState = SendingNoReport;
} }
if (_sendingState != SendingNoReport) { if (_sendingState != SendingNoReport) {

View File

@ -1900,7 +1900,7 @@ int32 ConnectionPrivate::handleOneReceived(const mtpPrime *from, const mtpPrime
DEBUG_LOG(("Message Info: resend of msgs requested, ids: %1").arg(Logs::vector(ids))); DEBUG_LOG(("Message Info: resend of msgs requested, ids: %1").arg(Logs::vector(ids)));
if (!idsCount) return (badTime ? 0 : 1); if (!idsCount) return (badTime ? 0 : 1);
QVector<quint64> toResend(ids.size(), Qt::Uninitialized); QVector<quint64> toResend(ids.size());
for (int32 i = 0, l = ids.size(); i < l; ++i) { for (int32 i = 0, l = ids.size(); i < l; ++i) {
toResend[i] = ids.at(i).v; toResend[i] = ids.at(i).v;
} }

View File

@ -563,7 +563,7 @@ void PsMainWindow::psSetupTrayIcon() {
QIcon icon(QPixmap::fromImage(App::wnd()->iconLarge(), Qt::ColorOnly)); QIcon icon(QPixmap::fromImage(App::wnd()->iconLarge(), Qt::ColorOnly));
trayIcon->setIcon(icon); trayIcon->setIcon(icon);
trayIcon->setToolTip(QString::fromStdWString(AppName)); trayIcon->setToolTip(str_const_toString(AppName));
connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(toggleTray(QSystemTrayIcon::ActivationReason)), Qt::UniqueConnection); connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(toggleTray(QSystemTrayIcon::ActivationReason)), Qt::UniqueConnection);
connect(trayIcon, SIGNAL(messageClicked()), this, SLOT(showFromTray())); connect(trayIcon, SIGNAL(messageClicked()), this, SLOT(showFromTray()));
App::wnd()->updateTrayMenu(); App::wnd()->updateTrayMenu();
@ -1171,7 +1171,7 @@ QString psAppDataPath() {
} }
QString psDownloadPath() { QString psDownloadPath() {
return QStandardPaths::writableLocation(QStandardPaths::DownloadLocation) + '/' + QString::fromWCharArray(AppName) + '/'; return QStandardPaths::writableLocation(QStandardPaths::DownloadLocation) + '/' + str_const_toString(AppName) + '/';
} }
QString psCurrentExeDirectory(int argc, char *argv[]) { QString psCurrentExeDirectory(int argc, char *argv[]) {
@ -1314,7 +1314,7 @@ void psRegisterCustomScheme() {
s << "StartupWMClass=Telegram\n"; s << "StartupWMClass=Telegram\n";
s << "Type=Application\n"; s << "Type=Application\n";
s << "Categories=Network;\n"; s << "Categories=Network;\n";
s << "MimeType=application/x-xdg-protocol-tg;x-scheme-handler/tg;\n"; s << "MimeType=x-scheme-handler/tg;\n";
f.close(); f.close();
if (_psRunCommand("desktop-file-install --dir=" + escapeShell(QFile::encodeName(home + qsl(".local/share/applications"))) + " --delete-original " + escapeShell(QFile::encodeName(file)))) { if (_psRunCommand("desktop-file-install --dir=" + escapeShell(QFile::encodeName(home + qsl(".local/share/applications"))) + " --delete-original " + escapeShell(QFile::encodeName(file)))) {

View File

@ -116,7 +116,7 @@ void PsMainWindow::psSetupTrayIcon() {
icon.addPixmap(QPixmap::fromImage(psTrayIcon(true), Qt::ColorOnly), QIcon::Selected); icon.addPixmap(QPixmap::fromImage(psTrayIcon(true), Qt::ColorOnly), QIcon::Selected);
trayIcon->setIcon(icon); trayIcon->setIcon(icon);
trayIcon->setToolTip(QString::fromStdWString(AppName)); trayIcon->setToolTip(str_const_toString(AppName));
connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(toggleTray(QSystemTrayIcon::ActivationReason)), Qt::UniqueConnection); connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(toggleTray(QSystemTrayIcon::ActivationReason)), Qt::UniqueConnection);
App::wnd()->updateTrayMenu(); App::wnd()->updateTrayMenu();
} }

View File

@ -1041,7 +1041,7 @@ double objc_appkitVersion() {
QString objc_appDataPath() { QString objc_appDataPath() {
NSURL *url = [[NSFileManager defaultManager] URLForDirectory:NSApplicationSupportDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:nil]; NSURL *url = [[NSFileManager defaultManager] URLForDirectory:NSApplicationSupportDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:nil];
if (url) { if (url) {
return QString::fromUtf8([[url path] fileSystemRepresentation]) + '/' + QString::fromWCharArray(AppName) + '/'; return QString::fromUtf8([[url path] fileSystemRepresentation]) + '/' + str_const_toString(AppName) + '/';
} }
return QString(); return QString();
} }
@ -1049,7 +1049,7 @@ QString objc_appDataPath() {
QString objc_downloadPath() { QString objc_downloadPath() {
NSURL *url = [[NSFileManager defaultManager] URLForDirectory:NSDownloadsDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:nil]; NSURL *url = [[NSFileManager defaultManager] URLForDirectory:NSDownloadsDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:nil];
if (url) { if (url) {
return QString::fromUtf8([[url path] fileSystemRepresentation]) + '/' + QString::fromWCharArray(AppName) + '/'; return QString::fromUtf8([[url path] fileSystemRepresentation]) + '/' + str_const_toString(AppName) + '/';
} }
return QString(); return QString();
} }

View File

@ -1075,7 +1075,7 @@ void PsMainWindow::psSetupTrayIcon() {
QIcon icon(QPixmap::fromImage(App::wnd()->iconLarge(), Qt::ColorOnly)); QIcon icon(QPixmap::fromImage(App::wnd()->iconLarge(), Qt::ColorOnly));
trayIcon->setIcon(icon); trayIcon->setIcon(icon);
trayIcon->setToolTip(QString::fromStdWString(AppName)); trayIcon->setToolTip(str_const_toString(AppName));
connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(toggleTray(QSystemTrayIcon::ActivationReason)), Qt::UniqueConnection); connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(toggleTray(QSystemTrayIcon::ActivationReason)), Qt::UniqueConnection);
connect(trayIcon, SIGNAL(messageClicked()), this, SLOT(showFromTray())); connect(trayIcon, SIGNAL(messageClicked()), this, SLOT(showFromTray()));
App::wnd()->updateTrayMenu(); App::wnd()->updateTrayMenu();
@ -1829,7 +1829,7 @@ QString psAppDataPath() {
WCHAR wstrPath[maxFileLen]; WCHAR wstrPath[maxFileLen];
if (GetEnvironmentVariable(L"APPDATA", wstrPath, maxFileLen)) { if (GetEnvironmentVariable(L"APPDATA", wstrPath, maxFileLen)) {
QDir appData(QString::fromStdWString(std::wstring(wstrPath))); QDir appData(QString::fromStdWString(std::wstring(wstrPath)));
return appData.absolutePath() + '/' + QString::fromWCharArray(AppName) + '/'; return appData.absolutePath() + '/' + str_const_toString(AppName) + '/';
} }
return QString(); return QString();
} }
@ -1839,13 +1839,13 @@ QString psAppDataPathOld() {
WCHAR wstrPath[maxFileLen]; WCHAR wstrPath[maxFileLen];
if (GetEnvironmentVariable(L"APPDATA", wstrPath, maxFileLen)) { if (GetEnvironmentVariable(L"APPDATA", wstrPath, maxFileLen)) {
QDir appData(QString::fromStdWString(std::wstring(wstrPath))); QDir appData(QString::fromStdWString(std::wstring(wstrPath)));
return appData.absolutePath() + '/' + QString::fromWCharArray(AppNameOld) + '/'; return appData.absolutePath() + '/' + str_const_toString(AppNameOld) + '/';
} }
return QString(); return QString();
} }
QString psDownloadPath() { QString psDownloadPath() {
return QStandardPaths::writableLocation(QStandardPaths::DownloadLocation) + '/' + QString::fromWCharArray(AppName) + '/'; return QStandardPaths::writableLocation(QStandardPaths::DownloadLocation) + '/' + str_const_toString(AppName) + '/';
} }
QString psCurrentExeDirectory(int argc, char *argv[]) { QString psCurrentExeDirectory(int argc, char *argv[]) {
@ -1903,7 +1903,7 @@ void psDoFixPrevious() {
DWORD checkType, checkSize = bufSize * 2; DWORD checkType, checkSize = bufSize * 2;
WCHAR checkStr[bufSize]; WCHAR checkStr[bufSize];
QString appId = QString::fromStdWString(AppId); QString appId = str_const_toString(AppId);
QString newKeyStr1 = QString("Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\%1_is1").arg(appId); QString newKeyStr1 = QString("Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\%1_is1").arg(appId);
QString newKeyStr2 = QString("Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\%1_is1").arg(appId); QString newKeyStr2 = QString("Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\%1_is1").arg(appId);
QString oldKeyStr1 = QString("SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\%1_is1").arg(appId); QString oldKeyStr1 = QString("SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\%1_is1").arg(appId);
@ -2305,7 +2305,7 @@ void _manageAppLnk(bool create, bool silent, int path_csidl, const wchar_t *args
WCHAR startupFolder[MAX_PATH]; WCHAR startupFolder[MAX_PATH];
HRESULT hr = SHGetFolderPath(0, path_csidl, 0, SHGFP_TYPE_CURRENT, startupFolder); HRESULT hr = SHGetFolderPath(0, path_csidl, 0, SHGFP_TYPE_CURRENT, startupFolder);
if (SUCCEEDED(hr)) { if (SUCCEEDED(hr)) {
QString lnk = QString::fromWCharArray(startupFolder) + '\\' + QString::fromWCharArray(AppFile) + qsl(".lnk"); QString lnk = QString::fromWCharArray(startupFolder) + '\\' + str_const_toString(AppFile) + qsl(".lnk");
if (create) { if (create) {
ComPtr<IShellLink> shellLink; ComPtr<IShellLink> shellLink;
hr = CoCreateInstance(CLSID_ShellLink, nullptr, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&shellLink)); hr = CoCreateInstance(CLSID_ShellLink, nullptr, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&shellLink));
@ -2368,9 +2368,6 @@ void psUpdateOverlayed(TWidget *widget) {
if (!wv) widget->setAttribute(Qt::WA_WState_Visible, false); if (!wv) widget->setAttribute(Qt::WA_WState_Visible, false);
} }
static const WCHAR *_programName = AppName; // folder in APPDATA, if current path is unavailable for writing
static const WCHAR *_exeName = L"Telegram.exe";
// Stack walk code is inspired by http://www.codeproject.com/Articles/11132/Walking-the-callstack // Stack walk code is inspired by http://www.codeproject.com/Articles/11132/Walking-the-callstack
static const int StackEntryMaxNameLength = MAX_SYM_NAME + 1; static const int StackEntryMaxNameLength = MAX_SYM_NAME + 1;
@ -2765,7 +2762,7 @@ QString psPrepareCrashDump(const QByteArray &crashdump, QString dumpfile) {
QString tolaunch; QString tolaunch;
if ((betaversion && betaversion != cBetaVersion()) || (!betaversion && version && version != AppVersion)) { if ((betaversion && betaversion != cBetaVersion()) || (!betaversion && version && version != AppVersion)) {
QString path = cExeDir(); QString path = cExeDir();
QRegularExpressionMatch m = QRegularExpression("deploy/\\d+\\.\\d+/\\d+\\.\\d+\\.\\d+(/|\\.dev/|_\\d+/)(Telegram/)?$").match(path); QRegularExpressionMatch m = QRegularExpression("deploy/\\d+\\.\\d+/\\d+\\.\\d+\\.\\d+(/|\\.dev/|\\.alpha/|_\\d+/)(Telegram/)?$").match(path);
if (m.hasMatch()) { if (m.hasMatch()) {
QString base = path.mid(0, m.capturedStart()) + qstr("deploy/"); QString base = path.mid(0, m.capturedStart()) + qstr("deploy/");
int32 major = version / 1000000, minor = (version % 1000000) / 1000, micro = (version % 1000); int32 major = version / 1000000, minor = (version % 1000000) / 1000, micro = (version % 1000);
@ -2774,6 +2771,8 @@ QString psPrepareCrashDump(const QByteArray &crashdump, QString dumpfile) {
base += qsl("_%1").arg(betaversion); base += qsl("_%1").arg(betaversion);
} else if (QDir(base + qstr(".dev")).exists()) { } else if (QDir(base + qstr(".dev")).exists()) {
base += qstr(".dev"); base += qstr(".dev");
} else if (QDir(base + qstr(".alpha")).exists()) {
base += qstr(".alpha");
} }
if (QFile(base + qstr("/Telegram/Telegram.exe")).exists()) { if (QFile(base + qstr("/Telegram/Telegram.exe")).exists()) {
base += qstr("/Telegram"); base += qstr("/Telegram");

View File

@ -1088,7 +1088,7 @@ void PsMainWindow::psSetupTrayIcon() {
QIcon icon(QPixmap::fromImage(App::wnd()->iconLarge(), Qt::ColorOnly)); QIcon icon(QPixmap::fromImage(App::wnd()->iconLarge(), Qt::ColorOnly));
trayIcon->setIcon(icon); trayIcon->setIcon(icon);
trayIcon->setToolTip(QString::fromStdWString(AppName)); trayIcon->setToolTip(str_const_toString(AppName));
connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(toggleTray(QSystemTrayIcon::ActivationReason)), Qt::UniqueConnection); connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(toggleTray(QSystemTrayIcon::ActivationReason)), Qt::UniqueConnection);
connect(trayIcon, SIGNAL(messageClicked()), this, SLOT(showFromTray())); connect(trayIcon, SIGNAL(messageClicked()), this, SLOT(showFromTray()));
App::wnd()->updateTrayMenu(); App::wnd()->updateTrayMenu();
@ -1843,7 +1843,7 @@ QString psAppDataPath() {
//WCHAR wstrPath[maxFileLen]; //WCHAR wstrPath[maxFileLen];
//if (GetEnvironmentVariable(L"APPDATA", wstrPath, maxFileLen)) { //if (GetEnvironmentVariable(L"APPDATA", wstrPath, maxFileLen)) {
// QDir appData(QString::fromStdWString(std::wstring(wstrPath))); // QDir appData(QString::fromStdWString(std::wstring(wstrPath)));
// return appData.absolutePath() + '/' + QString::fromWCharArray(AppName) + '/'; // return appData.absolutePath() + '/' + str_const_toString(AppName) + '/';
//} //}
return QString(); return QString();
} }
@ -1853,13 +1853,13 @@ QString psAppDataPathOld() {
//WCHAR wstrPath[maxFileLen]; //WCHAR wstrPath[maxFileLen];
//if (GetEnvironmentVariable(L"APPDATA", wstrPath, maxFileLen)) { //if (GetEnvironmentVariable(L"APPDATA", wstrPath, maxFileLen)) {
// QDir appData(QString::fromStdWString(std::wstring(wstrPath))); // QDir appData(QString::fromStdWString(std::wstring(wstrPath)));
// return appData.absolutePath() + '/' + QString::fromWCharArray(AppNameOld) + '/'; // return appData.absolutePath() + '/' + str_const_toString(AppNameOld) + '/';
//} //}
return QString(); return QString();
} }
QString psDownloadPath() { QString psDownloadPath() {
return QStandardPaths::writableLocation(QStandardPaths::DownloadLocation) + '/' + QString::fromWCharArray(AppName) + '/'; return QStandardPaths::writableLocation(QStandardPaths::DownloadLocation) + '/' + str_const_toString(AppName) + '/';
} }
QString psCurrentExeDirectory(int argc, char *argv[]) { QString psCurrentExeDirectory(int argc, char *argv[]) {
@ -1917,7 +1917,7 @@ void psDoFixPrevious() {
//DWORD checkType, checkSize = bufSize * 2; //DWORD checkType, checkSize = bufSize * 2;
//WCHAR checkStr[bufSize]; //WCHAR checkStr[bufSize];
//QString appId = QString::fromStdWString(AppId); //QString appId = str_const_toString(AppId);
//QString newKeyStr1 = QString("Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\%1_is1").arg(appId); //QString newKeyStr1 = QString("Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\%1_is1").arg(appId);
//QString newKeyStr2 = QString("Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\%1_is1").arg(appId); //QString newKeyStr2 = QString("Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\%1_is1").arg(appId);
//QString oldKeyStr1 = QString("SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\%1_is1").arg(appId); //QString oldKeyStr1 = QString("SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\%1_is1").arg(appId);
@ -2319,7 +2319,7 @@ void _manageAppLnk(bool create, bool silent, int path_csidl, const wchar_t *args
//WCHAR startupFolder[MAX_PATH]; //WCHAR startupFolder[MAX_PATH];
//HRESULT hr = SHGetFolderPath(0, path_csidl, 0, SHGFP_TYPE_CURRENT, startupFolder); //HRESULT hr = SHGetFolderPath(0, path_csidl, 0, SHGFP_TYPE_CURRENT, startupFolder);
//if (SUCCEEDED(hr)) { //if (SUCCEEDED(hr)) {
// QString lnk = QString::fromWCharArray(startupFolder) + '\\' + QString::fromWCharArray(AppFile) + qsl(".lnk"); // QString lnk = QString::fromWCharArray(startupFolder) + '\\' + str_const_toString(AppFile) + qsl(".lnk");
// if (create) { // if (create) {
// ComPtr<IShellLink> shellLink; // ComPtr<IShellLink> shellLink;
// hr = CoCreateInstance(CLSID_ShellLink, nullptr, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&shellLink)); // hr = CoCreateInstance(CLSID_ShellLink, nullptr, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&shellLink));
@ -2382,9 +2382,6 @@ void psUpdateOverlayed(TWidget *widget) {
if (!wv) widget->setAttribute(Qt::WA_WState_Visible, false); if (!wv) widget->setAttribute(Qt::WA_WState_Visible, false);
} }
static const WCHAR *_programName = AppName; // folder in APPDATA, if current path is unavailable for writing
static const WCHAR *_exeName = L"Telegram.exe";
void psWriteDump() { void psWriteDump() {
} }

View File

@ -19,8 +19,9 @@ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
*/ */
#include "stdafx.h" #include "stdafx.h"
#include "pspecific.h"
#include "settings.h" #include "settings.h"
#include "pspecific.h"
#include "lang.h" #include "lang.h"
bool gRtl = false; bool gRtl = false;
@ -28,9 +29,9 @@ Qt::LayoutDirection gLangDir = gRtl ? Qt::RightToLeft : Qt::LeftToRight;
QString gArguments; QString gArguments;
bool gDevVersion = DevVersion; bool gAlphaVersion = AppAlphaVersion;
uint64 gBetaVersion = BETA_VERSION; uint64 gBetaVersion = AppBetaVersion;
uint64 gRealBetaVersion = BETA_VERSION; uint64 gRealBetaVersion = AppBetaVersion;
QByteArray gBetaPrivateKey; QByteArray gBetaPrivateKey;
bool gTestMode = false; bool gTestMode = false;

View File

@ -55,7 +55,7 @@ inline bool rtl() {
DeclareReadSetting(QString, Arguments); DeclareReadSetting(QString, Arguments);
DeclareSetting(bool, DevVersion); DeclareSetting(bool, AlphaVersion);
DeclareSetting(uint64, BetaVersion); DeclareSetting(uint64, BetaVersion);
DeclareSetting(uint64, RealBetaVersion); DeclareSetting(uint64, RealBetaVersion);
DeclareSetting(QByteArray, BetaPrivateKey); DeclareSetting(QByteArray, BetaPrivateKey);

View File

@ -264,7 +264,7 @@ SettingsInner::SettingsInner(SettingsWidget *parent) : TWidget(parent)
connect(&_dpiAutoScale, SIGNAL(changed()), this, SLOT(onScaleAuto())); connect(&_dpiAutoScale, SIGNAL(changed()), this, SLOT(onScaleAuto()));
connect(&_dpiSlider, SIGNAL(changed(int32)), this, SLOT(onScaleChange())); connect(&_dpiSlider, SIGNAL(changed(int32)), this, SLOT(onScaleChange()));
_curVersionText = lng_settings_current_version(lt_version, QString::fromWCharArray(AppVersionStr) + (cDevVersion() ? " dev" : "") + (cBetaVersion() ? qsl(" beta %1").arg(cBetaVersion()) : QString())) + ' '; _curVersionText = lng_settings_current_version(lt_version, QString::fromLatin1(AppVersionStr.c_str()) + (cAlphaVersion() ? " alpha" : "") + (cBetaVersion() ? qsl(" beta %1").arg(cBetaVersion()) : QString())) + ' ';
_curVersionWidth = st::linkFont->width(_curVersionText); _curVersionWidth = st::linkFont->width(_curVersionText);
_newVersionText = lang(lng_settings_update_ready) + ' '; _newVersionText = lang(lng_settings_update_ready) + ' ';
_newVersionWidth = st::linkFont->width(_newVersionText); _newVersionWidth = st::linkFont->width(_newVersionText);

View File

@ -33,8 +33,6 @@ Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin)
Q_IMPORT_PLUGIN(QDDSPlugin) Q_IMPORT_PLUGIN(QDDSPlugin)
Q_IMPORT_PLUGIN(QICNSPlugin) Q_IMPORT_PLUGIN(QICNSPlugin)
Q_IMPORT_PLUGIN(QICOPlugin) Q_IMPORT_PLUGIN(QICOPlugin)
Q_IMPORT_PLUGIN(QJp2Plugin)
Q_IMPORT_PLUGIN(QMngPlugin)
Q_IMPORT_PLUGIN(QTgaPlugin) Q_IMPORT_PLUGIN(QTgaPlugin)
Q_IMPORT_PLUGIN(QTiffPlugin) Q_IMPORT_PLUGIN(QTiffPlugin)
Q_IMPORT_PLUGIN(QWbmpPlugin) Q_IMPORT_PLUGIN(QWbmpPlugin)

View File

@ -31,6 +31,7 @@ namespace {
class InputStyle : public QCommonStyle { class InputStyle : public QCommonStyle {
public: public:
InputStyle() { InputStyle() {
setParent(QCoreApplication::instance());
} }
void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget = 0) const { void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget = 0) const {
@ -44,9 +45,29 @@ namespace {
} }
return QCommonStyle::subElementRect(r, opt, widget); return QCommonStyle::subElementRect(r, opt, widget);
} }
static InputStyle<InputClass> *instance() {
if (!_instance) {
if (!QGuiApplication::instance()) {
return nullptr;
}
_instance = new InputStyle<InputClass>();
}
return _instance;
}
~InputStyle() {
_instance = nullptr;
}
private:
static InputStyle<InputClass> *_instance;
}; };
InputStyle<FlatInput> _flatInputStyle;
InputStyle<MaskedInputField> _inputFieldStyle; template <typename InputClass>
InputStyle<InputClass> *InputStyle<InputClass>::_instance = nullptr;
} }
FlatInput::FlatInput(QWidget *parent, const style::flatInput &st, const QString &pholder, const QString &v) : QLineEdit(v, parent) FlatInput::FlatInput(QWidget *parent, const style::flatInput &st, const QString &pholder, const QString &v) : QLineEdit(v, parent)
@ -76,7 +97,7 @@ FlatInput::FlatInput(QWidget *parent, const style::flatInput &st, const QString
connect(this, SIGNAL(textEdited(const QString &)), this, SLOT(onTextEdited())); connect(this, SIGNAL(textEdited(const QString &)), this, SLOT(onTextEdited()));
if (App::wnd()) connect(this, SIGNAL(selectionChanged()), App::wnd(), SLOT(updateGlobalMenu())); if (App::wnd()) connect(this, SIGNAL(selectionChanged()), App::wnd(), SLOT(updateGlobalMenu()));
setStyle(&_flatInputStyle); setStyle(InputStyle<FlatInput>::instance());
QLineEdit::setTextMargins(0, 0, 0, 0); QLineEdit::setTextMargins(0, 0, 0, 0);
setContentsMargins(0, 0, 0, 0); setContentsMargins(0, 0, 0, 0);
@ -213,13 +234,8 @@ void FlatInput::resizeEvent(QResizeEvent *e) {
} }
} }
//#include "../../../QtStatic/qtbase/src/widgets/widgets/qwidgettextcontrol_p.h"
void FlatInput::contextMenuEvent(QContextMenuEvent *e) { void FlatInput::contextMenuEvent(QContextMenuEvent *e) {
if (QMenu *menu = createStandardContextMenu()) { if (QMenu *menu = createStandardContextMenu()) {
//menu->addSeparator(); // testing two level menu
//QUnicodeControlCharacterMenu *ctrlCharacterMenu = new QUnicodeControlCharacterMenu(this, menu);
//menu->addMenu(ctrlCharacterMenu);
(new PopupMenu(menu))->popup(e->globalPos()); (new PopupMenu(menu))->popup(e->globalPos());
} }
} }
@ -2023,7 +2039,7 @@ MaskedInputField::MaskedInputField(QWidget *parent, const style::InputField &st,
connect(this, SIGNAL(textEdited(const QString&)), this, SLOT(onTextEdited())); connect(this, SIGNAL(textEdited(const QString&)), this, SLOT(onTextEdited()));
if (App::wnd()) connect(this, SIGNAL(selectionChanged()), App::wnd(), SLOT(updateGlobalMenu())); if (App::wnd()) connect(this, SIGNAL(selectionChanged()), App::wnd(), SLOT(updateGlobalMenu()));
setStyle(&_inputFieldStyle); setStyle(InputStyle<MaskedInputField>::instance());
QLineEdit::setTextMargins(0, 0, 0, 0); QLineEdit::setTextMargins(0, 0, 0, 0);
setContentsMargins(0, 0, 0, 0); setContentsMargins(0, 0, 0, 0);

View File

@ -34,18 +34,14 @@ namespace {
const style::textStyle *_textStyle = nullptr; const style::textStyle *_textStyle = nullptr;
void _initDefault() { void initDefault() {
_textStyle = &st::defaultTextStyle; _textStyle = &st::defaultTextStyle;
} }
inline int32 _blockHeight(const ITextBlock *b, const style::font &font) { inline int32 countBlockHeight(const ITextBlock *b, const style::font &font) {
return (b->type() == TextBlockTSkip) ? static_cast<const SkipBlock*>(b)->height() : (_textStyle->lineHeight > font->height) ? _textStyle->lineHeight : font->height; return (b->type() == TextBlockTSkip) ? static_cast<const SkipBlock*>(b)->height() : (_textStyle->lineHeight > font->height) ? _textStyle->lineHeight : font->height;
} }
inline QFixed _blockRBearing(const ITextBlock *b) {
return (b->type() == TextBlockTText) ? static_cast<const TextBlock*>(b)->f_rbearing() : 0;
}
} // namespace } // namespace
const style::textStyle *textstyleCurrent() { const style::textStyle *textstyleCurrent() {
@ -908,7 +904,7 @@ public:
if (_t->isEmpty()) return; if (_t->isEmpty()) return;
_blocksSize = _t->_blocks.size(); _blocksSize = _t->_blocks.size();
if (!_textStyle) _initDefault(); if (!_textStyle) initDefault();
if (_p) { if (_p) {
_p->setFont(_t->_font->f); _p->setFont(_t->_font->f);
@ -955,8 +951,7 @@ public:
for (Text::TextBlocks::const_iterator i = _t->_blocks.cbegin(); i != e; ++i, ++blockIndex) { for (Text::TextBlocks::const_iterator i = _t->_blocks.cbegin(); i != e; ++i, ++blockIndex) {
ITextBlock *b = *i; ITextBlock *b = *i;
TextBlockType _btype = b->type(); TextBlockType _btype = b->type();
int32 blockHeight = _blockHeight(b, _t->_font); int32 blockHeight = countBlockHeight(b, _t->_font);
QFixed _rb = _blockRBearing(b);
if (_btype == TextBlockTNewline) { if (_btype == TextBlockTNewline) {
if (!_lineHeight) _lineHeight = blockHeight; if (!_lineHeight) _lineHeight = blockHeight;
@ -968,7 +963,7 @@ public:
_lineStart = nextStart; _lineStart = nextStart;
_lineStartBlock = blockIndex + 1; _lineStartBlock = blockIndex + 1;
last_rBearing = _rb; last_rBearing = b->f_rbearing();
last_rPadding = b->f_rpadding(); last_rPadding = b->f_rpadding();
_wLeft = _w - (b->f_width() - last_rBearing); _wLeft = _w - (b->f_width() - last_rBearing);
if (_elideLast && _elideRemoveFromEnd > 0 && (_y + blockHeight >= _yToElide)) { if (_elideLast && _elideRemoveFromEnd > 0 && (_y + blockHeight >= _yToElide)) {
@ -983,10 +978,11 @@ public:
continue; continue;
} }
QFixed lpadding = b->f_lpadding(); auto b__f_lpadding = b->f_lpadding();
QFixed newWidthLeft = _wLeft - lpadding - last_rBearing - (last_rPadding + b->f_width() - _rb); auto b__f_rbearing = b->f_rbearing();
QFixed newWidthLeft = _wLeft - b__f_lpadding - last_rBearing - (last_rPadding + b->f_width() - b__f_rbearing);
if (newWidthLeft >= 0) { if (newWidthLeft >= 0) {
last_rBearing = _rb; last_rBearing = b__f_rbearing;
last_rPadding = b->f_rpadding(); last_rPadding = b->f_rpadding();
_wLeft = newWidthLeft; _wLeft = newWidthLeft;
@ -999,7 +995,7 @@ public:
if (_btype == TextBlockTText) { if (_btype == TextBlockTText) {
TextBlock *t = static_cast<TextBlock*>(b); TextBlock *t = static_cast<TextBlock*>(b);
if (t->_words.isEmpty()) { // no words in this block, spaces only => layout this block in the same line if (t->_words.isEmpty()) { // no words in this block, spaces only => layout this block in the same line
last_rPadding += lpadding; last_rPadding += b__f_lpadding;
_lineHeight = qMax(_lineHeight, blockHeight); _lineHeight = qMax(_lineHeight, blockHeight);
@ -1010,14 +1006,14 @@ public:
QFixed f_wLeft = _wLeft; // vars for saving state of the last word start QFixed f_wLeft = _wLeft; // vars for saving state of the last word start
int32 f_lineHeight = _lineHeight; // f points to the last word-start element of t->_words int32 f_lineHeight = _lineHeight; // f points to the last word-start element of t->_words
for (TextBlock::TextWords::const_iterator j = t->_words.cbegin(), en = t->_words.cend(), f = j; j != en; ++j) { for (TextBlock::TextWords::const_iterator j = t->_words.cbegin(), en = t->_words.cend(), f = j; j != en; ++j) {
bool wordEndsHere = (j->width >= 0); bool wordEndsHere = (j->f_width() >= 0);
QFixed j_width = wordEndsHere ? j->width : -j->width; QFixed j_width = wordEndsHere ? j->f_width() : -j->f_width();
QFixed newWidthLeft = _wLeft - lpadding - last_rBearing - (last_rPadding + j_width - j->f_rbearing()); QFixed newWidthLeft = _wLeft - b__f_lpadding - last_rBearing - (last_rPadding + j_width - j->f_rbearing());
lpadding = 0; b__f_lpadding = 0;
if (newWidthLeft >= 0) { if (newWidthLeft >= 0) {
last_rBearing = j->f_rbearing(); last_rBearing = j->f_rbearing();
last_rPadding = j->rpadding; last_rPadding = j->f_rpadding();
_wLeft = newWidthLeft; _wLeft = newWidthLeft;
_lineHeight = qMax(_lineHeight, blockHeight); _lineHeight = qMax(_lineHeight, blockHeight);
@ -1042,16 +1038,16 @@ public:
j = f; j = f;
_wLeft = f_wLeft; _wLeft = f_wLeft;
_lineHeight = f_lineHeight; _lineHeight = f_lineHeight;
j_width = (j->width >= 0) ? j->width : -j->width; j_width = (j->f_width() >= 0) ? j->f_width() : -j->f_width();
} }
if (!drawLine(elidedLine ? ((j + 1 == en) ? _blockEnd(_t, i, e) : (j + 1)->from) : j->from, i, e)) return; if (!drawLine(elidedLine ? ((j + 1 == en) ? _blockEnd(_t, i, e) : (j + 1)->from()) : j->from(), i, e)) return;
_y += _lineHeight; _y += _lineHeight;
_lineHeight = qMax(0, blockHeight); _lineHeight = qMax(0, blockHeight);
_lineStart = j->from; _lineStart = j->from();
_lineStartBlock = blockIndex; _lineStartBlock = blockIndex;
last_rBearing = j->f_rbearing(); last_rBearing = j->f_rbearing();
last_rPadding = j->rpadding; last_rPadding = j->f_rpadding();
_wLeft = _w - (j_width - last_rBearing); _wLeft = _w - (j_width - last_rBearing);
if (_elideLast && _elideRemoveFromEnd > 0 && (_y + blockHeight >= _yToElide)) { if (_elideLast && _elideRemoveFromEnd > 0 && (_y + blockHeight >= _yToElide)) {
_wLeft -= _elideRemoveFromEnd; _wLeft -= _elideRemoveFromEnd;
@ -1076,7 +1072,7 @@ public:
_lineStart = b->from(); _lineStart = b->from();
_lineStartBlock = blockIndex; _lineStartBlock = blockIndex;
last_rBearing = _rb; last_rBearing = b__f_rbearing;
last_rPadding = b->f_rpadding(); last_rPadding = b->f_rpadding();
_wLeft = _w - (b->f_width() - last_rBearing); _wLeft = _w - (b->f_width() - last_rBearing);
if (_elideLast && _elideRemoveFromEnd > 0 && (_y + blockHeight >= _yToElide)) { if (_elideLast && _elideRemoveFromEnd > 0 && (_y + blockHeight >= _yToElide)) {
@ -1470,7 +1466,6 @@ public:
} }
return false; return false;
} else if (_p) { } else if (_p) {
#ifndef TDESKTOP_WINRT // temp
QTextCharFormat format; QTextCharFormat format;
QTextItemInt gf(glyphs.mid(glyphsStart, glyphsEnd - glyphsStart), QTextItemInt gf(glyphs.mid(glyphsStart, glyphsEnd - glyphsStart),
&_e->fnt, engine.layoutData->string.unicode() + itemStart, &_e->fnt, engine.layoutData->string.unicode() + itemStart,
@ -1479,7 +1474,6 @@ public:
gf.width = itemWidth; gf.width = itemWidth;
gf.justified = false; gf.justified = false;
gf.initWithScriptItem(si); gf.initWithScriptItem(si);
#endif // !TDESKTOP_WINRT
if (_localFrom + itemStart < _selection.to && _localFrom + itemEnd > _selection.from) { if (_localFrom + itemStart < _selection.to && _localFrom + itemEnd > _selection.from) {
QFixed selX = x, selWidth = itemWidth; QFixed selX = x, selWidth = itemWidth;
if (_localFrom + itemEnd > _selection.to || _localFrom + itemStart < _selection.from) { if (_localFrom + itemEnd > _selection.to || _localFrom + itemStart < _selection.from) {
@ -1520,9 +1514,7 @@ public:
_p->fillRect(QRectF(selX.toReal(), _y + _yDelta, selWidth.toReal(), _fontHeight), _textStyle->selectBg->b); _p->fillRect(QRectF(selX.toReal(), _y + _yDelta, selWidth.toReal(), _fontHeight), _textStyle->selectBg->b);
} }
#ifndef TDESKTOP_WINRT // temp
_p->drawTextItem(QPointF(x.toReal(), textY), gf); _p->drawTextItem(QPointF(x.toReal(), textY), gf);
#endif // !TDESKTOP_WINRT
} }
x += itemWidth; x += itemWidth;
@ -2408,7 +2400,7 @@ Text &Text::operator=(Text &&other) {
} }
void Text::setText(style::font font, const QString &text, const TextParseOptions &options) { void Text::setText(style::font font, const QString &text, const TextParseOptions &options) {
if (!_textStyle) _initDefault(); if (!_textStyle) initDefault();
_font = font; _font = font;
clear(); clear();
{ {
@ -2427,9 +2419,7 @@ void Text::recountNaturalSize(bool initial, Qt::LayoutDirection optionsDir) {
for (TextBlocks::const_iterator i = _blocks.cbegin(), e = _blocks.cend(); i != e; ++i) { for (TextBlocks::const_iterator i = _blocks.cbegin(), e = _blocks.cend(); i != e; ++i) {
ITextBlock *b = *i; ITextBlock *b = *i;
TextBlockType _btype = b->type(); TextBlockType _btype = b->type();
int32 blockHeight = _blockHeight(b, _font); int32 blockHeight = countBlockHeight(b, _font);
QFixed _rb = _blockRBearing(b);
if (_btype == TextBlockTNewline) { if (_btype == TextBlockTNewline) {
if (!lineHeight) lineHeight = blockHeight; if (!lineHeight) lineHeight = blockHeight;
if (initial) { if (initial) {
@ -2448,7 +2438,7 @@ void Text::recountNaturalSize(bool initial, Qt::LayoutDirection optionsDir) {
_minHeight += lineHeight; _minHeight += lineHeight;
lineHeight = 0; lineHeight = 0;
last_rBearing = _rb; last_rBearing = b->f_rbearing();
last_rPadding = b->f_rpadding(); last_rPadding = b->f_rpadding();
if (_maxWidth < _width) { if (_maxWidth < _width) {
_maxWidth = _width; _maxWidth = _width;
@ -2457,11 +2447,13 @@ void Text::recountNaturalSize(bool initial, Qt::LayoutDirection optionsDir) {
continue; continue;
} }
auto b__f_rbearing = b->f_rbearing(); // cache
_width += b->f_lpadding(); _width += b->f_lpadding();
_width += last_rBearing + (last_rPadding + b->f_width() - _rb); _width += last_rBearing + (last_rPadding + b->f_width() - b__f_rbearing);
lineHeight = qMax(lineHeight, blockHeight); lineHeight = qMax(lineHeight, blockHeight);
last_rBearing = _rb; last_rBearing = b__f_rbearing;
last_rPadding = b->f_rpadding(); last_rPadding = b->f_rpadding();
continue; continue;
} }
@ -2477,7 +2469,7 @@ void Text::recountNaturalSize(bool initial, Qt::LayoutDirection optionsDir) {
} }
} }
if (_width > 0) { if (_width > 0) {
if (!lineHeight) lineHeight = _blockHeight(_blocks.back(), _font); if (!lineHeight) lineHeight = countBlockHeight(_blocks.back(), _font);
_minHeight += lineHeight; _minHeight += lineHeight;
if (_maxWidth < _width) { if (_maxWidth < _width) {
_maxWidth = _width; _maxWidth = _width;
@ -2486,7 +2478,7 @@ void Text::recountNaturalSize(bool initial, Qt::LayoutDirection optionsDir) {
} }
void Text::setMarkedText(style::font font, const QString &text, const EntitiesInText &entities, const TextParseOptions &options) { void Text::setMarkedText(style::font font, const QString &text, const EntitiesInText &entities, const TextParseOptions &options) {
if (!_textStyle) _initDefault(); if (!_textStyle) initDefault();
_font = font; _font = font;
clear(); clear();
{ {
@ -2648,11 +2640,10 @@ int32 Text::countWidth(int32 w) const {
for (TextBlocks::const_iterator i = _blocks.cbegin(), e = _blocks.cend(); i != e; ++i) { for (TextBlocks::const_iterator i = _blocks.cbegin(), e = _blocks.cend(); i != e; ++i) {
ITextBlock *b = *i; ITextBlock *b = *i;
TextBlockType _btype = b->type(); TextBlockType _btype = b->type();
int32 blockHeight = _blockHeight(b, _font); int32 blockHeight = countBlockHeight(b, _font);
QFixed _rb = _blockRBearing(b);
if (_btype == TextBlockTNewline) { if (_btype == TextBlockTNewline) {
last_rBearing = _rb; last_rBearing = b->f_rbearing();
last_rPadding = b->f_rpadding(); last_rPadding = b->f_rpadding();
if (widthLeft < minWidthLeft) { if (widthLeft < minWidthLeft) {
minWidthLeft = widthLeft; minWidthLeft = widthLeft;
@ -2662,10 +2653,11 @@ int32 Text::countWidth(int32 w) const {
longWordLine = true; longWordLine = true;
continue; continue;
} }
QFixed lpadding = b->f_lpadding(); auto b__f_lpadding = b->f_lpadding();
QFixed newWidthLeft = widthLeft - lpadding - last_rBearing - (last_rPadding + b->f_width() - _rb); auto b__f_rbearing = b->f_rbearing(); // cache
QFixed newWidthLeft = widthLeft - b__f_lpadding - last_rBearing - (last_rPadding + b->f_width() - b__f_rbearing);
if (newWidthLeft >= 0) { if (newWidthLeft >= 0) {
last_rBearing = _rb; last_rBearing = b__f_rbearing;
last_rPadding = b->f_rpadding(); last_rPadding = b->f_rpadding();
widthLeft = newWidthLeft; widthLeft = newWidthLeft;
@ -2676,7 +2668,7 @@ int32 Text::countWidth(int32 w) const {
if (_btype == TextBlockTText) { if (_btype == TextBlockTText) {
TextBlock *t = static_cast<TextBlock*>(b); TextBlock *t = static_cast<TextBlock*>(b);
if (t->_words.isEmpty()) { // no words in this block, spaces only => layout this block in the same line if (t->_words.isEmpty()) { // no words in this block, spaces only => layout this block in the same line
last_rPadding += lpadding; last_rPadding += b__f_lpadding;
longWordLine = false; longWordLine = false;
continue; continue;
@ -2684,14 +2676,14 @@ int32 Text::countWidth(int32 w) const {
QFixed f_wLeft = widthLeft; QFixed f_wLeft = widthLeft;
for (TextBlock::TextWords::const_iterator j = t->_words.cbegin(), e = t->_words.cend(), f = j; j != e; ++j) { for (TextBlock::TextWords::const_iterator j = t->_words.cbegin(), e = t->_words.cend(), f = j; j != e; ++j) {
bool wordEndsHere = (j->width >= 0); bool wordEndsHere = (j->f_width() >= 0);
QFixed j_width = wordEndsHere ? j->width : -j->width; QFixed j_width = wordEndsHere ? j->f_width() : -j->f_width();
QFixed newWidthLeft = widthLeft - lpadding - last_rBearing - (last_rPadding + j_width - j->f_rbearing()); QFixed newWidthLeft = widthLeft - b__f_lpadding - last_rBearing - (last_rPadding + j_width - j->f_rbearing());
lpadding = 0; b__f_lpadding = 0;
if (newWidthLeft >= 0) { if (newWidthLeft >= 0) {
last_rBearing = j->f_rbearing(); last_rBearing = j->f_rbearing();
last_rPadding = j->rpadding; last_rPadding = j->f_rpadding();
widthLeft = newWidthLeft; widthLeft = newWidthLeft;
if (wordEndsHere) { if (wordEndsHere) {
@ -2707,11 +2699,11 @@ int32 Text::countWidth(int32 w) const {
if (f != j) { if (f != j) {
j = f; j = f;
widthLeft = f_wLeft; widthLeft = f_wLeft;
j_width = (j->width >= 0) ? j->width : -j->width; j_width = (j->f_width() >= 0) ? j->f_width() : -j->f_width();
} }
last_rBearing = j->f_rbearing(); last_rBearing = j->f_rbearing();
last_rPadding = j->rpadding; last_rPadding = j->f_rpadding();
if (widthLeft < minWidthLeft) { if (widthLeft < minWidthLeft) {
minWidthLeft = widthLeft; minWidthLeft = widthLeft;
} }
@ -2724,7 +2716,7 @@ int32 Text::countWidth(int32 w) const {
continue; continue;
} }
last_rBearing = _rb; last_rBearing = b__f_rbearing;
last_rPadding = b->f_rpadding(); last_rPadding = b->f_rpadding();
if (widthLeft < minWidthLeft) { if (widthLeft < minWidthLeft) {
minWidthLeft = widthLeft; minWidthLeft = widthLeft;
@ -2754,24 +2746,24 @@ int32 Text::countHeight(int32 w) const {
for (TextBlocks::const_iterator i = _blocks.cbegin(), e = _blocks.cend(); i != e; ++i) { for (TextBlocks::const_iterator i = _blocks.cbegin(), e = _blocks.cend(); i != e; ++i) {
ITextBlock *b = *i; ITextBlock *b = *i;
TextBlockType _btype = b->type(); TextBlockType _btype = b->type();
int32 blockHeight = _blockHeight(b, _font); int32 blockHeight = countBlockHeight(b, _font);
QFixed _rb = _blockRBearing(b);
if (_btype == TextBlockTNewline) { if (_btype == TextBlockTNewline) {
if (!lineHeight) lineHeight = blockHeight; if (!lineHeight) lineHeight = blockHeight;
result += lineHeight; result += lineHeight;
lineHeight = 0; lineHeight = 0;
last_rBearing = _rb; last_rBearing = b->f_rbearing();
last_rPadding = b->f_rpadding(); last_rPadding = b->f_rpadding();
widthLeft = width - (b->f_width() - last_rBearing); widthLeft = width - (b->f_width() - last_rBearing);
longWordLine = true; longWordLine = true;
continue; continue;
} }
QFixed lpadding = b->f_lpadding(); auto b__f_lpadding = b->f_lpadding();
QFixed newWidthLeft = widthLeft - lpadding - last_rBearing - (last_rPadding + b->f_width() - _rb); auto b__f_rbearing = b->f_rbearing();
QFixed newWidthLeft = widthLeft - b__f_lpadding - last_rBearing - (last_rPadding + b->f_width() - b__f_rbearing);
if (newWidthLeft >= 0) { if (newWidthLeft >= 0) {
last_rBearing = _rb; last_rBearing = b__f_rbearing;
last_rPadding = b->f_rpadding(); last_rPadding = b->f_rpadding();
widthLeft = newWidthLeft; widthLeft = newWidthLeft;
@ -2784,7 +2776,7 @@ int32 Text::countHeight(int32 w) const {
if (_btype == TextBlockTText) { if (_btype == TextBlockTText) {
TextBlock *t = static_cast<TextBlock*>(b); TextBlock *t = static_cast<TextBlock*>(b);
if (t->_words.isEmpty()) { // no words in this block, spaces only => layout this block in the same line if (t->_words.isEmpty()) { // no words in this block, spaces only => layout this block in the same line
last_rPadding += lpadding; last_rPadding += b__f_lpadding;
lineHeight = qMax(lineHeight, blockHeight); lineHeight = qMax(lineHeight, blockHeight);
@ -2795,14 +2787,14 @@ int32 Text::countHeight(int32 w) const {
QFixed f_wLeft = widthLeft; QFixed f_wLeft = widthLeft;
int32 f_lineHeight = lineHeight; int32 f_lineHeight = lineHeight;
for (TextBlock::TextWords::const_iterator j = t->_words.cbegin(), e = t->_words.cend(), f = j; j != e; ++j) { for (TextBlock::TextWords::const_iterator j = t->_words.cbegin(), e = t->_words.cend(), f = j; j != e; ++j) {
bool wordEndsHere = (j->width >= 0); bool wordEndsHere = (j->f_width() >= 0);
QFixed j_width = wordEndsHere ? j->width : -j->width; QFixed j_width = wordEndsHere ? j->f_width() : -j->f_width();
QFixed newWidthLeft = widthLeft - lpadding - last_rBearing - (last_rPadding + j_width - j->f_rbearing()); QFixed newWidthLeft = widthLeft - b__f_lpadding - last_rBearing - (last_rPadding + j_width - j->f_rbearing());
lpadding = 0; b__f_lpadding = 0;
if (newWidthLeft >= 0) { if (newWidthLeft >= 0) {
last_rBearing = j->f_rbearing(); last_rBearing = j->f_rbearing();
last_rPadding = j->rpadding; last_rPadding = j->f_rpadding();
widthLeft = newWidthLeft; widthLeft = newWidthLeft;
lineHeight = qMax(lineHeight, blockHeight); lineHeight = qMax(lineHeight, blockHeight);
@ -2822,13 +2814,13 @@ int32 Text::countHeight(int32 w) const {
j = f; j = f;
widthLeft = f_wLeft; widthLeft = f_wLeft;
lineHeight = f_lineHeight; lineHeight = f_lineHeight;
j_width = (j->width >= 0) ? j->width : -j->width; j_width = (j->f_width() >= 0) ? j->f_width() : -j->f_width();
} }
result += lineHeight; result += lineHeight;
lineHeight = qMax(0, blockHeight); lineHeight = qMax(0, blockHeight);
last_rBearing = j->f_rbearing(); last_rBearing = j->f_rbearing();
last_rPadding = j->rpadding; last_rPadding = j->f_rpadding();
widthLeft = width - (j_width - last_rBearing); widthLeft = width - (j_width - last_rBearing);
longWordLine = true; longWordLine = true;
@ -2841,7 +2833,7 @@ int32 Text::countHeight(int32 w) const {
result += lineHeight; result += lineHeight;
lineHeight = qMax(0, blockHeight); lineHeight = qMax(0, blockHeight);
last_rBearing = _rb; last_rBearing = b__f_rbearing;
last_rPadding = b->f_rpadding(); last_rPadding = b->f_rpadding();
widthLeft = width - (b->f_width() - last_rBearing); widthLeft = width - (b->f_width() - last_rBearing);

View File

@ -20,7 +20,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include "../../../QtStatic/qtbase/src/gui/text/qfontengine_p.h" #include "private/qfontengine_p.h"
#include "core/click_handler.h" #include "core/click_handler.h"
#include "ui/text/text_entity.h" #include "ui/text/text_entity.h"

View File

@ -32,10 +32,11 @@ struct ScriptLine {
QFixed textWidth; QFixed textWidth;
}; };
// All members finished with "_" are internal.
struct LineBreakHelper struct LineBreakHelper
{ {
LineBreakHelper() LineBreakHelper()
: glyphCount(0), maxGlyphs(0), currentPosition(0), fontEngine(0), logClusters(0) : glyphCount(0), maxGlyphs(INT_MAX), currentPosition(0), fontEngine(0), logClusters(0)
{ {
} }
@ -48,7 +49,9 @@ struct LineBreakHelper
int glyphCount; int glyphCount;
int maxGlyphs; int maxGlyphs;
int currentPosition; int currentPosition;
glyph_t previousGlyph;
glyph_t previousGlyph_ = 0;
QFontEngine *previousFontEngine_ = nullptr;
QFixed rightBearing; QFixed rightBearing;
@ -65,35 +68,71 @@ struct LineBreakHelper
inline void saveCurrentGlyph() inline void saveCurrentGlyph()
{ {
previousGlyph = 0;
if (currentPosition > 0 && if (currentPosition > 0 &&
logClusters[currentPosition - 1] < glyphs.numGlyphs) { logClusters[currentPosition - 1] < glyphs.numGlyphs) {
previousGlyph = currentGlyph(); // needed to calculate right bearing later previousGlyph_ = currentGlyph(); // needed to calculate right bearing later
previousFontEngine_ = fontEngine;
} else {
previousGlyph_ = 0;
previousFontEngine_ = nullptr;
} }
} }
inline void adjustRightBearing(glyph_t glyph) inline void calculateRightBearing(QFontEngine *engine, glyph_t glyph)
{ {
qreal rb; qreal rb;
fontEngine->getGlyphBearings(glyph, 0, &rb); engine->getGlyphBearings(glyph, 0, &rb);
rightBearing = qMin(QFixed(), QFixed::fromReal(rb));
// We only care about negative right bearings, so we limit the range
// of the bearing here so that we can assume it's negative in the rest
// of the code, as well ase use QFixed(1) as a sentinel to represent
// the state where we have yet to compute the right bearing.
rightBearing = qMin(QFixed::fromReal(rb), QFixed(0));
} }
inline void adjustRightBearing() inline void calculateRightBearing()
{ {
if (currentPosition <= 0) if (currentPosition > 0 &&
return; logClusters[currentPosition - 1] < glyphs.numGlyphs) {
adjustRightBearing(currentGlyph()); calculateRightBearing(fontEngine, currentGlyph());
} else {
rightBearing = 0;
}
} }
inline void adjustPreviousRightBearing() inline void calculateRightBearingForPreviousGlyph()
{ {
if (previousGlyph > 0) if (previousGlyph_ > 0) {
adjustRightBearing(previousGlyph); calculateRightBearing(previousFontEngine_, previousGlyph_);
} else {
rightBearing = 0;
}
}
// We always calculate the right bearing right before it is needed.
// So we don't need caching / optimizations referred to delayed right bearing calculations.
//static const QFixed RightBearingNotCalculated;
//inline void resetRightBearing()
//{
// rightBearing = RightBearingNotCalculated;
//}
// We express the negative right bearing as an absolute number
// so that it can be applied to the width using addition.
inline QFixed negativeRightBearing() const
{
//if (rightBearing == RightBearingNotCalculated)
// return QFixed(0);
return qAbs(rightBearing);
} }
}; };
//const QFixed LineBreakHelper::RightBearingNotCalculated = QFixed(1);
static inline void addNextCluster(int &pos, int end, ScriptLine &line, int &glyphCount, static inline void addNextCluster(int &pos, int end, ScriptLine &line, int &glyphCount,
const QScriptItem &current, const unsigned short *logClusters, const QScriptItem &current, const unsigned short *logClusters,
const QGlyphLayout &glyphs) const QGlyphLayout &glyphs)
@ -127,8 +166,6 @@ public:
void parseWords(QFixed minResizeWidth, int32 blockFrom) { void parseWords(QFixed minResizeWidth, int32 blockFrom) {
LineBreakHelper lbh; LineBreakHelper lbh;
lbh.maxGlyphs = INT_MAX;
int item = -1; int item = -1;
int newItem = eng->findItem(0); int newItem = eng->findItem(0);
@ -137,10 +174,8 @@ public:
const QCharAttributes *attributes = eng->attributes(); const QCharAttributes *attributes = eng->attributes();
if (!attributes) if (!attributes)
return; return;
lbh.currentPosition = 0;
int end = 0; int end = 0;
lbh.logClusters = eng->layoutData->logClustersPtr; lbh.logClusters = eng->layoutData->logClustersPtr;
lbh.previousGlyph = 0;
block->_lpadding = 0; block->_lpadding = 0;
block->_words.clear(); block->_words.clear();
@ -180,7 +215,7 @@ public:
if (block->_words.isEmpty()) { if (block->_words.isEmpty()) {
block->_lpadding = lbh.spaceData.textWidth; block->_lpadding = lbh.spaceData.textWidth;
} else { } else {
block->_words.back().rpadding += lbh.spaceData.textWidth; block->_words.back().add_rpadding(lbh.spaceData.textWidth);
block->_width += lbh.spaceData.textWidth; block->_width += lbh.spaceData.textWidth;
} }
lbh.spaceData.length = 0; lbh.spaceData.length = 0;
@ -199,8 +234,8 @@ public:
if (lbh.currentPosition >= eng->layoutData->string.length() if (lbh.currentPosition >= eng->layoutData->string.length()
|| attributes[lbh.currentPosition].whiteSpace || attributes[lbh.currentPosition].whiteSpace
|| isLineBreak(attributes, lbh.currentPosition)) { || isLineBreak(attributes, lbh.currentPosition)) {
lbh.adjustRightBearing(); lbh.calculateRightBearing();
block->_words.push_back(TextWord(wordStart + blockFrom, lbh.tmpData.textWidth, qMin(QFixed(), lbh.rightBearing))); block->_words.push_back(TextWord(wordStart + blockFrom, lbh.tmpData.textWidth, -lbh.negativeRightBearing()));
block->_width += lbh.tmpData.textWidth; block->_width += lbh.tmpData.textWidth;
lbh.tmpData.textWidth = 0; lbh.tmpData.textWidth = 0;
lbh.tmpData.length = 0; lbh.tmpData.length = 0;
@ -209,8 +244,8 @@ public:
} else if (attributes[lbh.currentPosition].graphemeBoundary) { } else if (attributes[lbh.currentPosition].graphemeBoundary) {
if (!addingEachGrapheme && lbh.tmpData.textWidth > minResizeWidth) { if (!addingEachGrapheme && lbh.tmpData.textWidth > minResizeWidth) {
if (lastGraphemeBoundaryPosition >= 0) { if (lastGraphemeBoundaryPosition >= 0) {
lbh.adjustPreviousRightBearing(); lbh.calculateRightBearingForPreviousGlyph();
block->_words.push_back(TextWord(wordStart + blockFrom, -lastGraphemeBoundaryLine.textWidth, qMin(QFixed(), lbh.rightBearing))); block->_words.push_back(TextWord(wordStart + blockFrom, -lastGraphemeBoundaryLine.textWidth, -lbh.negativeRightBearing()));
block->_width += lastGraphemeBoundaryLine.textWidth; block->_width += lastGraphemeBoundaryLine.textWidth;
lbh.tmpData.textWidth -= lastGraphemeBoundaryLine.textWidth; lbh.tmpData.textWidth -= lastGraphemeBoundaryLine.textWidth;
lbh.tmpData.length -= lastGraphemeBoundaryLine.length; lbh.tmpData.length -= lastGraphemeBoundaryLine.length;
@ -219,8 +254,8 @@ public:
addingEachGrapheme = true; addingEachGrapheme = true;
} }
if (addingEachGrapheme) { if (addingEachGrapheme) {
lbh.adjustRightBearing(); lbh.calculateRightBearing();
block->_words.push_back(TextWord(wordStart + blockFrom, -lbh.tmpData.textWidth, qMin(QFixed(), lbh.rightBearing))); block->_words.push_back(TextWord(wordStart + blockFrom, -lbh.tmpData.textWidth, -lbh.negativeRightBearing()));
block->_width += lbh.tmpData.textWidth; block->_width += lbh.tmpData.textWidth;
lbh.tmpData.textWidth = 0; lbh.tmpData.textWidth = 0;
lbh.tmpData.length = 0; lbh.tmpData.length = 0;
@ -239,7 +274,7 @@ public:
if (block->_words.isEmpty()) { if (block->_words.isEmpty()) {
block->_rpadding = 0; block->_rpadding = 0;
} else { } else {
block->_rpadding = block->_words.back().rpadding; block->_rpadding = block->_words.back().f_rpadding();
block->_width -= block->_rpadding; block->_width -= block->_rpadding;
block->_words.squeeze(); block->_words.squeeze();
} }
@ -261,6 +296,10 @@ private:
}; };
QFixed ITextBlock::f_rbearing() const {
return (type() == TextBlockTText) ? static_cast<const TextBlock*>(this)->real_f_rbearing() : 0;
}
TextBlock::TextBlock(const style::font &font, const QString &str, QFixed minResizeWidth, uint16 from, uint16 length, uchar flags, const style::color &color, uint16 lnkIndex) : ITextBlock(font, str, from, length, flags, color, lnkIndex) { TextBlock::TextBlock(const style::font &font, const QString &str, QFixed minResizeWidth, uint16 from, uint16 length, uchar flags, const style::color &color, uint16 lnkIndex) : ITextBlock(font, str, from, length, flags, color, lnkIndex) {
_flags |= ((TextBlockTText & 0x0F) << 8); _flags |= ((TextBlockTText & 0x0F) << 8);
if (length) { if (length) {

View File

@ -20,7 +20,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
#include "../../../QtStatic/qtbase/src/gui/text/qfontengine_p.h" #include "private/qfontengine_p.h"
enum TextBlockType { enum TextBlockType {
TextBlockTNewline = 0x01, TextBlockTNewline = 0x01,
@ -75,6 +75,9 @@ public:
return _rpadding; return _rpadding;
} }
// Should be virtual, but optimized throught type() call.
QFixed f_rbearing() const;
uint16 lnkIndex() const { uint16 lnkIndex() const {
return (_flags >> 12) & 0xFFFF; return (_flags >> 12) & 0xFFFF;
} }
@ -132,27 +135,41 @@ private:
friend class TextPainter; friend class TextPainter;
}; };
struct TextWord { class TextWord {
TextWord() { public:
TextWord() = default;
TextWord(uint16 from, QFixed width, QFixed rbearing, QFixed rpadding = 0)
: _from(from)
, _width(width)
, _rpadding(rpadding)
, _rbearing(rbearing.value() > 0x7FFF ? 0x7FFF : (rbearing.value() < -0x7FFF ? -0x7FFF : rbearing.value())) {
} }
TextWord(uint16 from, QFixed width, QFixed rbearing, QFixed rpadding = 0) : from(from), uint16 from() const {
_rbearing(rbearing.value() > 0x7FFF ? 0x7FFF : (rbearing.value() < -0x7FFF ? -0x7FFF : rbearing.value())), width(width), rpadding(rpadding) { return _from;
} }
QFixed f_rbearing() const { QFixed f_rbearing() const {
return QFixed::fromFixed(_rbearing); return QFixed::fromFixed(_rbearing);
} }
uint16 from; QFixed f_width() const {
int16 _rbearing; return _width;
QFixed width, rpadding; }
QFixed f_rpadding() const {
return _rpadding;
}
void add_rpadding(QFixed padding) {
_rpadding += padding;
}
private:
uint16 _from = 0;
QFixed _width, _rpadding;
int16 _rbearing = 0;
}; };
class TextBlock : public ITextBlock { class TextBlock : public ITextBlock {
public: public:
QFixed f_rbearing() const {
return _words.isEmpty() ? 0 : _words.back().f_rbearing();
}
ITextBlock *clone() const { ITextBlock *clone() const {
return new TextBlock(*this); return new TextBlock(*this);
} }
@ -161,6 +178,11 @@ private:
TextBlock(const style::font &font, const QString &str, QFixed minResizeWidth, uint16 from, uint16 length, uchar flags, const style::color &color, uint16 lnkIndex); TextBlock(const style::font &font, const QString &str, QFixed minResizeWidth, uint16 from, uint16 length, uchar flags, const style::color &color, uint16 lnkIndex);
friend class ITextBlock;
QFixed real_f_rbearing() const {
return _words.isEmpty() ? 0 : _words.back().f_rbearing();
}
typedef QVector<TextWord> TextWords; typedef QVector<TextWord> TextWords;
TextWords _words; TextWords _words;

View File

@ -11,7 +11,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>0.9.45</string> <string>$(TDESKTOP_VERSION)</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleURLTypes</key> <key>CFBundleURLTypes</key>

View File

@ -44,8 +44,8 @@ CONFIG(release, debug|release) {
} }
codegen_lang.target = lang_target codegen_lang.target = lang_target
codegen_lang.depends = ./../../Telegram/Resources/lang.strings codegen_lang.depends = ./../../Telegram/Resources/langs/lang.strings
codegen_lang.commands = mkdir -p ./GeneratedFiles && ./../DebugLang/MetaLang -lang_in ./../../Telegram/Resources/lang.strings -lang_out ./GeneratedFiles/lang_auto codegen_lang.commands = mkdir -p ./GeneratedFiles && ./../DebugLang/MetaLang -lang_in ./../../Telegram/Resources/langs/lang.strings -lang_out ./GeneratedFiles/lang_auto
QMAKE_EXTRA_TARGETS += codegen_style codegen_numbers codegen_lang QMAKE_EXTRA_TARGETS += codegen_style codegen_numbers codegen_lang
@ -241,6 +241,7 @@ HEADERS += \
./SourceFiles/core/basic_types.h \ ./SourceFiles/core/basic_types.h \
./SourceFiles/core/click_handler.h \ ./SourceFiles/core/click_handler.h \
./SourceFiles/core/click_handler_types.h \ ./SourceFiles/core/click_handler_types.h \
./SourceFiles/core/version.h \
./SourceFiles/dialogs/dialogs_common.h \ ./SourceFiles/dialogs/dialogs_common.h \
./SourceFiles/dialogs/dialogs_indexed_list.h \ ./SourceFiles/dialogs/dialogs_indexed_list.h \
./SourceFiles/dialogs/dialogs_layout.h \ ./SourceFiles/dialogs/dialogs_layout.h \
@ -355,9 +356,9 @@ CONFIG(debug, debug|release) {
QMAKE_LFLAGS_DEBUG += -g -rdynamic -static-libstdc++ QMAKE_LFLAGS_DEBUG += -g -rdynamic -static-libstdc++
} }
INCLUDEPATH += ./../../Libraries/QtStatic/qtbase/include/QtGui/5.5.1/QtGui\ INCLUDEPATH += /usr/local/tdesktop/Qt-5.6.0/include/QtGui/5.6.0/QtGui\
./../../Libraries/QtStatic/qtbase/include/QtCore/5.5.1/QtCore\ /usr/local/tdesktop/Qt-5.6.0/include/QtCore/5.6.0/QtCore\
./../../Libraries/QtStatic/qtbase/include\ /usr/local/tdesktop/Qt-5.6.0/include\
/usr/local/include\ /usr/local/include\
/usr/local/include/opus\ /usr/local/include/opus\
./SourceFiles\ ./SourceFiles\
@ -381,9 +382,9 @@ INCLUDEPATH += "/usr/include/dee-1.0"
INCLUDEPATH += "/usr/include/libdbusmenu-glib-0.4" INCLUDEPATH += "/usr/include/libdbusmenu-glib-0.4"
LIBS += -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 \ LIBS += /usr/local/tdesktop/Qt-5.6.0/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.a \
./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libibusplatforminputcontextplugin.a \ /usr/local/tdesktop/Qt-5.6.0/plugins/platforminputcontexts/libibusplatforminputcontextplugin.a \
./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.a /usr/local/tdesktop/Qt-5.6.0/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.a
LIBS += /usr/local/lib/libz.a LIBS += /usr/local/lib/libz.a
LIBS += /usr/local/lib/libxkbcommon.a LIBS += /usr/local/lib/libxkbcommon.a
LIBS += ./../../../Libraries/breakpad/src/client/linux/libbreakpad_client.a LIBS += ./../../../Libraries/breakpad/src/client/linux/libbreakpad_client.a
@ -397,7 +398,7 @@ OTHER_FILES += \
./Resources/basic_types.style \ ./Resources/basic_types.style \
./Resources/basic.style \ ./Resources/basic.style \
./Resources/all_files.style \ ./Resources/all_files.style \
./Resources/lang.strings \ ./Resources/langs/lang.strings \
./Resources/langs/lang_it.strings \ ./Resources/langs/lang_it.strings \
./Resources/langs/lang_es.strings \ ./Resources/langs/lang_es.strings \
./Resources/langs/lang_de.strings \ ./Resources/langs/lang_de.strings \

File diff suppressed because it is too large Load Diff

View File

@ -4,9 +4,6 @@
<Filter Include="Resources"> <Filter Include="Resources">
<UniqueIdentifier>{df139398-6d5d-4bd5-8abe-b509b102f5d8}</UniqueIdentifier> <UniqueIdentifier>{df139398-6d5d-4bd5-8abe-b509b102f5d8}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="Version">
<UniqueIdentifier>{9d7bbb7d-817b-4f19-a719-74e674bdc84b}</UniqueIdentifier>
</Filter>
<Filter Include="ThirdParty"> <Filter Include="ThirdParty">
<UniqueIdentifier>{cda95767-f353-4a6b-a124-73632e61028a}</UniqueIdentifier> <UniqueIdentifier>{cda95767-f353-4a6b-a124-73632e61028a}</UniqueIdentifier>
</Filter> </Filter>
@ -88,6 +85,12 @@
<Filter Include="SourceFiles\ui\style"> <Filter Include="SourceFiles\ui\style">
<UniqueIdentifier>{58dd7db6-06a2-4076-964d-aec4e106c8c8}</UniqueIdentifier> <UniqueIdentifier>{58dd7db6-06a2-4076-964d-aec4e106c8c8}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="OtherPlatforms">
<UniqueIdentifier>{9d7bbb7d-817b-4f19-a719-74e674bdc84b}</UniqueIdentifier>
</Filter>
<Filter Include="Resources\winrc">
<UniqueIdentifier>{6b33ddc0-a7e2-4961-81dc-e1b5de2e2c60}</UniqueIdentifier>
</Filter>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="SourceFiles\main.cpp"> <ClCompile Include="SourceFiles\main.cpp">
@ -1115,9 +1118,6 @@
<ClInclude Include="SourceFiles\app.h"> <ClInclude Include="SourceFiles\app.h">
<Filter>SourceFiles</Filter> <Filter>SourceFiles</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="resource.h">
<Filter>GeneratedFiles</Filter>
</ClInclude>
<ClInclude Include="SourceFiles\settings.h"> <ClInclude Include="SourceFiles\settings.h">
<Filter>SourceFiles</Filter> <Filter>SourceFiles</Filter>
</ClInclude> </ClInclude>
@ -1136,9 +1136,6 @@
<ClInclude Include="SourceFiles\pspecific_mac_p.h"> <ClInclude Include="SourceFiles\pspecific_mac_p.h">
<Filter>SourceFiles</Filter> <Filter>SourceFiles</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="SourceFiles\config.h">
<Filter>Version</Filter>
</ClInclude>
<ClInclude Include="ThirdParty\minizip\crypt.h"> <ClInclude Include="ThirdParty\minizip\crypt.h">
<Filter>ThirdParty\minizip</Filter> <Filter>ThirdParty\minizip</Filter>
</ClInclude> </ClInclude>
@ -1271,6 +1268,15 @@
<ClInclude Include="SourceFiles\ui\style\style_core_icon.h"> <ClInclude Include="SourceFiles\ui\style\style_core_icon.h">
<Filter>SourceFiles\ui\style</Filter> <Filter>SourceFiles\ui\style</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="SourceFiles\core\version.h">
<Filter>SourceFiles\core</Filter>
</ClInclude>
<ClInclude Include="SourceFiles\config.h">
<Filter>SourceFiles</Filter>
</ClInclude>
<ClInclude Include="Resources\winrc\resource.h">
<Filter>Resources\winrc</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<CustomBuild Include="SourceFiles\application.h"> <CustomBuild Include="SourceFiles\application.h">
@ -1405,9 +1411,6 @@
<CustomBuild Include="SourceFiles\playerwidget.h"> <CustomBuild Include="SourceFiles\playerwidget.h">
<Filter>SourceFiles</Filter> <Filter>SourceFiles</Filter>
</CustomBuild> </CustomBuild>
<CustomBuild Include="Resources\lang.strings">
<Filter>Resources</Filter>
</CustomBuild>
<CustomBuild Include="Resources\numbers.txt"> <CustomBuild Include="Resources\numbers.txt">
<Filter>Resources</Filter> <Filter>Resources</Filter>
</CustomBuild> </CustomBuild>
@ -1510,6 +1513,9 @@
<CustomBuild Include="SourceFiles\core\basic_types.h"> <CustomBuild Include="SourceFiles\core\basic_types.h">
<Filter>SourceFiles\core</Filter> <Filter>SourceFiles\core</Filter>
</CustomBuild> </CustomBuild>
<CustomBuild Include="Resources\langs\lang.strings">
<Filter>Resources\langs</Filter>
</CustomBuild>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="Resources\langs\lang_it.strings"> <None Include="Resources\langs\lang_it.strings">
@ -1531,19 +1537,16 @@
<Filter>Resources\langs</Filter> <Filter>Resources\langs</Filter>
</None> </None>
<None Include="Telegram.xcodeproj\project.pbxproj"> <None Include="Telegram.xcodeproj\project.pbxproj">
<Filter>Version</Filter> <Filter>OtherPlatforms</Filter>
</None> </None>
<None Include="Telegram.plist"> <None Include="Telegram.plist">
<Filter>Version</Filter> <Filter>OtherPlatforms</Filter>
</None>
<None Include="Version">
<Filter>Version</Filter>
</None> </None>
<None Include="Telegram.xcodeproj\qt_preprocess.mak"> <None Include="Telegram.xcodeproj\qt_preprocess.mak">
<Filter>Version</Filter> <Filter>OtherPlatforms</Filter>
</None> </None>
<None Include="Telegram.pro"> <None Include="Telegram.pro">
<Filter>Version</Filter> <Filter>OtherPlatforms</Filter>
</None> </None>
<None Include="SourceFiles\mtproto\generate.py"> <None Include="SourceFiles\mtproto\generate.py">
<Filter>SourceFiles\mtproto</Filter> <Filter>SourceFiles\mtproto</Filter>
@ -1554,17 +1557,21 @@
<None Include="SourceFiles\pspecific_mac_p.mm"> <None Include="SourceFiles\pspecific_mac_p.mm">
<Filter>SourceFiles</Filter> <Filter>SourceFiles</Filter>
</None> </None>
<None Include="Resources\langs\download.sh">
<Filter>Resources\langs</Filter>
</None>
<None Include="Resources\langs\list">
<Filter>Resources\langs</Filter>
</None>
<None Include="Resources\langs\upload.sh">
<Filter>Resources\langs</Filter>
</None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Image Include="Resources\art\icon256.ico"> <Image Include="Resources\art\icon256.ico">
<Filter>Resources</Filter> <Filter>Resources</Filter>
</Image> </Image>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ResourceCompile Include="Telegram.rc">
<Filter>Version</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup> <ItemGroup>
<CodegenStyleItem Include="Resources\all_files.style"> <CodegenStyleItem Include="Resources\all_files.style">
<Filter>Resources</Filter> <Filter>Resources</Filter>
@ -1579,4 +1586,9 @@
<Filter>SourceFiles\overview</Filter> <Filter>SourceFiles\overview</Filter>
</CodegenStyleItem> </CodegenStyleItem>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ResourceCompile Include="Resources\winrc\Telegram.rc">
<Filter>Resources\winrc</Filter>
</ResourceCompile>
</ItemGroup>
</Project> </Project>

View File

@ -89,6 +89,7 @@
078500361CC94D1900168DBB /* style_core_icon.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 078500301CC94D1900168DBB /* style_core_icon.cpp */; }; 078500361CC94D1900168DBB /* style_core_icon.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 078500301CC94D1900168DBB /* style_core_icon.cpp */; };
078500371CC94D1900168DBB /* style_core_types.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 078500321CC94D1900168DBB /* style_core_types.cpp */; }; 078500371CC94D1900168DBB /* style_core_types.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 078500321CC94D1900168DBB /* style_core_types.cpp */; };
0785003A1CC94D9600168DBB /* style_overview.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 078500381CC94D9600168DBB /* style_overview.cpp */; }; 0785003A1CC94D9600168DBB /* style_overview.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 078500381CC94D9600168DBB /* style_overview.cpp */; };
0785004D1CCA847400168DBB /* libqtfreetype.a in Link Binary With Libraries */ = {isa = PBXBuildFile; fileRef = 0785004C1CCA847400168DBB /* libqtfreetype.a */; };
078A2FCA1A811C5900CCC7A0 /* moc_backgroundbox.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 078A2FC91A811C5900CCC7A0 /* moc_backgroundbox.cpp */; }; 078A2FCA1A811C5900CCC7A0 /* moc_backgroundbox.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 078A2FC91A811C5900CCC7A0 /* moc_backgroundbox.cpp */; };
078A2FCD1A811CA600CCC7A0 /* backgroundbox.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 078A2FCB1A811CA600CCC7A0 /* backgroundbox.cpp */; }; 078A2FCD1A811CA600CCC7A0 /* backgroundbox.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 078A2FCB1A811CA600CCC7A0 /* backgroundbox.cpp */; };
07A69332199277BA0099CB9F /* mediaview.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 07A69330199277BA0099CB9F /* mediaview.cpp */; }; 07A69332199277BA0099CB9F /* mediaview.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 07A69330199277BA0099CB9F /* mediaview.cpp */; };
@ -166,7 +167,6 @@
4FEA8F51B7BC7CAC71347A1A /* connectionbox.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 51355181C0E6689B0B764543 /* connectionbox.cpp */; settings = {ATTRIBUTES = (); }; }; 4FEA8F51B7BC7CAC71347A1A /* connectionbox.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 51355181C0E6689B0B764543 /* connectionbox.cpp */; settings = {ATTRIBUTES = (); }; };
5058CB9D7BFFCE9F404A3700 /* Qt5Network in Link Binary With Libraries */ = {isa = PBXBuildFile; fileRef = 6700DD555BF1C0FC338FB959 /* Qt5Network */; }; 5058CB9D7BFFCE9F404A3700 /* Qt5Network in Link Binary With Libraries */ = {isa = PBXBuildFile; fileRef = 6700DD555BF1C0FC338FB959 /* Qt5Network */; };
565F748438E6CE0148C54AFE /* moc_flatinput.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 1E5EEB5782B6357057356F9E /* moc_flatinput.cpp */; settings = {ATTRIBUTES = (); }; }; 565F748438E6CE0148C54AFE /* moc_flatinput.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 1E5EEB5782B6357057356F9E /* moc_flatinput.cpp */; settings = {ATTRIBUTES = (); }; };
59789101736112A570B8EFE6 /* qjp2 in Link Binary With Libraries */ = {isa = PBXBuildFile; fileRef = F0681BC551FC8A2B132FC646 /* qjp2 */; };
5CE57D44510AB2A11886AB52 /* title.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 2BB2A1BB8DB0993F78F4E3C7 /* title.cpp */; settings = {ATTRIBUTES = (); }; }; 5CE57D44510AB2A11886AB52 /* title.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 2BB2A1BB8DB0993F78F4E3C7 /* title.cpp */; settings = {ATTRIBUTES = (); }; };
5FC914F652D1B16FDA8F0634 /* moc_contactsbox.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 26083D8E535AFF927591E1A5 /* moc_contactsbox.cpp */; settings = {ATTRIBUTES = (); }; }; 5FC914F652D1B16FDA8F0634 /* moc_contactsbox.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 26083D8E535AFF927591E1A5 /* moc_contactsbox.cpp */; settings = {ATTRIBUTES = (); }; };
60CB4898955209B665E7B07D /* moc_twidget.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 55A654A2EE8554FF062742B8 /* moc_twidget.cpp */; settings = {ATTRIBUTES = (); }; }; 60CB4898955209B665E7B07D /* moc_twidget.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 55A654A2EE8554FF062742B8 /* moc_twidget.cpp */; settings = {ATTRIBUTES = (); }; };
@ -262,7 +262,6 @@
F8B465CE34D8DF87AAE95913 /* CoreFoundation.framework in Link Binary With Libraries */ = {isa = PBXBuildFile; fileRef = 4D765E1B1EA6C757220C63E7 /* CoreFoundation.framework */; }; F8B465CE34D8DF87AAE95913 /* CoreFoundation.framework in Link Binary With Libraries */ = {isa = PBXBuildFile; fileRef = 4D765E1B1EA6C757220C63E7 /* CoreFoundation.framework */; };
F8ED42CF8679BF83227DAFC4 /* Carbon.framework in Link Binary With Libraries */ = {isa = PBXBuildFile; fileRef = 9DFF62A901D70814B8A323D4 /* Carbon.framework */; }; F8ED42CF8679BF83227DAFC4 /* Carbon.framework in Link Binary With Libraries */ = {isa = PBXBuildFile; fileRef = 9DFF62A901D70814B8A323D4 /* Carbon.framework */; };
FA603B17F803E8D6B55C2F2B /* pspecific_mac_p.mm in Compile Sources */ = {isa = PBXBuildFile; fileRef = 73737DC91E390C4AB18FB595 /* pspecific_mac_p.mm */; settings = {ATTRIBUTES = (); }; }; FA603B17F803E8D6B55C2F2B /* pspecific_mac_p.mm in Compile Sources */ = {isa = PBXBuildFile; fileRef = 73737DC91E390C4AB18FB595 /* pspecific_mac_p.mm */; settings = {ATTRIBUTES = (); }; };
FBD56E2AC34F76BFFDB68619 /* qmng in Link Binary With Libraries */ = {isa = PBXBuildFile; fileRef = 83D37373949868693FB7816D /* qmng */; };
FCC949FEA178F9F5D7478027 /* moc_flattextarea.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = D12A6BD8EE80B8B308E481AD /* moc_flattextarea.cpp */; settings = {ATTRIBUTES = (); }; }; FCC949FEA178F9F5D7478027 /* moc_flattextarea.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = D12A6BD8EE80B8B308E481AD /* moc_flattextarea.cpp */; settings = {ATTRIBUTES = (); }; };
FCE6518C548DF7BC82228A4A /* twidget.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = BB1602EA641643DE565005B1 /* twidget.cpp */; settings = {ATTRIBUTES = (); }; }; FCE6518C548DF7BC82228A4A /* twidget.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = BB1602EA641643DE565005B1 /* twidget.cpp */; settings = {ATTRIBUTES = (); }; };
FD2FE0C564A7389A2E609EC7 /* moc_sysbuttons.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = B88236FC554B694F618D848C /* moc_sysbuttons.cpp */; settings = {ATTRIBUTES = (); }; }; FD2FE0C564A7389A2E609EC7 /* moc_sysbuttons.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = B88236FC554B694F618D848C /* moc_sysbuttons.cpp */; settings = {ATTRIBUTES = (); }; };
@ -323,7 +322,7 @@
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
01D6341DC31FE5997F7BB159 /* file_download.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = file_download.cpp; path = SourceFiles/mtproto/file_download.cpp; sourceTree = "<absolute>"; }; 01D6341DC31FE5997F7BB159 /* file_download.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = file_download.cpp; path = SourceFiles/mtproto/file_download.cpp; sourceTree = "<absolute>"; };
032C1BF3E727B450A4851D48 /* emojibox.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = emojibox.h; path = SourceFiles/boxes/emojibox.h; sourceTree = "<absolute>"; }; 032C1BF3E727B450A4851D48 /* emojibox.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = emojibox.h; path = SourceFiles/boxes/emojibox.h; sourceTree = "<absolute>"; };
04391BE7A8B9D811E255100A /* Qt5Gui */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = Qt5Gui; path = "/usr/local/Qt-5.5.1/lib/libQt5Gui$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; }; 04391BE7A8B9D811E255100A /* Qt5Gui */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = Qt5Gui; path = "(QT_PATH)/lib/libQt5Gui$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; };
047DAFB0A7DE92C63033A43C /* mainwidget.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = mainwidget.cpp; path = SourceFiles/mainwidget.cpp; sourceTree = "<absolute>"; }; 047DAFB0A7DE92C63033A43C /* mainwidget.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = mainwidget.cpp; path = SourceFiles/mainwidget.cpp; sourceTree = "<absolute>"; };
06E379415713F34B83F99C35 /* app.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = app.cpp; path = SourceFiles/app.cpp; sourceTree = "<absolute>"; }; 06E379415713F34B83F99C35 /* app.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = app.cpp; path = SourceFiles/app.cpp; sourceTree = "<absolute>"; };
0702E9A11CB8D2A8007A7495 /* serialize_common.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = serialize_common.cpp; path = SourceFiles/serialize/serialize_common.cpp; sourceTree = SOURCE_ROOT; }; 0702E9A11CB8D2A8007A7495 /* serialize_common.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = serialize_common.cpp; path = SourceFiles/serialize/serialize_common.cpp; sourceTree = SOURCE_ROOT; };
@ -331,7 +330,7 @@
0702E9A31CB8D2A8007A7495 /* serialize_document.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = serialize_document.cpp; path = SourceFiles/serialize/serialize_document.cpp; sourceTree = SOURCE_ROOT; }; 0702E9A31CB8D2A8007A7495 /* serialize_document.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = serialize_document.cpp; path = SourceFiles/serialize/serialize_document.cpp; sourceTree = SOURCE_ROOT; };
0702E9A41CB8D2A8007A7495 /* serialize_document.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = serialize_document.h; path = SourceFiles/serialize/serialize_document.h; sourceTree = SOURCE_ROOT; }; 0702E9A41CB8D2A8007A7495 /* serialize_document.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = serialize_document.h; path = SourceFiles/serialize/serialize_document.h; sourceTree = SOURCE_ROOT; };
07055CC3194EE85B0008DEF6 /* libcrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcrypto.a; path = "./../../Libraries/openssl-xcode/libcrypto.a"; sourceTree = "<group>"; }; 07055CC3194EE85B0008DEF6 /* libcrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcrypto.a; path = "./../../Libraries/openssl-xcode/libcrypto.a"; sourceTree = "<group>"; };
07080BCB1A4357F300741A51 /* lang.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = lang.strings; path = Resources/lang.strings; sourceTree = SOURCE_ROOT; }; 07080BCB1A4357F300741A51 /* lang.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = lang.strings; path = Resources/langs/lang.strings; sourceTree = SOURCE_ROOT; };
07080BCD1A43588C00741A51 /* lang_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = lang_auto.cpp; path = GeneratedFiles/lang_auto.cpp; sourceTree = SOURCE_ROOT; }; 07080BCD1A43588C00741A51 /* lang_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = lang_auto.cpp; path = GeneratedFiles/lang_auto.cpp; sourceTree = SOURCE_ROOT; };
07080BCE1A43588C00741A51 /* lang_auto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lang_auto.h; path = GeneratedFiles/lang_auto.h; sourceTree = SOURCE_ROOT; }; 07080BCE1A43588C00741A51 /* lang_auto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lang_auto.h; path = GeneratedFiles/lang_auto.h; sourceTree = SOURCE_ROOT; };
07080BD01A436A5000741A51 /* lang.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = lang.cpp; path = SourceFiles/lang.cpp; sourceTree = SOURCE_ROOT; }; 07080BD01A436A5000741A51 /* lang.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = lang.cpp; path = SourceFiles/lang.cpp; sourceTree = SOURCE_ROOT; };
@ -423,6 +422,7 @@
078500331CC94D1900168DBB /* style_core_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = style_core_types.h; path = SourceFiles/ui/style/style_core_types.h; sourceTree = SOURCE_ROOT; }; 078500331CC94D1900168DBB /* style_core_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = style_core_types.h; path = SourceFiles/ui/style/style_core_types.h; sourceTree = SOURCE_ROOT; };
078500381CC94D9600168DBB /* style_overview.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = style_overview.cpp; path = GeneratedFiles/styles/style_overview.cpp; sourceTree = SOURCE_ROOT; }; 078500381CC94D9600168DBB /* style_overview.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = style_overview.cpp; path = GeneratedFiles/styles/style_overview.cpp; sourceTree = SOURCE_ROOT; };
078500391CC94D9600168DBB /* style_overview.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = style_overview.h; path = GeneratedFiles/styles/style_overview.h; sourceTree = SOURCE_ROOT; }; 078500391CC94D9600168DBB /* style_overview.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = style_overview.h; path = GeneratedFiles/styles/style_overview.h; sourceTree = SOURCE_ROOT; };
0785004C1CCA847400168DBB /* libqtfreetype.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libqtfreetype.a; path = "$(QT_PATH)/lib/libqtfreetype$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<group>"; };
078A2FC91A811C5900CCC7A0 /* moc_backgroundbox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_backgroundbox.cpp; path = GeneratedFiles/Debug/moc_backgroundbox.cpp; sourceTree = SOURCE_ROOT; }; 078A2FC91A811C5900CCC7A0 /* moc_backgroundbox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_backgroundbox.cpp; path = GeneratedFiles/Debug/moc_backgroundbox.cpp; sourceTree = SOURCE_ROOT; };
078A2FCB1A811CA600CCC7A0 /* backgroundbox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = backgroundbox.cpp; path = SourceFiles/boxes/backgroundbox.cpp; sourceTree = SOURCE_ROOT; }; 078A2FCB1A811CA600CCC7A0 /* backgroundbox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = backgroundbox.cpp; path = SourceFiles/boxes/backgroundbox.cpp; sourceTree = SOURCE_ROOT; };
078A2FCC1A811CA600CCC7A0 /* backgroundbox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = backgroundbox.h; path = SourceFiles/boxes/backgroundbox.h; sourceTree = SOURCE_ROOT; }; 078A2FCC1A811CA600CCC7A0 /* backgroundbox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = backgroundbox.h; path = SourceFiles/boxes/backgroundbox.h; sourceTree = SOURCE_ROOT; };
@ -473,16 +473,17 @@
07C8FE0D1CB80890007A8702 /* toast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = toast.h; path = SourceFiles/ui/toast/toast.h; sourceTree = SOURCE_ROOT; }; 07C8FE0D1CB80890007A8702 /* toast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = toast.h; path = SourceFiles/ui/toast/toast.h; sourceTree = SOURCE_ROOT; };
07C8FE111CB80915007A8702 /* moc_toast_manager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_toast_manager.cpp; path = GeneratedFiles/Debug/moc_toast_manager.cpp; sourceTree = SOURCE_ROOT; }; 07C8FE111CB80915007A8702 /* moc_toast_manager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_toast_manager.cpp; path = GeneratedFiles/Debug/moc_toast_manager.cpp; sourceTree = SOURCE_ROOT; };
07CAACD71AEA64F00058E508 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; }; 07CAACD71AEA64F00058E508 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; };
07D518D41CD0E27600F5FF59 /* version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = version.h; path = SourceFiles/core/version.h; sourceTree = SOURCE_ROOT; };
07D7034919B8755A00C4EED2 /* audio.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = audio.cpp; path = SourceFiles/audio.cpp; sourceTree = SOURCE_ROOT; }; 07D7034919B8755A00C4EED2 /* audio.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = audio.cpp; path = SourceFiles/audio.cpp; sourceTree = SOURCE_ROOT; };
07D7034A19B8755A00C4EED2 /* audio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = audio.h; path = SourceFiles/audio.h; sourceTree = SOURCE_ROOT; }; 07D7034A19B8755A00C4EED2 /* audio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = audio.h; path = SourceFiles/audio.h; sourceTree = SOURCE_ROOT; };
07D703BA19B88FB900C4EED2 /* moc_audio.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_audio.cpp; path = GeneratedFiles/Debug/moc_audio.cpp; sourceTree = SOURCE_ROOT; }; 07D703BA19B88FB900C4EED2 /* moc_audio.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_audio.cpp; path = GeneratedFiles/Debug/moc_audio.cpp; sourceTree = SOURCE_ROOT; };
07D795491B5544B200DE9598 /* qtpcre */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = qtpcre; path = "usr/local/Qt-5.5.1/lib/libqtpcre$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<group>"; }; 07D795491B5544B200DE9598 /* qtpcre */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = qtpcre; path = "$(QT_PATH)/lib/libqtpcre$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<group>"; };
07D7EABB1A597DD000838BA2 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; }; 07D7EABB1A597DD000838BA2 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Resources/langs/en.lproj/Localizable.strings; sourceTree = "<group>"; };
07D7EABD1A597DD200838BA2 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = "<group>"; }; 07D7EABD1A597DD200838BA2 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = Resources/langs/es.lproj/Localizable.strings; sourceTree = "<group>"; };
07D7EABE1A597DD300838BA2 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = "<group>"; }; 07D7EABE1A597DD300838BA2 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = Resources/langs/de.lproj/Localizable.strings; sourceTree = "<group>"; };
07D7EABF1A597DD400838BA2 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/Localizable.strings; sourceTree = "<group>"; }; 07D7EABF1A597DD400838BA2 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = Resources/langs/nl.lproj/Localizable.strings; sourceTree = "<group>"; };
07D7EAC01A597DD500838BA2 /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/Localizable.strings; sourceTree = "<group>"; }; 07D7EAC01A597DD500838BA2 /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = Resources/langs/it.lproj/Localizable.strings; sourceTree = "<group>"; };
07D7EAC11A597DD600838BA2 /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "pt-BR.lproj/Localizable.strings"; sourceTree = "<group>"; }; 07D7EAC11A597DD600838BA2 /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "Resources/langs/pt-BR.lproj/Localizable.strings"; sourceTree = "<group>"; };
07D8509219F5C97E00623D75 /* core_types.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = core_types.cpp; path = SourceFiles/mtproto/core_types.cpp; sourceTree = SOURCE_ROOT; }; 07D8509219F5C97E00623D75 /* core_types.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = core_types.cpp; path = SourceFiles/mtproto/core_types.cpp; sourceTree = SOURCE_ROOT; };
07D8509319F5C97E00623D75 /* scheme_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = scheme_auto.cpp; path = SourceFiles/mtproto/scheme_auto.cpp; sourceTree = SOURCE_ROOT; }; 07D8509319F5C97E00623D75 /* scheme_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = scheme_auto.cpp; path = SourceFiles/mtproto/scheme_auto.cpp; sourceTree = SOURCE_ROOT; };
07D8509719F8320900623D75 /* usernamebox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = usernamebox.cpp; path = SourceFiles/boxes/usernamebox.cpp; sourceTree = SOURCE_ROOT; }; 07D8509719F8320900623D75 /* usernamebox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = usernamebox.cpp; path = SourceFiles/boxes/usernamebox.cpp; sourceTree = SOURCE_ROOT; };
@ -548,14 +549,14 @@
2C99425D7670941EAF07B453 /* moc_historywidget.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_historywidget.cpp; path = GeneratedFiles/Debug/moc_historywidget.cpp; sourceTree = "<absolute>"; }; 2C99425D7670941EAF07B453 /* moc_historywidget.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_historywidget.cpp; path = GeneratedFiles/Debug/moc_historywidget.cpp; sourceTree = "<absolute>"; };
2EA58EF6CDF368B0132BAEB9 /* settings.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = settings.h; path = SourceFiles/settings.h; sourceTree = "<absolute>"; }; 2EA58EF6CDF368B0132BAEB9 /* settings.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = settings.h; path = SourceFiles/settings.h; sourceTree = "<absolute>"; };
301BB513F2F5D447B3BF22DF /* mainwindow.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = mainwindow.h; path = SourceFiles/mainwindow.h; sourceTree = "<absolute>"; }; 301BB513F2F5D447B3BF22DF /* mainwindow.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = mainwindow.h; path = SourceFiles/mainwindow.h; sourceTree = "<absolute>"; };
31120EDB269DFF13E1D49847 /* qicns */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = qicns; path = "/usr/local/Qt-5.5.1/plugins/imageformats/libqicns$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; }; 31120EDB269DFF13E1D49847 /* qicns */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = qicns; path = "$(QT_PATH)/plugins/imageformats/libqicns$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; };
315C7FACB4A9E18AA95486CA /* dcenter.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = dcenter.cpp; path = SourceFiles/mtproto/dcenter.cpp; sourceTree = "<absolute>"; }; 315C7FACB4A9E18AA95486CA /* dcenter.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = dcenter.cpp; path = SourceFiles/mtproto/dcenter.cpp; sourceTree = "<absolute>"; };
34E1DF19219C52D7DB20224A /* flatlabel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = flatlabel.h; path = SourceFiles/ui/flatlabel.h; sourceTree = "<absolute>"; }; 34E1DF19219C52D7DB20224A /* flatlabel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = flatlabel.h; path = SourceFiles/ui/flatlabel.h; sourceTree = "<absolute>"; };
36BDA5D01BED543A92886669 /* Telegram.pro */ = {isa = PBXFileReference; lastKnownFileType = text; path = Telegram.pro; sourceTree = "<absolute>"; }; 36BDA5D01BED543A92886669 /* Telegram.pro */ = {isa = PBXFileReference; lastKnownFileType = text; path = Telegram.pro; sourceTree = "<absolute>"; };
36F718DC72345A84987DB0F6 /* flatbutton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = flatbutton.h; path = SourceFiles/ui/flatbutton.h; sourceTree = "<absolute>"; }; 36F718DC72345A84987DB0F6 /* flatbutton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = flatbutton.h; path = SourceFiles/ui/flatbutton.h; sourceTree = "<absolute>"; };
3A220FD1AE5AD9FE3DC073A4 /* moc_mainwidget.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_mainwidget.cpp; path = GeneratedFiles/Debug/moc_mainwidget.cpp; sourceTree = "<absolute>"; }; 3A220FD1AE5AD9FE3DC073A4 /* moc_mainwidget.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_mainwidget.cpp; path = GeneratedFiles/Debug/moc_mainwidget.cpp; sourceTree = "<absolute>"; };
3B3ED09AB00290D78CF1181B /* moc_dialogswidget.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_dialogswidget.cpp; path = GeneratedFiles/Debug/moc_dialogswidget.cpp; sourceTree = "<absolute>"; }; 3B3ED09AB00290D78CF1181B /* moc_dialogswidget.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_dialogswidget.cpp; path = GeneratedFiles/Debug/moc_dialogswidget.cpp; sourceTree = "<absolute>"; };
3BBB805F6180E363BF89151A /* qtaudio_coreaudio */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = qtaudio_coreaudio; path = "/usr/local/Qt-5.5.1/plugins/audio/libqtaudio_coreaudio$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; }; 3BBB805F6180E363BF89151A /* qtaudio_coreaudio */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = qtaudio_coreaudio; path = "$(QT_PATH)/plugins/audio/libqtaudio_coreaudio$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; };
3BE70E2A82DC2BF402165ED5 /* sysbuttons.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = sysbuttons.h; path = SourceFiles/sysbuttons.h; sourceTree = "<absolute>"; }; 3BE70E2A82DC2BF402165ED5 /* sysbuttons.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = sysbuttons.h; path = SourceFiles/sysbuttons.h; sourceTree = "<absolute>"; };
3C44131FDCFEF4396B9EA2BA /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = "<absolute>"; }; 3C44131FDCFEF4396B9EA2BA /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = "<absolute>"; };
3D54A9F3266BB8739520E3FB /* moc_fileuploader.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_fileuploader.cpp; path = GeneratedFiles/Debug/moc_fileuploader.cpp; sourceTree = "<absolute>"; }; 3D54A9F3266BB8739520E3FB /* moc_fileuploader.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_fileuploader.cpp; path = GeneratedFiles/Debug/moc_fileuploader.cpp; sourceTree = "<absolute>"; };
@ -563,7 +564,7 @@
420A06A32B66D250142B4B6D /* style_core.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = style_core.cpp; path = SourceFiles/ui/style/style_core.cpp; sourceTree = "<absolute>"; }; 420A06A32B66D250142B4B6D /* style_core.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = style_core.cpp; path = SourceFiles/ui/style/style_core.cpp; sourceTree = "<absolute>"; };
4604687EBA85611C9E8A9CDF /* button.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = button.h; path = SourceFiles/ui/button.h; sourceTree = "<absolute>"; }; 4604687EBA85611C9E8A9CDF /* button.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = button.h; path = SourceFiles/ui/button.h; sourceTree = "<absolute>"; };
46292F489228B60010794CE4 /* moc_button.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_button.cpp; path = GeneratedFiles/Debug/moc_button.cpp; sourceTree = "<absolute>"; }; 46292F489228B60010794CE4 /* moc_button.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_button.cpp; path = GeneratedFiles/Debug/moc_button.cpp; sourceTree = "<absolute>"; };
4689C06178B60B84E7F3A3B7 /* Qt5Widgets */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = Qt5Widgets; path = "/usr/local/Qt-5.5.1/lib/libQt5Widgets$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; }; 4689C06178B60B84E7F3A3B7 /* Qt5Widgets */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = Qt5Widgets; path = "$(QT_PATH)/lib/libQt5Widgets$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; };
48003469151B9DDE82E851FB /* moc_profilewidget.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_profilewidget.cpp; path = GeneratedFiles/Debug/moc_profilewidget.cpp; sourceTree = "<absolute>"; }; 48003469151B9DDE82E851FB /* moc_profilewidget.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_profilewidget.cpp; path = GeneratedFiles/Debug/moc_profilewidget.cpp; sourceTree = "<absolute>"; };
4AF15B5A0A43EB62D6DAF211 /* libexif.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libexif.a; path = "../../Libraries/libexif-0.6.20/libexif/.libs/libexif.a"; sourceTree = "<absolute>"; }; 4AF15B5A0A43EB62D6DAF211 /* libexif.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libexif.a; path = "../../Libraries/libexif-0.6.20/libexif/.libs/libexif.a"; sourceTree = "<absolute>"; };
4D1099F2D3696E8A0E17D37D /* session.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = session.h; path = SourceFiles/mtproto/session.h; sourceTree = "<absolute>"; }; 4D1099F2D3696E8A0E17D37D /* session.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = session.h; path = SourceFiles/mtproto/session.h; sourceTree = "<absolute>"; };
@ -584,7 +585,7 @@
59E514973BA9BF6599252DDC /* flattextarea.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = flattextarea.h; path = SourceFiles/ui/flattextarea.h; sourceTree = "<absolute>"; }; 59E514973BA9BF6599252DDC /* flattextarea.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = flattextarea.h; path = SourceFiles/ui/flattextarea.h; sourceTree = "<absolute>"; };
5A5431331A13AA7B07414240 /* stdafx.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = stdafx.cpp; path = SourceFiles/stdafx.cpp; sourceTree = "<absolute>"; }; 5A5431331A13AA7B07414240 /* stdafx.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = stdafx.cpp; path = SourceFiles/stdafx.cpp; sourceTree = "<absolute>"; };
5A7F88F9C7F08D3DDE6EEF6B /* localimageloader.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = localimageloader.cpp; path = SourceFiles/localimageloader.cpp; sourceTree = "<absolute>"; }; 5A7F88F9C7F08D3DDE6EEF6B /* localimageloader.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = localimageloader.cpp; path = SourceFiles/localimageloader.cpp; sourceTree = "<absolute>"; };
5A80A1907B6CFFB524C1E57D /* Qt5Core */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = Qt5Core; path = "/usr/local/Qt-5.5.1/lib/libQt5Core$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; }; 5A80A1907B6CFFB524C1E57D /* Qt5Core */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = Qt5Core; path = "$(QT_PATH)/lib/libQt5Core$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; };
5A9B4C6C59856143F3D0DE53 /* layerwidget.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = layerwidget.cpp; path = SourceFiles/layerwidget.cpp; sourceTree = "<absolute>"; }; 5A9B4C6C59856143F3D0DE53 /* layerwidget.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = layerwidget.cpp; path = SourceFiles/layerwidget.cpp; sourceTree = "<absolute>"; };
5C7FD422BBEDA858D7237AE9 /* flattextarea.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = flattextarea.cpp; path = SourceFiles/ui/flattextarea.cpp; sourceTree = "<absolute>"; }; 5C7FD422BBEDA858D7237AE9 /* flattextarea.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = flattextarea.cpp; path = SourceFiles/ui/flattextarea.cpp; sourceTree = "<absolute>"; };
6011DDB120E1B2D4803E129A /* stdafx.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = stdafx.h; path = SourceFiles/stdafx.h; sourceTree = "<absolute>"; }; 6011DDB120E1B2D4803E129A /* stdafx.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = stdafx.h; path = SourceFiles/stdafx.h; sourceTree = "<absolute>"; };
@ -593,7 +594,7 @@
63AF8520023B4EA40306CB03 /* moc_session.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_session.cpp; path = GeneratedFiles/Debug/moc_session.cpp; sourceTree = "<absolute>"; }; 63AF8520023B4EA40306CB03 /* moc_session.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_session.cpp; path = GeneratedFiles/Debug/moc_session.cpp; sourceTree = "<absolute>"; };
6532A0DC7EFE446967682E83 /* moc_downloadpathbox.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_downloadpathbox.cpp; path = GeneratedFiles/Debug/moc_downloadpathbox.cpp; sourceTree = "<absolute>"; }; 6532A0DC7EFE446967682E83 /* moc_downloadpathbox.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_downloadpathbox.cpp; path = GeneratedFiles/Debug/moc_downloadpathbox.cpp; sourceTree = "<absolute>"; };
6610564B876E47D289A596DB /* confirmbox.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = confirmbox.cpp; path = SourceFiles/boxes/confirmbox.cpp; sourceTree = "<absolute>"; }; 6610564B876E47D289A596DB /* confirmbox.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = confirmbox.cpp; path = SourceFiles/boxes/confirmbox.cpp; sourceTree = "<absolute>"; };
6700DD555BF1C0FC338FB959 /* Qt5Network */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = Qt5Network; path = "/usr/local/Qt-5.5.1/lib/libQt5Network$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; }; 6700DD555BF1C0FC338FB959 /* Qt5Network */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = Qt5Network; path = "$(QT_PATH)/lib/libQt5Network$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; };
6868ADA9E9A9801B2BA92B97 /* countryinput.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = countryinput.h; path = SourceFiles/ui/countryinput.h; sourceTree = "<absolute>"; }; 6868ADA9E9A9801B2BA92B97 /* countryinput.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = countryinput.h; path = SourceFiles/ui/countryinput.h; sourceTree = "<absolute>"; };
6A510365F9F6367ECB0DB065 /* images.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = images.cpp; path = SourceFiles/ui/images.cpp; sourceTree = "<absolute>"; }; 6A510365F9F6367ECB0DB065 /* images.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = images.cpp; path = SourceFiles/ui/images.cpp; sourceTree = "<absolute>"; };
6B46A0EE3C3B9D3B5A24946E /* moc_mainwindow.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_mainwindow.cpp; path = GeneratedFiles/Debug/moc_mainwindow.cpp; sourceTree = "<absolute>"; }; 6B46A0EE3C3B9D3B5A24946E /* moc_mainwindow.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_mainwindow.cpp; path = GeneratedFiles/Debug/moc_mainwindow.cpp; sourceTree = "<absolute>"; };
@ -616,7 +617,6 @@
81780025807318AEA3B8A6FF /* moc_addcontactbox.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_addcontactbox.cpp; path = GeneratedFiles/Debug/moc_addcontactbox.cpp; sourceTree = "<absolute>"; }; 81780025807318AEA3B8A6FF /* moc_addcontactbox.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_addcontactbox.cpp; path = GeneratedFiles/Debug/moc_addcontactbox.cpp; sourceTree = "<absolute>"; };
83728F60A64483E0AA933D76 /* pspecific.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = pspecific.h; path = SourceFiles/pspecific.h; sourceTree = "<absolute>"; }; 83728F60A64483E0AA933D76 /* pspecific.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = pspecific.h; path = SourceFiles/pspecific.h; sourceTree = "<absolute>"; };
83A36F229E897566E011B79E /* scrollarea.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = scrollarea.h; path = SourceFiles/ui/scrollarea.h; sourceTree = "<absolute>"; }; 83A36F229E897566E011B79E /* scrollarea.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = scrollarea.h; path = SourceFiles/ui/scrollarea.h; sourceTree = "<absolute>"; };
83D37373949868693FB7816D /* qmng */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = qmng; path = "/usr/local/Qt-5.5.1/plugins/imageformats/libqmng$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; };
85FABD67716E36CD8B3CA4FA /* animation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = animation.h; path = SourceFiles/ui/animation.h; sourceTree = "<absolute>"; }; 85FABD67716E36CD8B3CA4FA /* animation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = animation.h; path = SourceFiles/ui/animation.h; sourceTree = "<absolute>"; };
8880067F9BFD46108777E134 /* facade.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = facade.h; path = SourceFiles/mtproto/facade.h; sourceTree = "<absolute>"; }; 8880067F9BFD46108777E134 /* facade.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = facade.h; path = SourceFiles/mtproto/facade.h; sourceTree = "<absolute>"; };
8918F4B71ED5FC138AFD3F70 /* moc_scrollarea.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_scrollarea.cpp; path = GeneratedFiles/Debug/moc_scrollarea.cpp; sourceTree = "<absolute>"; }; 8918F4B71ED5FC138AFD3F70 /* moc_scrollarea.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_scrollarea.cpp; path = GeneratedFiles/Debug/moc_scrollarea.cpp; sourceTree = "<absolute>"; };
@ -626,18 +626,18 @@
8B98A212C068D6CC7CE73CAA /* moc_introcode.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_introcode.cpp; path = GeneratedFiles/Debug/moc_introcode.cpp; sourceTree = "<absolute>"; }; 8B98A212C068D6CC7CE73CAA /* moc_introcode.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_introcode.cpp; path = GeneratedFiles/Debug/moc_introcode.cpp; sourceTree = "<absolute>"; };
8C800AAC9549E6E9E7046BED /* contactsbox.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = contactsbox.cpp; path = SourceFiles/boxes/contactsbox.cpp; sourceTree = "<absolute>"; }; 8C800AAC9549E6E9E7046BED /* contactsbox.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = contactsbox.cpp; path = SourceFiles/boxes/contactsbox.cpp; sourceTree = "<absolute>"; };
8CCCACE96535180FEB557712 /* settingswidget.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = settingswidget.cpp; path = SourceFiles/settingswidget.cpp; sourceTree = "<absolute>"; }; 8CCCACE96535180FEB557712 /* settingswidget.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = settingswidget.cpp; path = SourceFiles/settingswidget.cpp; sourceTree = "<absolute>"; };
8CF51323544B886B8F4A2232 /* qwbmp */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = qwbmp; path = "/usr/local/Qt-5.5.1/plugins/imageformats/libqwbmp$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; }; 8CF51323544B886B8F4A2232 /* qwbmp */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = qwbmp; path = "$(QT_PATH)/plugins/imageformats/libqwbmp$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; };
8D9815BDB5BD9F90D2BC05C5 /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = /System/Library/Frameworks/AGL.framework; sourceTree = "<absolute>"; }; 8D9815BDB5BD9F90D2BC05C5 /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = /System/Library/Frameworks/AGL.framework; sourceTree = "<absolute>"; };
8DF456E9A416E4C3C2D6946C /* downloadpathbox.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = downloadpathbox.cpp; path = SourceFiles/boxes/downloadpathbox.cpp; sourceTree = "<absolute>"; }; 8DF456E9A416E4C3C2D6946C /* downloadpathbox.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = downloadpathbox.cpp; path = SourceFiles/boxes/downloadpathbox.cpp; sourceTree = "<absolute>"; };
8EB83A4D34226609E79A613A /* connectionbox.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = connectionbox.h; path = SourceFiles/boxes/connectionbox.h; sourceTree = "<absolute>"; }; 8EB83A4D34226609E79A613A /* connectionbox.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = connectionbox.h; path = SourceFiles/boxes/connectionbox.h; sourceTree = "<absolute>"; };
8F500B5166907B6D9A7C3E3D /* qico */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = qico; path = "/usr/local/Qt-5.5.1/plugins/imageformats/libqico$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; }; 8F500B5166907B6D9A7C3E3D /* qico */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = qico; path = "$(QT_PATH)/plugins/imageformats/libqico$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; };
924D4939FD169BB4B8AEB1C9 /* moc_facade.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_facade.cpp; path = GeneratedFiles/Debug/moc_facade.cpp; sourceTree = "<absolute>"; }; 924D4939FD169BB4B8AEB1C9 /* moc_facade.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_facade.cpp; path = GeneratedFiles/Debug/moc_facade.cpp; sourceTree = "<absolute>"; };
93AFE74928551FC3D7E8390B /* moc_settingswidget.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_settingswidget.cpp; path = GeneratedFiles/Debug/moc_settingswidget.cpp; sourceTree = "<absolute>"; }; 93AFE74928551FC3D7E8390B /* moc_settingswidget.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_settingswidget.cpp; path = GeneratedFiles/Debug/moc_settingswidget.cpp; sourceTree = "<absolute>"; };
963123025C466CB8DD9CF4AF /* connection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = connection.h; path = SourceFiles/mtproto/connection.h; sourceTree = "<absolute>"; }; 963123025C466CB8DD9CF4AF /* connection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = connection.h; path = SourceFiles/mtproto/connection.h; sourceTree = "<absolute>"; };
96ACDDE3DCB798B97F9EA2F4 /* file_download.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = file_download.h; path = SourceFiles/mtproto/file_download.h; sourceTree = "<absolute>"; }; 96ACDDE3DCB798B97F9EA2F4 /* file_download.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = file_download.h; path = SourceFiles/mtproto/file_download.h; sourceTree = "<absolute>"; };
9742F24EE18EA44D52824F1E /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; }; 9742F24EE18EA44D52824F1E /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; };
974DB34EEB8F83B91614C0B0 /* logs.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = logs.cpp; path = SourceFiles/logs.cpp; sourceTree = "<absolute>"; }; 974DB34EEB8F83B91614C0B0 /* logs.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = logs.cpp; path = SourceFiles/logs.cpp; sourceTree = "<absolute>"; };
9A55B8F7C143D66AD9EAE304 /* qgenericbearer */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = qgenericbearer; path = "/usr/local/Qt-5.5.1/plugins/bearer/libqgenericbearer$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; }; 9A55B8F7C143D66AD9EAE304 /* qgenericbearer */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = qgenericbearer; path = "$(QT_PATH)/plugins/bearer/libqgenericbearer$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; };
9A69B711DE4B9C89BA803750 /* moc_aboutbox.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_aboutbox.cpp; path = GeneratedFiles/Debug/moc_aboutbox.cpp; sourceTree = "<absolute>"; }; 9A69B711DE4B9C89BA803750 /* moc_aboutbox.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_aboutbox.cpp; path = GeneratedFiles/Debug/moc_aboutbox.cpp; sourceTree = "<absolute>"; };
9AB1479D7D63386FD2046620 /* flatinput.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = flatinput.cpp; path = SourceFiles/ui/flatinput.cpp; sourceTree = "<absolute>"; }; 9AB1479D7D63386FD2046620 /* flatinput.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = flatinput.cpp; path = SourceFiles/ui/flatinput.cpp; sourceTree = "<absolute>"; };
9B36BB8C5B8CA7B07F3F35F0 /* fileuploader.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = fileuploader.cpp; path = SourceFiles/fileuploader.cpp; sourceTree = "<absolute>"; }; 9B36BB8C5B8CA7B07F3F35F0 /* fileuploader.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = fileuploader.cpp; path = SourceFiles/fileuploader.cpp; sourceTree = "<absolute>"; };
@ -650,14 +650,14 @@
A1A67BEAA744704B29168D39 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; }; A1A67BEAA744704B29168D39 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
A3622760CEC6D6827A25E710 /* rsa_public_key.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = rsa_public_key.h; path = SourceFiles/mtproto/rsa_public_key.h; sourceTree = "<absolute>"; }; A3622760CEC6D6827A25E710 /* rsa_public_key.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = rsa_public_key.h; path = SourceFiles/mtproto/rsa_public_key.h; sourceTree = "<absolute>"; };
A37C7E516201B0264A4CDA38 /* moc_introwidget.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_introwidget.cpp; path = GeneratedFiles/Debug/moc_introwidget.cpp; sourceTree = "<absolute>"; }; A37C7E516201B0264A4CDA38 /* moc_introwidget.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_introwidget.cpp; path = GeneratedFiles/Debug/moc_introwidget.cpp; sourceTree = "<absolute>"; };
A7782E2B07CB2D1D14F431B0 /* qtaccessiblewidgets */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = qtaccessiblewidgets; path = "/usr/local/Qt-5.5.1/plugins/accessible/libqtaccessiblewidgets$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; }; A7782E2B07CB2D1D14F431B0 /* qtaccessiblewidgets */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = qtaccessiblewidgets; path = "$(QT_PATH)/plugins/accessible/libqtaccessiblewidgets$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; };
A83D2C19F756D3371E5999A8 /* historywidget.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = historywidget.cpp; path = SourceFiles/historywidget.cpp; sourceTree = "<absolute>"; }; A83D2C19F756D3371E5999A8 /* historywidget.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = historywidget.cpp; path = SourceFiles/historywidget.cpp; sourceTree = "<absolute>"; };
A9FF4818C6775109B3DBFA18 /* introsignup.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = introsignup.cpp; path = SourceFiles/intro/introsignup.cpp; sourceTree = "<absolute>"; }; A9FF4818C6775109B3DBFA18 /* introsignup.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = introsignup.cpp; path = SourceFiles/intro/introsignup.cpp; sourceTree = "<absolute>"; };
AA5379CB06E908AC80BE7B82 /* Qt5OpenGL */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = Qt5OpenGL; path = "/usr/local/Qt-5.5.1/lib/libQt5OpenGL$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; }; AA5379CB06E908AC80BE7B82 /* Qt5OpenGL */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = Qt5OpenGL; path = "$(QT_PATH)/lib/libQt5OpenGL$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; };
AC9B5F6FB4B984C8D76F7AE2 /* moc_dropdown.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_dropdown.cpp; path = GeneratedFiles/Debug/moc_dropdown.cpp; sourceTree = "<absolute>"; }; AC9B5F6FB4B984C8D76F7AE2 /* moc_dropdown.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_dropdown.cpp; path = GeneratedFiles/Debug/moc_dropdown.cpp; sourceTree = "<absolute>"; };
AD0C395D671BC024083A5FC7 /* localimageloader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = localimageloader.h; path = SourceFiles/localimageloader.h; sourceTree = "<absolute>"; }; AD0C395D671BC024083A5FC7 /* localimageloader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = localimageloader.h; path = SourceFiles/localimageloader.h; sourceTree = "<absolute>"; };
AD90723EF02EAD016FD49CC9 /* introstart.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = introstart.h; path = SourceFiles/intro/introstart.h; sourceTree = "<absolute>"; }; AD90723EF02EAD016FD49CC9 /* introstart.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = introstart.h; path = SourceFiles/intro/introstart.h; sourceTree = "<absolute>"; };
ADC6308023253CEA51F86E21 /* qwebp */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = qwebp; path = "/usr/local/Qt-5.5.1/plugins/imageformats/libqwebp$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; }; ADC6308023253CEA51F86E21 /* qwebp */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = qwebp; path = "$(QT_PATH)/plugins/imageformats/libqwebp$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; };
AEA456A2F75ED9F5CDA7BCBE /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; }; AEA456A2F75ED9F5CDA7BCBE /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
AF4585F593B1C9D0D4FD061C /* flatcheckbox.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = flatcheckbox.cpp; path = SourceFiles/ui/flatcheckbox.cpp; sourceTree = "<absolute>"; }; AF4585F593B1C9D0D4FD061C /* flatcheckbox.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = flatcheckbox.cpp; path = SourceFiles/ui/flatcheckbox.cpp; sourceTree = "<absolute>"; };
AF5776B0652744978B7DF6D3 /* langloaderplain.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = langloaderplain.cpp; path = SourceFiles/langloaderplain.cpp; sourceTree = "<absolute>"; }; AF5776B0652744978B7DF6D3 /* langloaderplain.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = langloaderplain.cpp; path = SourceFiles/langloaderplain.cpp; sourceTree = "<absolute>"; };
@ -684,26 +684,25 @@
CF32DF59C7823E4F3397EF3C /* profilewidget.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = profilewidget.cpp; path = SourceFiles/profilewidget.cpp; sourceTree = "<absolute>"; }; CF32DF59C7823E4F3397EF3C /* profilewidget.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = profilewidget.cpp; path = SourceFiles/profilewidget.cpp; sourceTree = "<absolute>"; };
D12A6BD8EE80B8B308E481AD /* moc_flattextarea.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_flattextarea.cpp; path = GeneratedFiles/Debug/moc_flattextarea.cpp; sourceTree = "<absolute>"; }; D12A6BD8EE80B8B308E481AD /* moc_flattextarea.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_flattextarea.cpp; path = GeneratedFiles/Debug/moc_flattextarea.cpp; sourceTree = "<absolute>"; };
D1C9C77F1318F5A55C9BF289 /* photosendbox.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = photosendbox.cpp; path = SourceFiles/boxes/photosendbox.cpp; sourceTree = "<absolute>"; }; D1C9C77F1318F5A55C9BF289 /* photosendbox.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = photosendbox.cpp; path = SourceFiles/boxes/photosendbox.cpp; sourceTree = "<absolute>"; };
D3D1BE0BEA3AEE0551AD39AC /* qdds */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = qdds; path = "/usr/local/Qt-5.5.1/plugins/imageformats/libqdds$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; }; D3D1BE0BEA3AEE0551AD39AC /* qdds */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = qdds; path = "$(QT_PATH)/plugins/imageformats/libqdds$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; };
D3FE9C29B6A61D7C3C4B731B /* animation.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = animation.cpp; path = SourceFiles/ui/animation.cpp; sourceTree = "<absolute>"; }; D3FE9C29B6A61D7C3C4B731B /* animation.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = animation.cpp; path = SourceFiles/ui/animation.cpp; sourceTree = "<absolute>"; };
D4B32C2222F82AC56BADEB21 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; }; D4B32C2222F82AC56BADEB21 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
D53D8E6A188E05078A114294 /* qcocoa */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = qcocoa; path = "/usr/local/Qt-5.5.1/plugins/platforms/libqcocoa$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; }; D53D8E6A188E05078A114294 /* qcocoa */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = qcocoa; path = "$(QT_PATH)/plugins/platforms/libqcocoa$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; };
D6193B79CECC9DD0142D1200 /* qtharfbuzzng */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = qtharfbuzzng; path = "/usr/local/Qt-5.5.1/lib/libqtharfbuzzng$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; }; D6193B79CECC9DD0142D1200 /* qtharfbuzzng */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = qtharfbuzzng; path = "$(QT_PATH)/lib/libqtharfbuzzng$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; };
D6FF6676816C4E374D374060 /* qrc_telegram.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = qrc_telegram.cpp; path = GeneratedFiles/qrc_telegram.cpp; sourceTree = "<absolute>"; }; D6FF6676816C4E374D374060 /* qrc_telegram.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = qrc_telegram.cpp; path = GeneratedFiles/qrc_telegram.cpp; sourceTree = "<absolute>"; };
DBF506D10449BFABD45B82DA /* Qt5PrintSupport */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = Qt5PrintSupport; path = "/usr/local/Qt-5.5.1/lib/libQt5PrintSupport$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; }; DBF506D10449BFABD45B82DA /* Qt5PrintSupport */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = Qt5PrintSupport; path = "$(QT_PATH)/lib/libQt5PrintSupport$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; };
DC23E0B79FF53F35BA8F76A1 /* introsignup.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = introsignup.h; path = SourceFiles/intro/introsignup.h; sourceTree = "<absolute>"; }; DC23E0B79FF53F35BA8F76A1 /* introsignup.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = introsignup.h; path = SourceFiles/intro/introsignup.h; sourceTree = "<absolute>"; };
DCEFD9167C239650120B0145 /* qtga */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = qtga; path = "/usr/local/Qt-5.5.1/plugins/imageformats/libqtga$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; }; DCEFD9167C239650120B0145 /* qtga */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = qtga; path = "$(QT_PATH)/plugins/imageformats/libqtga$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; };
DE4C0E3685DDAE58F9397B13 /* filedialog.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = filedialog.cpp; path = SourceFiles/ui/filedialog.cpp; sourceTree = "<absolute>"; }; DE4C0E3685DDAE58F9397B13 /* filedialog.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = filedialog.cpp; path = SourceFiles/ui/filedialog.cpp; sourceTree = "<absolute>"; };
DFD7912080BC557230093752 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; }; DFD7912080BC557230093752 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; };
E181C525E21A16F2D4396CA7 /* moc_application.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_application.cpp; path = GeneratedFiles/Debug/moc_application.cpp; sourceTree = "<absolute>"; }; E181C525E21A16F2D4396CA7 /* moc_application.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_application.cpp; path = GeneratedFiles/Debug/moc_application.cpp; sourceTree = "<absolute>"; };
E466873F01ABA1E55E914489 /* dialogswidget.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = dialogswidget.cpp; path = SourceFiles/dialogswidget.cpp; sourceTree = "<absolute>"; }; E466873F01ABA1E55E914489 /* dialogswidget.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = dialogswidget.cpp; path = SourceFiles/dialogswidget.cpp; sourceTree = "<absolute>"; };
E7B2F248E3F7970788F35BF5 /* Qt5PlatformSupport */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = Qt5PlatformSupport; path = "/usr/local/Qt-5.5.1/lib/libQt5PlatformSupport$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; }; E7B2F248E3F7970788F35BF5 /* Qt5PlatformSupport */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = Qt5PlatformSupport; path = "$(QT_PATH)/lib/libQt5PlatformSupport$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; };
E908A6C86F93FA27DF70866C /* photocropbox.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = photocropbox.cpp; path = SourceFiles/boxes/photocropbox.cpp; sourceTree = "<absolute>"; }; E908A6C86F93FA27DF70866C /* photocropbox.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = photocropbox.cpp; path = SourceFiles/boxes/photocropbox.cpp; sourceTree = "<absolute>"; };
EE03BC5CA4628A6D6BEB0122 /* qcorewlanbearer */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = qcorewlanbearer; path = "/usr/local/Qt-5.5.1/plugins/bearer/libqcorewlanbearer$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; }; EE03BC5CA4628A6D6BEB0122 /* qcorewlanbearer */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = qcorewlanbearer; path = "$(QT_PATH)/plugins/bearer/libqcorewlanbearer$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; };
EF1AD6A66D0C28A6A15E2C30 /* introphone.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = introphone.h; path = SourceFiles/intro/introphone.h; sourceTree = "<absolute>"; }; EF1AD6A66D0C28A6A15E2C30 /* introphone.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = introphone.h; path = SourceFiles/intro/introphone.h; sourceTree = "<absolute>"; };
F0681BC551FC8A2B132FC646 /* qjp2 */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = qjp2; path = "/usr/local/Qt-5.5.1/plugins/imageformats/libqjp2$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; };
F1A04BDB750C2AE652797B04 /* flatbutton.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = flatbutton.cpp; path = SourceFiles/ui/flatbutton.cpp; sourceTree = "<absolute>"; }; F1A04BDB750C2AE652797B04 /* flatbutton.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = flatbutton.cpp; path = SourceFiles/ui/flatbutton.cpp; sourceTree = "<absolute>"; };
F2453BA07315EB9F34F1CD57 /* qtiff */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = qtiff; path = "/usr/local/Qt-5.5.1/plugins/imageformats/libqtiff$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; }; F2453BA07315EB9F34F1CD57 /* qtiff */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = qtiff; path = "$(QT_PATH)/plugins/imageformats/libqtiff$(QT_LIBRARY_SUFFIX).a"; sourceTree = "<absolute>"; };
F26998DF735BCE5F975508ED /* CoreWLAN.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreWLAN.framework; path = /System/Library/Frameworks/CoreWLAN.framework; sourceTree = "<absolute>"; }; F26998DF735BCE5F975508ED /* CoreWLAN.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreWLAN.framework; path = /System/Library/Frameworks/CoreWLAN.framework; sourceTree = "<absolute>"; };
F4EECA1187A744AEF5165243 /* pspecific_mac.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = pspecific_mac.cpp; path = SourceFiles/pspecific_mac.cpp; sourceTree = "<absolute>"; }; F4EECA1187A744AEF5165243 /* pspecific_mac.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = pspecific_mac.cpp; path = SourceFiles/pspecific_mac.cpp; sourceTree = "<absolute>"; };
F80095A026AF9453E9C2B8BD /* settingswidget.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = settingswidget.h; path = SourceFiles/settingswidget.h; sourceTree = "<absolute>"; }; F80095A026AF9453E9C2B8BD /* settingswidget.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = settingswidget.h; path = SourceFiles/settingswidget.h; sourceTree = "<absolute>"; };
@ -719,6 +718,7 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
0785004D1CCA847400168DBB /* libqtfreetype.a in Link Binary With Libraries */,
0752F8751C2C89F40026D0BC /* VideoToolbox.framework in Link Binary With Libraries */, 0752F8751C2C89F40026D0BC /* VideoToolbox.framework in Link Binary With Libraries */,
0752F8731C2C89220026D0BC /* VideoDecodeAcceleration.framework in Link Binary With Libraries */, 0752F8731C2C89220026D0BC /* VideoDecodeAcceleration.framework in Link Binary With Libraries */,
07CAACD81AEA64F00058E508 /* AudioUnit.framework in Link Binary With Libraries */, 07CAACD81AEA64F00058E508 /* AudioUnit.framework in Link Binary With Libraries */,
@ -749,8 +749,6 @@
A9563D9C9FD0D76FAAF1CA96 /* qdds in Link Binary With Libraries */, A9563D9C9FD0D76FAAF1CA96 /* qdds in Link Binary With Libraries */,
7CA5405B8503BFFC60932D2B /* qicns in Link Binary With Libraries */, 7CA5405B8503BFFC60932D2B /* qicns in Link Binary With Libraries */,
496FD9CEEB508016AFB9F928 /* qico in Link Binary With Libraries */, 496FD9CEEB508016AFB9F928 /* qico in Link Binary With Libraries */,
59789101736112A570B8EFE6 /* qjp2 in Link Binary With Libraries */,
FBD56E2AC34F76BFFDB68619 /* qmng in Link Binary With Libraries */,
7F76437B577F737145996DC3 /* qtga in Link Binary With Libraries */, 7F76437B577F737145996DC3 /* qtga in Link Binary With Libraries */,
C06DDE378A7AC1FA9E6FF69A /* qtiff in Link Binary With Libraries */, C06DDE378A7AC1FA9E6FF69A /* qtiff in Link Binary With Libraries */,
A3F8F2284013928A02AE5C38 /* qwbmp in Link Binary With Libraries */, A3F8F2284013928A02AE5C38 /* qwbmp in Link Binary With Libraries */,
@ -878,6 +876,7 @@
076B1C511CBFC6F2002C0BC2 /* click_handler_types.h */, 076B1C511CBFC6F2002C0BC2 /* click_handler_types.h */,
076B1C521CBFC6F2002C0BC2 /* click_handler.cpp */, 076B1C521CBFC6F2002C0BC2 /* click_handler.cpp */,
076B1C531CBFC6F2002C0BC2 /* click_handler.h */, 076B1C531CBFC6F2002C0BC2 /* click_handler.h */,
07D518D41CD0E27600F5FF59 /* version.h */,
); );
name = core; name = core;
sourceTree = "<group>"; sourceTree = "<group>";
@ -1324,6 +1323,7 @@
AF39DD055C3EF8226FBE929D /* Frameworks */ = { AF39DD055C3EF8226FBE929D /* Frameworks */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
0785004C1CCA847400168DBB /* libqtfreetype.a */,
0752F8741C2C89F40026D0BC /* VideoToolbox.framework */, 0752F8741C2C89F40026D0BC /* VideoToolbox.framework */,
0752F8721C2C89220026D0BC /* VideoDecodeAcceleration.framework */, 0752F8721C2C89220026D0BC /* VideoDecodeAcceleration.framework */,
07CAACD71AEA64F00058E508 /* AudioUnit.framework */, 07CAACD71AEA64F00058E508 /* AudioUnit.framework */,
@ -1362,8 +1362,6 @@
D3D1BE0BEA3AEE0551AD39AC /* qdds */, D3D1BE0BEA3AEE0551AD39AC /* qdds */,
31120EDB269DFF13E1D49847 /* qicns */, 31120EDB269DFF13E1D49847 /* qicns */,
8F500B5166907B6D9A7C3E3D /* qico */, 8F500B5166907B6D9A7C3E3D /* qico */,
F0681BC551FC8A2B132FC646 /* qjp2 */,
83D37373949868693FB7816D /* qmng */,
DCEFD9167C239650120B0145 /* qtga */, DCEFD9167C239650120B0145 /* qtga */,
F2453BA07315EB9F34F1CD57 /* qtiff */, F2453BA07315EB9F34F1CD57 /* qtiff */,
8CF51323544B886B8F4A2232 /* qwbmp */, 8CF51323544B886B8F4A2232 /* qwbmp */,
@ -1528,7 +1526,7 @@
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "mkdir -p \"$CONFIGURATION_BUILD_DIR/$PRODUCT_NAME.app/Contents/Helpers\" && cp \"./../../Libraries/crashpad/crashpad/out/Release/crashpad_handler\" \"$CONFIGURATION_BUILD_DIR/$PRODUCT_NAME.app/Contents/Helpers/\""; shellScript = "mkdir -p \"$CONFIGURATION_BUILD_DIR/$PRODUCT_NAME.app/Contents/Helpers\" && cp \"$CRASHPAD_PATH/out/Release/crashpad_handler\" \"$CONFIGURATION_BUILD_DIR/$PRODUCT_NAME.app/Contents/Helpers/\"";
}; };
0747FF741CC6408600096FC3 /* Generate styles */ = { 0747FF741CC6408600096FC3 /* Generate styles */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
@ -1598,7 +1596,7 @@
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "open ../Mac/DebugLang/MetaLang.app --args -lang_in \"../../Telegram/Resources/lang.strings\" -lang_out \"../../Telegram/GeneratedFiles/lang_auto\""; shellScript = "open ../Mac/DebugLang/MetaLang.app --args -lang_in \"../../Telegram/Resources/langs/lang.strings\" -lang_out \"../../Telegram/GeneratedFiles/lang_auto\"";
}; };
7EF0942E79C014DCEC8976BC /* Qt Preprocessors */ = { 7EF0942E79C014DCEC8976BC /* Qt Preprocessors */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
@ -1859,7 +1857,6 @@
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 0.9.45;
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;
@ -1878,7 +1875,6 @@
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COPY_PHASE_STRIP = YES; COPY_PHASE_STRIP = YES;
CURRENT_PROJECT_VERSION = 0.9.45;
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;
@ -1907,10 +1903,10 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = ""; CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 0.9.45; CURRENT_PROJECT_VERSION = "$(TDESKTOP_VERSION)";
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DYLIB_COMPATIBILITY_VERSION = 0.9; DYLIB_COMPATIBILITY_VERSION = "$(TDESKTOP_MAJOR_VERSION)";
DYLIB_CURRENT_VERSION = 0.9.45; DYLIB_CURRENT_VERSION = "$(TDESKTOP_VERSION)";
ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_STRICT_OBJC_MSGSEND = YES;
FRAMEWORK_SEARCH_PATHS = ""; FRAMEWORK_SEARCH_PATHS = "";
GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
@ -1927,27 +1923,22 @@
GCC_WARN_UNUSED_FUNCTION = NO; GCC_WARN_UNUSED_FUNCTION = NO;
GCC_WARN_UNUSED_VARIABLE = NO; GCC_WARN_UNUSED_VARIABLE = NO;
HEADER_SEARCH_PATHS = ( HEADER_SEARCH_PATHS = (
./../../Libraries/QtStatic/qtbase/include/QtGui/5.5.1/QtGui,
./../../Libraries/QtStatic/qtbase/include/QtCore/5.5.1/QtCore,
./../../Libraries/QtStatic/qtbase/include,
./SourceFiles, ./SourceFiles,
./GeneratedFiles, ./GeneratedFiles,
/usr/local/include, /usr/local/include,
"$(QT_PATH)/include",
"$(QT_PATH)/include/QtGui/5.6.0/QtGui",
"$(QT_PATH)/include/QtCore/5.6.0/QtCore",
"$(QT_PATH)/mkspecs/macx-clang",
./../../Libraries/opus/include, ./../../Libraries/opus/include,
"./../../Libraries/openal-soft/include", "$(OPENAL_PATH)/include",
"./../../Libraries/libexif-0.6.20", "./../../Libraries/libexif-0.6.20",
"/usr/local/Qt-5.5.1/include",
"/usr/local/Qt-5.5.1/include/QtWidgets",
"/usr/local/Qt-5.5.1/include/QtNetwork",
"/usr/local/Qt-5.5.1/include/QtGui",
"/usr/local/Qt-5.5.1/include/QtCore",
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers, /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers,
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/AGL.framework/Headers, /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/AGL.framework/Headers,
"/usr/local/Qt-5.5.1/mkspecs/macx-clang",
./ThirdParty/breakpad, ./ThirdParty/breakpad,
./ThirdParty/minizip, ./ThirdParty/minizip,
./../../Libraries/crashpad/crashpad, "$(CRASHPAD_PATH)",
./../../Libraries/crashpad/crashpad/third_party/mini_chromium/mini_chromium, "$(CRASHPAD_PATH)/third_party/mini_chromium/mini_chromium",
); );
INFOPLIST_FILE = Telegram.plist; INFOPLIST_FILE = Telegram.plist;
INSTALL_DIR = ./../Mac/Release/; INSTALL_DIR = ./../Mac/Release/;
@ -1955,10 +1946,10 @@
LIBRARY_SEARCH_PATHS = ( LIBRARY_SEARCH_PATHS = (
/System/Library/Frameworks/, /System/Library/Frameworks/,
"./../../Libraries/libexif-0.6.20/libexif/.libs", "./../../Libraries/libexif-0.6.20/libexif/.libs",
"/usr/local/Qt-5.5.1/lib", "$(QT_PATH)/lib",
"/usr/local/Qt-5.5.1/plugins/bearer", "$(QT_PATH)/plugins/bearer",
"/usr/local/Qt-5.5.1/plugins/platforms", "$(QT_PATH)/plugins/platforms",
"/usr/local/Qt-5.5.1/plugins/imageformats", "$(QT_PATH)/plugins/imageformats",
"./../../Libraries/openssl-xcode", "./../../Libraries/openssl-xcode",
); );
MACOSX_DEPLOYMENT_TARGET = 10.8; MACOSX_DEPLOYMENT_TARGET = 10.8;
@ -2001,34 +1992,38 @@
); );
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"-headerpad_max_install_names", "-headerpad_max_install_names",
"-L/usr/local/Qt-5.5.1/lib",
"-L/usr/local/Qt-5.5.1/plugins/bearer",
"-L/usr/local/Qt-5.5.1/plugins/platforms",
"-lcups", "-lcups",
"-lbsm", "-lbsm",
"-L/usr/local/Qt-5.5.1/plugins/imageformats", "$(ZLIB_PATH)/lib/libz.a",
/usr/local/lib/libz.a,
"-lm", "-lm",
/usr/local/lib/libopenal.a, "$(OPENAL_PATH)/lib/libopenal.a",
/usr/local/lib/libopus.a, /usr/local/lib/libopus.a,
/usr/local/lib/liblzma.a, /usr/local/lib/liblzma.a,
/usr/local/lib/libexif.a, /usr/local/lib/libexif.a,
/usr/local/lib/libavcodec.a, "$(FFMPEG_PATH)/lib/libavcodec.a",
/usr/local/lib/libavformat.a, "$(FFMPEG_PATH)/lib/libavformat.a",
/usr/local/lib/libswscale.a, "$(FFMPEG_PATH)/lib/libswscale.a",
/usr/local/lib/libswresample.a, "$(FFMPEG_PATH)/lib/libswresample.a",
/usr/local/lib/libavutil.a, "$(FFMPEG_PATH)/lib/libavutil.a",
/usr/local/lib/libiconv.a, "$(ICONV_PATH)/lib/libiconv.a",
"./../../Libraries/openssl-xcode/libcrypto.a", "./../../Libraries/openssl-xcode/libcrypto.a",
./../../Libraries/crashpad/crashpad/out/Release/libbase.a, "$(CRASHPAD_PATH)/out/Release/libbase.a",
./../../Libraries/crashpad/crashpad/out/Release/libcrashpad_client.a, "$(CRASHPAD_PATH)/out/Release/libcrashpad_client.a",
./../../Libraries/crashpad/crashpad/out/Release/libcrashpad_util.a, "$(CRASHPAD_PATH)/out/Release/libcrashpad_util.a",
"-g", "-g",
); );
PRODUCT_NAME = Telegram; PRODUCT_NAME = Telegram;
QT_LIBRARY_SUFFIX = ""; QT_LIBRARY_SUFFIX = "";
QT_PATH = "/usr/local/tdesktop/Qt-5.6.0";
ZLIB_PATH = "/usr/local";
FFMPEG_PATH = "/usr/local";
ICONV_PATH = "/usr/local";
CRASHPAD_PATH = "./../../Libraries/crashpad/crashpad";
OPENAL_PATH = "/usr/local";
SDKROOT = macosx; SDKROOT = macosx;
SYMROOT = ./../Mac; SYMROOT = ./../Mac;
TDESKTOP_MAJOR_VERSION = 0.9;
TDESKTOP_VERSION = 0.9.48;
}; };
name = Release; name = Release;
}; };
@ -2047,10 +2042,10 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = ""; CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 0.9.45; CURRENT_PROJECT_VERSION = "$(TDESKTOP_VERSION)";
DEBUG_INFORMATION_FORMAT = dwarf; DEBUG_INFORMATION_FORMAT = dwarf;
DYLIB_COMPATIBILITY_VERSION = 0.9; DYLIB_COMPATIBILITY_VERSION = "$(TDESKTOP_MAJOR_VERSION)";
DYLIB_CURRENT_VERSION = 0.9.45; DYLIB_CURRENT_VERSION = "$(TDESKTOP_VERSION)";
ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES; ENABLE_TESTABILITY = YES;
FRAMEWORK_SEARCH_PATHS = ""; FRAMEWORK_SEARCH_PATHS = "";
@ -2068,27 +2063,22 @@
GCC_WARN_UNUSED_FUNCTION = NO; GCC_WARN_UNUSED_FUNCTION = NO;
GCC_WARN_UNUSED_VARIABLE = NO; GCC_WARN_UNUSED_VARIABLE = NO;
HEADER_SEARCH_PATHS = ( HEADER_SEARCH_PATHS = (
./../../Libraries/QtStatic/qtbase/include/QtGui/5.5.1/QtGui,
./../../Libraries/QtStatic/qtbase/include/QtCore/5.5.1/QtCore,
./../../Libraries/QtStatic/qtbase/include,
./SourceFiles, ./SourceFiles,
./GeneratedFiles, ./GeneratedFiles,
/usr/local/include, /usr/local/include,
"$(QT_PATH)/include",
"$(QT_PATH)/include/QtGui/5.6.0/QtGui",
"$(QT_PATH)/include/QtCore/5.6.0/QtCore",
"$(QT_PATH)/mkspecs/macx-clang",
./../../Libraries/opus/include, ./../../Libraries/opus/include,
"./../../Libraries/openal-soft/include", "$(OPENAL_PATH)/include",
"./../../Libraries/libexif-0.6.20", "./../../Libraries/libexif-0.6.20",
"/usr/local/Qt-5.5.1/include",
"/usr/local/Qt-5.5.1/include/QtWidgets",
"/usr/local/Qt-5.5.1/include/QtNetwork",
"/usr/local/Qt-5.5.1/include/QtGui",
"/usr/local/Qt-5.5.1/include/QtCore",
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers, /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers,
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/AGL.framework/Headers, /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/AGL.framework/Headers,
"/usr/local/Qt-5.5.1/mkspecs/macx-clang",
./ThirdParty/breakpad, ./ThirdParty/breakpad,
./ThirdParty/minizip, ./ThirdParty/minizip,
./../../Libraries/crashpad/crashpad, "$(CRASHPAD_PATH)",
./../../Libraries/crashpad/crashpad/third_party/mini_chromium/mini_chromium, "$(CRASHPAD_PATH)/third_party/mini_chromium/mini_chromium",
); );
INFOPLIST_FILE = Telegram.plist; INFOPLIST_FILE = Telegram.plist;
INSTALL_DIR = ./../Mac/Debug/; INSTALL_DIR = ./../Mac/Debug/;
@ -2096,10 +2086,10 @@
LIBRARY_SEARCH_PATHS = ( LIBRARY_SEARCH_PATHS = (
/System/Library/Frameworks/, /System/Library/Frameworks/,
"./../../Libraries/libexif-0.6.20/libexif/.libs", "./../../Libraries/libexif-0.6.20/libexif/.libs",
"/usr/local/Qt-5.5.1/lib", "$(QT_PATH)/lib",
"/usr/local/Qt-5.5.1/plugins/bearer", "$(QT_PATH)/plugins/bearer",
"/usr/local/Qt-5.5.1/plugins/platforms", "$(QT_PATH)/plugins/platforms",
"/usr/local/Qt-5.5.1/plugins/imageformats", "$(QT_PATH)/plugins/imageformats",
"./../../Libraries/openssl-xcode", "./../../Libraries/openssl-xcode",
); );
MACOSX_DEPLOYMENT_TARGET = 10.8; MACOSX_DEPLOYMENT_TARGET = 10.8;
@ -2143,34 +2133,38 @@
); );
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"-headerpad_max_install_names", "-headerpad_max_install_names",
"-L/usr/local/Qt-5.5.1/lib",
"-L/usr/local/Qt-5.5.1/plugins/bearer",
"-L/usr/local/Qt-5.5.1/plugins/platforms",
"-lcups", "-lcups",
"-lbsm", "-lbsm",
"-L/usr/local/Qt-5.5.1/plugins/imageformats", "$(ZLIB_PATH)/lib/libz.a",
/usr/local/lib/libz.a,
"-lm", "-lm",
/usr/local/lib/libopenal.a, "$(OPENAL_PATH)/lib/libopenal.a",
/usr/local/lib/libopus.a, /usr/local/lib/libopus.a,
/usr/local/lib/liblzma.a, /usr/local/lib/liblzma.a,
/usr/local/lib/libexif.a, /usr/local/lib/libexif.a,
/usr/local/lib/libavcodec.a, "$(FFMPEG_PATH)/lib/libavcodec.a",
/usr/local/lib/libavformat.a, "$(FFMPEG_PATH)/lib/libavformat.a",
/usr/local/lib/libswscale.a, "$(FFMPEG_PATH)/lib/libswscale.a",
/usr/local/lib/libswresample.a, "$(FFMPEG_PATH)/lib/libswresample.a",
/usr/local/lib/libavutil.a, "$(FFMPEG_PATH)/lib/libavutil.a",
/usr/local/lib/libiconv.a, "$(ICONV_PATH)/lib/libiconv.a",
"./../../Libraries/openssl-xcode/libcrypto.a", "./../../Libraries/openssl-xcode/libcrypto.a",
./../../Libraries/crashpad/crashpad/out/Release/libbase.a, "$(CRASHPAD_PATH)/out/Release/libbase.a",
./../../Libraries/crashpad/crashpad/out/Release/libcrashpad_client.a, "$(CRASHPAD_PATH)/out/Release/libcrashpad_client.a",
./../../Libraries/crashpad/crashpad/out/Release/libcrashpad_util.a, "$(CRASHPAD_PATH)/out/Release/libcrashpad_util.a",
"-g", "-g",
); );
PRODUCT_NAME = Telegram; PRODUCT_NAME = Telegram;
QT_LIBRARY_SUFFIX = _debug; QT_LIBRARY_SUFFIX = _debug;
QT_PATH = "/usr/local/tdesktop/Qt-5.6.0";
ZLIB_PATH = "/usr/local";
FFMPEG_PATH = "/usr/local";
ICONV_PATH = "/usr/local";
CRASHPAD_PATH = "./../../Libraries/crashpad/crashpad";
OPENAL_PATH = "/usr/local";
SDKROOT = macosx; SDKROOT = macosx;
SYMROOT = ./../Mac; SYMROOT = ./../Mac;
TDESKTOP_MAJOR_VERSION = 0.9;
TDESKTOP_VERSION = 0.9.48;
}; };
name = Debug; name = Debug;
}; };
@ -2181,6 +2175,10 @@
CODE_SIGN_IDENTITY = ""; CODE_SIGN_IDENTITY = "";
COMBINE_HIDPI_IMAGES = YES; COMBINE_HIDPI_IMAGES = YES;
GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h; GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(QT_PATH)/lib",
);
LLVM_LTO = YES; LLVM_LTO = YES;
MACOSX_DEPLOYMENT_TARGET = 10.8; MACOSX_DEPLOYMENT_TARGET = 10.8;
OBJROOT = ./../Mac/ReleaseIntermediate; OBJROOT = ./../Mac/ReleaseIntermediate;
@ -2198,6 +2196,10 @@
CODE_SIGN_IDENTITY = ""; CODE_SIGN_IDENTITY = "";
COMBINE_HIDPI_IMAGES = YES; COMBINE_HIDPI_IMAGES = YES;
GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h; GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(QT_PATH)/lib",
);
MACOSX_DEPLOYMENT_TARGET = 10.8; MACOSX_DEPLOYMENT_TARGET = 10.8;
OBJROOT = ./../Mac/DebugIntermediate; OBJROOT = ./../Mac/DebugIntermediate;
PRODUCT_BUNDLE_IDENTIFIER = "com.tdesktop.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_BUNDLE_IDENTIFIER = "com.tdesktop.$(PRODUCT_NAME:rfc1034identifier)";

View File

@ -1,15 +1,12 @@
############################################################################# #############################################################################
# Makefile for building: ../Mac/Debug/Telegram.app/Contents/MacOS/Telegram # Makefile for building: ../Mac/Debug/Telegram.app/Contents/MacOS/Telegram
# Generated by qmake (3.0) (Qt 5.5.1) # Initially generated by qmake
# Project: Telegram.pro
# Template: app
# Command: /usr/local/Qt-5.5.1/bin/qmake -spec macx-xcode -o Telegram.xcodeproj/project.pbxproj Telegram.pro
############################################################################# #############################################################################
MAKEFILE = project.pbxproj MAKEFILE = project.pbxproj
QT_VER = 5.5.1 QT_VER = 5.6.0
QT_DIR = /usr/local/Qt-$(QT_VER) QT_DIR = /usr/local/tdesktop/Qt-$(QT_VER)
QT_MOC = $(QT_DIR)/bin/moc QT_MOC = $(QT_DIR)/bin/moc
QT_RCC = $(QT_DIR)/bin/rcc QT_RCC = $(QT_DIR)/bin/rcc
LEX = flex LEX = flex
@ -21,10 +18,6 @@ INCPATH = -I$(QT_DIR)/mkspecs/macx-clang\
-I$(QT_DIR)/include/QtGui/$(QT_VER)/QtGui\ -I$(QT_DIR)/include/QtGui/$(QT_VER)/QtGui\
-I$(QT_DIR)/include/QtCore/$(QT_VER)/QtCore\ -I$(QT_DIR)/include/QtCore/$(QT_VER)/QtCore\
-I$(QT_VER)/include\ -I$(QT_VER)/include\
-I$(QT_DIR)/include/QtWidgets\
-I$(QT_DIR)/include/QtNetwork\
-I$(QT_DIR)/include/QtGui\
-I$(QT_DIR)/include/QtCore\
-ISourceFiles\ -ISourceFiles\
-IGeneratedFiles\ -IGeneratedFiles\
-I../../Libraries/lzma/C\ -I../../Libraries/lzma/C\

View File

@ -1,12 +0,0 @@
cd ../../
while IFS='' read -r line || [[ -n "$line" ]]; do
tx pull -f -l $line --minimum-perc=100
done < tdesktop/Telegram/Resources/LangList
cd translations/telegram-desktop.langstrings/
for file in *.strings; do
iconv -f "UTF-16LE" -t "UTF-8" "$file" > "../../tdesktop/Telegram/Resources/langs/lang_$file.tmp"
awk '{ if (NR==1) sub(/^\xef\xbb\xbf/,""); sub(/ /,""); print }' "../../tdesktop/Telegram/Resources/langs/lang_$file.tmp" > "../../tdesktop/Telegram/Resources/langs/lang_$file"
rm "../../tdesktop/Telegram/Resources/langs/lang_$file.tmp"
done
cd ../../tdesktop/Telegram/
touch Resources/telegram.qrc

Binary file not shown.

View File

@ -136,12 +136,9 @@
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="resource1.h" /> <ClInclude Include="Resources\winrc\resource1.h" />
<ClInclude Include="SourceFiles\_other\updater.h" /> <ClInclude Include="SourceFiles\_other\updater.h" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<ResourceCompile Include="Updater.rc" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="SourceFiles\_other\updater_osx.m"> <None Include="SourceFiles\_other\updater_osx.m">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
@ -149,6 +146,9 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ResourceCompile Include="Resources\winrc\Updater.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
</ImportGroup> </ImportGroup>

View File

@ -1,25 +1,41 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup> <ItemGroup>
<Filter Include="Resource Files"> <Filter Include="Resources">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter> </Filter>
<Filter Include="SourceFiles">
<UniqueIdentifier>{66369fb7-5116-4c56-b656-d1c8132021e3}</UniqueIdentifier>
</Filter>
<Filter Include="Resources\winrc">
<UniqueIdentifier>{617a8112-8c4e-4729-8bbd-a32b0f6d3caa}</UniqueIdentifier>
</Filter>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="SourceFiles\_other\updater.h" /> <ClCompile Include="SourceFiles\_other\updater.cpp">
<ClInclude Include="resource1.h" /> <Filter>SourceFiles</Filter>
</ClCompile>
<ClCompile Include="SourceFiles\_other\updater_linux.cpp">
<Filter>SourceFiles</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="Updater.rc"> <ClInclude Include="SourceFiles\_other\updater.h">
<Filter>Resource Files</Filter> <Filter>SourceFiles</Filter>
</ClInclude>
<ClInclude Include="Resources\winrc\resource1.h">
<Filter>Resources\winrc</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="SourceFiles\_other\updater_osx.m">
<Filter>SourceFiles</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Resources\winrc\Updater.rc">
<Filter>Resources\winrc</Filter>
</ResourceCompile> </ResourceCompile>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ClCompile Include="SourceFiles\_other\updater.cpp" />
<ClCompile Include="SourceFiles\_other\updater_linux.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="SourceFiles\_other\updater_osx.m" />
</ItemGroup>
</Project> </Project>

View File

@ -1,6 +0,0 @@
cd ../../
while IFS='' read -r line || [[ -n "$line" ]]; do
tx pull -f -l $line
done < tdesktop/Telegram/Resources/LangList
tx push -s
cd tdesktop/Telegram/

View File

@ -1,6 +0,0 @@
AppVersion 9045
AppVersionStrMajor 0.9
AppVersionStrSmall 0.9.45
AppVersionStr 0.9.45
DevChannel 1
BetaVersion 0

View File

@ -1,20 +1,31 @@
@echo OFF @echo OFF
setlocal setlocal enabledelayedexpansion
set "FullScriptPath=%~dp0"
set "FullExecPath=%cd%"
FOR /F "tokens=1,2* delims= " %%i in (Version) do set "%%i=%%j" if not exist "%FullScriptPath%..\..\..\TelegramPrivate" (
echo.
echo This script is for building the production version of Telegram Desktop.
echo.
echo For building custom versions please visit the build instructions page at:
echo https://github.com/telegramdesktop/tdesktop/#build-instructions
exit /b
)
FOR /F "tokens=1,2* delims= " %%i in (%FullScriptPath%version) do set "%%i=%%j"
set "VersionForPacker=%AppVersion%" set "VersionForPacker=%AppVersion%"
if %BetaVersion% neq 0 ( if %BetaVersion% neq 0 (
set "AppVersion=%BetaVersion%" set "AppVersion=%BetaVersion%"
set "AppVersionStrFull=%AppVersionStr%_%BetaVersion%" set "AppVersionStrFull=%AppVersionStr%_%BetaVersion%"
set "DevParam=-beta %BetaVersion%" set "AlphaBetaParam=-beta %BetaVersion%"
set "BetaKeyFile=tbeta_%BetaVersion%_key" set "BetaKeyFile=tbeta_%BetaVersion%_key"
) else ( ) else (
if %DevChannel% neq 0 ( if %AlphaChannel% neq 0 (
set "DevParam=-dev" set "AlphaBetaParam=-alpha"
set "AppVersionStrFull=%AppVersionStr%.dev" set "AppVersionStrFull=%AppVersionStr%.alpha"
) else ( ) else (
set "DevParam=" set "AlphaBetaParam="
set "AppVersionStrFull=%AppVersionStr%" set "AppVersionStrFull=%AppVersionStr%"
) )
) )
@ -23,15 +34,17 @@ echo.
echo Building version %AppVersionStrFull% for Windows.. echo Building version %AppVersionStrFull% for Windows..
echo. echo.
set "HomePath=%FullScriptPath%.."
set "ResourcesPath=%HomePath%\Resources"
set "SolutionPath=%HomePath%\.."
set "UpdateFile=tupdate%AppVersion%" set "UpdateFile=tupdate%AppVersion%"
set "SetupFile=tsetup.%AppVersionStrFull%.exe" set "SetupFile=tsetup.%AppVersionStrFull%.exe"
set "PortableFile=tportable.%AppVersionStrFull%.zip" set "PortableFile=tportable.%AppVersionStrFull%.zip"
set "HomePath=..\..\Telegram" set "ReleasePath=%HomePath%\..\Win32\Deploy"
set "ReleasePath=..\Win32\Deploy"
set "DeployPath=%ReleasePath%\deploy\%AppVersionStrMajor%\%AppVersionStrFull%" set "DeployPath=%ReleasePath%\deploy\%AppVersionStrMajor%\%AppVersionStrFull%"
set "SignPath=..\..\TelegramPrivate\Sign.bat" set "SignPath=%HomePath%\..\..\TelegramPrivate\Sign.bat"
set "BinaryName=Telegram" set "BinaryName=Telegram"
set "DropboxSymbolsPath=Z:\Dropbox\Telegram\symbols" set "DropboxSymbolsPath=X:\Telegram\symbols"
if %BetaVersion% neq 0 ( if %BetaVersion% neq 0 (
if exist %DeployPath%\ ( if exist %DeployPath%\ (
@ -43,6 +56,10 @@ if %BetaVersion% neq 0 (
exit /b 1 exit /b 1
) )
) else ( ) else (
if exist %ReleasePath%\deploy\%AppVersionStrMajor%\%AppVersionStr%.alpha\ (
echo Deploy folder for version %AppVersionStr%.alpha already exists!
exit /b 1
)
if exist %ReleasePath%\deploy\%AppVersionStrMajor%\%AppVersionStr%.dev\ ( if exist %ReleasePath%\deploy\%AppVersionStrMajor%\%AppVersionStr%.dev\ (
echo Deploy folder for version %AppVersionStr%.dev already exists! echo Deploy folder for version %AppVersionStr%.dev already exists!
exit /b 1 exit /b 1
@ -56,18 +73,16 @@ if %BetaVersion% neq 0 (
exit /b 1 exit /b 1
) )
) )
cd Resources\ cd "%ResourcesPath%"
if "%1" == "fast" ( if "%1" == "fast" (
echo Skipping touching of telegram.qrc.. echo Skipping touching of telegram.qrc...
) else ( ) else (
copy telegram.qrc /B+,,/Y copy telegram.qrc /B+,,/Y
) )
cd ..\
if %errorlevel% neq 0 goto error if %errorlevel% neq 0 goto error
cd ..\ cd "%SolutionPath%"
MSBuild Telegram.sln /property:Configuration=Deploy MSBuild Telegram.sln /property:Configuration=Deploy
cd Telegram\
if %errorlevel% neq 0 goto error if %errorlevel% neq 0 goto error
echo . echo .
@ -75,34 +90,31 @@ echo Version %AppVersionStrFull% build successfull. Preparing..
echo . echo .
echo Dumping debug symbols.. echo Dumping debug symbols..
call ..\..\Libraries\breakpad\src\tools\windows\binaries\dump_syms.exe %ReleasePath%\%BinaryName%.pdb > %ReleasePath%\%BinaryName%.sym call "%SolutionPath%\..\Libraries\breakpad\src\tools\windows\binaries\dump_syms.exe" "%ReleasePath%\%BinaryName%.pdb" > "%ReleasePath%\%BinaryName%.sym"
echo Done! echo Done!
set "PATH=%PATH%;C:\Program Files\7-Zip;C:\Program Files (x86)\Inno Setup 5" set "PATH=%PATH%;C:\Program Files\7-Zip;C:\Program Files (x86)\Inno Setup 5"
call %SignPath% %ReleasePath%\%BinaryName%.exe cd "%ReleasePath%"
call "%SignPath%" "%BinaryName%.exe"
if %errorlevel% neq 0 goto error if %errorlevel% neq 0 goto error
call %SignPath% %ReleasePath%\Updater.exe call "%SignPath%" "Updater.exe"
if %errorlevel% neq 0 goto error if %errorlevel% neq 0 goto error
if %BetaVersion% equ 0 ( if %BetaVersion% equ 0 (
cd %ReleasePath% iscc /dMyAppVersion=%AppVersionStrSmall% /dMyAppVersionZero=%AppVersionStr% /dMyAppVersionFull=%AppVersionStrFull% "%FullScriptPath%setup.iss"
iscc /dMyAppVersion=%AppVersionStrSmall% /dMyAppVersionZero=%AppVersionStr% /dMyAppVersionFull=%AppVersionStrFull% %HomePath%\Setup.iss
cd %HomePath%
if %errorlevel% neq 0 goto error if %errorlevel% neq 0 goto error
call %SignPath% %ReleasePath%\tsetup.%AppVersionStrFull%.exe call "%SignPath%" "tsetup.%AppVersionStrFull%.exe"
if %errorlevel% neq 0 goto error if %errorlevel% neq 0 goto error
) )
cd %ReleasePath% call Packer.exe -version %VersionForPacker% -path %BinaryName%.exe -path Updater.exe %AlphaBetaParam%
call Packer.exe -version %VersionForPacker% -path %BinaryName%.exe -path Updater.exe %DevParam%
cd %HomePath%
if %errorlevel% neq 0 goto error if %errorlevel% neq 0 goto error
if %BetaVersion% neq 0 ( if %BetaVersion% neq 0 (
if not exist %ReleasePath%\%BetaKeyFile% ( if not exist "%ReleasePath%\%BetaKeyFile%" (
echo Beta version key file not found! echo Beta version key file not found!
exit /b 1 exit /b 1
) )
@ -128,30 +140,29 @@ FOR /F "tokens=1,2,3,4* delims= " %%i in ("%SymbolsHashLine%") do set "SymbolsHa
echo Copying %BinaryName%.sym to %DropboxSymbolsPath%\%BinaryName%.pdb\%SymbolsHash% echo Copying %BinaryName%.sym to %DropboxSymbolsPath%\%BinaryName%.pdb\%SymbolsHash%
if not exist %DropboxSymbolsPath%\%BinaryName%.pdb mkdir %DropboxSymbolsPath%\%BinaryName%.pdb if not exist %DropboxSymbolsPath%\%BinaryName%.pdb mkdir %DropboxSymbolsPath%\%BinaryName%.pdb
if not exist %DropboxSymbolsPath%\%BinaryName%.pdb\%SymbolsHash% mkdir %DropboxSymbolsPath%\%BinaryName%.pdb\%SymbolsHash% if not exist %DropboxSymbolsPath%\%BinaryName%.pdb\%SymbolsHash% mkdir %DropboxSymbolsPath%\%BinaryName%.pdb\%SymbolsHash%
xcopy %ReleasePath%\%BinaryName%.sym %DropboxSymbolsPath%\%BinaryName%.pdb\%SymbolsHash%\ xcopy "%ReleasePath%\%BinaryName%.sym" %DropboxSymbolsPath%\%BinaryName%.pdb\%SymbolsHash%\
echo Done! echo Done!
if not exist %ReleasePath%\deploy mkdir %ReleasePath%\deploy if not exist "%ReleasePath%\deploy" mkdir "%ReleasePath%\deploy"
if not exist %ReleasePath%\deploy\%AppVersionStrMajor% mkdir %ReleasePath%\deploy\%AppVersionStrMajor% if not exist "%ReleasePath%\deploy\%AppVersionStrMajor%" mkdir "%ReleasePath%\deploy\%AppVersionStrMajor%"
mkdir %DeployPath% mkdir "%DeployPath%"
mkdir %DeployPath%\Telegram mkdir "%DeployPath%\Telegram"
if %errorlevel% neq 0 goto error if %errorlevel% neq 0 goto error
move %ReleasePath%\Telegram.exe %DeployPath%\Telegram\ move "%ReleasePath%\Telegram.exe" "%DeployPath%\Telegram\"
move %ReleasePath%\Updater.exe %DeployPath%\ move "%ReleasePath%\Updater.exe" "%DeployPath%\"
move %ReleasePath%\Telegram.pdb %DeployPath%\ move "%ReleasePath%\Telegram.pdb" "%DeployPath%\"
move %ReleasePath%\Updater.pdb %DeployPath%\ move "%ReleasePath%\Updater.pdb" "%DeployPath%\"
if %BetaVersion% equ 0 ( if %BetaVersion% equ 0 (
move %ReleasePath%\%SetupFile% %DeployPath%\ move "%ReleasePath%\%SetupFile%" "%DeployPath%\"
) else ( ) else (
move %ReleasePath%\%BetaKeyFile% %DeployPath%\ move "%ReleasePath%\%BetaKeyFile%" "%DeployPath%\"
) )
move %ReleasePath%\%UpdateFile% %DeployPath%\ move "%ReleasePath%\%UpdateFile%" "%DeployPath%\"
if %errorlevel% neq 0 goto error if %errorlevel% neq 0 goto error
cd %DeployPath%\ cd "%DeployPath%"
7z a -mx9 %PortableFile% Telegram\ 7z a -mx9 %PortableFile% Telegram\
cd ..\..\..\%HomePath%\
if %errorlevel% neq 0 goto error if %errorlevel% neq 0 goto error
echo . echo .
@ -161,35 +172,42 @@ echo .
set "FinalReleasePath=Z:\TBuild\tother\tsetup" set "FinalReleasePath=Z:\TBuild\tother\tsetup"
set "FinalDeployPath=%FinalReleasePath%\%AppVersionStrMajor%\%AppVersionStrFull%" set "FinalDeployPath=%FinalReleasePath%\%AppVersionStrMajor%\%AppVersionStrFull%"
if not exist %DeployPath%\%UpdateFile% goto error if not exist "%DeployPath%\%UpdateFile%" goto error
if not exist %DeployPath%\%PortableFile% goto error if not exist "%DeployPath%\%PortableFile%" goto error
if %BetaVersion% equ 0 ( if %BetaVersion% equ 0 (
if not exist %DeployPath%\%SetupFile% goto error if not exist "%DeployPath%\%SetupFile%" goto error
) )
if not exist %DeployPath%\%BinaryName%.pdb goto error if not exist "%DeployPath%\%BinaryName%.pdb" goto error
if not exist %DeployPath%\Updater.exe goto error if not exist "%DeployPath%\Updater.exe" goto error
if not exist %DeployPath%\Updater.pdb goto error if not exist "%DeployPath%\Updater.pdb" goto error
if not exist %FinalReleasePath%\%AppVersionStrMajor% mkdir %FinalReleasePath%\%AppVersionStrMajor% if not exist "%FinalReleasePath%\%AppVersionStrMajor%" mkdir "%FinalReleasePath%\%AppVersionStrMajor%"
if not exist %FinalDeployPath% mkdir %FinalDeployPath% if not exist "%FinalDeployPath%" mkdir "%FinalDeployPath%"
xcopy %DeployPath%\%UpdateFile% %FinalDeployPath%\ xcopy "%DeployPath%\%UpdateFile%" "%FinalDeployPath%\"
xcopy %DeployPath%\%PortableFile% %FinalDeployPath%\ xcopy "%DeployPath%\%PortableFile%" "%FinalDeployPath%\"
if %BetaVersion% equ 0 ( if %BetaVersion% equ 0 (
xcopy %DeployPath%\%SetupFile% %FinalDeployPath%\ xcopy "%DeployPath%\%SetupFile%" "%FinalDeployPath%\"
) else ( ) else (
xcopy %DeployPath%\%BetaKeyFile% %FinalDeployPath%\ /Y xcopy "%DeployPath%\%BetaKeyFile%" "%FinalDeployPath%\" /Y
) )
xcopy %DeployPath%\%BinaryName%.pdb %FinalDeployPath%\ xcopy "%DeployPath%\%BinaryName%.pdb" "%FinalDeployPath%\"
xcopy %DeployPath%\Updater.exe %FinalDeployPath%\ xcopy "%DeployPath%\Updater.exe" "%FinalDeployPath%\"
xcopy %DeployPath%\Updater.pdb %FinalDeployPath%\ xcopy "%DeployPath%\Updater.pdb" "%FinalDeployPath%\"
echo Version %AppVersionStrFull% is ready! echo Version %AppVersionStrFull% is ready!
goto eof cd "%FullExecPath%"
exit /b
:error :error
echo ERROR occured! (
if %errorlevel% neq 0 exit /b %errorlevel% set ErrorCode=%errorlevel%
exit /b 1 if !ErrorCode! neq 0 (
echo Error !ErrorCode!
:eof ) else (
echo Error 666
set ErrorCode=666
)
cd "%FullExecPath%"
exit /b !ErrorCode!
)

View File

@ -1,106 +1,120 @@
set -e set -e
FullExecPath=$PWD
pushd `dirname $0` > /dev/null
FullScriptPath=`pwd`
popd > /dev/null
QMakePath="/usr/local/tdesktop/Qt-5.6.0/bin/qmake"
if [ ! -d "$FullScriptPath/../../../TelegramPrivate" ]; then
echo ""
echo "This script is for building the production version of Telegram Desktop."
echo ""
echo "For building custom versions please visit the build instructions page at:"
echo "https://github.com/telegramdesktop/tdesktop/#build-instructions"
exit
fi
Error () {
cd $FullExecPath
echo "$1"
exit 1
}
FastParam="$1" FastParam="$1"
if [ ! -f "$FullScriptPath/target" ]; then
Error "Build target not found!"
fi
while IFS='' read -r line || [[ -n "$line" ]]; do
BuildTarget="$line"
done < "$FullScriptPath/target"
while IFS='' read -r line || [[ -n "$line" ]]; do while IFS='' read -r line || [[ -n "$line" ]]; do
set $line set $line
eval $1="$2" eval $1="$2"
done < Version done < "$FullScriptPath/version"
VersionForPacker="$AppVersion" VersionForPacker="$AppVersion"
if [ "$BetaVersion" != "0" ]; then if [ "$BetaVersion" != "0" ]; then
AppVersion="$BetaVersion" AppVersion="$BetaVersion"
AppVersionStrFull="${AppVersionStr}_${BetaVersion}" AppVersionStrFull="${AppVersionStr}_${BetaVersion}"
DevParam="-beta $BetaVersion" AlphaBetaParam="-beta $BetaVersion"
BetaKeyFile="tbeta_${AppVersion}_key" BetaKeyFile="tbeta_${AppVersion}_key"
elif [ "$DevChannel" == "0" ]; then elif [ "$AlphaChannel" == "0" ]; then
AppVersionStrFull="$AppVersionStr" AppVersionStrFull="$AppVersionStr"
DevParam='' AlphaBetaParam=''
else else
AppVersionStrFull="$AppVersionStr.dev" AppVersionStrFull="$AppVersionStr.alpha"
DevParam='-dev' AlphaBetaParam='-alpha'
fi fi
if [ ! -f "Target" ]; then
echo "Build target not found!"
exit 1
fi
while IFS='' read -r line || [[ -n "$line" ]]; do
BuildTarget="$line"
done < Target
echo "" echo ""
HomePath="./../../Telegram" HomePath="$FullScriptPath/.."
if [ "$BuildTarget" == "linux" ]; then if [ "$BuildTarget" == "linux" ]; then
echo "Building version $AppVersionStrFull for Linux 64bit.." echo "Building version $AppVersionStrFull for Linux 64bit.."
UpdateFile="tlinuxupd$AppVersion" UpdateFile="tlinuxupd$AppVersion"
SetupFile="tsetup.$AppVersionStrFull.tar.xz" SetupFile="tsetup.$AppVersionStrFull.tar.xz"
WorkPath="./../Linux" WorkPath="$HomePath/../Linux"
FixScript="$HomePath/FixMake.sh" ReleasePath="$WorkPath/Release"
ReleasePath="./../Linux/Release"
BinaryName="Telegram" BinaryName="Telegram"
elif [ "$BuildTarget" == "linux32" ]; then elif [ "$BuildTarget" == "linux32" ]; then
echo "Building version $AppVersionStrFull for Linux 32bit.." echo "Building version $AppVersionStrFull for Linux 32bit.."
UpdateFile="tlinux32upd$AppVersion" UpdateFile="tlinux32upd$AppVersion"
SetupFile="tsetup32.$AppVersionStrFull.tar.xz" SetupFile="tsetup32.$AppVersionStrFull.tar.xz"
WorkPath="./../Linux" WorkPath="$HomePath/../Linux"
FixScript="$HomePath/FixMake32.sh" ReleasePath="$WorkPath/Release"
ReleasePath="./../Linux/Release"
BinaryName="Telegram" BinaryName="Telegram"
elif [ "$BuildTarget" == "mac" ]; then elif [ "$BuildTarget" == "mac" ]; then
echo "Building version $AppVersionStrFull for OS X 10.8+.." echo "Building version $AppVersionStrFull for OS X 10.8+.."
UpdateFile="tmacupd$AppVersion" UpdateFile="tmacupd$AppVersion"
SetupFile="tsetup.$AppVersionStrFull.dmg" SetupFile="tsetup.$AppVersionStrFull.dmg"
ReleasePath="./../Mac/Release" ReleasePath="$HomePath/../Mac/Release"
BinaryName="Telegram" BinaryName="Telegram"
elif [ "$BuildTarget" == "mac32" ]; then elif [ "$BuildTarget" == "mac32" ]; then
echo "Building version $AppVersionStrFull for OS X 10.6 and 10.7.." echo "Building version $AppVersionStrFull for OS X 10.6 and 10.7.."
UpdateFile="tmac32upd$AppVersion" UpdateFile="tmac32upd$AppVersion"
SetupFile="tsetup32.$AppVersionStrFull.dmg" SetupFile="tsetup32.$AppVersionStrFull.dmg"
ReleasePath="./../Mac/Release" ReleasePath="$HomePath/../Mac/Release"
BinaryName="Telegram" BinaryName="Telegram"
elif [ "$BuildTarget" == "macstore" ]; then elif [ "$BuildTarget" == "macstore" ]; then
if [ "$BetaVersion" != "0" ]; then if [ "$BetaVersion" != "0" ]; then
echo "Can't build macstore beta version!" Error "Can't build macstore beta version!"
exit 1
fi fi
echo "Building version $AppVersionStrFull for Mac App Store.." echo "Building version $AppVersionStrFull for Mac App Store.."
ReleasePath="./../Mac/Release" ReleasePath="$HomePath/../Mac/Release"
BinaryName="Telegram Desktop" BinaryName="Telegram Desktop"
DropboxPath="./../../../Dropbox/Telegram/deploy/$AppVersionStrMajor" DropboxPath="/Volumes/Storage/Dropbox/Telegram/deploy/$AppVersionStrMajor"
DropboxDeployPath="$DropboxPath/$AppVersionStrFull" DropboxDeployPath="$DropboxPath/$AppVersionStrFull"
else else
echo "Invalid target!" Error "Invalid target!"
exit 1
fi fi
#if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ] || [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarget" == "macstore" ]; then #if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ] || [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarget" == "macstore" ]; then
if [ "$BetaVersion" != "0" ]; then if [ "$BetaVersion" != "0" ]; then
if [ -f "$ReleasePath/$BetaKeyFile" ]; then if [ -f "$ReleasePath/$BetaKeyFile" ]; then
echo "Beta version key file for version $AppVersion already exists!" Error "Beta version key file for version $AppVersion already exists!"
exit 1
fi fi
if [ -d "$ReleasePath/deploy/$AppVersionStrMajor/$AppVersionStrFull" ]; then if [ -d "$ReleasePath/deploy/$AppVersionStrMajor/$AppVersionStrFull" ]; then
echo "Deploy folder for version $AppVersionStrFull already exists!" Error "Deploy folder for version $AppVersionStrFull already exists!"
exit 1
fi fi
else else
if [ -d "$ReleasePath/deploy/$AppVersionStrMajor/$AppVersionStr.dev" ]; then if [ -d "$ReleasePath/deploy/$AppVersionStrMajor/$AppVersionStr.alpha" ]; then
echo "Deploy folder for version $AppVersionStr.dev already exists!" Error "Deploy folder for version $AppVersionStr.alpha already exists!"
exit 1
fi fi
if [ -f "$ReleasePath/$UpdateFile" ]; then if [ -d "$ReleasePath/deploy/$AppVersionStrMajor/$AppVersionStr.dev" ]; then
echo "Update file for version $AppVersion already exists!" Error "Deploy folder for version $AppVersionStr.dev already exists!"
exit 1
fi fi
if [ -d "$ReleasePath/deploy/$AppVersionStrMajor/$AppVersionStr" ]; then if [ -d "$ReleasePath/deploy/$AppVersionStrMajor/$AppVersionStr" ]; then
echo "Deploy folder for version $AppVersionStr already exists!" Error "Deploy folder for version $AppVersionStr already exists!"
exit 1 fi
if [ -f "$ReleasePath/$UpdateFile" ]; then
Error "Update file for version $AppVersion already exists!"
fi fi
fi fi
@ -109,34 +123,38 @@ fi
if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then
DropboxSymbolsPath="/media/psf/Home/Dropbox/Telegram/symbols" DropboxSymbolsPath="/media/psf/Dropbox/Telegram/symbols"
if [ ! -d "$DropboxSymbolsPath" ]; then
Error "Dropbox path not found!"
fi
mkdir -p "$WorkPath/ReleaseIntermediateUpdater" mkdir -p "$WorkPath/ReleaseIntermediateUpdater"
cd "$WorkPath/ReleaseIntermediateUpdater" cd "$WorkPath/ReleaseIntermediateUpdater"
/usr/local/Qt-5.5.1/bin/qmake "$HomePath/Updater.pro" -r -spec linux-g++ "$QMakePath" "$HomePath/Updater.pro" -r -spec linux-g++
make make
echo "Updater build complete!" echo "Updater build complete!"
cd "$HomePath"
mkdir -p "$WorkPath/ReleaseIntermediate" mkdir -p "$WorkPath/ReleaseIntermediate"
cd "$WorkPath/ReleaseIntermediate" cd "$WorkPath/ReleaseIntermediate"
/usr/local/Qt-5.5.1/bin/qmake "$HomePath/Telegram.pro" -r -spec linux-g++ "$QMakePath" "$HomePath/Telegram.pro" -r -spec linux-g++
eval "$FixScript"
make eval "$HomePath/build/makefile_static.sh"
./../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
make -j4
echo "$BinaryName build complete!" echo "$BinaryName build complete!"
cd "$HomePath"
if [ ! -f "$ReleasePath/$BinaryName" ]; then if [ ! -f "$ReleasePath/$BinaryName" ]; then
echo "$BinaryName not found!" Error "$BinaryName not found!"
exit 1
fi fi
if [ ! -f "$ReleasePath/Updater" ]; then if [ ! -f "$ReleasePath/Updater" ]; then
echo "Updater not found!" Error "Updater not found!"
exit 1
fi fi
echo "Dumping debug symbols.." echo "Dumping debug symbols.."
"./../../Libraries/breakpad/src/tools/linux/dump_syms/dump_syms" "$ReleasePath/$BinaryName" > "$ReleasePath/$BinaryName.sym" "$HomePath/../../Libraries/breakpad/src/tools/linux/dump_syms/dump_syms" "$ReleasePath/$BinaryName" > "$ReleasePath/$BinaryName.sym"
echo "Done!" echo "Done!"
echo "Stripping the executable.." echo "Stripping the executable.."
@ -144,13 +162,13 @@ if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then
echo "Done!" echo "Done!"
echo "Preparing version $AppVersionStrFull, executing Packer.." echo "Preparing version $AppVersionStrFull, executing Packer.."
cd "$ReleasePath" && "./Packer" -path "$BinaryName" -path Updater -version $VersionForPacker $DevParam && cd "$HomePath" cd "$ReleasePath"
"./Packer" -path "$BinaryName" -path Updater -version $VersionForPacker $AlphaBetaParam
echo "Packer done!" echo "Packer done!"
if [ "$BetaVersion" != "0" ]; then if [ "$BetaVersion" != "0" ]; then
if [ ! -f "$ReleasePath/$BetaKeyFile" ]; then if [ ! -f "$ReleasePath/$BetaKeyFile" ]; then
echo "Beta version key file not found!" Error "Beta version key file not found!"
exit 1
fi fi
while IFS='' read -r line || [[ -n "$line" ]]; do while IFS='' read -r line || [[ -n "$line" ]]; do
@ -184,12 +202,16 @@ if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then
if [ "$BetaVersion" != "0" ]; then if [ "$BetaVersion" != "0" ]; then
mv "$ReleasePath/$BetaKeyFile" "$DeployPath/" mv "$ReleasePath/$BetaKeyFile" "$DeployPath/"
fi fi
cd "$DeployPath" && tar -cJvf "$SetupFile" "$BinaryName/" && cd "./../../../$HomePath" cd "$DeployPath"
tar -cJvf "$SetupFile" "$BinaryName/"
fi fi
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarget" == "macstore" ]; then if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarget" == "macstore" ]; then
DropboxSymbolsPath="./../../../Dropbox/Telegram/symbols" DropboxSymbolsPath="/Volumes/Storage/Dropbox/Telegram/symbols"
if [ ! -d "$DropboxSymbolsPath" ]; then
Error "Dropbox path not found!"
fi
if [ "$FastParam" != "fast" ]; then if [ "$FastParam" != "fast" ]; then
touch "./Resources/telegram.qrc" touch "./Resources/telegram.qrc"
@ -197,13 +219,11 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarg
xcodebuild -project Telegram.xcodeproj -alltargets -configuration Release build xcodebuild -project Telegram.xcodeproj -alltargets -configuration Release build
if [ ! -d "$ReleasePath/$BinaryName.app" ]; then if [ ! -d "$ReleasePath/$BinaryName.app" ]; then
echo "$BinaryName.app not found!" Error "$BinaryName.app not found!"
exit 1
fi fi
if [ ! -d "$ReleasePath/$BinaryName.app.dSYM" ]; then if [ ! -d "$ReleasePath/$BinaryName.app.dSYM" ]; then
echo "$BinaryName.app.dSYM not found!" Error "$BinaryName.app.dSYM not found!"
exit 1
fi fi
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ]; then if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ]; then
@ -213,7 +233,7 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarg
fi fi
echo "Dumping debug symbols.." echo "Dumping debug symbols.."
"./../../Libraries/breakpad/src/tools/mac/dump_syms/build/Release/dump_syms" "$ReleasePath/$BinaryName.app.dSYM" > "$ReleasePath/$BinaryName.sym" 2>/dev/null "$HomePath/../../Libraries/breakpad/src/tools/mac/dump_syms/build/Release/dump_syms" "$ReleasePath/$BinaryName.app.dSYM" > "$ReleasePath/$BinaryName.sym" 2>/dev/null
echo "Done!" echo "Done!"
echo "Stripping the executable.." echo "Stripping the executable.."
@ -231,34 +251,28 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarg
AppUUID=`dwarfdump -u "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName" | awk -F " " '{print $2}'` AppUUID=`dwarfdump -u "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName" | awk -F " " '{print $2}'`
DsymUUID=`dwarfdump -u "$ReleasePath/$BinaryName.app.dSYM" | awk -F " " '{print $2}'` DsymUUID=`dwarfdump -u "$ReleasePath/$BinaryName.app.dSYM" | awk -F " " '{print $2}'`
if [ "$AppUUID" != "$DsymUUID" ]; then if [ "$AppUUID" != "$DsymUUID" ]; then
echo "UUID of binary '$AppUUID' and dSYM '$DsymUUID' differ!" Error "UUID of binary '$AppUUID' and dSYM '$DsymUUID' differ!"
exit 1
fi fi
if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Resources/Icon.icns" ]; then if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Resources/Icon.icns" ]; then
echo "Icon.icns not found in Resources!" Error "Icon.icns not found in Resources!"
exit 1
fi fi
if [ ! -f "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName" ]; then if [ ! -f "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName" ]; then
echo "$BinaryName not found in MacOS!" Error "$BinaryName not found in MacOS!"
exit 1
fi fi
if [ ! -d "$ReleasePath/$BinaryName.app/Contents/_CodeSignature" ]; then if [ ! -d "$ReleasePath/$BinaryName.app/Contents/_CodeSignature" ]; then
echo "$BinaryName signature not found!" Error "$BinaryName signature not found!"
exit 1
fi fi
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ]; then if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ]; then
if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Frameworks/Updater" ]; then if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Frameworks/Updater" ]; then
echo "Updater not found in Frameworks!" Error "Updater not found in Frameworks!"
exit 1
fi fi
elif [ "$BuildTarget" == "macstore" ]; then elif [ "$BuildTarget" == "macstore" ]; then
if [ ! -f "$ReleasePath/$BinaryName.pkg" ]; then if [ ! -f "$ReleasePath/$BinaryName.pkg" ]; then
echo "$BinaryName.pkg not found!" Error "$BinaryName.pkg not found!"
exit 1
fi fi
fi fi
@ -271,20 +285,20 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarg
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ]; then if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ]; then
if [ "$BetaVersion" == "0" ]; then if [ "$BetaVersion" == "0" ]; then
cd "$ReleasePath" cd "$ReleasePath"
temppath=`hdiutil attach -readwrite tsetup.dmg | awk -F "\t" 'END {print $3}'` cp -f tsetup_blank.dmg tsetup.dmg
temppath=`hdiutil attach -nobrowse -noautoopenrw -readwrite tsetup.dmg | awk -F "\t" 'END {print $3}'`
cp -R "./$BinaryName.app" "$temppath/" cp -R "./$BinaryName.app" "$temppath/"
bless --folder "$temppath/" --openfolder "$temppath/" bless --folder "$temppath/" --openfolder "$temppath/"
hdiutil detach "$temppath" hdiutil detach "$temppath"
hdiutil convert tsetup.dmg -format UDZO -imagekey zlib-level=9 -ov -o "$SetupFile" hdiutil convert tsetup.dmg -format UDZO -imagekey zlib-level=9 -ov -o "$SetupFile"
cd "./../../Telegram"
fi fi
cd "$ReleasePath" && "./Packer.app/Contents/MacOS/Packer" -path "$BinaryName.app" -version $VersionForPacker $DevParam && cd "$HomePath" cd "$ReleasePath"
"./Packer.app/Contents/MacOS/Packer" -path "$BinaryName.app" -version $VersionForPacker $AlphaBetaParam
echo "Packer done!" echo "Packer done!"
if [ "$BetaVersion" != "0" ]; then if [ "$BetaVersion" != "0" ]; then
if [ ! -f "$ReleasePath/$BetaKeyFile" ]; then if [ ! -f "$ReleasePath/$BetaKeyFile" ]; then
echo "Beta version key file not found!" Error "Beta version key file not found!"
exit 1
fi fi
while IFS='' read -r line || [[ -n "$line" ]]; do while IFS='' read -r line || [[ -n "$line" ]]; do
@ -310,7 +324,9 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarg
mkdir "$DeployPath/$BinaryName" mkdir "$DeployPath/$BinaryName"
cp -r "$ReleasePath/$BinaryName.app" "$DeployPath/$BinaryName/" cp -r "$ReleasePath/$BinaryName.app" "$DeployPath/$BinaryName/"
if [ "$BetaVersion" != "0" ]; then if [ "$BetaVersion" != "0" ]; then
cd "$DeployPath" && zip -r "$SetupFile" "$BinaryName" && mv "$SetupFile" "./../../../" && cd "./../../../$HomePath" cd "$DeployPath"
zip -r "$SetupFile" "$BinaryName"
mv "$SetupFile" "$ReleasePath/"
mv "$ReleasePath/$BetaKeyFile" "$DeployPath/" mv "$ReleasePath/$BetaKeyFile" "$DeployPath/"
fi fi
mv "$ReleasePath/$BinaryName.app.dSYM" "$DeployPath/" mv "$ReleasePath/$BinaryName.app.dSYM" "$DeployPath/"
@ -321,7 +337,7 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarg
mv "$ReleasePath/$SetupFile" "$DeployPath/" mv "$ReleasePath/$SetupFile" "$DeployPath/"
if [ "$BuildTarget" == "mac32" ]; then if [ "$BuildTarget" == "mac32" ]; then
ReleaseToPath="./../../../TBuild/tother/tmac32" ReleaseToPath="$HomePath/../../tother/tmac32"
DeployToPath="$ReleaseToPath/$AppVersionStrMajor/$AppVersionStrFull" DeployToPath="$ReleaseToPath/$AppVersionStrMajor/$AppVersionStrFull"
if [ ! -d "$ReleaseToPath/$AppVersionStrMajor" ]; then if [ ! -d "$ReleaseToPath/$AppVersionStrMajor" ]; then
mkdir "$ReleaseToPath/$AppVersionStrMajor" mkdir "$ReleaseToPath/$AppVersionStrMajor"

View File

@ -1,46 +1,62 @@
set -e set -e
FullExecPath=$PWD
pushd `dirname $0` > /dev/null
FullScriptPath=`pwd`
popd > /dev/null
if [ ! -d "$FullScriptPath/../../../TelegramPrivate" ]; then
echo ""
echo "This script is for building the production version of Telegram Desktop."
echo ""
echo "For building custom versions please visit the build instructions page at:"
echo "https://github.com/telegramdesktop/tdesktop/#build-instructions"
exit
fi
Error () {
cd $FullExecPath
echo "$1"
exit 1
}
DeployTarget="$1" DeployTarget="$1"
while IFS='' read -r line || [[ -n "$line" ]]; do if [ ! -f "$FullScriptPath/target" ]; then
set $line Error "Build target not found!"
eval $1="$2"
done < Version
if [ "$BetaVersion" != "0" ]; then
AppVersion="$BetaVersion"
AppVersionStrFull="${AppVersionStr}_${BetaVersion}"
DevParam="-beta $BetaVersion"
BetaKeyFile="tbeta_${AppVersion}_key"
elif [ "$DevChannel" == "0" ]; then
AppVersionStrFull="$AppVersionStr"
DevParam=''
else
AppVersionStrFull="$AppVersionStr.dev"
DevParam='-dev'
fi
if [ ! -f "Target" ]; then
echo "Deploy target not found!"
exit 1
fi fi
while IFS='' read -r line || [[ -n "$line" ]]; do while IFS='' read -r line || [[ -n "$line" ]]; do
BuildTarget="$line" BuildTarget="$line"
done < Target done < "$FullScriptPath/target"
while IFS='' read -r line || [[ -n "$line" ]]; do
set $line
eval $1="$2"
done < "$FullScriptPath/version"
if [ "$BetaVersion" != "0" ]; then
AppVersion="$BetaVersion"
AppVersionStrFull="${AppVersionStr}_${BetaVersion}"
BetaKeyFile="tbeta_${AppVersion}_key"
elif [ "$AlphaChannel" == "0" ]; then
AppVersionStrFull="$AppVersionStr"
else
AppVersionStrFull="$AppVersionStr.alpha"
fi
echo "" echo ""
HomePath="$FullScriptPath/.."
if [ "$BuildTarget" == "linux" ]; then if [ "$BuildTarget" == "linux" ]; then
echo "Deploying version $AppVersionStrFull for Linux 64bit.." echo "Deploying version $AppVersionStrFull for Linux 64bit.."
UpdateFile="tlinuxupd$AppVersion" UpdateFile="tlinuxupd$AppVersion"
SetupFile="tsetup.$AppVersionStrFull.tar.xz" SetupFile="tsetup.$AppVersionStrFull.tar.xz"
ReleasePath="./../Linux/Release" ReleasePath="$HomePath/../Linux/Release"
RemoteFolder="tlinux" RemoteFolder="tlinux"
elif [ "$BuildTarget" == "linux32" ]; then elif [ "$BuildTarget" == "linux32" ]; then
echo "Deploying version $AppVersionStrFull for Linux 32bit.." echo "Deploying version $AppVersionStrFull for Linux 32bit.."
UpdateFile="tlinux32upd$AppVersion" UpdateFile="tlinux32upd$AppVersion"
SetupFile="tsetup32.$AppVersionStrFull.tar.xz" SetupFile="tsetup32.$AppVersionStrFull.tar.xz"
ReleasePath="./../Linux/Release" ReleasePath="$HomePath/../Linux/Release"
RemoteFolder="tlinux32" RemoteFolder="tlinux32"
elif [ "$BuildTarget" == "mac" ]; then elif [ "$BuildTarget" == "mac" ]; then
DeployMac="0" DeployMac="0"
@ -67,27 +83,25 @@ elif [ "$BuildTarget" == "mac" ]; then
fi fi
UpdateFile="tmacupd$AppVersion" UpdateFile="tmacupd$AppVersion"
SetupFile="tsetup.$AppVersionStrFull.dmg" SetupFile="tsetup.$AppVersionStrFull.dmg"
ReleasePath="./../Mac/Release" ReleasePath="$HomePath/../Mac/Release"
RemoteFolder="tmac" RemoteFolder="tmac"
Mac32DeployPath="./../../tother/tmac32/$AppVersionStrMajor/$AppVersionStrFull" Mac32DeployPath="$HomePath/../../tother/tmac32/$AppVersionStrMajor/$AppVersionStrFull"
Mac32UpdateFile="tmac32upd$AppVersion" Mac32UpdateFile="tmac32upd$AppVersion"
Mac32SetupFile="tsetup32.$AppVersionStrFull.dmg" Mac32SetupFile="tsetup32.$AppVersionStrFull.dmg"
Mac32RemoteFolder="tmac32" Mac32RemoteFolder="tmac32"
WinDeployPath="./../../tother/tsetup/$AppVersionStrMajor/$AppVersionStrFull" WinDeployPath="$HomePath/../../tother/tsetup/$AppVersionStrMajor/$AppVersionStrFull"
WinUpdateFile="tupdate$AppVersion" WinUpdateFile="tupdate$AppVersion"
WinSetupFile="tsetup.$AppVersionStrFull.exe" WinSetupFile="tsetup.$AppVersionStrFull.exe"
WinPortableFile="tportable.$AppVersionStrFull.zip" WinPortableFile="tportable.$AppVersionStrFull.zip"
WinRemoteFolder="tsetup" WinRemoteFolder="tsetup"
DropboxPath="./../../../Dropbox/Telegram/deploy/$AppVersionStrMajor" DropboxPath="/Volumes/Storage/Dropbox/Telegram/deploy/$AppVersionStrMajor"
DropboxDeployPath="$DropboxPath/$AppVersionStrFull" DropboxDeployPath="$DropboxPath/$AppVersionStrFull"
DropboxSetupFile="$SetupFile" DropboxSetupFile="$SetupFile"
DropboxMac32SetupFile="$Mac32SetupFile" DropboxMac32SetupFile="$Mac32SetupFile"
elif [ "$BuildTarget" == "mac32" ] || [ "$BuildTarget" = "macstore" ]; then elif [ "$BuildTarget" == "mac32" ] || [ "$BuildTarget" = "macstore" ]; then
echo "No need to deploy this target." Error "No need to deploy this target."
exit
else else
echo "Invalid target!" Error "Invalid target!"
exit 1
fi fi
DeployPath="$ReleasePath/deploy/$AppVersionStrMajor/$AppVersionStrFull" DeployPath="$ReleasePath/deploy/$AppVersionStrMajor/$AppVersionStrFull"
@ -101,8 +115,7 @@ if [ "$BetaVersion" != "0" ]; then
BetaFilePath="$DeployPath/$BetaKeyFile" BetaFilePath="$DeployPath/$BetaKeyFile"
fi fi
if [ ! -f "$BetaFilePath" ]; then if [ ! -f "$BetaFilePath" ]; then
echo "Beta key file for $AppVersionStrFull not found :(" Error "Beta key file for $AppVersionStrFull not found :("
exit 1
fi fi
while IFS='' read -r line || [[ -n "$line" ]]; do while IFS='' read -r line || [[ -n "$line" ]]; do
@ -127,45 +140,38 @@ fi
if [ "$BuildTarget" != "mac" ] || [ "$DeployMac" == "1" ]; then if [ "$BuildTarget" != "mac" ] || [ "$DeployMac" == "1" ]; then
if [ ! -f "$DeployPath/$UpdateFile" ]; then if [ ! -f "$DeployPath/$UpdateFile" ]; then
echo "$UpdateFile not found!"; Error "$UpdateFile not found!";
exit 1
fi fi
if [ ! -f "$DeployPath/$SetupFile" ]; then if [ ! -f "$DeployPath/$SetupFile" ]; then
echo "$SetupFile not found!" Error "$SetupFile not found!"
exit 1
fi fi
fi fi
if [ "$BuildTarget" == "mac" ]; then if [ "$BuildTarget" == "mac" ]; then
if [ "$DeployMac32" == "1" ]; then if [ "$DeployMac32" == "1" ]; then
if [ ! -f "$Mac32DeployPath/$Mac32UpdateFile" ]; then if [ ! -f "$Mac32DeployPath/$Mac32UpdateFile" ]; then
echo "$Mac32UpdateFile not found!" Error "$Mac32UpdateFile not found!"
exit 1
fi fi
if [ ! -f "$Mac32DeployPath/$Mac32SetupFile" ]; then if [ ! -f "$Mac32DeployPath/$Mac32SetupFile" ]; then
echo "$Mac32SetupFile not found!" Error "$Mac32SetupFile not found!"
exit 1
fi fi
fi fi
if [ "$DeployWin" == "1" ]; then if [ "$DeployWin" == "1" ]; then
if [ ! -f "$WinDeployPath/$WinUpdateFile" ]; then if [ ! -f "$WinDeployPath/$WinUpdateFile" ]; then
echo "$WinUpdateFile not found!" Error "$WinUpdateFile not found!"
exit 1
fi fi
if [ "$BetaVersion" == "0" ]; then if [ "$BetaVersion" == "0" ]; then
if [ ! -f "$WinDeployPath/$WinSetupFile" ]; then if [ ! -f "$WinDeployPath/$WinSetupFile" ]; then
echo "$WinSetupFile not found!" Error "$WinSetupFile not found!"
exit 1
fi fi
fi fi
if [ ! -f "$WinDeployPath/$WinPortableFile" ]; then if [ ! -f "$WinDeployPath/$WinPortableFile" ]; then
echo "$WinPortableFile not found!" Error "$WinPortableFile not found!"
exit 1
fi fi
fi fi
@ -217,4 +223,6 @@ if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ] || [ "$Build
fi fi
fi fi
echo "Version $AppVersionStrFull was deployed!"; echo "Version $AppVersionStrFull was deployed!"
cd $FullExecPath

View File

@ -0,0 +1,65 @@
set -e
FullExecPath=$PWD
pushd `dirname $0` > /dev/null
FullScriptPath=`pwd`
popd > /dev/null
if [ ! -d "$FullScriptPath/../../../TelegramPrivate" ]; then
echo ""
echo "This script is for building the production version of Telegram Desktop."
echo ""
echo "For building custom versions please visit the build instructions page at:"
echo "https://github.com/telegramdesktop/tdesktop/#build-instructions"
exit 1
fi
Error () {
cd $FullExecPath
echo "$1"
exit 1
}
if [ ! -f "$FullScriptPath/target" ]; then
Error "Build target not found."
fi
while IFS='' read -r line || [[ -n "$line" ]]; do
BuildTarget="$line"
done < "$FullScriptPath/target"
LocalDirPath="\/usr\/local\/lib"
if [ "$BuildTarget" == "linux" ]; then
ArchDirPath="\/usr\/lib\/x86_64\-linux\-gnu"
elif [ "$BuildTarget" == "linux32" ]; then
ArchDirPath="\/usr\/lib\/i386\-linux\-gnu"
else
Error "Bad build target."
fi
Replace () {
CheckCommand="grep -ci '$1' Makefile"
CheckCount=$(eval $CheckCommand)
if [ "$CheckCount" -gt 0 ]; then
echo "Requested '$1' to '$2', found - replacing.."
ReplaceCommand="sed -i 's/$1/$2/g' Makefile"
eval $ReplaceCommand
else
echo "Skipping '$1' to '$2'"
fi
}
Replace '\-llzma' "$ArchDirPath\/liblzma\.a"
Replace '\-lXi' "$ArchDirPath\/libXi\.a $ArchDirPath\/libXext\.a"
Replace '\-lSM' "$ArchDirPath\/libSM\.a"
Replace '\-lICE' "$ArchDirPath\/libICE\.a"
Replace '\-lfontconfig' "$ArchDirPath\/libfontconfig\.a $ArchDirPath\/libexpat\.a"
Replace '\-lfreetype' "$ArchDirPath\/libfreetype\.a"
Replace '\-lXext' "$ArchDirPath\/libXext\.a"
Replace '\-lopus' "$LocalDirPath\/libopus\.a"
Replace '\-lopenal' "$LocalDirPath\/libopenal\.a"
Replace '\-lavformat' "$LocalDirPath\/libavformat\.a"
Replace '\-lavcodec' "$LocalDirPath\/libavcodec\.a"
Replace '\-lswresample' "$LocalDirPath\/libswresample\.a"
Replace '\-lswscale' "$LocalDirPath\/libswscale\.a"
Replace '\-lavutil' "$LocalDirPath\/libavutil\.a"
Replace '\-lva' "$LocalDirPath\/libva\.a"

View File

@ -0,0 +1,23 @@
Dim pat, patparts, rxp, inp, found
pat = WScript.Arguments(0)
pat = Replace(pat, "&quot;", chr(34))
pat = Replace(pat, "&hat;", "^")
pat = Replace(pat, "&amp;", "&")
patparts = Split(pat,"/")
Set rxp = new RegExp
found = False
rxp.Global = True
rxp.Multiline = False
rxp.Pattern = patparts(0)
Do While Not WScript.StdIn.AtEndOfStream
inp = WScript.StdIn.ReadLine()
If not found Then
If rxp.Test(inp) Then
found = True
End If
End If
WScript.Echo rxp.Replace(inp, patparts(1))
Loop
If not found Then
WScript.Quit(2)
End If

View File

@ -0,0 +1,140 @@
@echo OFF
setlocal enabledelayedexpansion
set "FullScriptPath=%~dp0"
set "InputVersion=%1"
for /F "tokens=1,2,3,4 delims=. " %%a in ("%InputVersion%") do (
set "VersionMajor=%%a"
set "VersionMinor=%%b"
set "VersionPatch=%%c"
if "%%d" == "" (
set "VersionBeta=0"
set "VersionAlpha=0"
) else if "%%d" == "alpha" (
set "VersionBeta=0"
set "VersionAlpha=1"
) else (
set "VersionBeta=%%d"
set "VersionAlpha=0"
)
)
set /a "VersionMajorCleared=%VersionMajor% %% 1000"
if "%VersionMajorCleared%" neq "%VersionMajor%" (
echo Bad major version!
exit /b 1
)
set /a "VersionMinorCleared=%VersionMinor% %% 1000"
if "%VersionMinorCleared%" neq "%VersionMinor%" (
echo Bad minor version!
exit /b 1
)
set /a "VersionPatchCleared=%VersionPatch% %% 1000"
if "%VersionPatchCleared%" neq "%VersionPatch%" (
echo Bad patch version!
exit /b 1
)
if "%VersionAlpha%" neq "0" (
if "%VersionAlpha%" neq "1" (
echo Bad alpha version!
exit /b 1
)
set "VersionAlphaBool=true"
) else (
set "VersionAlphaBool=false"
)
set /a "VersionFull=%VersionMajor% * 1000000 + %VersionMinor% * 1000 + %VersionPatch%"
if "%VersionBeta%" neq "0" (
set /a "VersionBetaCleared=%VersionBeta% %% 1000"
if "!VersionBetaCleared!" neq "%VersionBeta%" (
echo Bad beta version!
exit /b 1
)
set /a "VersionBetaMul=1000 + %VersionBeta%"
set "VersionFullBeta=%VersionFull%!VersionBetaMul:~1!"
) else (
set "VersionFullBeta=0"
)
set "VersionStr=%VersionMajor%.%VersionMinor%.%VersionPatch%"
if "%VersionPatch%" neq "0" (
set "VersionStrSmall=%VersionStr%"
) else (
set "VersionStrSmall=%VersionMajor%.%VersionMinor%"
)
if "%VersionAlpha%" neq "0" (
echo Setting version: %VersionStr% alpha
) else if "%VersionBeta%" neq "0" (
echo Setting version: %VersionStr%.%VersionBeta% closed beta
) else (
echo Setting version: %VersionStr% stable
)
echo Patching build/version...
set "VersionFilePath=%FullScriptPath%version"
call :repl "Replace=(AppVersion) (\s*)\d+/$1$2 %VersionFull%" "Filename=%VersionFilePath%" || goto :error
call :repl "Replace=(AppVersionStrMajor) (\s*)[\d\.]+/$1$2 %VersionMajor%.%VersionMinor%" "Filename=%VersionFilePath%" || goto :error
call :repl "Replace=(AppVersionStrSmall) (\s*)[\d\.]+/$1$2 %VersionStrSmall%" "Filename=%VersionFilePath%" || goto :error
call :repl "Replace=(AppVersionStr) (\s*)[\d\.]+/$1$2 %VersionStr%" "Filename=%VersionFilePath%" || goto :error
call :repl "Replace=(AlphaChannel) (\s*)[\d\.]+/$1$2 %VersionAlpha%" "Filename=%VersionFilePath%" || goto :error
call :repl "Replace=(BetaVersion) (\s*)\d+/$1$2 %VersionFullBeta%" "Filename=%VersionFilePath%" || goto :error
echo Patching core/version.h...
set "VersionHeaderPath=%FullScriptPath%..\SourceFiles\core\version.h"
call :repl "Replace=(BETA_VERSION_MACRO\s+)\(\d+ULL\)/$1(%VersionFullBeta%ULL)" "Filename=%VersionHeaderPath%" || goto :error
call :repl "Replace=(AppVersion\s+=) (\s*)\d+/$1$2 %VersionFull%" "Filename=%VersionHeaderPath%" || goto :error
call :repl "Replace=(AppVersionStr\s+=) (\s*)[&hat;;]+/$1$2 &quot;%VersionStrSmall%&quot;" "Filename=%VersionHeaderPath%" || goto :error
call :repl "Replace=(AppAlphaVersion\s+=) (\s*)[a-z]+/$1$2 %VersionAlphaBool%" "Filename=%VersionHeaderPath%" || goto :error
echo Patching project.pbxproj...
set "TelegramProjectPath=%FullScriptPath%..\Telegram.xcodeproj\project.pbxproj"
call :repl "Replace=(TDESKTOP_MAJOR_VERSION\s+=) (\s*)[&hat;;]+/$1$2 %VersionMajor%.%VersionMinor%" "Filename=%TelegramProjectPath%" || goto :error
call :repl "Replace=(TDESKTOP_VERSION\s+=) (\s*)[&hat;;]+/$1$2 %VersionStrSmall%" "Filename=%TelegramProjectPath%" || goto :error
echo Patching Telegram.rc...
set "ResourcePath=%FullScriptPath%..\Resources\winrc\Telegram.rc"
call :repl "Replace=(FILEVERSION) (\s*)\d+,\d+,\d+,\d+/$1$2 %VersionMajor%,%VersionMinor%,%VersionPatch%,%VersionBeta%" "Filename=%ResourcePath%" || goto :error
call :repl "Replace=(PRODUCTVERSION) (\s*)\d+,\d+,\d+,\d+/$1$2 %VersionMajor%,%VersionMinor%,%VersionPatch%,%VersionBeta%" "Filename=%ResourcePath%" || goto :error
call :repl "Replace=(&quot;FileVersion&quot;,) (\s*)&quot;\d+.\d+.\d+.\d+&quot;/$1$2 &quot;%VersionMajor%.%VersionMinor%.%VersionPatch%.%VersionBeta%&quot;" "Filename=%ResourcePath%" || goto :error
call :repl "Replace=(&quot;ProductVersion&quot;,) (\s*)&quot;\d+.\d+.\d+.\d+&quot;/$1$2 &quot;%VersionMajor%.%VersionMinor%.%VersionPatch%.%VersionBeta%&quot;" "Filename=%ResourcePath%" || goto :error
echo Patching Updater.rc...
set "ResourcePath=%FullScriptPath%..\Resources\winrc\Updater.rc"
call :repl "Replace=(FILEVERSION) (\s*)\d+,\d+,\d+,\d+/$1$2 %VersionMajor%,%VersionMinor%,%VersionPatch%,%VersionBeta%" "Filename=%ResourcePath%" || goto :error
call :repl "Replace=(PRODUCTVERSION) (\s*)\d+,\d+,\d+,\d+/$1$2 %VersionMajor%,%VersionMinor%,%VersionPatch%,%VersionBeta%" "Filename=%ResourcePath%" || goto :error
call :repl "Replace=(&quot;FileVersion&quot;,) (\s*)&quot;\d+.\d+.\d+.\d+&quot;/$1$2 &quot;%VersionMajor%.%VersionMinor%.%VersionPatch%.%VersionBeta%&quot;" "Filename=%ResourcePath%" || goto :error
call :repl "Replace=(&quot;ProductVersion&quot;,) (\s*)&quot;\d+.\d+.\d+.\d+&quot;/$1$2 &quot;%VersionMajor%.%VersionMinor%.%VersionPatch%.%VersionBeta%&quot;" "Filename=%ResourcePath%" || goto :error
exit /b
:error
(
set ErrorCode=%errorlevel%
echo Error !ErrorCode!
exit /b !ErrorCode!
)
:repl
(
set %1
set %2
set "TempFilename=!Filename!__tmp__"
cscript //Nologo "%FullScriptPath%replace.vbs" "!Replace!" < "!Filename!" > "!TempFilename!" || goto :repl_finish
xcopy /Y !TempFilename! !Filename! >NUL || goto :repl_finish
goto :repl_finish
)
:repl_finish
(
set ErrorCode=%errorlevel%
if !ErrorCode! neq 0 (
echo Replace error !ErrorCode!
echo While replacing "%Replace%"
echo In file "%Filename%"
)
del %TempFilename%
exit /b !ErrorCode!
)

127
Telegram/build/set_version.sh Executable file
View File

@ -0,0 +1,127 @@
set -e
pushd `dirname $0` > /dev/null
FullScriptPath=`pwd`
popd > /dev/null
Error () {
echo "$1"
exit 1
}
InputVersion="$1"
IFS='.' read -ra VersionParts <<< "$InputVersion"
VersionMajor="${VersionParts[0]}"
VersionMinor="${VersionParts[1]}"
VersionPatch="${VersionParts[2]}"
if [ "${VersionParts[3]}" == "" ]; then
VersionBeta=0
VersionAlpha=0
elif [ "${VersionParts[3]}" == "alpha" ]; then
VersionBeta=0
VersionAlpha=1
else
VersionBeta="${VersionParts[3]}"
VersionAlpha=0
fi
VersionMajorCleared=`echo "$VersionMajor % 1000" | bc`
if [ "$VersionMajorCleared" != "$VersionMajor" ]; then
Error "Bad major version!"
fi
VersionMinorCleared=`echo "$VersionMinor % 1000" | bc`
if [ "$VersionMinorCleared" != "$VersionMinor" ]; then
Error "Bad minor version!"
fi
VersionPatchCleared=`echo "$VersionPatch % 1000" | bc`
if [ "$VersionPatchCleared" != "$VersionPatch" ]; then
Error "Bad patch version!"
fi
if [ "$VersionAlpha" != "0" ]; then
if [ "$VersionAlpha" != "1" ]; then
Error "Bad alpha version!"
fi
VersionAlphaBool=true
else
VersionAlphaBool=false
fi
VersionFull=`echo "$VersionMajor * 1000000 + $VersionMinor * 1000 + $VersionPatch" | bc`
if [ "$VersionBeta" != "0" ]; then
VersionBetaCleared=`echo "$VersionBeta % 1000" | bc`
if [ "$VersionBetaCleared" != "$VersionBeta" ]; then
Error "Bad beta version!"
fi
VersionBetaMul=`echo "$VersionBeta + 1000" | bc`
VersionFullBeta="$VersionFull${VersionBetaMul:1}"
else
VersionFullBeta=0
fi
VersionStr="$VersionMajor.$VersionMinor.$VersionPatch"
if [ "$VersionPatch" != "0" ]; then
VersionStrSmall="$VersionStr"
else
VersionStrSmall="$VersionMajor.$VersionMinor"
fi
if [ "$VersionAlpha" != "0" ]; then
echo "Setting version: $VersionStr alpha"
elif [ "$VersionBeta" != "0" ]; then
echo "Setting version: $VersionStr.$VersionBeta closed beta"
else
echo "Setting version: $VersionStr stable"
fi
repl () {
Pattern="$1"
Replacement="$2"
File="$3"
CheckCommand="grep -sc '$Pattern' $File"
set +e
CheckCount=`eval $CheckCommand`
set -e
if [ "$CheckCount" -gt 0 ]; then
ReplaceCommand="sed -i 's/$Pattern/$Replacement/g' $File"
eval $ReplaceCommand
else
echo "Not found $Pattern"
Error "While processing $File"
fi
}
echo "Patching build/version..."
VersionFilePath="$FullScriptPath/version"
repl "\(AppVersion\) \(\s*\)[0-9][0-9]*" "\1\2 $VersionFull" "$VersionFilePath"
repl "\(AppVersionStrMajor\) \(\s*\)[0-9][0-9\.]*" "\1\2 $VersionMajor.$VersionMinor" "$VersionFilePath"
repl "\(AppVersionStrSmall\) \(\s*\)[0-9][0-9\.]*" "\1\2 $VersionStrSmall" "$VersionFilePath"
repl "\(AppVersionStr\) \(\s*\)[0-9][0-9\.]*" "\1\2 $VersionStr" "$VersionFilePath"
repl "\(AlphaChannel\) \(\s*\)[0-9][0-9]*" "\1\2 $VersionAlpha" "$VersionFilePath"
repl "\(BetaVersion\) \(\s*\)[0-9][0-9]*" "\1\2 $VersionFullBeta" "$VersionFilePath"
echo "Patching core/version.h..."
VersionHeaderPath="$FullScriptPath/../SourceFiles/core/version.h"
repl "\(BETA_VERSION_MACRO\s\s*\)([0-9][0-9]*ULL)" "\1(${VersionFullBeta}ULL)" "$VersionHeaderPath"
repl "\(AppVersion\s\s*=\) \(\s*\)[0-9][0-9]*" "\1\2 $VersionFull" "$VersionHeaderPath"
repl "\(AppVersionStr\s\s*=\) \(\s*\)[^;][^;]*" "\1\2 \"$VersionStrSmall\"" "$VersionHeaderPath"
repl "\(AppAlphaVersion\s\s*=\) \(\s*\)[a-z][a-z]*" "\1\2 $VersionAlphaBool" "$VersionHeaderPath"
echo "Patching project.pbxproj..."
TelegramProjectPath="$FullScriptPath/../Telegram.xcodeproj/project.pbxproj"
repl "\(TDESKTOP_MAJOR_VERSION\s\s*=\) \(\s*\)[^;][^;]*" "\1\2 $VersionMajor.$VersionMinor" "$TelegramProjectPath"
repl "\(TDESKTOP_VERSION\s\s*=\) \(\s*\)[^;][^;]*" "\1\2 $VersionStrSmall" "$TelegramProjectPath"
echo "Patching Telegram.rc..."
ResourcePath="$FullScriptPath/../Resources/winrc/Telegram.rc"
repl "\(FILEVERSION\) \(\s*\)[0-9][0-9]*,[0-9][0-9]*,[0-9][0-9]*,[0-9][0-9]*" "\1\2 $VersionMajor,$VersionMinor,$VersionPatch,$VersionBeta" "$ResourcePath"
repl "\(PRODUCTVERSION\) \(\s*\)[0-9][0-9]*,[0-9][0-9]*,[0-9][0-9]*,[0-9][0-9]*" "\1\2 $VersionMajor,$VersionMinor,$VersionPatch,$VersionBeta" "$ResourcePath"
repl "\(\"FileVersion\",\) \(\s*\)\"[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\"" "\1\2 \"$VersionMajor.$VersionMinor.$VersionPatch.$VersionBeta\"" "$ResourcePath"
repl "\(\"ProductVersion\",\) \(\s*\)\"[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\"" "\1\2 \"$VersionMajor.$VersionMinor.$VersionPatch.$VersionBeta\"" "$ResourcePath"
echo "Patching Updater.rc..."
ResourcePath="$FullScriptPath/../Resources/winrc/Updater.rc"
repl "\(FILEVERSION\) \(\s*\)[0-9][0-9]*,[0-9][0-9]*,[0-9][0-9]*,[0-9][0-9]*" "\1\2 $VersionMajor,$VersionMinor,$VersionPatch,$VersionBeta" "$ResourcePath"
repl "\(PRODUCTVERSION\) \(\s*\)[0-9][0-9]*,[0-9][0-9]*,[0-9][0-9]*,[0-9][0-9]*" "\1\2 $VersionMajor,$VersionMinor,$VersionPatch,$VersionBeta" "$ResourcePath"
repl "\(\"FileVersion\",\) \(\s*\)\"[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\"" "\1\2 \"$VersionMajor.$VersionMinor.$VersionPatch.$VersionBeta\"" "$ResourcePath"
repl "\(\"ProductVersion\",\) \(\s*\)\"[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\"" "\1\2 \"$VersionMajor.$VersionMinor.$VersionPatch.$VersionBeta\"" "$ResourcePath"

View File

@ -1,6 +1,3 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppShortName "Telegram" #define MyAppShortName "Telegram"
#define MyAppName "Telegram Desktop" #define MyAppName "Telegram Desktop"
#define MyAppPublisher "Telegram Messenger LLP" #define MyAppPublisher "Telegram Messenger LLP"
@ -15,7 +12,6 @@
AppId={{{#MyAppId}} AppId={{{#MyAppId}}
AppName={#MyAppName} AppName={#MyAppName}
AppVersion={#MyAppVersion} AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher} AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL} AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL} AppSupportURL={#MyAppURL}
@ -23,9 +19,9 @@ AppUpdatesURL={#MyAppURL}
DefaultDirName={userappdata}\{#MyAppName} DefaultDirName={userappdata}\{#MyAppName}
DefaultGroupName={#MyAppName} DefaultGroupName={#MyAppName}
AllowNoIcons=yes AllowNoIcons=yes
OutputDir=.\..\Win32\Deploy OutputDir={#SourcePath}..\..\Win32\Deploy
OutputBaseFilename=tsetup.{#MyAppVersionFull} OutputBaseFilename=tsetup.{#MyAppVersionFull}
SetupIconFile=.\Resources\art\icon256.ico SetupIconFile={#SourcePath}..\Resources\art\icon256.ico
UninstallDisplayIcon={app}\Telegram.exe UninstallDisplayIcon={app}\Telegram.exe
Compression=lzma Compression=lzma
SolidCompression=yes SolidCompression=yes
@ -41,8 +37,8 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; OnlyBelowVersion: 0,6.1 Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; OnlyBelowVersion: 0,6.1
[Files] [Files]
Source: ".\..\Win32\Deploy\Telegram.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "{#SourcePath}..\..\Win32\Deploy\Telegram.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: ".\..\Win32\Deploy\Updater.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "{#SourcePath}..\..\Win32\Deploy\Updater.exe"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons] [Icons]

View File

@ -5,6 +5,10 @@
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Deploy|Win32">
<Configuration>Deploy</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32"> <ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
@ -49,6 +53,10 @@
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v140</PlatformToolset> <PlatformToolset>v140</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
</ImportGroup> </ImportGroup>
@ -58,6 +66,9 @@
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup> <PropertyGroup>
<_ProjectFileVersion>14.0.24730.2</_ProjectFileVersion> <_ProjectFileVersion>14.0.24730.2</_ProjectFileVersion>
@ -70,17 +81,21 @@
<OutDir>$(SolutionDir)$(Platform)\codegen\$(Configuration)\</OutDir> <OutDir>$(SolutionDir)$(Platform)\codegen\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir> <IntDir>$(SolutionDir)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">
<OutDir>$(SolutionDir)$(Platform)\codegen\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>
<PreprocessorDefinitions>UNICODE;WIN32;QT_CORE_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>UNICODE;WIN32;QT_CORE_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalIncludeDirectories>$(QTDIR)\include;.\..\..\..\SourceFiles;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(QTDIR)\include;.\..\..\..\SourceFiles;.\GeneratedFiles\$(ConfigurationName);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<WarningLevel>Level4</WarningLevel> <WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
<AdditionalOptions>/w44062 /wd4127 %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/w44062 /wd4127 /wd4718 %(AdditionalOptions)</AdditionalOptions>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
@ -95,11 +110,31 @@
<PreprocessorDefinitions>UNICODE;WIN32;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>UNICODE;WIN32;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat /> <DebugInformationFormat />
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalIncludeDirectories>$(QTDIR)\include;.\..\..\..\SourceFiles;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(QTDIR)\include;.\..\..\..\SourceFiles;.\GeneratedFiles\$(ConfigurationName);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<WarningLevel>Level4</WarningLevel> <WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
<AdditionalOptions>/w44062 /wd4127 %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/w44062 /wd4127 /wd4718 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
<AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<AdditionalDependencies>ws2_32.lib;qtmain.lib;qtharfbuzzng.lib;qtpcre.lib;qtfreetype.lib;Qt5Core.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">
<ClCompile>
<PreprocessorDefinitions>UNICODE;WIN32;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>
</DebugInformationFormat>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalIncludeDirectories>$(QTDIR)\include;.\..\..\..\SourceFiles;.\GeneratedFiles\$(ConfigurationName);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<AdditionalOptions>/w44062 /wd4127 /wd4718 %(AdditionalOptions)</AdditionalOptions>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
@ -114,7 +149,7 @@
</ImportGroup> </ImportGroup>
<ProjectExtensions> <ProjectExtensions>
<VisualStudio> <VisualStudio>
<UserProperties MocDir=".\GeneratedFiles\$(ConfigurationName)" UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" lupdateOptions="" lupdateOnBuild="0" lreleaseOptions="" Qt5Version_x0020_Win32="QtStatic" MocOptions="" /> <UserProperties MocDir=".\GeneratedFiles\$(ConfigurationName)" UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" lupdateOptions="" lupdateOnBuild="0" lreleaseOptions="" Qt5Version_x0020_Win32="$(DefaultQtVersion)" MocOptions="" />
</VisualStudio> </VisualStudio>
</ProjectExtensions> </ProjectExtensions>
</Project> </Project>

View File

@ -5,6 +5,10 @@
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Deploy|Win32">
<Configuration>Deploy</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32"> <ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
@ -55,6 +59,10 @@
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v140</PlatformToolset> <PlatformToolset>v140</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
</ImportGroup> </ImportGroup>
@ -64,6 +72,9 @@
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup> <PropertyGroup>
<_ProjectFileVersion>14.0.24730.2</_ProjectFileVersion> <_ProjectFileVersion>14.0.24730.2</_ProjectFileVersion>
@ -76,17 +87,21 @@
<OutDir>$(SolutionDir)$(Platform)\codegen\$(Configuration)\</OutDir> <OutDir>$(SolutionDir)$(Platform)\codegen\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir> <IntDir>$(SolutionDir)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">
<OutDir>$(SolutionDir)$(Platform)\codegen\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>
<PreprocessorDefinitions>UNICODE;WIN32;QT_CORE_LIB;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>UNICODE;WIN32;QT_CORE_LIB;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalIncludeDirectories>$(QTDIR)\include;.\..\..\..\SourceFiles;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(QTDIR)\include;.\..\..\..\SourceFiles;.\GeneratedFiles\$(ConfigurationName);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<WarningLevel>Level4</WarningLevel> <WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
<AdditionalOptions>/w44062 /wd4127 %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/w44062 /wd4127 /wd4718 %(AdditionalOptions)</AdditionalOptions>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
@ -101,16 +116,36 @@
<PreprocessorDefinitions>UNICODE;WIN32;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>UNICODE;WIN32;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat /> <DebugInformationFormat />
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalIncludeDirectories>$(QTDIR)\include;.\..\..\..\SourceFiles;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(QTDIR)\include;.\..\..\..\SourceFiles;.\GeneratedFiles\$(ConfigurationName);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<WarningLevel>Level4</WarningLevel> <WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
<AdditionalOptions>/w44062 /wd4127 %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/w44062 /wd4127 /wd4718 %(AdditionalOptions)</AdditionalOptions>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
<OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile> <OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
<AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(QTDIR)\lib;$(QTDIR)\plugins;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<AdditionalDependencies>ws2_32.lib;qtmain.lib;qtharfbuzzng.lib;qtpcre.lib;qtfreetype.lib;imageformats\qwebp.lib;Qt5Core.lib;Qt5Gui.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">
<ClCompile>
<PreprocessorDefinitions>UNICODE;WIN32;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>
</DebugInformationFormat>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalIncludeDirectories>$(QTDIR)\include;.\..\..\..\SourceFiles;.\GeneratedFiles\$(ConfigurationName);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<AdditionalOptions>/w44062 /wd4127 /wd4718 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
<AdditionalLibraryDirectories>$(QTDIR)\lib;$(QTDIR)\plugins;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation> <GenerateDebugInformation>false</GenerateDebugInformation>
<AdditionalDependencies>ws2_32.lib;qtmain.lib;qtharfbuzzng.lib;qtpcre.lib;qtfreetype.lib;imageformats\qwebp.lib;Qt5Core.lib;Qt5Gui.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>ws2_32.lib;qtmain.lib;qtharfbuzzng.lib;qtpcre.lib;qtfreetype.lib;imageformats\qwebp.lib;Qt5Core.lib;Qt5Gui.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
@ -120,7 +155,7 @@
</ImportGroup> </ImportGroup>
<ProjectExtensions> <ProjectExtensions>
<VisualStudio> <VisualStudio>
<UserProperties MocDir=".\GeneratedFiles\$(ConfigurationName)" UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" lupdateOptions="" lupdateOnBuild="0" lreleaseOptions="" Qt5Version_x0020_Win32="QtStatic" MocOptions="" /> <UserProperties MocDir=".\GeneratedFiles\$(ConfigurationName)" UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" lupdateOptions="" lupdateOnBuild="0" lreleaseOptions="" Qt5Version_x0020_Win32="$(DefaultQtVersion)" MocOptions="" />
</VisualStudio> </VisualStudio>
</ProjectExtensions> </ProjectExtensions>
</Project> </Project>

6
Telegram/build/version Normal file
View File

@ -0,0 +1,6 @@
AppVersion 9048
AppVersionStrMajor 0.9
AppVersionStrSmall 0.9.48
AppVersionStr 0.9.48
AlphaChannel 0
BetaVersion 0

View File

@ -88,7 +88,7 @@ Open **VS2015 x86 Native Tools Command Prompt.bat** (should be in **Start Menu >
git clone git://repo.or.cz/openal-soft.git git clone git://repo.or.cz/openal-soft.git
cd openal-soft cd openal-soft
git checkout 90349b38 git checkout 90349b38
git apply ./../../tdesktop/Telegram/_openal_patch.diff git apply ./../../tdesktop/Telegram/Patches/openal.diff
#####Building library #####Building library
@ -145,7 +145,7 @@ Open **VS2015 x86 Native Tools Command Prompt.bat** (should be in **Start Menu >
make make
make install make install
####Qt 5.5.1, slightly patched ####Qt 5.6.0, slightly patched
* Install Python 3.3.2 from https://www.python.org/download/releases/3.3.2 > [**Windows x86 MSI Installer (3.3.2)**](https://www.python.org/ftp/python/3.3.2/python-3.3.2.msi) * Install Python 3.3.2 from https://www.python.org/download/releases/3.3.2 > [**Windows x86 MSI Installer (3.3.2)**](https://www.python.org/ftp/python/3.3.2/python-3.3.2.msi)
* Open **VS2015 x86 Native Tools Command Prompt.bat** (should be in **Start Menu > Programs > Visual Studio 2015** menu folder) * Open **VS2015 x86 Native Tools Command Prompt.bat** (should be in **Start Menu > Programs > Visual Studio 2015** menu folder)
@ -157,17 +157,17 @@ There go to Libraries directory
and run and run
git clone git://code.qt.io/qt/qt5.git QtStatic git clone git://code.qt.io/qt/qt5.git qt5_6_0
cd QtStatic cd qt5_6_0
git checkout 5.5 git checkout 5.6
perl init-repository --module-subset=qtbase,qtimageformats perl init-repository --module-subset=qtbase,qtimageformats
git checkout v5.5.1 git checkout v5.6.0
cd qtimageformats && git checkout v5.5.1 && cd .. cd qtimageformats && git checkout v5.6.0 && cd ..
cd qtbase && git checkout v5.5.1 && cd .. cd qtbase && git checkout v5.6.0 && cd ..
#####Apply the patch #####Apply the patch
cd qtbase && git apply ../../../tdesktop/Telegram/_qtbase_5_5_1_patch.diff && cd .. cd qtbase && git apply ../../../tdesktop/Telegram/Patches/qtbase_5_6_0.diff && cd ..
#####Install Windows SDKs #####Install Windows SDKs
@ -219,8 +219,8 @@ and run
* Launch VS2015 for configuring Qt5Package * Launch VS2015 for configuring Qt5Package
* QT5 > Qt Options > Add * QT5 > Qt Options > Add
* Version name: **QtStatic.5.5.1** * Version name: **Qt 5.6.0 Win32**
* Path: **D:\TBuild\Libraries\QtStatic\qtbase** * Path: **D:\TBuild\Libraries\qt5_6_0\qtbase**
* Default Qt/Win version: **QtStatic.5.5.1** **OK** * Default Qt/Win version: **Qt 5.6.0 Win32** **OK**
* File > Open > Project/Solution > **D:\TBuild\tdesktop\Telegram.sln** * File > Open > Project/Solution > **D:\TBuild\tdesktop\Telegram.sln**
* Build \ Build Solution (Debug and Release configurations) * Build \ Build Solution (Debug and Release configurations)

View File

@ -5,7 +5,7 @@ The following commands assume the following environment variables are set:
* `$srcdir`: The directory into which the source has been downloaded and * `$srcdir`: The directory into which the source has been downloaded and
unpacked. unpacked.
* `_qtver`: The Qt version being used (eg: `5.5.1`). * `_qtver`: The Qt version being used (eg: `5.6.0`).
* `$pkgdir`: The directory into which installable files are places. This is * `$pkgdir`: The directory into which installable files are places. This is
`/` for local installations, or can be different directory when preparing a `/` for local installations, or can be different directory when preparing a
redistributable package. redistributable package.
@ -15,7 +15,7 @@ Either set them accordingly, or replace them in the below commands as desired.
The following sources should be downloaded and unpacked into `$srcdir`: The following sources should be downloaded and unpacked into `$srcdir`:
* This repository (either `master` or a specific tag). * This repository (either `master` or a specific tag).
* The Qt sources: `http://download.qt-project.org/official_releases/qt/${_qtver%.*}/$_qtver/single/qt-everywhere-opensource-src-$_qtver.tar.xz` * `git clone git://code.qt.io/qt/qt5.git`
* `git clone git+https://chromium.googlesource.com/breakpad/breakpad breakpad` * `git clone git+https://chromium.googlesource.com/breakpad/breakpad breakpad`
* `git clone git+https://chromium.googlesource.com/linux-syscall-support breakpad-lss` * `git clone git+https://chromium.googlesource.com/linux-syscall-support breakpad-lss`
* telegramdesktop.desktop (The intention is to include this file inside the * telegramdesktop.desktop (The intention is to include this file inside the
@ -27,26 +27,34 @@ Preparation
----------- -----------
cd "$srcdir/tdesktop" cd "$srcdir/tdesktop"
mkdir -p "$srcdir/Libraries" mkdir -p "$srcdir/Libraries"
local qt_patch_file="$srcdir/tdesktop/Telegram/_qtbase_${_qtver//./_}_patch.diff" local qt_patch_file="$srcdir/tdesktop/Telegram/Patches/qtbase_${_qtver//./_}.diff"
if [ "$qt_patch_file" -nt "$srcdir/Libraries/QtStatic" ]; then local qt_dir="$srcdir/Libraries/qt${_qtver//./_}"
rm -rf "$srcdir/Libraries/QtStatic" if [ "$qt_patch_file" -nt "$qt_dir" ]; then
mv "$srcdir/qt-everywhere-opensource-src-$_qtver" "$srcdir/Libraries/QtStatic" rm -rf "$qt_dir"
cd "$srcdir/Libraries/QtStatic/qtbase" git clone git://code.qt.io/qt/qt5.git
patch -p1 -i "$qt_patch_file" cd "$qt_dir"
git checkout 5.6
perl init-repository --module-subset=qtbase,qtimageformats
git checkout v$_qtver
cd qtimageformats
git checkout v$_qtver
cd ../qtbase
git checkout v$_qtver
git apply "$qt_patch_file"
fi fi
if [ ! -h "$srcdir/Libraries/breakpad" ]; then if [ ! -h "$srcdir/Libraries/breakpad" ]; then
ln -s "$srcdir/breakpad" "$srcdir/Libraries/breakpad" ln -s "$srcdir/breakpad" "$srcdir/Libraries/breakpad"
ln -s "$srcdir/breakpad-lss" "$srcdir/Libraries/breakpad/src/third_party/lss" ln -s "$srcdir/breakpad-lss" "$srcdir/Libraries/breakpad/src/third_party/lss"
fi fi
sed -i 's/CUSTOM_API_ID//g' "$srcdir/tdesktop/Telegram/Telegram.pro" 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/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,LIBS += /usr/local/lib/libz.a,LIBS += -lz,g' "$srcdir/tdesktop/Telegram/Telegram.pro"
( (
echo "DEFINES += TDESKTOP_DISABLE_AUTOUPDATE" echo "DEFINES += TDESKTOP_DISABLE_AUTOUPDATE"
echo "DEFINES += TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME" echo "DEFINES += TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME"
@ -67,14 +75,14 @@ Building
-qt-xkbcommon-x11 -no-opengl -static -nomake examples -nomake tests -qt-xkbcommon-x11 -no-opengl -static -nomake examples -nomake tests
make module-qtbase module-qtimageformats make module-qtbase module-qtimageformats
make module-qtbase-install_subtargets module-qtimageformats-install_subtargets make module-qtbase-install_subtargets module-qtimageformats-install_subtargets
export PATH="$srcdir/qt/bin:$PATH" export PATH="$srcdir/qt/bin:$PATH"
# Build breakpad # Build breakpad
cd "$srcdir/Libraries/breakpad" cd "$srcdir/Libraries/breakpad"
./configure ./configure
make make
# Build codegen_style # Build codegen_style
mkdir -p "$srcdir/tdesktop/Linux/obj/codegen_style/Debug" mkdir -p "$srcdir/tdesktop/Linux/obj/codegen_style/Debug"
cd "$srcdir/tdesktop/Linux/obj/codegen_style/Debug" cd "$srcdir/tdesktop/Linux/obj/codegen_style/Debug"
@ -86,21 +94,17 @@ Building
cd "$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 CONFIG+=debug ../../../../Telegram/build/qmake/codegen_numbers/codegen_numbers.pro
make make
# Build MetaLang # Build MetaLang
mkdir -p "$srcdir/tdesktop/Linux/DebugIntermediateLang" mkdir -p "$srcdir/tdesktop/Linux/DebugIntermediateLang"
cd "$srcdir/tdesktop/Linux/DebugIntermediateLang" cd "$srcdir/tdesktop/Linux/DebugIntermediateLang"
qmake CONFIG+=debug "../../Telegram/MetaLang.pro" qmake CONFIG+=debug "../../Telegram/MetaLang.pro"
make make
# Build Telegram Desktop # Build Telegram Desktop
mkdir -p "$srcdir/tdesktop/Linux/ReleaseIntermediate" mkdir -p "$srcdir/tdesktop/Linux/ReleaseIntermediate"
cd "$srcdir/tdesktop/Linux/ReleaseIntermediate" cd "$srcdir/tdesktop/Linux/ReleaseIntermediate"
qmake CONFIG+=release "../../Telegram/Telegram.pro"
local pattern="^PRE_TARGETDEPS +="
grep "$pattern" "$srcdir/tdesktop/Telegram/Telegram.pro" | sed "s/$pattern//g" | xargs make
qmake CONFIG+=release "../../Telegram/Telegram.pro" qmake CONFIG+=release "../../Telegram/Telegram.pro"
make make
@ -110,17 +114,17 @@ Installation
install -dm755 "$pkgdir/usr/bin" install -dm755 "$pkgdir/usr/bin"
install -m755 "$srcdir/tdesktop/Linux/Release/Telegram" "$pkgdir/usr/bin/telegram-desktop" install -m755 "$srcdir/tdesktop/Linux/Release/Telegram" "$pkgdir/usr/bin/telegram-desktop"
install -d "$pkgdir/usr/share/applications" install -d "$pkgdir/usr/share/applications"
install -m644 "$srcdir/telegramdesktop.desktop" "$pkgdir/usr/share/applications/telegramdesktop.desktop" install -m644 "$srcdir/telegramdesktop.desktop" "$pkgdir/usr/share/applications/telegramdesktop.desktop"
install -d "$pkgdir/usr/share/kde4/services" install -d "$pkgdir/usr/share/kde4/services"
install -m644 "$srcdir/tg.protocol" "$pkgdir/usr/share/kde4/services/tg.protocol" install -m644 "$srcdir/tg.protocol" "$pkgdir/usr/share/kde4/services/tg.protocol"
local icon_size icon_dir local icon_size icon_dir
for icon_size in 16 32 48 64 128 256 512; do for icon_size in 16 32 48 64 128 256 512; do
icon_dir="$pkgdir/usr/share/icons/hicolor/${icon_size}x${icon_size}/apps" icon_dir="$pkgdir/usr/share/icons/hicolor/${icon_size}x${icon_size}/apps"
install -d "$icon_dir" install -d "$icon_dir"
install -m644 "$srcdir/tdesktop/Telegram/SourceFiles/art/icon${icon_size}.png" "$icon_dir/telegram-desktop.png" install -m644 "$srcdir/tdesktop/Telegram/SourceFiles/art/icon${icon_size}.png" "$icon_dir/telegram-desktop.png"
done done

View File

@ -6,13 +6,13 @@
* Install g++ by command **sudo apt-get install g++** in Terminal * Install g++ by command **sudo apt-get install g++** in Terminal
* Install Qt Creator from [**Downloads page**](https://www.qt.io/download/) * Install Qt Creator from [**Downloads page**](https://www.qt.io/download/)
For 32 bit Ubuntu you need to install g++ version 4.8 manually by such commands You need to install g++ version 4.9 manually by such commands
* sudo add-apt-repository ppa:ubuntu-toolchain-r/test * sudo add-apt-repository ppa:ubuntu-toolchain-r/test
* sudo apt-get update * sudo apt-get update
* sudo apt-get install gcc-4.8 g++-4.8 * sudo apt-get install gcc-4.9 g++-4.9
* sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20 * sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 21
* sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 20 * sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 21
###Prepare folder ###Prepare folder
@ -123,33 +123,33 @@ In Terminal go to **/home/user/TBuild/Libraries** and run
make make
sudo make install sudo make install
####Qt 5.5.1, slightly patched ####Qt 5.6.0, slightly patched
In Terminal go to **/home/user/TBuild/Libraries** and run In Terminal go to **/home/user/TBuild/Libraries** and run
git clone git://code.qt.io/qt/qt5.git QtStatic git clone git://code.qt.io/qt/qt5.git qt5_6_0
cd QtStatic cd qt5_6_0
git checkout 5.5 git checkout 5.6
perl init-repository --module-subset=qtbase,qtimageformats perl init-repository --module-subset=qtbase,qtimageformats
git checkout v5.5.1 git checkout v5.6.0
cd qtimageformats && git checkout v5.5.1 && cd .. cd qtimageformats && git checkout v5.6.0 && cd ..
cd qtbase && git checkout v5.5.1 && cd .. cd qtbase && git checkout v5.6.0 && cd ..
#####Apply the patch #####Apply the patch
cd qtbase && git apply ../../../tdesktop/Telegram/_qtbase_5_5_1_patch.diff && cd .. cd qtbase && git apply ../../../tdesktop/Telegram/Patches/qtbase_5_6_0.diff && cd ..
#####Building library #####Building library
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/qt5_6_0/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 libasound-dev libpulse-dev libxcb-sync0-dev libxcb-xfixes0-dev libxcb-randr0-dev libx11-xcb-dev libffi-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 libffi-dev
In Terminal go to **/home/user/TBuild/Libraries/QtStatic** and there run In Terminal go to **/home/user/TBuild/Libraries/qt5_6_0** and there run
OPENSSL_LIBS='-L/usr/local/ssl/lib -lssl -lcrypto' ./configure -release -force-debug-info -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 OPENSSL_LIBS='-L/usr/local/ssl/lib -lssl -lcrypto' ./configure -prefix "/usr/local/tdesktop/Qt-5.6.0" -release -force-debug-info -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 make -j4
sudo make -j4 install sudo make install
building (**make** command) will take really long time. building (**make** command) will take really long time.
@ -170,18 +170,18 @@ In Terminal go to **/home/user/TBuild/tdesktop** and run
mkdir -p Linux/obj/codegen_style/Debug mkdir -p Linux/obj/codegen_style/Debug
cd Linux/obj/codegen_style/Debug cd Linux/obj/codegen_style/Debug
/usr/local/Qt-5.5.1/bin/qmake CONFIG+=debug ../../../../Telegram/build/qmake/codegen_style/codegen_style.pro /usr/local/tdesktop/Qt-5.6.0/bin/qmake CONFIG+=debug ../../../../Telegram/build/qmake/codegen_style/codegen_style.pro
make make
mkdir -p ../../codegen_numbers/Debug mkdir -p ../../codegen_numbers/Debug
cd ../../codegen_numbers/Debug cd ../../codegen_numbers/Debug
/usr/local/Qt-5.5.1/bin/qmake CONFIG+=debug ../../../../Telegram/build/qmake/codegen_numbers/codegen_numbers.pro /usr/local/tdesktop/Qt-5.6.0/bin/qmake CONFIG+=debug ../../../../Telegram/build/qmake/codegen_numbers/codegen_numbers.pro
make make
###Building Telegram Desktop ###Building Telegram Desktop
* Launch Qt Creator, all projects will be taken from **/home/user/TBuild/tdesktop/Telegram** * Launch Qt Creator, all projects will be taken from **/home/user/TBuild/tdesktop/Telegram**
* Tools > Options > Build & Run > Qt Versions tab > Add > File System /usr/local/Qt-5.5.1/bin/qmake > **Qt 5.5.1 (Qt-5.5.1)** > Apply * Tools > Options > Build & Run > Qt Versions tab > Add > File System /usr/local/tdesktop/Qt-5.6.0/bin/qmake > **Qt 5.6.0 (Qt-5.6.0)** > Apply
* Tools > Options > Build & Run > Kits tab > Desktop (default) > change **Qt version** to **Qt 5.5.1 (Qt-5.5.1)** > Apply * Tools > Options > Build & Run > Kits tab > Desktop (default) > change **Qt version** to **Qt 5.6.0 (Qt-5.6.0)** > Apply
* Open MetaLang.pro, configure project with paths **/home/user/TBuild/tdesktop/Linux/DebugIntermediateLang** and **/home/user/TBuild/tdesktop/Linux/ReleaseIntermediateLang** and build for Debug * Open MetaLang.pro, configure project with paths **/home/user/TBuild/tdesktop/Linux/DebugIntermediateLang** and **/home/user/TBuild/tdesktop/Linux/ReleaseIntermediateLang** and build for Debug
* Open Telegram.pro, configure project with paths **/home/user/TBuild/tdesktop/Linux/DebugIntermediate** and **/home/user/TBuild/tdesktop/Linux/ReleaseIntermediate** and build for Debug, if GeneratedFiles are not found click **Run qmake** from **Build** menu and try again * Open Telegram.pro, configure project with paths **/home/user/TBuild/tdesktop/Linux/DebugIntermediate** and **/home/user/TBuild/tdesktop/Linux/ReleaseIntermediate** and build for Debug, if GeneratedFiles are not found click **Run qmake** from **Build** menu and try again
* Open Updater.pro, configure project with paths **/home/user/TBuild/tdesktop/Linux/DebugIntermediateUpdater** and **/home/user/TBuild/tdesktop/Linux/ReleaseIntermediateUpdater** and build for Debug * Open Updater.pro, configure project with paths **/home/user/TBuild/tdesktop/Linux/DebugIntermediateUpdater** and **/home/user/TBuild/tdesktop/Linux/ReleaseIntermediateUpdater** and build for Debug

View File

@ -4,7 +4,7 @@
Choose a folder for the future build, for example **/Users/user/TBuild** There you will have two folders, **Libraries** for third-party libs and **tdesktop** (or **tdesktop-master**) for the app. Choose a folder for the future build, for example **/Users/user/TBuild** There you will have two folders, **Libraries** for third-party libs and **tdesktop** (or **tdesktop-master**) for the app.
**IMPORTANT** You are required to build and install Qt 5.5.1 from the [Xcode 7](building-xcode.md) instructions first. **IMPORTANT** You are required to build and install Qt 5.6.0 from the [Xcode 7](building-xcode.md) instructions first.
###Clone source code ###Clone source code
@ -175,11 +175,11 @@ In Terminal go to **/Users/user/TBuild/Libraries** and run:
From **/Users/user/TBuild/Libraries/QtStatic/qtbase**, run: From **/Users/user/TBuild/Libraries/QtStatic/qtbase**, run:
git apply ../../../tdesktop/Telegram/_qtbase_5_3_2_patch.diff git apply ../../../tdesktop/Telegram/Patches/qtbase_5_3_2.diff
From **/Users/user/TBuild/Libraries/QtStatic/qtimageformats**, run: From **/Users/user/TBuild/Libraries/QtStatic/qtimageformats**, run:
git apply ../../../tdesktop/Telegram/_qtimageformats_5_3_2_patch.diff git apply ../../../tdesktop/Telegram/Patches/qtimageformats_5_3_2.diff
#####Building library #####Building library

View File

@ -192,32 +192,32 @@ Then in Terminal go to **/Users/user/TBuild/Libraries/ffmpeg** and run:
make make
sudo make install sudo make install
####Qt 5.5.1, slightly patched ####Qt 5.6.0, slightly patched
#####Get the source code #####Get the source code
In Terminal go to **/Users/user/TBuild/Libraries** and run: In Terminal go to **/Users/user/TBuild/Libraries** and run:
git clone git://code.qt.io/qt/qt5.git QtStatic git clone git://code.qt.io/qt/qt5.git qt5_6_0
cd QtStatic cd qt5_6_0
git checkout 5.5 git checkout 5.6
perl init-repository --module-subset=qtbase,qtimageformats perl init-repository --module-subset=qtbase,qtimageformats
git checkout v5.5.1 git checkout v5.6.0
cd qtimageformats && git checkout v5.5.1 && cd .. cd qtimageformats && git checkout v5.6.0 && cd ..
cd qtbase && git checkout v5.5.1 && cd .. cd qtbase && git checkout v5.6.0 && cd ..
#####Apply the patch #####Apply the patch
From **/Users/user/TBuild/Libraries/QtStatic/qtbase**, run: From **/Users/user/TBuild/Libraries/qt5_6_0/qtbase**, run:
git apply ../../../tdesktop/Telegram/_qtbase_5_5_1_patch.diff git apply ../../../tdesktop/Telegram/Patches/qtbase_5_6_0.diff
#####Building library #####Building library
Go to **/Users/user/TBuild/Libraries/QtStatic** and run: Go to **/Users/user/TBuild/Libraries/qt5_6_0** and run:
./configure -debug-and-release -force-debug-info -opensource -confirm-license -static -opengl desktop -no-openssl -securetransport -nomake examples -nomake tests -platform macx-clang ./configure -prefix "/usr/local/tdesktop/Qt-5.6.0" -debug-and-release -force-debug-info -opensource -confirm-license -static -opengl desktop -no-openssl -securetransport -nomake examples -nomake tests -platform macx-clang
make -j4 make -j4
sudo make -j4 install sudo make install
Building (**make** command) will take a really long time. Building (**make** command) will take a really long time.
@ -243,7 +243,7 @@ In Terminal go to **/Users/user/TBuild/Libraries** and run:
cd crashpad cd crashpad
fetch crashpad fetch crashpad
cd crashpad/third_party/mini_chromium/mini_chromium cd crashpad/third_party/mini_chromium/mini_chromium
git apply ../../../../../../tdesktop/Telegram/_mini_chromium_patch.diff git apply ../../../../../../tdesktop/Telegram/Patches/mini_chromium.diff
cd ../../../ cd ../../../
build/gyp_crashpad.py -Dmac_deployment_target=10.8 build/gyp_crashpad.py -Dmac_deployment_target=10.8
ninja -C out/Release ninja -C out/Release