From bedefaee4d9f5b23b85a7052aeed883f9c4147bb Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 8 May 2020 13:51:50 +0400 Subject: [PATCH] Version 2.1.3. - Added support for new emoji. - Channels to which you can't post will no longer be suggested when forwarding. - Improved font selection and bold font support for CJK and Farsi. --- Telegram/Resources/uwp/AppX/AppxManifest.xml | 2 +- Telegram/Resources/winrc/Telegram.rc | 8 +- Telegram/Resources/winrc/Updater.rc | 8 +- Telegram/SourceFiles/core/version.h | 4 +- Telegram/build/build.sh | 227 ++++++++++--------- Telegram/build/version | 8 +- changelog.txt | 6 + 7 files changed, 144 insertions(+), 119 deletions(-) diff --git a/Telegram/Resources/uwp/AppX/AppxManifest.xml b/Telegram/Resources/uwp/AppX/AppxManifest.xml index 1a625857d..61cfb0276 100644 --- a/Telegram/Resources/uwp/AppX/AppxManifest.xml +++ b/Telegram/Resources/uwp/AppX/AppxManifest.xml @@ -9,7 +9,7 @@ + Version="2.1.3.0" /> Telegram Desktop Telegram FZ-LLC diff --git a/Telegram/Resources/winrc/Telegram.rc b/Telegram/Resources/winrc/Telegram.rc index 60d00ccbf..0ff297454 100644 --- a/Telegram/Resources/winrc/Telegram.rc +++ b/Telegram/Resources/winrc/Telegram.rc @@ -33,8 +33,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,1,2,0 - PRODUCTVERSION 2,1,2,0 + FILEVERSION 2,1,3,0 + PRODUCTVERSION 2,1,3,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -51,10 +51,10 @@ BEGIN BEGIN VALUE "CompanyName", "Telegram FZ-LLC" VALUE "FileDescription", "Telegram Desktop" - VALUE "FileVersion", "2.1.2.0" + VALUE "FileVersion", "2.1.3.0" VALUE "LegalCopyright", "Copyright (C) 2014-2020" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "2.1.2.0" + VALUE "ProductVersion", "2.1.3.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/Resources/winrc/Updater.rc b/Telegram/Resources/winrc/Updater.rc index 62f3d2df6..88205d3f7 100644 --- a/Telegram/Resources/winrc/Updater.rc +++ b/Telegram/Resources/winrc/Updater.rc @@ -24,8 +24,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,1,2,0 - PRODUCTVERSION 2,1,2,0 + FILEVERSION 2,1,3,0 + PRODUCTVERSION 2,1,3,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -42,10 +42,10 @@ BEGIN BEGIN VALUE "CompanyName", "Telegram FZ-LLC" VALUE "FileDescription", "Telegram Desktop Updater" - VALUE "FileVersion", "2.1.2.0" + VALUE "FileVersion", "2.1.3.0" VALUE "LegalCopyright", "Copyright (C) 2014-2020" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "2.1.2.0" + VALUE "ProductVersion", "2.1.3.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/SourceFiles/core/version.h b/Telegram/SourceFiles/core/version.h index 730120743..006ef8ba9 100644 --- a/Telegram/SourceFiles/core/version.h +++ b/Telegram/SourceFiles/core/version.h @@ -22,7 +22,7 @@ constexpr auto AppId = "{53F49750-6209-4FBF-9CA8-7A333C87D1ED}"_cs; constexpr auto AppNameOld = "Telegram Win (Unofficial)"_cs; constexpr auto AppName = "Telegram Desktop"_cs; constexpr auto AppFile = "Telegram"_cs; -constexpr auto AppVersion = 2001002; -constexpr auto AppVersionStr = "2.1.2"; +constexpr auto AppVersion = 2001003; +constexpr auto AppVersionStr = "2.1.3"; constexpr auto AppBetaVersion = false; constexpr auto AppAlphaVersion = TDESKTOP_ALPHA_VERSION; diff --git a/Telegram/build/build.sh b/Telegram/build/build.sh index a503d7fc1..19da165c6 100755 --- a/Telegram/build/build.sh +++ b/Telegram/build/build.sh @@ -13,6 +13,12 @@ if [ ! -d "$FullScriptPath/../../../DesktopPrivate" ]; then exit fi +if [ "$1" == "request_uuid" ]; then + if [ "$2" != "" ]; then + NotarizeRequestId="$2" + fi +fi + Error () { cd $FullExecPath echo "$1" @@ -260,96 +266,102 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ] || [ "$BuildTarget Error "Backup path not found!" fi - ./configure.sh + if [ "$NotarizeRequestId" == "" ]; then + ./configure.sh - cd $ProjectPath - cmake --build . --config Release --target Telegram - cd $ReleasePath + cd $ProjectPath + cmake --build . --config Release --target Telegram - if [ ! -d "$ReleasePath/$BinaryName.app" ]; then - Error "$BinaryName.app not found!" - fi + cd $ReleasePath - if [ ! -d "$ReleasePath/$BinaryName.app.dSYM" ]; then - Error "$BinaryName.app.dSYM not found!" - fi - - if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ]; then - if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Frameworks/Updater" ]; then - Error "Updater not found!" + if [ ! -d "$ReleasePath/$BinaryName.app" ]; then + Error "$BinaryName.app not found!" fi - if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Helpers/crashpad_handler" ]; then - Error "crashpad_handler not found!" + + if [ ! -d "$ReleasePath/$BinaryName.app.dSYM" ]; then + Error "$BinaryName.app.dSYM not found!" fi - fi - if [ "$BuildTarget" == "macstore" ]; then - if [ ! -d "$ReleasePath/$BinaryName.app/Contents/Frameworks/Breakpad.framework" ]; then - Error "Breakpad.framework not found!" + + if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ]; then + if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Frameworks/Updater" ]; then + Error "Updater not found!" + fi + if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Helpers/crashpad_handler" ]; then + Error "crashpad_handler not found!" + fi fi - fi - - echo "Dumping debug symbols.." - "$HomePath/../../Libraries/macos/breakpad/src/tools/mac/dump_syms/build/Release/dump_syms" "$ReleasePath/$BinaryName.app.dSYM" > "$ReleasePath/$BinaryName.sym" 2>/dev/null - echo "Done!" - - echo "Stripping the executable.." - strip "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName" - echo "Done!" - - echo "Signing the application.." - if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ]; then - codesign --force --deep --timestamp --options runtime --sign "Developer ID Application: John Preston" "$ReleasePath/$BinaryName.app" --entitlements "$HomePath/Telegram/Telegram.entitlements" - elif [ "$BuildTarget" == "macstore" ]; then - codesign --force --deep --sign "3rd Party Mac Developer Application: Telegram FZ-LLC (C67CF9S4VU)" "$ReleasePath/$BinaryName.app" --entitlements "$HomePath/Telegram/Telegram Lite.entitlements" - echo "Making an installer.." - productbuild --sign "3rd Party Mac Developer Installer: Telegram FZ-LLC (C67CF9S4VU)" --component "$ReleasePath/$BinaryName.app" /Applications "$ReleasePath/$BinaryName.pkg" - fi - echo "Done!" - - AppUUID=`dwarfdump -u "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName" | awk -F " " '{print $2}'` - DsymUUID=`dwarfdump -u "$ReleasePath/$BinaryName.app.dSYM" | awk -F " " '{print $2}'` - if [ "$AppUUID" != "$DsymUUID" ]; then - Error "UUID of binary '$AppUUID' and dSYM '$DsymUUID' differ!" - fi - - if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Resources/Icon.icns" ]; then - Error "Icon.icns not found in Resources!" - fi - - if [ ! -f "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName" ]; then - Error "$BinaryName not found in MacOS!" - fi - - if [ ! -d "$ReleasePath/$BinaryName.app/Contents/_CodeSignature" ]; then - Error "$BinaryName signature not found!" - fi - - if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ]; then - if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Frameworks/Updater" ]; then - Error "Updater not found in Frameworks!" + if [ "$BuildTarget" == "macstore" ]; then + if [ ! -d "$ReleasePath/$BinaryName.app/Contents/Frameworks/Breakpad.framework" ]; then + Error "Breakpad.framework not found!" + fi fi - elif [ "$BuildTarget" == "macstore" ]; then - if [ ! -f "$ReleasePath/$BinaryName.pkg" ]; then - Error "$BinaryName.pkg not found!" - fi - fi - SymbolsHash=`head -n 1 "$ReleasePath/$BinaryName.sym" | awk -F " " 'END {print $4}'` - echo "Copying $BinaryName.sym to $DropboxSymbolsPath/$BinaryName/$SymbolsHash" - mkdir -p "$DropboxSymbolsPath/$BinaryName/$SymbolsHash" - cp "$ReleasePath/$BinaryName.sym" "$DropboxSymbolsPath/$BinaryName/$SymbolsHash/" - echo "Done!" + echo "Dumping debug symbols.." + "$HomePath/../../Libraries/macos/breakpad/src/tools/mac/dump_syms/build/Release/dump_syms" "$ReleasePath/$BinaryName.app.dSYM" > "$ReleasePath/$BinaryName.sym" 2>/dev/null + echo "Done!" + + echo "Stripping the executable.." + strip "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName" + echo "Done!" + + echo "Signing the application.." + if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ]; then + codesign --force --deep --timestamp --options runtime --sign "Developer ID Application: John Preston" "$ReleasePath/$BinaryName.app" --entitlements "$HomePath/Telegram/Telegram.entitlements" + elif [ "$BuildTarget" == "macstore" ]; then + codesign --force --deep --sign "3rd Party Mac Developer Application: Telegram FZ-LLC (C67CF9S4VU)" "$ReleasePath/$BinaryName.app" --entitlements "$HomePath/Telegram/Telegram Lite.entitlements" + echo "Making an installer.." + productbuild --sign "3rd Party Mac Developer Installer: Telegram FZ-LLC (C67CF9S4VU)" --component "$ReleasePath/$BinaryName.app" /Applications "$ReleasePath/$BinaryName.pkg" + fi + echo "Done!" + + AppUUID=`dwarfdump -u "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName" | awk -F " " '{print $2}'` + DsymUUID=`dwarfdump -u "$ReleasePath/$BinaryName.app.dSYM" | awk -F " " '{print $2}'` + if [ "$AppUUID" != "$DsymUUID" ]; then + Error "UUID of binary '$AppUUID' and dSYM '$DsymUUID' differ!" + fi + + if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Resources/Icon.icns" ]; then + Error "Icon.icns not found in Resources!" + fi + + if [ ! -f "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName" ]; then + Error "$BinaryName not found in MacOS!" + fi + + if [ ! -d "$ReleasePath/$BinaryName.app/Contents/_CodeSignature" ]; then + Error "$BinaryName signature not found!" + fi + + if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ]; then + if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Frameworks/Updater" ]; then + Error "Updater not found in Frameworks!" + fi + elif [ "$BuildTarget" == "macstore" ]; then + if [ ! -f "$ReleasePath/$BinaryName.pkg" ]; then + Error "$BinaryName.pkg not found!" + fi + fi + + SymbolsHash=`head -n 1 "$ReleasePath/$BinaryName.sym" | awk -F " " 'END {print $4}'` + echo "Copying $BinaryName.sym to $DropboxSymbolsPath/$BinaryName/$SymbolsHash" + mkdir -p "$DropboxSymbolsPath/$BinaryName/$SymbolsHash" + cp "$ReleasePath/$BinaryName.sym" "$DropboxSymbolsPath/$BinaryName/$SymbolsHash/" + echo "Done!" + fi if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ]; then cd "$ReleasePath" - if [ "$AlphaVersion" == "0" ]; then - cp -f tsetup_template.dmg tsetup.temp.dmg - TempDiskPath=`hdiutil attach -nobrowse -noautoopenrw -readwrite tsetup.temp.dmg | awk -F "\t" 'END {print $3}'` - cp -R "./$BinaryName.app" "$TempDiskPath/" - bless --folder "$TempDiskPath/" --openfolder "$TempDiskPath/" - hdiutil detach "$TempDiskPath" - hdiutil convert tsetup.temp.dmg -format UDZO -imagekey zlib-level=9 -ov -o "$SetupFile" - rm tsetup.temp.dmg + + if [ "$NotarizeRequestId" == "" ]; then + if [ "$AlphaVersion" == "0" ]; then + cp -f tsetup_template.dmg tsetup.temp.dmg + TempDiskPath=`hdiutil attach -nobrowse -noautoopenrw -readwrite tsetup.temp.dmg | awk -F "\t" 'END {print $3}'` + cp -R "./$BinaryName.app" "$TempDiskPath/" + bless --folder "$TempDiskPath/" --openfolder "$TempDiskPath/" + hdiutil detach "$TempDiskPath" + hdiutil convert tsetup.temp.dmg -format UDZO -imagekey zlib-level=9 -ov -o "$SetupFile" + rm tsetup.temp.dmg + fi fi if [ "$AlphaVersion" != "0" ]; then @@ -366,33 +378,40 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ] || [ "$BuildTarget UpdateFile="${UpdateFile}_${AlphaSignature}" SetupFile="talpha${AlphaVersion}_${AlphaSignature}.zip" - rm -rf "$ReleasePath/AlphaTemp" - mkdir "$ReleasePath/AlphaTemp" - mkdir "$ReleasePath/AlphaTemp/$BinaryName" - cp -r "$ReleasePath/$BinaryName.app" "$ReleasePath/AlphaTemp/$BinaryName/" - cd "$ReleasePath/AlphaTemp" - zip -r "$SetupFile" "$BinaryName" - mv "$SetupFile" "$ReleasePath/" - cd "$ReleasePath" + if [ "$NotarizeRequestId" == "" ]; then + rm -rf "$ReleasePath/AlphaTemp" + mkdir "$ReleasePath/AlphaTemp" + mkdir "$ReleasePath/AlphaTemp/$BinaryName" + cp -r "$ReleasePath/$BinaryName.app" "$ReleasePath/AlphaTemp/$BinaryName/" + cd "$ReleasePath/AlphaTemp" + zip -r "$SetupFile" "$BinaryName" + mv "$SetupFile" "$ReleasePath/" + cd "$ReleasePath" + fi fi if [ "$BuildTarget" == "mac" ]; then - echo "Beginning notarization process." - set +e - xcrun altool --notarize-app --primary-bundle-id "com.tdesktop.Telegram" --username "$AC_USERNAME" --password "@keychain:AC_PASSWORD" --file "$SetupFile" > request_uuid.txt - set -e - while IFS='' read -r line || [[ -n "$line" ]]; do - Prefix=$(echo $line | cut -d' ' -f 1) - Value=$(echo $line | cut -d' ' -f 3) - if [ "$Prefix" == "RequestUUID" ]; then - RequestUUID=$Value + if [ "$NotarizeRequestId" == "" ]; then + echo "Beginning notarization process." + set +e + xcrun altool --notarize-app --primary-bundle-id "com.tdesktop.Telegram" --username "$AC_USERNAME" --password "@keychain:AC_PASSWORD" --file "$SetupFile" > request_uuid.txt + set -e + while IFS='' read -r line || [[ -n "$line" ]]; do + Prefix=$(echo $line | cut -d' ' -f 1) + Value=$(echo $line | cut -d' ' -f 3) + if [ "$Prefix" == "RequestUUID" ]; then + RequestUUID=$Value + fi + done < "request_uuid.txt" + if [ "$RequestUUID" == "" ]; then + cat request_uuid.txt + Error "Could not extract Request UUID." fi - done < "request_uuid.txt" - if [ "$RequestUUID" == "" ]; then - cat request_uuid.txt - Error "Could not extract Request UUID." + echo "Request UUID: $RequestUUID" + rm request_uuid.txt + else + RequestUUID=$NotarizeRequestId + echo "Continue notarization process with Request UUID: $RequestUUID" fi - echo "Request UUID: $RequestUUID" - rm request_uuid.txt RequestStatus= LogFile= @@ -419,7 +438,7 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ] || [ "$BuildTarget echo "Notarization problems, response:" cat request_result.txt if [ "$LogFile" != "" ]; then - echo "Requesting log..." + echo "Requesting log: $LogFile" curl $LogFile fi Error "Notarization FAILED." @@ -427,7 +446,7 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ] || [ "$BuildTarget rm request_result.txt if [ "$LogFile" != "" ]; then - echo "Requesting log..." + echo "Requesting log: $LogFile" curl $LogFile > request_log.txt fi diff --git a/Telegram/build/version b/Telegram/build/version index 07ef7a8ba..4f998549d 100644 --- a/Telegram/build/version +++ b/Telegram/build/version @@ -1,7 +1,7 @@ -AppVersion 2001002 +AppVersion 2001003 AppVersionStrMajor 2.1 -AppVersionStrSmall 2.1.2 -AppVersionStr 2.1.2 +AppVersionStrSmall 2.1.3 +AppVersionStr 2.1.3 BetaChannel 0 AlphaVersion 0 -AppVersionOriginal 2.1.2 +AppVersionOriginal 2.1.3 diff --git a/changelog.txt b/changelog.txt index 8c4d43757..a5b835746 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,9 @@ +2.1.3 (08.05.20) + +- Added support for new emoji. +- Channels to which you can't post will no longer be suggested when forwarding. +- Improved font selection and bold font support for CJK and Farsi. + 2.1.2 (05.05.20) - Fix polls and quizes results viewing.