mirror of https://github.com/procxx/kepka.git
added IPv6 setting checkbox in Connection Type box in Settings, version 0.8.33.dev
This commit is contained in:
parent
890352ef97
commit
2940561ee2
|
@ -1,20 +1,21 @@
|
||||||
AppVersion=`./Version.sh | awk -F " " '{print $1}'`
|
AppVersionStrMajor=`./Version.sh | awk -F " " '{print $1}'`
|
||||||
AppVersionStr=`./Version.sh | awk -F " " '{print $2}'`
|
AppVersion=`./Version.sh | awk -F " " '{print $2}'`
|
||||||
DevChannel=`./Version.sh | awk -F " " '{print $3}'`
|
AppVersionStr=`./Version.sh | awk -F " " '{print $3}'`
|
||||||
|
DevChannel=`./Version.sh | awk -F " " '{print $4}'`
|
||||||
DevPostfix=''
|
DevPostfix=''
|
||||||
if [ "$DevChannel" != "0" ]; then
|
if [ "$DevChannel" != "0" ]; then
|
||||||
DevPostfix='.dev'
|
DevPostfix='.dev'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "./../Linux/Release/deploy/$AppVersionStr$DevPostfix/tlinuxupd$AppVersion" ]; then
|
if [ ! -f "./../Linux/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/tlinuxupd$AppVersion" ]; then
|
||||||
echo "tlinuxupd$AppVersion not found!";
|
echo "tlinuxupd$AppVersion not found!";
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "./../Linux/Release/deploy/$AppVersionStr$DevPostfix/tsetup.$AppVersionStr$DevPostfix.tar.xz" ]; then
|
if [ ! -f "./../Linux/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/tsetup.$AppVersionStr$DevPostfix.tar.xz" ]; then
|
||||||
echo "tsetup.$AppVersionStr$DevPostfix.tar.xz not found!"
|
echo "tsetup.$AppVersionStr$DevPostfix.tar.xz not found!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
scp ./../Linux/Release/deploy/$AppVersionStr$DevPostfix/tlinuxupd$AppVersion tmaster:tdesktop/www/tlinux/
|
scp ./../Linux/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/tlinuxupd$AppVersion tmaster:tdesktop/www/tlinux/
|
||||||
scp ./../Linux/Release/deploy/$AppVersionStr$DevPostfix/tsetup.$AppVersionStr$DevPostfix.tar.xz tmaster:tdesktop/www/tlinux/
|
scp ./../Linux/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/tsetup.$AppVersionStr$DevPostfix.tar.xz tmaster:tdesktop/www/tlinux/
|
||||||
|
|
|
@ -1,21 +1,22 @@
|
||||||
AppVersion=`./Version.sh | awk -F " " '{print $1}'`
|
AppVersionStrMajor=`./Version.sh | awk -F " " '{print $1}'`
|
||||||
AppVersionStr=`./Version.sh | awk -F " " '{print $2}'`
|
AppVersion=`./Version.sh | awk -F " " '{print $2}'`
|
||||||
DevChannel=`./Version.sh | awk -F " " '{print $3}'`
|
AppVersionStr=`./Version.sh | awk -F " " '{print $3}'`
|
||||||
|
DevChannel=`./Version.sh | awk -F " " '{print $4}'`
|
||||||
DevPostfix=''
|
DevPostfix=''
|
||||||
if [ "$DevChannel" != "0" ]; then
|
if [ "$DevChannel" != "0" ]; then
|
||||||
DevPostfix='.dev'
|
DevPostfix='.dev'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "./../Linux/Release/deploy/$AppVersionStr$DevPostfix/tlinux32upd$AppVersion" ]; then
|
if [ ! -f "./../Linux/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/tlinux32upd$AppVersion" ]; then
|
||||||
echo "tlinux32upd$AppVersion not found!"
|
echo "tlinux32upd$AppVersion not found!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "./../Linux/Release/deploy/$AppVersionStr$DevPostfix/tsetup32.$AppVersionStr$DevPostfix.tar.xz" ]; then
|
if [ ! -f "./../Linux/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/tsetup32.$AppVersionStr$DevPostfix.tar.xz" ]; then
|
||||||
echo "tsetup32.$AppVersionStr$DevPostfix.zip not found!"
|
echo "tsetup32.$AppVersionStr$DevPostfix.zip not found!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
scp ./../Linux/Release/deploy/$AppVersionStr$DevPostfix/tlinux32upd$AppVersion tmaster:tdesktop/www/tlinux32/
|
scp ./../Linux/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/tlinux32upd$AppVersion tmaster:tdesktop/www/tlinux32/
|
||||||
scp ./../Linux/Release/deploy/$AppVersionStr$DevPostfix/tsetup32.$AppVersionStr$DevPostfix.tar.xz tmaster:tdesktop/www/tlinux32/
|
scp ./../Linux/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/tsetup32.$AppVersionStr$DevPostfix.tar.xz tmaster:tdesktop/www/tlinux32/
|
||||||
|
|
||||||
|
|
|
@ -1,38 +1,54 @@
|
||||||
AppVersion=`./Version.sh | awk -F " " '{print $1}'`
|
AppVersionStrMajor=`./Version.sh | awk -F " " '{print $1}'`
|
||||||
AppVersionStr=`./Version.sh | awk -F " " '{print $2}'`
|
AppVersion=`./Version.sh | awk -F " " '{print $2}'`
|
||||||
DevChannel=`./Version.sh | awk -F " " '{print $3}'`
|
AppVersionStr=`./Version.sh | awk -F " " '{print $3}'`
|
||||||
|
DevChannel=`./Version.sh | awk -F " " '{print $4}'`
|
||||||
DevPostfix=''
|
DevPostfix=''
|
||||||
if [ "$DevChannel" != "0" ]; then
|
if [ "$DevChannel" != "0" ]; then
|
||||||
DevPostfix='.dev'
|
DevPostfix='.dev'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "./../Mac/Release/deploy/$AppVersionStr$DevPostfix/tmacupd$AppVersion" ]; then
|
if [ ! -f "./../Mac/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/tmacupd$AppVersion" ]; then
|
||||||
echo "tmacupd$AppVersion not found!"
|
echo "tmacupd$AppVersion not found!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "./../Mac/Release/deploy/$AppVersionStr$DevPostfix/tsetup.$AppVersionStr$DevPostfix.dmg" ]; then
|
if [ ! -f "./../Mac/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/tsetup.$AppVersionStr$DevPostfix.dmg" ]; then
|
||||||
echo "tsetup.$AppVersionStr$DevPostfix.dmg not found!"
|
echo "tsetup.$AppVersionStr$DevPostfix.dmg not found!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "./../../tother/tsetup/tupdate$AppVersion" ]; then
|
if [ ! -f "./../../tother/tsetup/$AppVersionStrMajor/$AppVersionStr$DevPostfix/tupdate$AppVersion" ]; then
|
||||||
echo "tupdate$AppVersion not found!"
|
echo "tupdate$AppVersion not found!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "./../../tother/tsetup/tportable.$AppVersionStr$DevPostfix.zip" ]; then
|
if [ ! -f "./../../tother/tsetup/$AppVersionStrMajor/$AppVersionStr$DevPostfix/tportable.$AppVersionStr$DevPostfix.zip" ]; then
|
||||||
echo "tportable.$AppVersionStr$DevPostfix.zip not found!"
|
echo "tportable.$AppVersionStr$DevPostfix.zip not found!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "./../../tother/tsetup/tsetup.$AppVersionStr$DevPostfix.exe" ]; then
|
if [ ! -f "./../../tother/tsetup/$AppVersionStrMajor/$AppVersionStr$DevPostfix/tsetup.$AppVersionStr$DevPostfix.exe" ]; then
|
||||||
echo "tsetup.$AppVersionStr$DevPostfix.exe not found!"
|
echo "tsetup.$AppVersionStr$DevPostfix.exe not found!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
scp ./../Mac/Release/deploy/$AppVersionStr$DevPostfix/tmacupd$AppVersion tmaster:tdesktop/www/tmac/
|
if [ ! -d "./../../../Dropbox/Telegram/deploy/$AppVersionStrMajor" ]; then
|
||||||
scp ./../Mac/Release/deploy/$AppVersionStr$DevPostfix/tsetup.$AppVersionStr$DevPostfix.dmg tmaster:tdesktop/www/tmac/
|
mkdir "./../../../Dropbox/Telegram/deploy/$AppVersionStrMajor"
|
||||||
scp ./../../tother/tsetup/tupdate$AppVersion tmaster:tdesktop/www/tsetup/
|
fi
|
||||||
scp ./../../tother/tsetup/tportable.$AppVersionStr$DevPostfix.zip tmaster:tdesktop/www/tsetup/
|
|
||||||
scp ./../../tother/tsetup/tsetup.$AppVersionStr$DevPostfix.exe tmaster:tdesktop/www/tsetup/
|
if [ ! -d "./../../../Dropbox/Telegram/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix" ]; then
|
||||||
|
mkdir "./../../../Dropbox/Telegram/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix"
|
||||||
|
fi
|
||||||
|
|
||||||
|
scp ./../Mac/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/tmacupd$AppVersion tmaster:tdesktop/www/tmac/
|
||||||
|
scp ./../Mac/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/tsetup.$AppVersionStr$DevPostfix.dmg tmaster:tdesktop/www/tmac/
|
||||||
|
scp ./../../tother/tsetup/$AppVersionStrMajor/$AppVersionStr$DevPostfix/tupdate$AppVersion tmaster:tdesktop/www/tsetup/
|
||||||
|
scp ./../../tother/tsetup/$AppVersionStrMajor/$AppVersionStr$DevPostfix/tportable.$AppVersionStr$DevPostfix.zip tmaster:tdesktop/www/tsetup/
|
||||||
|
scp ./../../tother/tsetup/$AppVersionStrMajor/$AppVersionStr$DevPostfix/tsetup.$AppVersionStr$DevPostfix.exe tmaster:tdesktop/www/tsetup/
|
||||||
|
|
||||||
|
mv -rv ./../../tother/tsetup/$AppVersionStrMajor/$AppVersionStr$DevPostfix ./../../../Dropbox/Telegram/deploy/$AppVersionStrMajor/
|
||||||
|
|
||||||
|
cp -v ./../Mac/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/tmacupd$AppVersion ./../../../Dropbox/Telegram/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/
|
||||||
|
cp -v ./../Mac/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/tsetup.$AppVersionStr$DevPostfix.dmg ./../../../Dropbox/Telegram/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/
|
||||||
|
cp -rv ./../Mac/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/Telegram.app.dSYM ./../../../Dropbox/Telegram/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/
|
||||||
|
|
||||||
|
|
|
@ -1,26 +1,39 @@
|
||||||
AppVersion=`./Version.sh | awk -F " " '{print $1}'`
|
AppVersionStrMajor=`./Version.sh | awk -F " " '{print $1}'`
|
||||||
AppVersionStr=`./Version.sh | awk -F " " '{print $2}'`
|
AppVersion=`./Version.sh | awk -F " " '{print $2}'`
|
||||||
DevChannel=`./Version.sh | awk -F " " '{print $3}'`
|
AppVersionStr=`./Version.sh | awk -F " " '{print $3}'`
|
||||||
|
DevChannel=`./Version.sh | awk -F " " '{print $4}'`
|
||||||
DevPostfix=''
|
DevPostfix=''
|
||||||
if [ "$DevChannel" != "0" ]; then
|
if [ "$DevChannel" != "0" ]; then
|
||||||
DevPostfix='.dev'
|
DevPostfix='.dev'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "./../Win32/Deploy/deploy/$AppVersionStr$DevPostfix/tupdate$AppVersion" ]; then
|
if [ ! -f "./../Win32/Deploy/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/tupdate$AppVersion" ]; then
|
||||||
echo "tupdate$AppVersion not found!"
|
echo "tupdate$AppVersion not found!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "./../Win32/Deploy/deploy/$AppVersionStr$DevPostfix/tportable.$AppVersionStr$DevPostfix.zip" ]; then
|
if [ ! -f "./../Win32/Deploy/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/tportable.$AppVersionStr$DevPostfix.zip" ]; then
|
||||||
echo "tportable.$AppVersionStr$DevPostfix.zip not found!"
|
echo "tportable.$AppVersionStr$DevPostfix.zip not found!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "./../Win32/Deploy/deploy/$AppVersionStr$DevPostfix/tsetup.$AppVersionStr$DevPostfix.exe" ]; then
|
if [ ! -f "./../Win32/Deploy/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/tsetup.$AppVersionStr$DevPostfix.exe" ]; then
|
||||||
echo "tsetup.$AppVersionStr$DevPostfix.exe not found!"
|
echo "tsetup.$AppVersionStr$DevPostfix.exe not found!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cp -v ./../Win32/Deploy/deploy/$AppVersionStr$DevPostfix/tupdate$AppVersion /z/TBuild/tother/tsetup/
|
if [ ! -d "/z/TBuild/tother/tsetup/$AppVersionStrMajor" ]; then
|
||||||
cp -v ./../Win32/Deploy/deploy/$AppVersionStr$DevPostfix/tportable.$AppVersionStr$DevPostfix.zip /z/TBuild/tother/tsetup/
|
mkdir "/z/TBuild/tother/tsetup/$AppVersionStrMajor"
|
||||||
cp -v ./../Win32/Deploy/deploy/$AppVersionStr$DevPostfix/tsetup.$AppVersionStr$DevPostfix.exe /z/TBuild/tother/tsetup/
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "/z/TBuild/tother/tsetup/$AppVersionStrMajor/$AppVersionStr$DevPostfix" ]; then
|
||||||
|
mkdir "/z/TBuild/tother/tsetup/$AppVersionStrMajor/$AppVersionStr$DevPostfix"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp -v ./../Win32/Deploy/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/tupdate$AppVersion /z/TBuild/tother/tsetup/$AppVersionStrMajor/$AppVersionStr$DevPostfix/
|
||||||
|
cp -v ./../Win32/Deploy/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/tportable.$AppVersionStr$DevPostfix.zip /z/TBuild/tother/tsetup/$AppVersionStrMajor/$AppVersionStr$DevPostfix/
|
||||||
|
cp -v ./../Win32/Deploy/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/tsetup.$AppVersionStr$DevPostfix.exe /z/TBuild/tother/tsetup/$AppVersionStrMajor/$AppVersionStr$DevPostfix/
|
||||||
|
cp -v ./../Win32/Deploy/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/Telegram.pdb /z/TBuild/tother/tsetup/$AppVersionStrMajor/$AppVersionStr$DevPostfix/
|
||||||
|
cp -v ./../Win32/Deploy/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/Updater.exe /z/TBuild/tother/tsetup/$AppVersionStrMajor/$AppVersionStr$DevPostfix/
|
||||||
|
cp -v ./../Win32/Deploy/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/Updater.pdb /z/TBuild/tother/tsetup/$AppVersionStrMajor/$AppVersionStr$DevPostfix/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
AppVersion=`./Version.sh | awk -F " " '{print $1}'`
|
AppVersionStrMajor=`./Version.sh | awk -F " " '{print $1}'`
|
||||||
AppVersionStr=`./Version.sh | awk -F " " '{print $2}'`
|
AppVersion=`./Version.sh | awk -F " " '{print $2}'`
|
||||||
DevChannel=`./Version.sh | awk -F " " '{print $3}'`
|
AppVersionStr=`./Version.sh | awk -F " " '{print $3}'`
|
||||||
|
DevChannel=`./Version.sh | awk -F " " '{print $4}'`
|
||||||
DevPostfix=''
|
DevPostfix=''
|
||||||
DevParam=''
|
DevParam=''
|
||||||
if [ "$DevChannel" != "0" ]; then
|
if [ "$DevChannel" != "0" ]; then
|
||||||
|
@ -8,12 +9,12 @@ if [ "$DevChannel" != "0" ]; then
|
||||||
DevParam='-dev'
|
DevParam='-dev'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "./../Linux/Release/deploy/$AppVersionStr.dev" ]; then
|
if [ -d "./../Linux/Release/deploy/$AppVersionStrMajor/$AppVersionStr.dev" ]; then
|
||||||
echo "Deploy folder for version $AppVersionStr.dev already exists!"
|
echo "Deploy folder for version $AppVersionStr.dev already exists!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "./../Linux/Release/deploy/$AppVersionStr" ]; then
|
if [ -d "./../Linux/Release/deploy/$AppVersionStrMajor/$AppVersionStr" ]; then
|
||||||
echo "Deploy folder for version $AppVersionStr already exists!"
|
echo "Deploy folder for version $AppVersionStr already exists!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -40,12 +41,17 @@ echo "Packer done!"
|
||||||
if [ ! -d "./../Linux/Release/deploy" ]; then
|
if [ ! -d "./../Linux/Release/deploy" ]; then
|
||||||
mkdir "./../Linux/Release/deploy"
|
mkdir "./../Linux/Release/deploy"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "./../Linux/Release/deploy/$AppVersionStrMajor" ]; then
|
||||||
|
mkdir "./../Linux/Release/deploy/$AppVersionStrMajor"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Copying Telegram, Updater and tlinuxupd$AppVersion to deploy/$AppVersionStr$DevPostfix..";
|
echo "Copying Telegram, Updater and tlinuxupd$AppVersion to deploy/$AppVersionStr$DevPostfix..";
|
||||||
mkdir "./../Linux/Release/deploy/$AppVersionStr$DevPostfix"
|
mkdir "./../Linux/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix"
|
||||||
mkdir "./../Linux/Release/deploy/$AppVersionStr$DevPostfix/Telegram"
|
mkdir "./../Linux/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/Telegram"
|
||||||
mv ./../Linux/Release/Telegram ./../Linux/Release/deploy/$AppVersionStr$DevPostfix/Telegram/
|
mv ./../Linux/Release/Telegram ./../Linux/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/Telegram/
|
||||||
mv ./../Linux/Release/Updater ./../Linux/Release/deploy/$AppVersionStr$DevPostfix/Telegram/
|
mv ./../Linux/Release/Updater ./../Linux/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/Telegram/
|
||||||
mv ./../Linux/Release/tlinuxupd$AppVersion ./../Linux/Release/deploy/$AppVersionStr$DevPostfix/
|
mv ./../Linux/Release/tlinuxupd$AppVersion ./../Linux/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/
|
||||||
cd ./../Linux/Release/deploy/$AppVersionStr$DevPostfix && tar -cJvf tsetup.$AppVersionStr$DevPostfix.tar.xz Telegram/ && cd ./../../../../Telegram
|
cd ./../Linux/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix && tar -cJvf tsetup.$AppVersionStr$DevPostfix.tar.xz Telegram/ && cd ./../../../../../Telegram
|
||||||
echo "Version $AppVersionStr$DevPostfix prepared!";
|
echo "Version $AppVersionStr$DevPostfix prepared!";
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
AppVersion=`./Version.sh | awk -F " " '{print $1}'`
|
AppVersionStrMajor=`./Version.sh | awk -F " " '{print $1}'`
|
||||||
AppVersionStr=`./Version.sh | awk -F " " '{print $2}'`
|
AppVersion=`./Version.sh | awk -F " " '{print $2}'`
|
||||||
DevChannel=`./Version.sh | awk -F " " '{print $3}'`
|
AppVersionStr=`./Version.sh | awk -F " " '{print $3}'`
|
||||||
|
DevChannel=`./Version.sh | awk -F " " '{print $4}'`
|
||||||
DevPostfix=''
|
DevPostfix=''
|
||||||
DevParam=''
|
DevParam=''
|
||||||
if [ "$DevChannel" != "0" ]; then
|
if [ "$DevChannel" != "0" ]; then
|
||||||
|
@ -8,12 +9,12 @@ if [ "$DevChannel" != "0" ]; then
|
||||||
DevParam='-dev'
|
DevParam='-dev'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "./../Linux/Release/deploy/$AppVersionStr.dev" ]; then
|
if [ -d "./../Linux/Release/deploy/$AppVersionStrMajor/$AppVersionStr.dev" ]; then
|
||||||
echo "Deploy folder for version $AppVersionStr.dev already exists!"
|
echo "Deploy folder for version $AppVersionStr.dev already exists!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "./../Linux/Release/deploy/$AppVersionStr" ]; then
|
if [ -d "./../Linux/Release/deploy/$AppVersionStrMajor/$AppVersionStr" ]; then
|
||||||
echo "Deploy folder for version $AppVersionStr already exists!"
|
echo "Deploy folder for version $AppVersionStr already exists!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -40,12 +41,17 @@ echo "Packer done!"
|
||||||
if [ ! -d "./../Linux/Release/deploy" ]; then
|
if [ ! -d "./../Linux/Release/deploy" ]; then
|
||||||
mkdir "./../Linux/Release/deploy"
|
mkdir "./../Linux/Release/deploy"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "./../Linux/Release/deploy/$AppVersionStrMajor" ]; then
|
||||||
|
mkdir "./../Linux/Release/deploy/$AppVersionStrMajor"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Copying Telegram, Updater and tlinux32upd$AppVersion to deploy/$AppVersionStr$DevPostfix..";
|
echo "Copying Telegram, Updater and tlinux32upd$AppVersion to deploy/$AppVersionStr$DevPostfix..";
|
||||||
mkdir "./../Linux/Release/deploy/$AppVersionStr$DevPostfix"
|
mkdir "./../Linux/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix"
|
||||||
mkdir "./../Linux/Release/deploy/$AppVersionStr$DevPostfix/Telegram"
|
mkdir "./../Linux/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/Telegram"
|
||||||
mv ./../Linux/Release/Telegram ./../Linux/Release/deploy/$AppVersionStr$DevPostfix/Telegram/
|
mv ./../Linux/Release/Telegram ./../Linux/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/Telegram/
|
||||||
mv ./../Linux/Release/Updater ./../Linux/Release/deploy/$AppVersionStr$DevPostfix/Telegram/
|
mv ./../Linux/Release/Updater ./../Linux/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/Telegram/
|
||||||
mv ./../Linux/Release/tlinux32upd$AppVersion ./../Linux/Release/deploy/$AppVersionStr$DevPostfix/
|
mv ./../Linux/Release/tlinux32upd$AppVersion ./../Linux/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/
|
||||||
cd ./../Linux/Release/deploy/$AppVersionStr$DevPostfix && tar -cJvf tsetup32.$AppVersionStr$DevPostfix.tar.xz Telegram/ && cd ./../../../../Telegram
|
cd ./../Linux/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix && tar -cJvf tsetup32.$AppVersionStr$DevPostfix.tar.xz Telegram/ && cd ./../../../../../Telegram
|
||||||
echo "Version $AppVersionStr$DevPostfix prepared!";
|
echo "Version $AppVersionStr$DevPostfix prepared!";
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
AppVersion=`./Version.sh | awk -F " " '{print $1}'`
|
AppVersionStrMajor=`./Version.sh | awk -F " " '{print $1}'`
|
||||||
AppVersionStr=`./Version.sh | awk -F " " '{print $2}'`
|
AppVersion=`./Version.sh | awk -F " " '{print $2}'`
|
||||||
DevChannel=`./Version.sh | awk -F " " '{print $3}'`
|
AppVersionStr=`./Version.sh | awk -F " " '{print $3}'`
|
||||||
|
DevChannel=`./Version.sh | awk -F " " '{print $4}'`
|
||||||
DevPostfix=''
|
DevPostfix=''
|
||||||
DevParam=''
|
DevParam=''
|
||||||
if [ "$DevChannel" != "0" ]; then
|
if [ "$DevChannel" != "0" ]; then
|
||||||
|
@ -12,12 +13,12 @@ echo ""
|
||||||
echo "Preparing version $AppVersionStr$DevPostfix.."
|
echo "Preparing version $AppVersionStr$DevPostfix.."
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
if [ -d "./../Mac/Release/deploy/$AppVersionStr.dev" ]; then
|
if [ -d "./../Mac/Release/deploy/$AppVersionStrMajor/$AppVersionStr.dev" ]; then
|
||||||
echo "Deploy folder for version $AppVersionStr.dev already exists!"
|
echo "Deploy folder for version $AppVersionStr.dev already exists!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "./../Mac/Release/deploy/$AppVersionStr" ]; then
|
if [ -d "./../Mac/Release/deploy/$AppVersionStrMajor/$AppVersionStr" ]; then
|
||||||
echo "Deploy folder for version $AppVersionStr already exists!"
|
echo "Deploy folder for version $AppVersionStr already exists!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -73,19 +74,23 @@ hdiutil convert tsetup.dmg -format UDZO -imagekey zlib-level=9 -ov -o tsetup.$Ap
|
||||||
cd ./../../Telegram
|
cd ./../../Telegram
|
||||||
cd ./../Mac/Release && ./Packer.app/Contents/MacOS/Packer -path Telegram.app -version $AppVersion $DevParam && cd ./../../Telegram
|
cd ./../Mac/Release && ./Packer.app/Contents/MacOS/Packer -path Telegram.app -version $AppVersion $DevParam && cd ./../../Telegram
|
||||||
|
|
||||||
if [ ! -d "./../Mac/Release/deploy/" ]; then
|
if [ ! -d "./../Mac/Release/deploy" ]; then
|
||||||
mkdir "./../Mac/Release/deploy"
|
mkdir "./../Mac/Release/deploy"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Copying Telegram.app and tmacupd$AppVersion to deploy/$AppVersionStr..";
|
if [ ! -d "./../Mac/Release/deploy/$AppVersionStrMajor" ]; then
|
||||||
mkdir "./../Mac/Release/deploy/$AppVersionStr$DevPostfix"
|
mkdir "./../Mac/Release/deploy/$AppVersionStrMajor"
|
||||||
mkdir "./../Mac/Release/deploy/$AppVersionStr$DevPostfix/Telegram"
|
fi
|
||||||
cp -r ./../Mac/Release/Telegram.app ./../Mac/Release/deploy/$AppVersionStr$DevPostfix/Telegram/
|
|
||||||
mv ./../Mac/Release/Telegram.app.dSYM ./../Mac/Release/deploy/$AppVersionStr$DevPostfix/
|
echo "Copying Telegram.app and tmacupd$AppVersion to deploy/$AppVersionStrMajor/$AppVersionStr..";
|
||||||
|
mkdir "./../Mac/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix"
|
||||||
|
mkdir "./../Mac/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/Telegram"
|
||||||
|
cp -r ./../Mac/Release/Telegram.app ./../Mac/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/Telegram/
|
||||||
|
mv ./../Mac/Release/Telegram.app.dSYM ./../Mac/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/
|
||||||
rm ./../Mac/Release/Telegram.app/Contents/MacOS/Telegram
|
rm ./../Mac/Release/Telegram.app/Contents/MacOS/Telegram
|
||||||
rm ./../Mac/Release/Telegram.app/Contents/Frameworks/Updater
|
rm ./../Mac/Release/Telegram.app/Contents/Frameworks/Updater
|
||||||
rm -rf ./../Mac/Release/Telegram.app/Contents/_CodeSignature
|
rm -rf ./../Mac/Release/Telegram.app/Contents/_CodeSignature
|
||||||
mv ./../Mac/Release/tmacupd$AppVersion ./../Mac/Release/deploy/$AppVersionStr$DevPostfix/
|
mv ./../Mac/Release/tmacupd$AppVersion ./../Mac/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/
|
||||||
mv ./../Mac/Release/tsetup.$AppVersionStr$DevPostfix.dmg ./../Mac/Release/deploy/$AppVersionStr$DevPostfix/tsetup.$AppVersionStr$DevPostfix.dmg
|
mv ./../Mac/Release/tsetup.$AppVersionStr$DevPostfix.dmg ./../Mac/Release/deploy/$AppVersionStrMajor/$AppVersionStr$DevPostfix/tsetup.$AppVersionStr$DevPostfix.dmg
|
||||||
echo "Version $AppVersionStr$DevPostfix prepared!";
|
echo "Version $AppVersionStr$DevPostfix prepared!";
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
@echo OFF
|
@echo OFF
|
||||||
|
|
||||||
set "AppVersion=8032"
|
set "AppVersionStrMajor=0.8"
|
||||||
set "AppVersionStrSmall=0.8.32"
|
set "AppVersion=8033"
|
||||||
set "AppVersionStr=0.8.32"
|
set "AppVersionStrSmall=0.8.33"
|
||||||
set "AppVersionStrFull=0.8.32.0"
|
set "AppVersionStr=0.8.33"
|
||||||
set "DevChannel=0"
|
set "AppVersionStrFull=0.8.33.0"
|
||||||
|
set "DevChannel=1"
|
||||||
|
|
||||||
if %DevChannel% neq 0 goto preparedev
|
if %DevChannel% neq 0 goto preparedev
|
||||||
|
|
||||||
|
@ -23,8 +24,8 @@ echo.
|
||||||
echo Preparing version %AppVersionStr%%DevPostfix%..
|
echo Preparing version %AppVersionStr%%DevPostfix%..
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
if exist ..\Win32\Deploy\deploy\%AppVersionStr%\ goto error_exist1
|
if exist ..\Win32\Deploy\deploy\%AppVersionStrMajor%\%AppVersionStr%\ goto error_exist1
|
||||||
if exist ..\Win32\Deploy\deploy\%AppVersionStr%.dev\ goto error_exist2
|
if exist ..\Win32\Deploy\deploy\%AppVersionStrMajor%\%AppVersionStr%.dev\ goto error_exist2
|
||||||
if exist ..\Win32\Deploy\tupdate%AppVersion% goto error_exist3
|
if exist ..\Win32\Deploy\tupdate%AppVersion% goto error_exist3
|
||||||
|
|
||||||
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"
|
||||||
|
@ -46,17 +47,18 @@ call Packer.exe -version %AppVersion% -path Telegram.exe -path Updater.exe %DevP
|
||||||
if %errorlevel% neq 0 goto error1
|
if %errorlevel% neq 0 goto error1
|
||||||
|
|
||||||
if not exist deploy mkdir deploy
|
if not exist deploy mkdir deploy
|
||||||
mkdir deploy\%AppVersionStr%%DevPostfix%
|
if not exist deploy\%AppVersionStrMajor% mkdir deploy\%AppVersionStrMajor%
|
||||||
mkdir deploy\%AppVersionStr%%DevPostfix%\Telegram
|
mkdir deploy\%AppVersionStrMajor%\%AppVersionStr%%DevPostfix%
|
||||||
|
mkdir deploy\%AppVersionStrMajor%\%AppVersionStr%%DevPostfix%\Telegram
|
||||||
|
|
||||||
move Telegram.exe deploy\%AppVersionStr%%DevPostfix%\Telegram\
|
move Telegram.exe deploy\%AppVersionStrMajor%\%AppVersionStr%%DevPostfix%\Telegram\
|
||||||
move Updater.exe deploy\%AppVersionStr%%DevPostfix%\
|
move Updater.exe deploy\%AppVersionStrMajor%\%AppVersionStr%%DevPostfix%\
|
||||||
move Telegram.pdb deploy\%AppVersionStr%%DevPostfix%\
|
move Telegram.pdb deploy\%AppVersionStrMajor%\%AppVersionStr%%DevPostfix%\
|
||||||
move Updater.pdb deploy\%AppVersionStr%%DevPostfix%\
|
move Updater.pdb deploy\%AppVersionStrMajor%\%AppVersionStr%%DevPostfix%\
|
||||||
move tsetup.%AppVersionStr%%DevPostfix%.exe deploy\%AppVersionStr%%DevPostfix%\
|
move tsetup.%AppVersionStr%%DevPostfix%.exe deploy\%AppVersionStrMajor%\%AppVersionStr%%DevPostfix%\
|
||||||
move tupdate%AppVersion% deploy\%AppVersionStr%%DevPostfix%\
|
move tupdate%AppVersion% deploy\%AppVersionStrMajor%\%AppVersionStr%%DevPostfix%\
|
||||||
|
|
||||||
cd deploy\%AppVersionStr%%DevPostfix%
|
cd deploy\%AppVersionStrMajor%\%AppVersionStr%%DevPostfix%
|
||||||
7z a -mx9 tportable.%AppVersionStr%%DevPostfix%.zip Telegram\
|
7z a -mx9 tportable.%AppVersionStr%%DevPostfix%.zip Telegram\
|
||||||
if %errorlevel% neq 0 goto error2
|
if %errorlevel% neq 0 goto error2
|
||||||
|
|
||||||
|
@ -64,11 +66,11 @@ echo .
|
||||||
echo Version %AppVersionStr%%DevPostfix% is ready for deploy!
|
echo Version %AppVersionStr%%DevPostfix% is ready for deploy!
|
||||||
echo .
|
echo .
|
||||||
|
|
||||||
cd ..\..\..\..\Telegram
|
cd ..\..\..\..\..\Telegram
|
||||||
goto eof
|
goto eof
|
||||||
|
|
||||||
:error2
|
:error2
|
||||||
cd ..\..
|
cd ..\..\..
|
||||||
:error1
|
:error1
|
||||||
cd ..\..\Telegram
|
cd ..\..\Telegram
|
||||||
echo ERROR occured!
|
echo ERROR occured!
|
||||||
|
|
|
@ -301,13 +301,14 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
|
||||||
|
|
||||||
"lng_connection_type" = "Connection type:";
|
"lng_connection_type" = "Connection type:";
|
||||||
"lng_connection_auto_connecting" = "Default (connecting..)";
|
"lng_connection_auto_connecting" = "Default (connecting..)";
|
||||||
"lng_connection_auto" = "Default ({type} used)";
|
"lng_connection_auto" = "Default ({transport} used)";
|
||||||
"lng_connection_http_proxy" = "HTTP with proxy";
|
"lng_connection_proxy_connecting" = "Connecting through proxy..";
|
||||||
"lng_connection_tcp_proxy" = "TCP with proxy";
|
"lng_connection_proxy" = "{transport} with proxy";
|
||||||
"lng_connection_header" = "Connection type";
|
"lng_connection_header" = "Connection type";
|
||||||
"lng_connection_auto_rb" = "Auto (TCP if available or HTTP)";
|
"lng_connection_auto_rb" = "Auto (TCP if available or HTTP)";
|
||||||
"lng_connection_http_proxy_rb" = "HTTP with custom http-proxy";
|
"lng_connection_http_proxy_rb" = "HTTP with custom http-proxy";
|
||||||
"lng_connection_tcp_proxy_rb" = "TCP with custom socks5-proxy";
|
"lng_connection_tcp_proxy_rb" = "TCP with custom socks5-proxy";
|
||||||
|
"lng_connection_try_ipv6" = "Try connecting through IPv6";
|
||||||
"lng_connection_host_ph" = "Hostname";
|
"lng_connection_host_ph" = "Hostname";
|
||||||
"lng_connection_port_ph" = "Port";
|
"lng_connection_port_ph" = "Port";
|
||||||
"lng_connection_user_ph" = "Username";
|
"lng_connection_user_ph" = "Username";
|
||||||
|
|
|
@ -33,7 +33,8 @@ ConnectionBox::ConnectionBox() :
|
||||||
_passwordInput(this, st::inpConnectionPassword, lang(lng_connection_password_ph), cConnectionProxy().password),
|
_passwordInput(this, st::inpConnectionPassword, lang(lng_connection_password_ph), cConnectionProxy().password),
|
||||||
_autoRadio(this, qsl("conn_type"), dbictAuto, lang(lng_connection_auto_rb), (cConnectionType() == dbictAuto)),
|
_autoRadio(this, qsl("conn_type"), dbictAuto, lang(lng_connection_auto_rb), (cConnectionType() == dbictAuto)),
|
||||||
_httpProxyRadio(this, qsl("conn_type"), dbictHttpProxy, lang(lng_connection_http_proxy_rb), (cConnectionType() == dbictHttpProxy)),
|
_httpProxyRadio(this, qsl("conn_type"), dbictHttpProxy, lang(lng_connection_http_proxy_rb), (cConnectionType() == dbictHttpProxy)),
|
||||||
_tcpProxyRadio(this, qsl("conn_type"), dbictTcpProxy, lang(lng_connection_tcp_proxy_rb), (cConnectionType() == dbictTcpProxy)) {
|
_tcpProxyRadio(this, qsl("conn_type"), dbictTcpProxy, lang(lng_connection_tcp_proxy_rb), (cConnectionType() == dbictTcpProxy)),
|
||||||
|
_tryIPv6(this, lang(lng_connection_try_ipv6), cTryIPv6()) {
|
||||||
|
|
||||||
connect(&_saveButton, SIGNAL(clicked()), this, SLOT(onSave()));
|
connect(&_saveButton, SIGNAL(clicked()), this, SLOT(onSave()));
|
||||||
connect(&_cancelButton, SIGNAL(clicked()), this, SLOT(onClose()));
|
connect(&_cancelButton, SIGNAL(clicked()), this, SLOT(onClose()));
|
||||||
|
@ -51,6 +52,7 @@ void ConnectionBox::hideAll() {
|
||||||
_autoRadio.hide();
|
_autoRadio.hide();
|
||||||
_httpProxyRadio.hide();
|
_httpProxyRadio.hide();
|
||||||
_tcpProxyRadio.hide();
|
_tcpProxyRadio.hide();
|
||||||
|
_tryIPv6.hide();
|
||||||
|
|
||||||
_hostInput.hide();
|
_hostInput.hide();
|
||||||
_portInput.hide();
|
_portInput.hide();
|
||||||
|
@ -65,8 +67,9 @@ void ConnectionBox::showAll() {
|
||||||
_autoRadio.show();
|
_autoRadio.show();
|
||||||
_httpProxyRadio.show();
|
_httpProxyRadio.show();
|
||||||
_tcpProxyRadio.show();
|
_tcpProxyRadio.show();
|
||||||
|
_tryIPv6.show();
|
||||||
|
|
||||||
int32 h = st::boxTitleHeight + st::connectionSkip + _autoRadio.height() + st::connectionSkip + _httpProxyRadio.height() + st::connectionSkip + _tcpProxyRadio.height() + st::connectionSkip;
|
int32 h = st::boxTitleHeight + st::connectionSkip + _autoRadio.height() + st::connectionSkip + _httpProxyRadio.height() + st::connectionSkip + _tcpProxyRadio.height() + st::connectionSkip + st::lineWidth + st::connectionSkip + _tryIPv6.height() + st::connectionSkip;
|
||||||
if (_httpProxyRadio.checked() || _tcpProxyRadio.checked()) {
|
if (_httpProxyRadio.checked() || _tcpProxyRadio.checked()) {
|
||||||
h += 2 * st::boxPadding.top() + 2 * _hostInput.height();
|
h += 2 * st::boxPadding.top() + 2 * _hostInput.height();
|
||||||
_hostInput.show();
|
_hostInput.show();
|
||||||
|
@ -99,6 +102,9 @@ void ConnectionBox::paintEvent(QPaintEvent *e) {
|
||||||
|
|
||||||
paintTitle(p, lang(lng_connection_header), true);
|
paintTitle(p, lang(lng_connection_header), true);
|
||||||
|
|
||||||
|
// paint separator
|
||||||
|
p.fillRect(st::boxPadding.left(), _tryIPv6.y() - st::connectionSkip - st::lineWidth, width() - st::boxPadding.left() - st::boxPadding.right(), st::lineWidth, st::scrollDef.shColor->b);
|
||||||
|
|
||||||
// paint shadow
|
// paint shadow
|
||||||
p.fillRect(0, height() - st::btnSelectCancel.height - st::scrollDef.bottomsh, width(), st::scrollDef.bottomsh, st::scrollDef.shColor->b);
|
p.fillRect(0, height() - st::btnSelectCancel.height - st::scrollDef.bottomsh, width(), st::scrollDef.bottomsh, st::scrollDef.shColor->b);
|
||||||
|
|
||||||
|
@ -128,10 +134,11 @@ void ConnectionBox::resizeEvent(QResizeEvent *e) {
|
||||||
_passwordInput.move(width() - st::boxPadding.right() - _passwordInput.width(), _userInput.y());
|
_passwordInput.move(width() - st::boxPadding.right() - _passwordInput.width(), _userInput.y());
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 buttony = (_tcpProxyRadio.checked() ? (_userInput.y() + _userInput.height()) : (_tcpProxyRadio.y() + _tcpProxyRadio.height())) + st::connectionSkip;
|
int32 tryipv6y = (_tcpProxyRadio.checked() ? (_userInput.y() + _userInput.height()) : (_tcpProxyRadio.y() + _tcpProxyRadio.height())) + st::connectionSkip + st::lineWidth + st::connectionSkip;
|
||||||
|
_tryIPv6.move(st::boxPadding.left(), tryipv6y);
|
||||||
|
|
||||||
_saveButton.move(width() - _saveButton.width(), buttony);
|
_saveButton.move(width() - _saveButton.width(), _tryIPv6.y() + _tryIPv6.height() + st::connectionSkip);
|
||||||
_cancelButton.move(0, buttony);
|
_cancelButton.move(0, _saveButton.y());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConnectionBox::onChange() {
|
void ConnectionBox::onChange() {
|
||||||
|
@ -172,8 +179,16 @@ void ConnectionBox::onSave() {
|
||||||
QNetworkProxyFactory::setUseSystemConfiguration(false);
|
QNetworkProxyFactory::setUseSystemConfiguration(false);
|
||||||
QNetworkProxyFactory::setUseSystemConfiguration(true);
|
QNetworkProxyFactory::setUseSystemConfiguration(true);
|
||||||
}
|
}
|
||||||
Local::writeSettings();
|
if (cPlatform() == dbipWindows && cTryIPv6() != _tryIPv6.checked()) {
|
||||||
MTP::restart();
|
cSetTryIPv6(_tryIPv6.checked());
|
||||||
reinitImageLinkManager();
|
Local::writeSettings();
|
||||||
emit closed();
|
cSetRestarting(true);
|
||||||
|
cSetRestartingToSettings(true);
|
||||||
|
App::quit();
|
||||||
|
} else {
|
||||||
|
Local::writeSettings();
|
||||||
|
MTP::restart();
|
||||||
|
reinitImageLinkManager();
|
||||||
|
emit closed();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,4 +47,5 @@ private:
|
||||||
PortInput _portInput;
|
PortInput _portInput;
|
||||||
FlatInput _userInput, _passwordInput;
|
FlatInput _userInput, _passwordInput;
|
||||||
FlatRadiobutton _autoRadio, _httpProxyRadio, _tcpProxyRadio;
|
FlatRadiobutton _autoRadio, _httpProxyRadio, _tcpProxyRadio;
|
||||||
|
FlatCheckbox _tryIPv6;
|
||||||
};
|
};
|
||||||
|
|
|
@ -17,9 +17,9 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
static const int32 AppVersion = 8032;
|
static const int32 AppVersion = 8033;
|
||||||
static const wchar_t *AppVersionStr = L"0.8.32";
|
static const wchar_t *AppVersionStr = L"0.8.33";
|
||||||
static const bool DevChannel = false;
|
static const bool DevChannel = true;
|
||||||
|
|
||||||
static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)";
|
static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)";
|
||||||
static const wchar_t *AppName = L"Telegram Desktop";
|
static const wchar_t *AppName = L"Telegram Desktop";
|
||||||
|
|
|
@ -2857,13 +2857,13 @@ void MentionsDropdown::recount(bool toDown) {
|
||||||
int32 h = (_rows.isEmpty() ? (_hrows.isEmpty() ? _crows.size() : _hrows.size()) : _rows.size()) * st::mentionHeight, oldst = _scroll.scrollTop(), st = oldst;
|
int32 h = (_rows.isEmpty() ? (_hrows.isEmpty() ? _crows.size() : _hrows.size()) : _rows.size()) * st::mentionHeight, oldst = _scroll.scrollTop(), st = oldst;
|
||||||
|
|
||||||
if (_inner.height() != h) {
|
if (_inner.height() != h) {
|
||||||
st += h - _inner.height();
|
// st += h - _inner.height();
|
||||||
_inner.resize(width(), h);
|
_inner.resize(width(), h);
|
||||||
}
|
}
|
||||||
if (h > _boundings.height()) h = _boundings.height();
|
if (h > _boundings.height()) h = _boundings.height();
|
||||||
if (h > 4.5 * st::mentionHeight) h = 4.5 * st::mentionHeight;
|
if (h > 4.5 * st::mentionHeight) h = 4.5 * st::mentionHeight;
|
||||||
if (height() != h) {
|
if (height() != h) {
|
||||||
st += _scroll.height() - h;
|
// st += _scroll.height() - h;
|
||||||
setGeometry(0, _boundings.height() - h, width(), h);
|
setGeometry(0, _boundings.height() - h, width(), h);
|
||||||
_scroll.resize(width(), h);
|
_scroll.resize(width(), h);
|
||||||
} else if (y() != _boundings.height() - h) {
|
} else if (y() != _boundings.height() - h) {
|
||||||
|
|
|
@ -1670,7 +1670,7 @@ bool BotKeyboard::updateMarkup(HistoryItem *to) {
|
||||||
|
|
||||||
const ReplyMarkup::Commands &commands(markup.commands);
|
const ReplyMarkup::Commands &commands(markup.commands);
|
||||||
if (!commands.isEmpty()) {
|
if (!commands.isEmpty()) {
|
||||||
int32 i = 0, l = qMin(commands.size(), 32);
|
int32 i = 0, l = qMin(commands.size(), 512);
|
||||||
_btns.reserve(l);
|
_btns.reserve(l);
|
||||||
for (; i != l; ++i) {
|
for (; i != l; ++i) {
|
||||||
const QList<QString> &row(commands.at(i));
|
const QList<QString> &row(commands.at(i));
|
||||||
|
|
|
@ -736,6 +736,14 @@ namespace {
|
||||||
};
|
};
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
|
case dbiTryIPv6: {
|
||||||
|
qint32 v;
|
||||||
|
stream >> v;
|
||||||
|
if (!_checkStreamStatus(stream)) return false;
|
||||||
|
|
||||||
|
cSetTryIPv6(v == 1);
|
||||||
|
} break;
|
||||||
|
|
||||||
case dbiSeenTrayTooltip: {
|
case dbiSeenTrayTooltip: {
|
||||||
qint32 v;
|
qint32 v;
|
||||||
stream >> v;
|
stream >> v;
|
||||||
|
@ -1789,7 +1797,7 @@ namespace Local {
|
||||||
cSetDcOptions(dcOpts);
|
cSetDcOptions(dcOpts);
|
||||||
}
|
}
|
||||||
|
|
||||||
quint32 size = 10 * (sizeof(quint32) + sizeof(qint32));
|
quint32 size = 11 * (sizeof(quint32) + sizeof(qint32));
|
||||||
for (mtpDcOptions::const_iterator i = dcOpts.cbegin(), e = dcOpts.cend(); i != e; ++i) {
|
for (mtpDcOptions::const_iterator i = dcOpts.cbegin(), e = dcOpts.cend(); i != e; ++i) {
|
||||||
size += sizeof(quint32) + sizeof(quint32) + sizeof(quint32);
|
size += sizeof(quint32) + sizeof(quint32) + sizeof(quint32);
|
||||||
size += sizeof(quint32) + _stringSize(QString::fromUtf8(i->ip.data(), i->ip.size()));
|
size += sizeof(quint32) + _stringSize(QString::fromUtf8(i->ip.data(), i->ip.size()));
|
||||||
|
@ -1827,6 +1835,7 @@ namespace Local {
|
||||||
const ConnectionProxy &proxy(cConnectionProxy());
|
const ConnectionProxy &proxy(cConnectionProxy());
|
||||||
data.stream << proxy.host << qint32(proxy.port) << proxy.user << proxy.password;
|
data.stream << proxy.host << qint32(proxy.port) << proxy.user << proxy.password;
|
||||||
}
|
}
|
||||||
|
data.stream << quint32(dbiTryIPv6) << qint32(cTryIPv6());
|
||||||
|
|
||||||
TWindowPos pos(cWindowPos());
|
TWindowPos pos(cWindowPos());
|
||||||
data.stream << quint32(dbiWindowPosition) << qint32(pos.x) << qint32(pos.y) << qint32(pos.w) << qint32(pos.h) << qint32(pos.moncrc) << qint32(pos.maximized);
|
data.stream << quint32(dbiWindowPosition) << qint32(pos.x) << qint32(pos.y) << qint32(pos.w) << qint32(pos.h) << qint32(pos.moncrc) << qint32(pos.maximized);
|
||||||
|
|
|
@ -606,7 +606,7 @@ void MTPabstractTcpConnection::socketRead() {
|
||||||
}
|
}
|
||||||
|
|
||||||
MTPautoConnection::MTPautoConnection(QThread *thread) : status(WaitingBoth),
|
MTPautoConnection::MTPautoConnection(QThread *thread) : status(WaitingBoth),
|
||||||
tcpNonce(MTP::nonce<MTPint128>()), httpNonce(MTP::nonce<MTPint128>()), _tcpTimeout(MTPMinReceiveDelay) {
|
tcpNonce(MTP::nonce<MTPint128>()), httpNonce(MTP::nonce<MTPint128>()), _tcpTimeout(MTPMinReceiveDelay), _flags(0) {
|
||||||
moveToThread(thread);
|
moveToThread(thread);
|
||||||
|
|
||||||
manager.moveToThread(thread);
|
manager.moveToThread(thread);
|
||||||
|
@ -615,6 +615,7 @@ tcpNonce(MTP::nonce<MTPint128>()), httpNonce(MTP::nonce<MTPint128>()), _tcpTimeo
|
||||||
httpStartTimer.moveToThread(thread);
|
httpStartTimer.moveToThread(thread);
|
||||||
httpStartTimer.setSingleShot(true);
|
httpStartTimer.setSingleShot(true);
|
||||||
connect(&httpStartTimer, SIGNAL(timeout()), this, SLOT(onHttpStart()));
|
connect(&httpStartTimer, SIGNAL(timeout()), this, SLOT(onHttpStart()));
|
||||||
|
|
||||||
tcpTimeoutTimer.moveToThread(thread);
|
tcpTimeoutTimer.moveToThread(thread);
|
||||||
tcpTimeoutTimer.setSingleShot(true);
|
tcpTimeoutTimer.setSingleShot(true);
|
||||||
connect(&tcpTimeoutTimer, SIGNAL(timeout()), this, SLOT(onTcpTimeoutTimer()));
|
connect(&tcpTimeoutTimer, SIGNAL(timeout()), this, SLOT(onTcpTimeoutTimer()));
|
||||||
|
@ -628,7 +629,7 @@ tcpNonce(MTP::nonce<MTPint128>()), httpNonce(MTP::nonce<MTPint128>()), _tcpTimeo
|
||||||
|
|
||||||
void MTPautoConnection::onHttpStart() {
|
void MTPautoConnection::onHttpStart() {
|
||||||
if (status == HttpReady) {
|
if (status == HttpReady) {
|
||||||
DEBUG_LOG(("Connection Info: Http-transport chosen by timer"));
|
DEBUG_LOG(("Connection Info: HTTP/%1-transport chosen by timer").arg((_flags & MTPDdcOption_flag_ipv6) ? "IPv6" : "IPv4"));
|
||||||
status = UsingHttp;
|
status = UsingHttp;
|
||||||
sock.disconnectFromHost();
|
sock.disconnectFromHost();
|
||||||
emit connected();
|
emit connected();
|
||||||
|
@ -639,7 +640,7 @@ void MTPautoConnection::onSocketConnected() {
|
||||||
if (status == HttpReady || status == WaitingBoth || status == WaitingTcp) {
|
if (status == HttpReady || status == WaitingBoth || status == WaitingTcp) {
|
||||||
mtpBuffer buffer(_preparePQFake(tcpNonce));
|
mtpBuffer buffer(_preparePQFake(tcpNonce));
|
||||||
|
|
||||||
DEBUG_LOG(("Connection Info: sending fake req_pq through tcp transport"));
|
DEBUG_LOG(("Connection Info: sending fake req_pq through TCP/%1 transport").arg((_flags & MTPDdcOption_flag_ipv6) ? "IPv6" : "IPv4"));
|
||||||
|
|
||||||
if (_tcpTimeout < 0) _tcpTimeout = -_tcpTimeout;
|
if (_tcpTimeout < 0) _tcpTimeout = -_tcpTimeout;
|
||||||
tcpTimeoutTimer.start(_tcpTimeout);
|
tcpTimeoutTimer.start(_tcpTimeout);
|
||||||
|
@ -677,7 +678,7 @@ void MTPautoConnection::onSocketDisconnected() {
|
||||||
} else if (status == WaitingTcp || status == UsingTcp) {
|
} else if (status == WaitingTcp || status == UsingTcp) {
|
||||||
emit disconnected();
|
emit disconnected();
|
||||||
} else if (status == HttpReady) {
|
} else if (status == HttpReady) {
|
||||||
DEBUG_LOG(("Connection Info: Http-transport chosen by socket disconnect"));
|
DEBUG_LOG(("Connection Info: HTTP/%1-transport chosen by socket disconnect").arg((_flags & MTPDdcOption_flag_ipv6) ? "IPv6" : "IPv4"));
|
||||||
status = UsingHttp;
|
status = UsingHttp;
|
||||||
emit connected();
|
emit connected();
|
||||||
}
|
}
|
||||||
|
@ -750,19 +751,20 @@ void MTPautoConnection::connectToServer(const QString &addr, int32 port, int32 f
|
||||||
|
|
||||||
_addr = addr;
|
_addr = addr;
|
||||||
_port = port;
|
_port = port;
|
||||||
|
_flags = flags;
|
||||||
|
|
||||||
connect(&sock, SIGNAL(readyRead()), this, SLOT(socketRead()));
|
connect(&sock, SIGNAL(readyRead()), this, SLOT(socketRead()));
|
||||||
sock.connectToHost(QHostAddress(_addr), _port);
|
sock.connectToHost(QHostAddress(_addr), _port);
|
||||||
|
|
||||||
mtpBuffer buffer(_preparePQFake(httpNonce));
|
mtpBuffer buffer(_preparePQFake(httpNonce));
|
||||||
|
|
||||||
DEBUG_LOG(("Connection Info: sending fake req_pq through http transport"));
|
DEBUG_LOG(("Connection Info: sending fake req_pq through HTTP/%1 transport").arg((_flags & MTPDdcOption_flag_ipv6) ? "IPv6" : "IPv4"));
|
||||||
|
|
||||||
httpSend(buffer);
|
httpSend(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MTPautoConnection::isConnected() {
|
bool MTPautoConnection::isConnected() const {
|
||||||
return status != FinishedWork && !address.isEmpty();
|
return (status == UsingTcp) || (status == UsingHttp);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MTPautoConnection::requestFinished(QNetworkReply *reply) {
|
void MTPautoConnection::requestFinished(QNetworkReply *reply) {
|
||||||
|
@ -792,13 +794,14 @@ void MTPautoConnection::requestFinished(QNetworkReply *reply) {
|
||||||
status = HttpReady;
|
status = HttpReady;
|
||||||
httpStartTimer.start(MTPTcpConnectionWaitTimeout);
|
httpStartTimer.start(MTPTcpConnectionWaitTimeout);
|
||||||
} else {
|
} else {
|
||||||
DEBUG_LOG(("Connection Info: Http-transport chosen by pq-response, awaited"));
|
DEBUG_LOG(("Connection Info: HTTP/%1-transport chosen by pq-response, awaited").arg((_flags & MTPDdcOption_flag_ipv6) ? "IPv6" : "IPv4"));
|
||||||
status = UsingHttp;
|
status = UsingHttp;
|
||||||
sock.disconnectFromHost();
|
sock.disconnectFromHost();
|
||||||
emit connected();
|
emit connected();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception &e) {
|
} catch (Exception &e) {
|
||||||
|
DEBUG_LOG(("Connection Error: exception in parsing HTTP fake pq-responce, %1").arg(e.what()));
|
||||||
if (status == WaitingBoth) {
|
if (status == WaitingBoth) {
|
||||||
status = WaitingTcp;
|
status = WaitingTcp;
|
||||||
} else {
|
} else {
|
||||||
|
@ -834,7 +837,7 @@ void MTPautoConnection::socketPacket(mtpPrime *packet, uint32 size) {
|
||||||
status = WaitingHttp;
|
status = WaitingHttp;
|
||||||
sock.disconnectFromHost();
|
sock.disconnectFromHost();
|
||||||
} else if (status == HttpReady) {
|
} else if (status == HttpReady) {
|
||||||
DEBUG_LOG(("Connection Info: Http-transport chosen by bad tcp response, ready"));
|
DEBUG_LOG(("Connection Info: HTTP/%1-transport chosen by bad tcp response, ready").arg((_flags & MTPDdcOption_flag_ipv6) ? "IPv6" : "IPv4"));
|
||||||
status = UsingHttp;
|
status = UsingHttp;
|
||||||
sock.disconnectFromHost();
|
sock.disconnectFromHost();
|
||||||
emit connected();
|
emit connected();
|
||||||
|
@ -853,16 +856,17 @@ void MTPautoConnection::socketPacket(mtpPrime *packet, uint32 size) {
|
||||||
MTPResPQ res_pq = _readPQFakeReply(data);
|
MTPResPQ res_pq = _readPQFakeReply(data);
|
||||||
const MTPDresPQ &res_pq_data(res_pq.c_resPQ());
|
const MTPDresPQ &res_pq_data(res_pq.c_resPQ());
|
||||||
if (res_pq_data.vnonce == tcpNonce) {
|
if (res_pq_data.vnonce == tcpNonce) {
|
||||||
DEBUG_LOG(("Connection Info: Tcp-transport chosen by pq-response"));
|
DEBUG_LOG(("Connection Info: TCP/%1-transport chosen by pq-response").arg((_flags & MTPDdcOption_flag_ipv6) ? "IPv6" : "IPv4"));
|
||||||
status = UsingTcp;
|
status = UsingTcp;
|
||||||
emit connected();
|
emit connected();
|
||||||
}
|
}
|
||||||
} catch (Exception &e) {
|
} catch (Exception &e) {
|
||||||
|
DEBUG_LOG(("Connection Error: exception in parsing TCP fake pq-responce, %1").arg(e.what()));
|
||||||
if (status == WaitingBoth) {
|
if (status == WaitingBoth) {
|
||||||
status = WaitingHttp;
|
status = WaitingHttp;
|
||||||
sock.disconnectFromHost();
|
sock.disconnectFromHost();
|
||||||
} else if (status == HttpReady) {
|
} else if (status == HttpReady) {
|
||||||
DEBUG_LOG(("Connection Info: Http-transport chosen by bad tcp response, awaited"));
|
DEBUG_LOG(("Connection Info: HTTP/%1-transport chosen by bad tcp response, awaited").arg((_flags & MTPDdcOption_flag_ipv6) ? "IPv6" : "IPv4"));
|
||||||
status = UsingHttp;
|
status = UsingHttp;
|
||||||
sock.disconnectFromHost();
|
sock.disconnectFromHost();
|
||||||
emit connected();
|
emit connected();
|
||||||
|
@ -902,7 +906,7 @@ void MTPautoConnection::socketError(QAbstractSocket::SocketError e) {
|
||||||
if (status == WaitingBoth) {
|
if (status == WaitingBoth) {
|
||||||
status = WaitingHttp;
|
status = WaitingHttp;
|
||||||
} else if (status == HttpReady) {
|
} else if (status == HttpReady) {
|
||||||
DEBUG_LOG(("Connection Info: Http-transport chosen by tcp error, ready"));
|
DEBUG_LOG(("Connection Info: HTTP/%1-transport chosen by tcp error, ready").arg((_flags & MTPDdcOption_flag_ipv6) ? "IPv6" : "IPv4"));
|
||||||
status = UsingHttp;
|
status = UsingHttp;
|
||||||
emit connected();
|
emit connected();
|
||||||
} else if (status == WaitingTcp || status == UsingTcp) {
|
} else if (status == WaitingTcp || status == UsingTcp) {
|
||||||
|
@ -912,13 +916,59 @@ void MTPautoConnection::socketError(QAbstractSocket::SocketError e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MTPtcpConnection::MTPtcpConnection(QThread *thread) {
|
MTPtcpConnection::MTPtcpConnection(QThread *thread) : status(WaitingTcp),
|
||||||
|
tcpNonce(MTP::nonce<MTPint128>()), _tcpTimeout(MTPMinReceiveDelay), _flags(0) {
|
||||||
moveToThread(thread);
|
moveToThread(thread);
|
||||||
|
|
||||||
|
tcpTimeoutTimer.moveToThread(thread);
|
||||||
|
tcpTimeoutTimer.setSingleShot(true);
|
||||||
|
connect(&tcpTimeoutTimer, SIGNAL(timeout()), this, SLOT(onTcpTimeoutTimer()));
|
||||||
|
|
||||||
sock.moveToThread(thread);
|
sock.moveToThread(thread);
|
||||||
App::setProxySettings(sock);
|
App::setProxySettings(sock);
|
||||||
connect(&sock, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(socketError(QAbstractSocket::SocketError)));
|
connect(&sock, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(socketError(QAbstractSocket::SocketError)));
|
||||||
connect(&sock, SIGNAL(connected()), this, SIGNAL(connected()));
|
connect(&sock, SIGNAL(connected()), this, SLOT(onSocketConnected()));
|
||||||
connect(&sock, SIGNAL(disconnected()), this, SIGNAL(disconnected()));
|
connect(&sock, SIGNAL(disconnected()), this, SLOT(onSocketDisconnected()));
|
||||||
|
}
|
||||||
|
|
||||||
|
void MTPtcpConnection::onSocketConnected() {
|
||||||
|
if (status == WaitingTcp) {
|
||||||
|
mtpBuffer buffer(_preparePQFake(tcpNonce));
|
||||||
|
|
||||||
|
DEBUG_LOG(("Connection Info: sending fake req_pq through TCP/%1 transport").arg((_flags & MTPDdcOption_flag_ipv6) ? "IPv6" : "IPv4"));
|
||||||
|
|
||||||
|
if (_tcpTimeout < 0) _tcpTimeout = -_tcpTimeout;
|
||||||
|
tcpTimeoutTimer.start(_tcpTimeout);
|
||||||
|
|
||||||
|
sendData(buffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MTPtcpConnection::onTcpTimeoutTimer() {
|
||||||
|
if (status == WaitingTcp) {
|
||||||
|
if (_tcpTimeout < MTPMaxReceiveDelay) _tcpTimeout *= 2;
|
||||||
|
_tcpTimeout = -_tcpTimeout;
|
||||||
|
|
||||||
|
QAbstractSocket::SocketState state = sock.state();
|
||||||
|
if (state == QAbstractSocket::ConnectedState || state == QAbstractSocket::ConnectingState || state == QAbstractSocket::HostLookupState) {
|
||||||
|
sock.disconnectFromHost();
|
||||||
|
} else if (state != QAbstractSocket::ClosingState) {
|
||||||
|
sock.connectToHost(QHostAddress(_addr), _port);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MTPtcpConnection::onSocketDisconnected() {
|
||||||
|
if (_tcpTimeout < 0) {
|
||||||
|
_tcpTimeout = -_tcpTimeout;
|
||||||
|
if (status == WaitingTcp) {
|
||||||
|
sock.connectToHost(QHostAddress(_addr), _port);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (status == WaitingTcp || status == UsingTcp) {
|
||||||
|
emit disconnected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MTPtcpConnection::sendData(mtpBuffer &buffer) {
|
void MTPtcpConnection::sendData(mtpBuffer &buffer) {
|
||||||
|
@ -945,23 +995,43 @@ void MTPtcpConnection::disconnectFromServer() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void MTPtcpConnection::connectToServer(const QString &addr, int32 port, int32 flags) {
|
void MTPtcpConnection::connectToServer(const QString &addr, int32 port, int32 flags) {
|
||||||
|
_addr = addr;
|
||||||
|
_port = port;
|
||||||
|
_flags = flags;
|
||||||
|
|
||||||
connect(&sock, SIGNAL(readyRead()), this, SLOT(socketRead()));
|
connect(&sock, SIGNAL(readyRead()), this, SLOT(socketRead()));
|
||||||
sock.connectToHost(QHostAddress(addr), port);
|
sock.connectToHost(QHostAddress(_addr), _port);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MTPtcpConnection::socketPacket(mtpPrime *packet, uint32 size) {
|
void MTPtcpConnection::socketPacket(mtpPrime *packet, uint32 size) {
|
||||||
|
if (status == FinishedWork) return;
|
||||||
|
|
||||||
mtpBuffer data = _handleTcpResponse(packet, size);
|
mtpBuffer data = _handleTcpResponse(packet, size);
|
||||||
if (data.size() == 1) {
|
if (data.size() == 1) {
|
||||||
bool mayBeBadKey = (data[0] == -404) && _sentEncrypted;
|
bool mayBeBadKey = (data[0] == -404) && _sentEncrypted;
|
||||||
emit error(mayBeBadKey);
|
emit error(mayBeBadKey);
|
||||||
|
} else if (status == UsingTcp) {
|
||||||
|
receivedQueue.push_back(data);
|
||||||
|
emit receivedData();
|
||||||
|
} else if (status == WaitingTcp) {
|
||||||
|
tcpTimeoutTimer.stop();
|
||||||
|
try {
|
||||||
|
MTPResPQ res_pq = _readPQFakeReply(data);
|
||||||
|
const MTPDresPQ &res_pq_data(res_pq.c_resPQ());
|
||||||
|
if (res_pq_data.vnonce == tcpNonce) {
|
||||||
|
DEBUG_LOG(("Connection Info: TCP/%1-transport chosen by pq-response").arg((_flags & MTPDdcOption_flag_ipv6) ? "IPv6" : "IPv4"));
|
||||||
|
status = UsingTcp;
|
||||||
|
emit connected();
|
||||||
|
}
|
||||||
|
} catch (Exception &e) {
|
||||||
|
DEBUG_LOG(("Connection Error: exception in parsing TCP fake pq-responce, %1").arg(e.what()));
|
||||||
|
emit error();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
receivedQueue.push_back(data);
|
|
||||||
emit receivedData();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MTPtcpConnection::isConnected() {
|
bool MTPtcpConnection::isConnected() const {
|
||||||
return sock.state() == QAbstractSocket::ConnectedState;
|
return (status == UsingTcp);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 MTPtcpConnection::debugState() const {
|
int32 MTPtcpConnection::debugState() const {
|
||||||
|
@ -969,7 +1039,7 @@ int32 MTPtcpConnection::debugState() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
QString MTPtcpConnection::transport() const {
|
QString MTPtcpConnection::transport() const {
|
||||||
return qsl("TCP");
|
return isConnected() ? qsl("TCP") : QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MTPtcpConnection::socketError(QAbstractSocket::SocketError e) {
|
void MTPtcpConnection::socketError(QAbstractSocket::SocketError e) {
|
||||||
|
@ -977,7 +1047,7 @@ void MTPtcpConnection::socketError(QAbstractSocket::SocketError e) {
|
||||||
emit error();
|
emit error();
|
||||||
}
|
}
|
||||||
|
|
||||||
MTPhttpConnection::MTPhttpConnection(QThread *thread) {
|
MTPhttpConnection::MTPhttpConnection(QThread *thread) : status(WaitingHttp), httpNonce(MTP::nonce<MTPint128>()), _flags(0) {
|
||||||
moveToThread(thread);
|
moveToThread(thread);
|
||||||
manager.moveToThread(thread);
|
manager.moveToThread(thread);
|
||||||
App::setProxySettings(manager);
|
App::setProxySettings(manager);
|
||||||
|
@ -1018,14 +1088,23 @@ void MTPhttpConnection::connectToServer(const QString &addr, int32 p, int32 flag
|
||||||
address = QUrl(((flags & MTPDdcOption_flag_ipv6) ? qsl("http://[%1]:%2/api") : qsl("http://%1:%2/api")).arg(addr).arg(80));//not p - always 80 port for http transport
|
address = QUrl(((flags & MTPDdcOption_flag_ipv6) ? qsl("http://[%1]:%2/api") : qsl("http://%1:%2/api")).arg(addr).arg(80));//not p - always 80 port for http transport
|
||||||
TCP_LOG(("HTTP Info: address is %1").arg(address.toDisplayString()));
|
TCP_LOG(("HTTP Info: address is %1").arg(address.toDisplayString()));
|
||||||
connect(&manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(requestFinished(QNetworkReply*)));
|
connect(&manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(requestFinished(QNetworkReply*)));
|
||||||
emit connected();
|
|
||||||
|
_flags = flags;
|
||||||
|
|
||||||
|
mtpBuffer buffer(_preparePQFake(httpNonce));
|
||||||
|
|
||||||
|
DEBUG_LOG(("Connection Info: sending fake req_pq through HTTP/%1 transport").arg((flags & MTPDdcOption_flag_ipv6) ? "IPv6" : "IPv4"));
|
||||||
|
|
||||||
|
sendData(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MTPhttpConnection::isConnected() {
|
bool MTPhttpConnection::isConnected() const {
|
||||||
return !address.isEmpty();
|
return (status == UsingHttp);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MTPhttpConnection::requestFinished(QNetworkReply *reply) {
|
void MTPhttpConnection::requestFinished(QNetworkReply *reply) {
|
||||||
|
if (status == FinishedWork) return;
|
||||||
|
|
||||||
reply->deleteLater();
|
reply->deleteLater();
|
||||||
if (reply->error() == QNetworkReply::NoError) {
|
if (reply->error() == QNetworkReply::NoError) {
|
||||||
requests.remove(reply);
|
requests.remove(reply);
|
||||||
|
@ -1034,8 +1113,23 @@ void MTPhttpConnection::requestFinished(QNetworkReply *reply) {
|
||||||
if (data.size() == 1) {
|
if (data.size() == 1) {
|
||||||
emit error();
|
emit error();
|
||||||
} else if (!data.isEmpty()) {
|
} else if (!data.isEmpty()) {
|
||||||
receivedQueue.push_back(data);
|
if (status == UsingHttp) {
|
||||||
emit receivedData();
|
receivedQueue.push_back(data);
|
||||||
|
emit receivedData();
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
MTPResPQ res_pq = _readPQFakeReply(data);
|
||||||
|
const MTPDresPQ &res_pq_data(res_pq.c_resPQ());
|
||||||
|
if (res_pq_data.vnonce == httpNonce) {
|
||||||
|
DEBUG_LOG(("Connection Info: HTTP/%1-transport connected by pq-response").arg((_flags & MTPDdcOption_flag_ipv6) ? "IPv6" : "IPv4"));
|
||||||
|
status = UsingHttp;
|
||||||
|
emit connected();
|
||||||
|
}
|
||||||
|
} catch (Exception &e) {
|
||||||
|
DEBUG_LOG(("Connection Error: exception in parsing HTTP fake pq-responce, %1").arg(e.what()));
|
||||||
|
emit error();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!requests.remove(reply)) {
|
if (!requests.remove(reply)) {
|
||||||
|
@ -1061,12 +1155,17 @@ int32 MTPhttpConnection::debugState() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
QString MTPhttpConnection::transport() const {
|
QString MTPhttpConnection::transport() const {
|
||||||
return qsl("HTTP");
|
if (status == UsingHttp) {
|
||||||
|
return qsl("HTTP");
|
||||||
|
} else {
|
||||||
|
return QString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MTProtoConnectionPrivate::createConn(bool createIPv4, bool createIPv6) {
|
void MTProtoConnectionPrivate::createConn(bool createIPv4, bool createIPv6) {
|
||||||
destroyConn();
|
destroyConn();
|
||||||
if (createIPv4) {
|
if (createIPv4) {
|
||||||
|
QWriteLocker lock(&stateConnMutex);
|
||||||
if (cConnectionType() == dbictAuto) {
|
if (cConnectionType() == dbictAuto) {
|
||||||
_conn4 = new MTPautoConnection(thread());
|
_conn4 = new MTPautoConnection(thread());
|
||||||
} else if (cConnectionType() == dbictTcpProxy) {
|
} else if (cConnectionType() == dbictTcpProxy) {
|
||||||
|
@ -1078,6 +1177,7 @@ void MTProtoConnectionPrivate::createConn(bool createIPv4, bool createIPv6) {
|
||||||
connect(_conn4, SIGNAL(receivedSome()), this, SLOT(onReceivedSome()));
|
connect(_conn4, SIGNAL(receivedSome()), this, SLOT(onReceivedSome()));
|
||||||
}
|
}
|
||||||
if (createIPv6) {
|
if (createIPv6) {
|
||||||
|
QWriteLocker lock(&stateConnMutex);
|
||||||
if (cConnectionType() == dbictAuto) {
|
if (cConnectionType() == dbictAuto) {
|
||||||
_conn6 = new MTPautoConnection(thread());
|
_conn6 = new MTPautoConnection(thread());
|
||||||
} else if (cConnectionType() == dbictTcpProxy) {
|
} else if (cConnectionType() == dbictTcpProxy) {
|
||||||
|
@ -1098,6 +1198,7 @@ void MTProtoConnectionPrivate::createConn(bool createIPv4, bool createIPv6) {
|
||||||
|
|
||||||
void MTProtoConnectionPrivate::destroyConn(MTPabstractConnection **conn) {
|
void MTProtoConnectionPrivate::destroyConn(MTPabstractConnection **conn) {
|
||||||
if (conn) {
|
if (conn) {
|
||||||
|
QWriteLocker lock(&stateConnMutex);
|
||||||
if (*conn) {
|
if (*conn) {
|
||||||
disconnect(*conn, SIGNAL(disconnected()), 0, 0);
|
disconnect(*conn, SIGNAL(disconnected()), 0, 0);
|
||||||
disconnect(*conn, SIGNAL(receivedData()), 0, 0);
|
disconnect(*conn, SIGNAL(receivedData()), 0, 0);
|
||||||
|
@ -1200,7 +1301,7 @@ int32 MTProtoConnectionPrivate::getDC() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 MTProtoConnectionPrivate::getState() const {
|
int32 MTProtoConnectionPrivate::getState() const {
|
||||||
QReadLocker lock(&stateMutex);
|
QReadLocker lock(&stateConnMutex);
|
||||||
int32 result = _state;
|
int32 result = _state;
|
||||||
if (_state < 0) {
|
if (_state < 0) {
|
||||||
if (retryTimer.isActive()) {
|
if (retryTimer.isActive()) {
|
||||||
|
@ -1214,18 +1315,21 @@ int32 MTProtoConnectionPrivate::getState() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
QString MTProtoConnectionPrivate::transport() const {
|
QString MTProtoConnectionPrivate::transport() const {
|
||||||
if ((!_conn4 && !_conn6) || _state < 0) {
|
QReadLocker lock(&stateConnMutex);
|
||||||
|
if ((!_conn4 && !_conn6) || (_conn4 && _conn6) || (_state < 0)) {
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
return (_conn4 ? _conn4 : _conn6)->transport();
|
QString result = (_conn4 ? _conn4 : _conn6)->transport();
|
||||||
|
if (!result.isEmpty() && cTryIPv6()) result += (_conn4 ? "/IPv4" : "/IPv6");
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MTProtoConnectionPrivate::setState(int32 state, int32 ifState) {
|
bool MTProtoConnectionPrivate::setState(int32 state, int32 ifState) {
|
||||||
if (ifState != MTProtoConnection::UpdateAlways) {
|
if (ifState != MTProtoConnection::UpdateAlways) {
|
||||||
QReadLocker lock(&stateMutex);
|
QReadLocker lock(&stateConnMutex);
|
||||||
if (_state != ifState) return false;
|
if (_state != ifState) return false;
|
||||||
}
|
}
|
||||||
QWriteLocker lock(&stateMutex);
|
QWriteLocker lock(&stateConnMutex);
|
||||||
if (_state == state) return false;
|
if (_state == state) return false;
|
||||||
_state = state;
|
_state = state;
|
||||||
if (state < 0) {
|
if (state < 0) {
|
||||||
|
@ -1784,15 +1888,15 @@ void MTProtoConnectionPrivate::socketStart(bool afterConfig) {
|
||||||
port6 = dcIndex6->port;
|
port6 = dcIndex6->port;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool noIPv4 = (!port4 || ip4.empty()), noIPv6 = (!port6 || ip6.empty());
|
bool noIPv4 = (!port4 || ip4.empty()), noIPv6 = (!cTryIPv6() || !port6 || ip6.empty());
|
||||||
if (noIPv4 && noIPv6) {
|
if (noIPv4 && noIPv6) {
|
||||||
if (afterConfig) {
|
if (afterConfig) {
|
||||||
if (noIPv4) LOG(("MTP Error: DC %1 options for IPv4 not found right after config load!").arg(dc));
|
if (noIPv4) LOG(("MTP Error: DC %1 options for IPv4 not found right after config load!").arg(dc));
|
||||||
if (noIPv6) LOG(("MTP Error: DC %1 options for IPv6 not found right after config load!").arg(dc));
|
if (cTryIPv6() && noIPv6) LOG(("MTP Error: DC %1 options for IPv6 not found right after config load!").arg(dc));
|
||||||
return restart();
|
return restart();
|
||||||
}
|
}
|
||||||
if (noIPv4) DEBUG_LOG(("MTP Info: DC %1 options for IPv4 not found, waiting for config").arg(dc));
|
if (noIPv4) DEBUG_LOG(("MTP Info: DC %1 options for IPv4 not found, waiting for config").arg(dc));
|
||||||
if (noIPv6) DEBUG_LOG(("MTP Info: DC %1 options for IPv6 not found, waiting for config").arg(dc));
|
if (cTryIPv6() && noIPv6) DEBUG_LOG(("MTP Info: DC %1 options for IPv6 not found, waiting for config").arg(dc));
|
||||||
connect(mtpConfigLoader(), SIGNAL(loaded()), this, SLOT(onConfigLoaded()));
|
connect(mtpConfigLoader(), SIGNAL(loaded()), this, SLOT(onConfigLoaded()));
|
||||||
mtpConfigLoader()->load();
|
mtpConfigLoader()->load();
|
||||||
return;
|
return;
|
||||||
|
@ -1800,7 +1904,7 @@ void MTProtoConnectionPrivate::socketStart(bool afterConfig) {
|
||||||
|
|
||||||
if (afterConfig && (_conn4 || _conn6)) return;
|
if (afterConfig && (_conn4 || _conn6)) return;
|
||||||
|
|
||||||
createConn(!noIPv4, false/*!noIPv6*/);
|
createConn(!noIPv4, !noIPv6);
|
||||||
retryTimer.stop();
|
retryTimer.stop();
|
||||||
_waitForConnectedTimer.stop();
|
_waitForConnectedTimer.stop();
|
||||||
|
|
||||||
|
@ -3479,7 +3583,7 @@ void MTProtoConnectionPrivate::sendRequestNotSecure(const TRequest &request) {
|
||||||
|
|
||||||
onSentSome(buffer.size() * sizeof(mtpPrime));
|
onSentSome(buffer.size() * sizeof(mtpPrime));
|
||||||
|
|
||||||
} catch(Exception &e) {
|
} catch (Exception &e) {
|
||||||
return restart();
|
return restart();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3516,7 +3620,7 @@ bool MTProtoConnectionPrivate::readResponseNotSecure(TResponse &response) {
|
||||||
}
|
}
|
||||||
const mtpPrime *from(answer + 5), *end(from + len - 5);
|
const mtpPrime *from(answer + 5), *end(from + len - 5);
|
||||||
response.read(from, end);
|
response.read(from, end);
|
||||||
} catch(Exception &e) {
|
} catch (Exception &e) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -141,7 +141,7 @@ public:
|
||||||
virtual void sendData(mtpBuffer &buffer) = 0; // has size + 3, buffer[0] = len, buffer[1] = packetnum, buffer[last] = crc32
|
virtual void sendData(mtpBuffer &buffer) = 0; // has size + 3, buffer[0] = len, buffer[1] = packetnum, buffer[last] = crc32
|
||||||
virtual void disconnectFromServer() = 0;
|
virtual void disconnectFromServer() = 0;
|
||||||
virtual void connectToServer(const QString &addr, int32 port, int32 flags) = 0;
|
virtual void connectToServer(const QString &addr, int32 port, int32 flags) = 0;
|
||||||
virtual bool isConnected() = 0;
|
virtual bool isConnected() const = 0;
|
||||||
virtual bool usingHttpWait() {
|
virtual bool usingHttpWait() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -209,7 +209,7 @@ public:
|
||||||
void sendData(mtpBuffer &buffer);
|
void sendData(mtpBuffer &buffer);
|
||||||
void disconnectFromServer();
|
void disconnectFromServer();
|
||||||
void connectToServer(const QString &addr, int32 port, int32 flags);
|
void connectToServer(const QString &addr, int32 port, int32 flags);
|
||||||
bool isConnected();
|
bool isConnected() const;
|
||||||
bool usingHttpWait();
|
bool usingHttpWait();
|
||||||
bool needHttpWait();
|
bool needHttpWait();
|
||||||
|
|
||||||
|
@ -256,7 +256,7 @@ private:
|
||||||
Requests requests;
|
Requests requests;
|
||||||
|
|
||||||
QString _addr;
|
QString _addr;
|
||||||
int32 _port, _tcpTimeout;
|
int32 _port, _tcpTimeout, _flags;
|
||||||
QTimer tcpTimeoutTimer;
|
QTimer tcpTimeoutTimer;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -271,7 +271,7 @@ public:
|
||||||
void sendData(mtpBuffer &buffer);
|
void sendData(mtpBuffer &buffer);
|
||||||
void disconnectFromServer();
|
void disconnectFromServer();
|
||||||
void connectToServer(const QString &addr, int32 port, int32 flags);
|
void connectToServer(const QString &addr, int32 port, int32 flags);
|
||||||
bool isConnected();
|
bool isConnected() const;
|
||||||
|
|
||||||
int32 debugState() const;
|
int32 debugState() const;
|
||||||
|
|
||||||
|
@ -281,10 +281,29 @@ public slots:
|
||||||
|
|
||||||
void socketError(QAbstractSocket::SocketError e);
|
void socketError(QAbstractSocket::SocketError e);
|
||||||
|
|
||||||
|
void onSocketConnected();
|
||||||
|
void onSocketDisconnected();
|
||||||
|
|
||||||
|
void onTcpTimeoutTimer();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
void socketPacket(mtpPrime *packet, uint32 packetSize);
|
void socketPacket(mtpPrime *packet, uint32 packetSize);
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
enum Status {
|
||||||
|
WaitingTcp = 0,
|
||||||
|
UsingTcp,
|
||||||
|
FinishedWork
|
||||||
|
};
|
||||||
|
Status status;
|
||||||
|
MTPint128 tcpNonce;
|
||||||
|
|
||||||
|
QString _addr;
|
||||||
|
int32 _port, _tcpTimeout, _flags;
|
||||||
|
QTimer tcpTimeoutTimer;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class MTPhttpConnection : public MTPabstractConnection {
|
class MTPhttpConnection : public MTPabstractConnection {
|
||||||
|
@ -297,7 +316,7 @@ public:
|
||||||
void sendData(mtpBuffer &buffer);
|
void sendData(mtpBuffer &buffer);
|
||||||
void disconnectFromServer();
|
void disconnectFromServer();
|
||||||
void connectToServer(const QString &addr, int32 port, int32 flags);
|
void connectToServer(const QString &addr, int32 port, int32 flags);
|
||||||
bool isConnected();
|
bool isConnected() const;
|
||||||
bool usingHttpWait();
|
bool usingHttpWait();
|
||||||
bool needHttpWait();
|
bool needHttpWait();
|
||||||
|
|
||||||
|
@ -311,6 +330,15 @@ public slots:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
enum Status {
|
||||||
|
WaitingHttp = 0,
|
||||||
|
UsingHttp,
|
||||||
|
FinishedWork
|
||||||
|
};
|
||||||
|
Status status;
|
||||||
|
MTPint128 httpNonce;
|
||||||
|
int32 _flags;
|
||||||
|
|
||||||
QNetworkAccessManager manager;
|
QNetworkAccessManager manager;
|
||||||
QUrl address;
|
QUrl address;
|
||||||
|
|
||||||
|
@ -414,7 +442,7 @@ private:
|
||||||
void clearMessages();
|
void clearMessages();
|
||||||
|
|
||||||
bool setState(int32 state, int32 ifState = MTProtoConnection::UpdateAlways);
|
bool setState(int32 state, int32 ifState = MTProtoConnection::UpdateAlways);
|
||||||
mutable QReadWriteLock stateMutex;
|
mutable QReadWriteLock stateConnMutex;
|
||||||
int32 _state;
|
int32 _state;
|
||||||
|
|
||||||
bool _needSessionReset;
|
bool _needSessionReset;
|
||||||
|
|
|
@ -52,6 +52,11 @@ bool gSupportTray = true;
|
||||||
DBIWorkMode gWorkMode = dbiwmWindowAndTray;
|
DBIWorkMode gWorkMode = dbiwmWindowAndTray;
|
||||||
DBIConnectionType gConnectionType = dbictAuto;
|
DBIConnectionType gConnectionType = dbictAuto;
|
||||||
ConnectionProxy gConnectionProxy;
|
ConnectionProxy gConnectionProxy;
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
bool gTryIPv6 = false;
|
||||||
|
#else
|
||||||
|
bool gTryIPv6 = true;
|
||||||
|
#endif
|
||||||
bool gSeenTrayTooltip = false;
|
bool gSeenTrayTooltip = false;
|
||||||
bool gRestartingUpdate = false, gRestarting = false, gRestartingToSettings = false, gWriteProtected = false;
|
bool gRestartingUpdate = false, gRestarting = false, gRestartingToSettings = false, gWriteProtected = false;
|
||||||
int32 gLastUpdateCheck = 0;
|
int32 gLastUpdateCheck = 0;
|
||||||
|
|
|
@ -109,6 +109,7 @@ DeclareSetting(TWindowPos, WindowPos);
|
||||||
DeclareSetting(bool, SupportTray);
|
DeclareSetting(bool, SupportTray);
|
||||||
DeclareSetting(DBIWorkMode, WorkMode);
|
DeclareSetting(DBIWorkMode, WorkMode);
|
||||||
DeclareSetting(DBIConnectionType, ConnectionType);
|
DeclareSetting(DBIConnectionType, ConnectionType);
|
||||||
|
DeclareSetting(bool, TryIPv6);
|
||||||
DeclareSetting(DBIDefaultAttach, DefaultAttach);
|
DeclareSetting(DBIDefaultAttach, DefaultAttach);
|
||||||
DeclareSetting(ConnectionProxy, ConnectionProxy);
|
DeclareSetting(ConnectionProxy, ConnectionProxy);
|
||||||
DeclareSetting(bool, SeenTrayTooltip);
|
DeclareSetting(bool, SeenTrayTooltip);
|
||||||
|
|
|
@ -182,7 +182,7 @@ SettingsInner::SettingsInner(SettingsWidget *parent) : QWidget(parent),
|
||||||
_passwordEdit(this, lang(lng_cloud_password_set)),
|
_passwordEdit(this, lang(lng_cloud_password_set)),
|
||||||
_passwordTurnOff(this, lang(lng_passcode_turn_off)),
|
_passwordTurnOff(this, lang(lng_passcode_turn_off)),
|
||||||
_hasPasswordRecovery(false),
|
_hasPasswordRecovery(false),
|
||||||
_connectionType(this, lng_connection_auto(lt_type, QString())),
|
_connectionType(this, lang(lng_connection_auto_connecting)),
|
||||||
_connectionTypeText(lang(lng_connection_type) + ' '),
|
_connectionTypeText(lang(lng_connection_type) + ' '),
|
||||||
_connectionTypeWidth(st::linkFont->m.width(_connectionTypeText)),
|
_connectionTypeWidth(st::linkFont->m.width(_connectionTypeText)),
|
||||||
_showSessions(this, lang(lng_settings_show_sessions)),
|
_showSessions(this, lang(lng_settings_show_sessions)),
|
||||||
|
@ -820,18 +820,19 @@ void SettingsInner::updateOnlineDisplay() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsInner::updateConnectionType() {
|
void SettingsInner::updateConnectionType() {
|
||||||
|
QString connection;
|
||||||
switch (cConnectionType()) {
|
switch (cConnectionType()) {
|
||||||
case dbictAuto: {
|
case dbictAuto: {
|
||||||
QString transport = MTP::dctransport();
|
QString transport = MTP::dctransport();
|
||||||
if (transport.isEmpty()) {
|
connection = transport.isEmpty() ? lang(lng_connection_auto_connecting) : lng_connection_auto(lt_transport, transport);
|
||||||
_connectionType.setText(lang(lng_connection_auto_connecting));
|
} break;
|
||||||
} else {
|
case dbictHttpProxy:
|
||||||
_connectionType.setText(lng_connection_auto(lt_type, transport));
|
case dbictTcpProxy: {
|
||||||
}
|
QString transport = MTP::dctransport();
|
||||||
|
connection = transport.isEmpty() ? lang(lng_connection_proxy_connecting) : lng_connection_proxy(lt_transport, transport);
|
||||||
} break;
|
} break;
|
||||||
case dbictHttpProxy: _connectionType.setText(lang(lng_connection_http_proxy)); break;
|
|
||||||
case dbictTcpProxy: _connectionType.setText(lang(lng_connection_tcp_proxy)); break;
|
|
||||||
}
|
}
|
||||||
|
_connectionType.setText(connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsInner::passcodeChanged() {
|
void SettingsInner::passcodeChanged() {
|
||||||
|
|
|
@ -247,7 +247,7 @@ enum DataBlockId {
|
||||||
dbiLastUpdateCheck = 0x0d,
|
dbiLastUpdateCheck = 0x0d,
|
||||||
dbiWindowPosition = 0x0e,
|
dbiWindowPosition = 0x0e,
|
||||||
dbiConnectionType = 0x0f,
|
dbiConnectionType = 0x0f,
|
||||||
// 16 reserved
|
// 0x10 reserved
|
||||||
dbiDefaultAttach = 0x11,
|
dbiDefaultAttach = 0x11,
|
||||||
dbiCatsAndDogs = 0x12,
|
dbiCatsAndDogs = 0x12,
|
||||||
dbiReplaceEmojis = 0x13,
|
dbiReplaceEmojis = 0x13,
|
||||||
|
@ -258,7 +258,7 @@ enum DataBlockId {
|
||||||
dbiRecentEmojisOld = 0x18,
|
dbiRecentEmojisOld = 0x18,
|
||||||
dbiLoggedPhoneNumber = 0x19,
|
dbiLoggedPhoneNumber = 0x19,
|
||||||
dbiMutedPeers = 0x1a,
|
dbiMutedPeers = 0x1a,
|
||||||
// 27 reserved
|
// 0x1b reserved
|
||||||
dbiNotifyView = 0x1c,
|
dbiNotifyView = 0x1c,
|
||||||
dbiSendToMenu = 0x1d,
|
dbiSendToMenu = 0x1d,
|
||||||
dbiCompressPastedImage = 0x1e,
|
dbiCompressPastedImage = 0x1e,
|
||||||
|
@ -271,6 +271,7 @@ enum DataBlockId {
|
||||||
dbiEmojiVariants = 0x25,
|
dbiEmojiVariants = 0x25,
|
||||||
dbiRecentStickers = 0x26,
|
dbiRecentStickers = 0x26,
|
||||||
dbiDcOption = 0x27,
|
dbiDcOption = 0x27,
|
||||||
|
dbiTryIPv6 = 0x28,
|
||||||
|
|
||||||
dbiEncryptedWithSalt = 333,
|
dbiEncryptedWithSalt = 333,
|
||||||
dbiEncrypted = 444,
|
dbiEncrypted = 444,
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>0.8.32</string>
|
<string>0.8.33</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
|
|
Binary file not shown.
|
@ -1701,7 +1701,7 @@
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
CURRENT_PROJECT_VERSION = 0.8.32;
|
CURRENT_PROJECT_VERSION = 0.8.33;
|
||||||
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;
|
||||||
|
@ -1719,7 +1719,7 @@
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
COPY_PHASE_STRIP = YES;
|
COPY_PHASE_STRIP = YES;
|
||||||
CURRENT_PROJECT_VERSION = 0.8.32;
|
CURRENT_PROJECT_VERSION = 0.8.33;
|
||||||
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;
|
||||||
|
@ -1745,10 +1745,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.8.32;
|
CURRENT_PROJECT_VERSION = 0.8.33;
|
||||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
DYLIB_COMPATIBILITY_VERSION = 0.8;
|
DYLIB_COMPATIBILITY_VERSION = 0.8;
|
||||||
DYLIB_CURRENT_VERSION = 0.8.32;
|
DYLIB_CURRENT_VERSION = 0.8.33;
|
||||||
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;
|
||||||
|
@ -1888,10 +1888,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.8.32;
|
CURRENT_PROJECT_VERSION = 0.8.33;
|
||||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
DYLIB_COMPATIBILITY_VERSION = 0.8;
|
DYLIB_COMPATIBILITY_VERSION = 0.8;
|
||||||
DYLIB_CURRENT_VERSION = 0.8.32;
|
DYLIB_CURRENT_VERSION = 0.8.33;
|
||||||
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;
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
echo 8032 0.8.32 0
|
echo 0.8 8033 0.8.33 1
|
||||||
# AppVersion AppVersionStr DevChannel
|
# AppVersionStrMajor AppVersion AppVersionStr DevChannel
|
||||||
|
|
Loading…
Reference in New Issue