mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 13:17:08 +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 height = state->blurred.height()
|
||||
? state->blurred.height()
|
||||
? (state->blurred.height() / state->blurred.devicePixelRatio())
|
||||
: width;
|
||||
const auto left = (st::boxWideWidth - width) / 2;
|
||||
const auto top = st::premiumPreviewHeight - height;
|
||||
|
|
|
@ -373,16 +373,16 @@ bool PeerMatchesTypes(
|
|||
return (types & PeerType::Group);
|
||||
}
|
||||
|
||||
PeerTypes ParseChooseTypes(const QString &choose) {
|
||||
PeerTypes ParseChooseTypes(QStringView choose) {
|
||||
auto result = PeerTypes();
|
||||
for (const auto &entry : choose.split(QChar(' '))) {
|
||||
if (entry == "users") {
|
||||
if (entry == u"users"_q) {
|
||||
result |= PeerType::User;
|
||||
} else if (entry == "bots") {
|
||||
} else if (entry == u"bots"_q) {
|
||||
result |= PeerType::Bot;
|
||||
} else if (entry == "groups") {
|
||||
} else if (entry == u"groups"_q) {
|
||||
result |= PeerType::Group;
|
||||
} else if (entry == "channels") {
|
||||
} else if (entry == u"channels"_q) {
|
||||
result |= PeerType::Broadcast;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ using PeerTypes = base::flags<PeerType>;
|
|||
not_null<PeerData*> peer,
|
||||
not_null<UserData*> bot,
|
||||
PeerTypes types);
|
||||
[[nodiscard]] PeerTypes ParseChooseTypes(const QString &choose);
|
||||
[[nodiscard]] PeerTypes ParseChooseTypes(QStringView choose);
|
||||
|
||||
struct AttachWebViewBot {
|
||||
not_null<UserData*> user;
|
||||
|
|
|
@ -843,7 +843,7 @@ void SessionController::setupPremiumToast() {
|
|||
Ui::Toast::Show(
|
||||
Window::Show(this).toastParent(),
|
||||
{
|
||||
.text = tr::lng_premium_success(tr::now),
|
||||
.text = { tr::lng_premium_success(tr::now) },
|
||||
.st = &st::defaultToast,
|
||||
});
|
||||
}, _lifetime);
|
||||
|
|
|
@ -106,7 +106,7 @@ if building:
|
|||
finish(1, 'Adding tdesktop to archive.')
|
||||
|
||||
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.')
|
||||
uuid = ''
|
||||
for line in lines.split('\n'):
|
||||
|
@ -124,7 +124,7 @@ if building:
|
|||
while requestStatus == '':
|
||||
time.sleep(5)
|
||||
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
|
||||
for line in lines.split('\n'):
|
||||
parts = line.strip().split(' ')
|
||||
|
@ -152,7 +152,7 @@ if building:
|
|||
logLines = ''
|
||||
if logUrl != '':
|
||||
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)
|
||||
if result != 0:
|
||||
finish(1, 'Error calling stapler')
|
||||
|
@ -203,7 +203,7 @@ if composing:
|
|||
if not re.match(r'^[a-f0-9]{9,40}$', 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')
|
||||
firstCommit = ''
|
||||
commits = []
|
||||
|
|
|
@ -17,6 +17,6 @@ pushd `dirname $0` > /dev/null
|
|||
FullScriptPath=`pwd`
|
||||
popd > /dev/null
|
||||
|
||||
python $FullScriptPath/updates.py $1 $2 $3 $4 $5 $6
|
||||
python3 $FullScriptPath/updates.py $1 $2 $3 $4 $5 $6
|
||||
|
||||
exit
|
||||
|
|
Loading…
Add table
Reference in a new issue