mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix build on macOS.
This commit is contained in:
parent
0e90092d59
commit
bcfbdcd6ed
6 changed files with 13 additions and 13 deletions
|
@ -422,7 +422,7 @@ void PreloadSticker(const std::shared_ptr<Data::DocumentMedia> &media) {
|
||||||
}
|
}
|
||||||
const auto width = st::premiumVideoWidth;
|
const auto width = st::premiumVideoWidth;
|
||||||
const auto height = state->blurred.height()
|
const auto height = state->blurred.height()
|
||||||
? state->blurred.height()
|
? (state->blurred.height() / state->blurred.devicePixelRatio())
|
||||||
: width;
|
: width;
|
||||||
const auto left = (st::boxWideWidth - width) / 2;
|
const auto left = (st::boxWideWidth - width) / 2;
|
||||||
const auto top = st::premiumPreviewHeight - height;
|
const auto top = st::premiumPreviewHeight - height;
|
||||||
|
|
|
@ -373,16 +373,16 @@ bool PeerMatchesTypes(
|
||||||
return (types & PeerType::Group);
|
return (types & PeerType::Group);
|
||||||
}
|
}
|
||||||
|
|
||||||
PeerTypes ParseChooseTypes(const QString &choose) {
|
PeerTypes ParseChooseTypes(QStringView choose) {
|
||||||
auto result = PeerTypes();
|
auto result = PeerTypes();
|
||||||
for (const auto &entry : choose.split(QChar(' '))) {
|
for (const auto &entry : choose.split(QChar(' '))) {
|
||||||
if (entry == "users") {
|
if (entry == u"users"_q) {
|
||||||
result |= PeerType::User;
|
result |= PeerType::User;
|
||||||
} else if (entry == "bots") {
|
} else if (entry == u"bots"_q) {
|
||||||
result |= PeerType::Bot;
|
result |= PeerType::Bot;
|
||||||
} else if (entry == "groups") {
|
} else if (entry == u"groups"_q) {
|
||||||
result |= PeerType::Group;
|
result |= PeerType::Group;
|
||||||
} else if (entry == "channels") {
|
} else if (entry == u"channels"_q) {
|
||||||
result |= PeerType::Broadcast;
|
result |= PeerType::Broadcast;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ using PeerTypes = base::flags<PeerType>;
|
||||||
not_null<PeerData*> peer,
|
not_null<PeerData*> peer,
|
||||||
not_null<UserData*> bot,
|
not_null<UserData*> bot,
|
||||||
PeerTypes types);
|
PeerTypes types);
|
||||||
[[nodiscard]] PeerTypes ParseChooseTypes(const QString &choose);
|
[[nodiscard]] PeerTypes ParseChooseTypes(QStringView choose);
|
||||||
|
|
||||||
struct AttachWebViewBot {
|
struct AttachWebViewBot {
|
||||||
not_null<UserData*> user;
|
not_null<UserData*> user;
|
||||||
|
|
|
@ -843,7 +843,7 @@ void SessionController::setupPremiumToast() {
|
||||||
Ui::Toast::Show(
|
Ui::Toast::Show(
|
||||||
Window::Show(this).toastParent(),
|
Window::Show(this).toastParent(),
|
||||||
{
|
{
|
||||||
.text = tr::lng_premium_success(tr::now),
|
.text = { tr::lng_premium_success(tr::now) },
|
||||||
.st = &st::defaultToast,
|
.st = &st::defaultToast,
|
||||||
});
|
});
|
||||||
}, _lifetime);
|
}, _lifetime);
|
||||||
|
|
|
@ -106,7 +106,7 @@ if building:
|
||||||
finish(1, 'Adding tdesktop to archive.')
|
finish(1, 'Adding tdesktop to archive.')
|
||||||
|
|
||||||
print('Beginning notarization process.')
|
print('Beginning notarization process.')
|
||||||
lines = subprocess.check_output('xcrun altool --notarize-app --primary-bundle-id "com.tdesktop.TelegramDebug" --username "' + username + '" --password "@keychain:AC_PASSWORD" --file "' + archive + '"', stderr=subprocess.STDOUT, shell=True)
|
lines = subprocess.check_output('xcrun altool --notarize-app --primary-bundle-id "com.tdesktop.TelegramDebug" --username "' + username + '" --password "@keychain:AC_PASSWORD" --file "' + archive + '"', stderr=subprocess.STDOUT, shell=True).decode('utf-8')
|
||||||
print('Response received.')
|
print('Response received.')
|
||||||
uuid = ''
|
uuid = ''
|
||||||
for line in lines.split('\n'):
|
for line in lines.split('\n'):
|
||||||
|
@ -124,7 +124,7 @@ if building:
|
||||||
while requestStatus == '':
|
while requestStatus == '':
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
print('Checking...')
|
print('Checking...')
|
||||||
lines = subprocess.check_output('xcrun altool --notarization-info "' + uuid + '" --username "' + username + '" --password "@keychain:AC_PASSWORD"', stderr=subprocess.STDOUT, shell=True)
|
lines = subprocess.check_output('xcrun altool --notarization-info "' + uuid + '" --username "' + username + '" --password "@keychain:AC_PASSWORD"', stderr=subprocess.STDOUT, shell=True).decode('utf-8')
|
||||||
statusFound = False
|
statusFound = False
|
||||||
for line in lines.split('\n'):
|
for line in lines.split('\n'):
|
||||||
parts = line.strip().split(' ')
|
parts = line.strip().split(' ')
|
||||||
|
@ -152,7 +152,7 @@ if building:
|
||||||
logLines = ''
|
logLines = ''
|
||||||
if logUrl != '':
|
if logUrl != '':
|
||||||
print('Requesting log...')
|
print('Requesting log...')
|
||||||
logLines = subprocess.check_output('curl ' + logUrl, shell=True)
|
logLines = subprocess.check_output('curl ' + logUrl, shell=True).decode('utf-8')
|
||||||
result = subprocess.call('xcrun stapler staple Telegram.app', shell=True)
|
result = subprocess.call('xcrun stapler staple Telegram.app', shell=True)
|
||||||
if result != 0:
|
if result != 0:
|
||||||
finish(1, 'Error calling stapler')
|
finish(1, 'Error calling stapler')
|
||||||
|
@ -203,7 +203,7 @@ if composing:
|
||||||
if not re.match(r'^[a-f0-9]{9,40}$', lastCommit):
|
if not re.match(r'^[a-f0-9]{9,40}$', lastCommit):
|
||||||
finish(1, 'Wrong last commit: ' + lastCommit)
|
finish(1, 'Wrong last commit: ' + lastCommit)
|
||||||
|
|
||||||
log = subprocess.check_output(['git', 'log', lastCommit+'..HEAD'])
|
log = subprocess.check_output(['git', 'log', lastCommit+'..HEAD']).decode('utf-8')
|
||||||
logLines = log.split('\n')
|
logLines = log.split('\n')
|
||||||
firstCommit = ''
|
firstCommit = ''
|
||||||
commits = []
|
commits = []
|
||||||
|
|
|
@ -17,6 +17,6 @@ pushd `dirname $0` > /dev/null
|
||||||
FullScriptPath=`pwd`
|
FullScriptPath=`pwd`
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
|
||||||
python $FullScriptPath/updates.py $1 $2 $3 $4 $5 $6
|
python3 $FullScriptPath/updates.py $1 $2 $3 $4 $5 $6
|
||||||
|
|
||||||
exit
|
exit
|
||||||
|
|
Loading…
Add table
Reference in a new issue