mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-07 01:10:09 +00:00
WIP
This commit is contained in:
parent
9ebb5b0a9f
commit
fdc850e011
133
Telegram/BUILD
133
Telegram/BUILD
@ -1,5 +1,5 @@
|
|||||||
load("@bazel_skylib//rules:common_settings.bzl",
|
load("@bazel_skylib//rules:common_settings.bzl",
|
||||||
"bool_flag"
|
"bool_flag",
|
||||||
)
|
)
|
||||||
|
|
||||||
load("@build_bazel_rules_apple//apple:ios.bzl",
|
load("@build_bazel_rules_apple//apple:ios.bzl",
|
||||||
@ -23,8 +23,6 @@ load("//build-system/bazel-utils:plist_fragment.bzl",
|
|||||||
|
|
||||||
load(
|
load(
|
||||||
"@build_configuration//:variables.bzl",
|
"@build_configuration//:variables.bzl",
|
||||||
"telegram_build_number",
|
|
||||||
"telegram_version",
|
|
||||||
"telegram_bundle_id",
|
"telegram_bundle_id",
|
||||||
"telegram_aps_environment",
|
"telegram_aps_environment",
|
||||||
"telegram_team_id",
|
"telegram_team_id",
|
||||||
@ -43,6 +41,12 @@ bool_flag(
|
|||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
string_flag(
|
||||||
|
name = "buildNumber",
|
||||||
|
build_setting_default = "10000",
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
config_setting(
|
config_setting(
|
||||||
name = "disableExtensionsSetting",
|
name = "disableExtensionsSetting",
|
||||||
flag_values = {
|
flag_values = {
|
||||||
@ -206,14 +210,20 @@ swift_library(
|
|||||||
)
|
)
|
||||||
|
|
||||||
plist_fragment(
|
plist_fragment(
|
||||||
name = "AdditionalInfoPlist",
|
name = "BuildNumberInfoPlist",
|
||||||
extension = "plist",
|
extension = "plist",
|
||||||
template =
|
template =
|
||||||
"""
|
"""
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>{telegram_version}</string>
|
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>{telegram_build_number}</string>
|
<string>{buildNumber}</string>
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
plist_fragment(
|
||||||
|
name = "UrlTypesInfoPlist",
|
||||||
|
extension = "plist",
|
||||||
|
template =
|
||||||
|
"""
|
||||||
<key>CFBundleURLTypes</key>
|
<key>CFBundleURLTypes</key>
|
||||||
<array>
|
<array>
|
||||||
<dict>
|
<dict>
|
||||||
@ -226,16 +236,6 @@ plist_fragment(
|
|||||||
<string>telegram</string>
|
<string>telegram</string>
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
<dict>
|
|
||||||
<key>CFBundleTypeRole</key>
|
|
||||||
<string>Viewer</string>
|
|
||||||
<key>CFBundleURLName</key>
|
|
||||||
<string>{telegram_bundle_id}.ton</string>
|
|
||||||
<key>CFBundleURLSchemes</key>
|
|
||||||
<array>
|
|
||||||
<string>ton</string>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleTypeRole</key>
|
<key>CFBundleTypeRole</key>
|
||||||
<string>Viewer</string>
|
<string>Viewer</string>
|
||||||
@ -248,8 +248,6 @@ plist_fragment(
|
|||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
""".format(
|
""".format(
|
||||||
telegram_version = telegram_version,
|
|
||||||
telegram_build_number = telegram_build_number,
|
|
||||||
telegram_bundle_id = telegram_bundle_id,
|
telegram_bundle_id = telegram_bundle_id,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -387,13 +385,8 @@ plist_fragment(
|
|||||||
template =
|
template =
|
||||||
"""
|
"""
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>{telegram_version}</string>
|
<string>{telegramVersion}</string>
|
||||||
<key>CFBundleVersion</key>
|
"""
|
||||||
<string>{telegram_build_number}</string>
|
|
||||||
""".format(
|
|
||||||
telegram_version = telegram_version,
|
|
||||||
telegram_build_number = telegram_build_number,
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
plist_fragment(
|
plist_fragment(
|
||||||
@ -494,6 +487,7 @@ watchos_extension(
|
|||||||
infoplists = [
|
infoplists = [
|
||||||
":WatchExtensionInfoPlist",
|
":WatchExtensionInfoPlist",
|
||||||
":VersionInfoPlist",
|
":VersionInfoPlist",
|
||||||
|
":BuildNumberInfoPlist",
|
||||||
":AppNameInfoPlist",
|
":AppNameInfoPlist",
|
||||||
":WatchExtensionNSExtensionInfoPlist",
|
":WatchExtensionNSExtensionInfoPlist",
|
||||||
],
|
],
|
||||||
@ -521,6 +515,7 @@ watchos_application(
|
|||||||
infoplists = [
|
infoplists = [
|
||||||
":WatchAppInfoPlist",
|
":WatchAppInfoPlist",
|
||||||
":VersionInfoPlist",
|
":VersionInfoPlist",
|
||||||
|
"BuildNumberInfoPlist",
|
||||||
":AppNameInfoPlist",
|
":AppNameInfoPlist",
|
||||||
":WatchAppCompanionInfoPlist",
|
":WatchAppCompanionInfoPlist",
|
||||||
],
|
],
|
||||||
@ -544,20 +539,14 @@ plist_fragment(
|
|||||||
"""
|
"""
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>{telegram_bundle_id}.MtProtoKit</string>
|
<string>{telegram_bundle_id}.MtProtoKit</string>
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>{telegram_build_number}</string>
|
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>en</string>
|
<string>en</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
<string>MtProtoKit</string>
|
<string>MtProtoKit</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>{telegram_version}</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>FMWK</string>
|
<string>FMWK</string>
|
||||||
""".format(
|
""".format(
|
||||||
telegram_bundle_id = telegram_bundle_id,
|
telegram_bundle_id = telegram_bundle_id,
|
||||||
telegram_version = telegram_version,
|
|
||||||
telegram_build_number = telegram_build_number,
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -572,6 +561,8 @@ ios_framework(
|
|||||||
],
|
],
|
||||||
infoplists = [
|
infoplists = [
|
||||||
":MtProtoKitInfoPlist",
|
":MtProtoKitInfoPlist",
|
||||||
|
":BuildNumberInfoPlist",
|
||||||
|
":VersionInfoPlist",
|
||||||
],
|
],
|
||||||
minimum_os_version = "9.0",
|
minimum_os_version = "9.0",
|
||||||
ipa_post_processor = strip_framework,
|
ipa_post_processor = strip_framework,
|
||||||
@ -587,20 +578,14 @@ plist_fragment(
|
|||||||
"""
|
"""
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>{telegram_bundle_id}.SwiftSignalKit</string>
|
<string>{telegram_bundle_id}.SwiftSignalKit</string>
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>{telegram_build_number}</string>
|
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>en</string>
|
<string>en</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
<string>SwiftSignalKit</string>
|
<string>SwiftSignalKit</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>{telegram_version}</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>FMWK</string>
|
<string>FMWK</string>
|
||||||
""".format(
|
""".format(
|
||||||
telegram_bundle_id = telegram_bundle_id,
|
telegram_bundle_id = telegram_bundle_id,
|
||||||
telegram_version = telegram_version,
|
|
||||||
telegram_build_number = telegram_build_number,
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -615,6 +600,8 @@ ios_framework(
|
|||||||
],
|
],
|
||||||
infoplists = [
|
infoplists = [
|
||||||
":SwiftSignalKitInfoPlist",
|
":SwiftSignalKitInfoPlist",
|
||||||
|
":BuildNumberInfoPlist",
|
||||||
|
":VersionInfoPlist",
|
||||||
],
|
],
|
||||||
minimum_os_version = "9.0",
|
minimum_os_version = "9.0",
|
||||||
ipa_post_processor = strip_framework,
|
ipa_post_processor = strip_framework,
|
||||||
@ -630,20 +617,14 @@ plist_fragment(
|
|||||||
"""
|
"""
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>{telegram_bundle_id}.Postbox</string>
|
<string>{telegram_bundle_id}.Postbox</string>
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>{telegram_build_number}</string>
|
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>en</string>
|
<string>en</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
<string>Postbox</string>
|
<string>Postbox</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>{telegram_version}</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>FMWK</string>
|
<string>FMWK</string>
|
||||||
""".format(
|
""".format(
|
||||||
telegram_bundle_id = telegram_bundle_id,
|
telegram_bundle_id = telegram_bundle_id,
|
||||||
telegram_version = telegram_version,
|
|
||||||
telegram_build_number = telegram_build_number,
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -658,6 +639,8 @@ ios_framework(
|
|||||||
],
|
],
|
||||||
infoplists = [
|
infoplists = [
|
||||||
":PostboxInfoPlist",
|
":PostboxInfoPlist",
|
||||||
|
":BuildNumberInfoPlist",
|
||||||
|
":VersionInfoPlist",
|
||||||
],
|
],
|
||||||
frameworks = [
|
frameworks = [
|
||||||
":SwiftSignalKitFramework",
|
":SwiftSignalKitFramework",
|
||||||
@ -676,20 +659,14 @@ plist_fragment(
|
|||||||
"""
|
"""
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>{telegram_bundle_id}.TelegramApi</string>
|
<string>{telegram_bundle_id}.TelegramApi</string>
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>{telegram_build_number}</string>
|
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>en</string>
|
<string>en</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
<string>TelegramApi</string>
|
<string>TelegramApi</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>{telegram_version}</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>FMWK</string>
|
<string>FMWK</string>
|
||||||
""".format(
|
""".format(
|
||||||
telegram_bundle_id = telegram_bundle_id,
|
telegram_bundle_id = telegram_bundle_id,
|
||||||
telegram_version = telegram_version,
|
|
||||||
telegram_build_number = telegram_build_number,
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -704,6 +681,8 @@ ios_framework(
|
|||||||
],
|
],
|
||||||
infoplists = [
|
infoplists = [
|
||||||
":TelegramApiInfoPlist",
|
":TelegramApiInfoPlist",
|
||||||
|
":BuildNumberInfoPlist",
|
||||||
|
":VersionInfoPlist",
|
||||||
],
|
],
|
||||||
minimum_os_version = "9.0",
|
minimum_os_version = "9.0",
|
||||||
ipa_post_processor = strip_framework,
|
ipa_post_processor = strip_framework,
|
||||||
@ -719,20 +698,14 @@ plist_fragment(
|
|||||||
"""
|
"""
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>{telegram_bundle_id}.SyncCore</string>
|
<string>{telegram_bundle_id}.SyncCore</string>
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>{telegram_build_number}</string>
|
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>en</string>
|
<string>en</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
<string>SyncCore</string>
|
<string>SyncCore</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>{telegram_version}</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>FMWK</string>
|
<string>FMWK</string>
|
||||||
""".format(
|
""".format(
|
||||||
telegram_bundle_id = telegram_bundle_id,
|
telegram_bundle_id = telegram_bundle_id,
|
||||||
telegram_version = telegram_version,
|
|
||||||
telegram_build_number = telegram_build_number,
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -747,6 +720,8 @@ ios_framework(
|
|||||||
],
|
],
|
||||||
infoplists = [
|
infoplists = [
|
||||||
":SyncCoreInfoPlist",
|
":SyncCoreInfoPlist",
|
||||||
|
":BuildNumberInfoPlist",
|
||||||
|
":VersionInfoPlist",
|
||||||
],
|
],
|
||||||
frameworks = [
|
frameworks = [
|
||||||
":SwiftSignalKitFramework",
|
":SwiftSignalKitFramework",
|
||||||
@ -766,20 +741,14 @@ plist_fragment(
|
|||||||
"""
|
"""
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>{telegram_bundle_id}.TelegramCore</string>
|
<string>{telegram_bundle_id}.TelegramCore</string>
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>{telegram_build_number}</string>
|
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>en</string>
|
<string>en</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
<string>TelegramCore</string>
|
<string>TelegramCore</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>{telegram_version}</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>FMWK</string>
|
<string>FMWK</string>
|
||||||
""".format(
|
""".format(
|
||||||
telegram_bundle_id = telegram_bundle_id,
|
telegram_bundle_id = telegram_bundle_id,
|
||||||
telegram_version = telegram_version,
|
|
||||||
telegram_build_number = telegram_build_number,
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -794,13 +763,14 @@ ios_framework(
|
|||||||
],
|
],
|
||||||
infoplists = [
|
infoplists = [
|
||||||
":TelegramCoreInfoPlist",
|
":TelegramCoreInfoPlist",
|
||||||
|
":BuildNumberInfoPlist",
|
||||||
|
":VersionInfoPlist",
|
||||||
],
|
],
|
||||||
frameworks = [
|
frameworks = [
|
||||||
":MtProtoKitFramework",
|
":MtProtoKitFramework",
|
||||||
":SwiftSignalKitFramework",
|
":SwiftSignalKitFramework",
|
||||||
":PostboxFramework",
|
":PostboxFramework",
|
||||||
":SyncCoreFramework",
|
":SyncCoreFramework",
|
||||||
#":TelegramApiFramework",
|
|
||||||
],
|
],
|
||||||
minimum_os_version = "9.0",
|
minimum_os_version = "9.0",
|
||||||
ipa_post_processor = strip_framework,
|
ipa_post_processor = strip_framework,
|
||||||
@ -816,20 +786,14 @@ plist_fragment(
|
|||||||
"""
|
"""
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>{telegram_bundle_id}.AsyncDisplayKit</string>
|
<string>{telegram_bundle_id}.AsyncDisplayKit</string>
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>{telegram_build_number}</string>
|
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>en</string>
|
<string>en</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
<string>AsyncDisplayKit</string>
|
<string>AsyncDisplayKit</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>{telegram_version}</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>FMWK</string>
|
<string>FMWK</string>
|
||||||
""".format(
|
""".format(
|
||||||
telegram_bundle_id = telegram_bundle_id,
|
telegram_bundle_id = telegram_bundle_id,
|
||||||
telegram_version = telegram_version,
|
|
||||||
telegram_build_number = telegram_build_number,
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -844,6 +808,8 @@ ios_framework(
|
|||||||
],
|
],
|
||||||
infoplists = [
|
infoplists = [
|
||||||
":AsyncDisplayKitInfoPlist",
|
":AsyncDisplayKitInfoPlist",
|
||||||
|
":BuildNumberInfoPlist",
|
||||||
|
":VersionInfoPlist",
|
||||||
],
|
],
|
||||||
minimum_os_version = "9.0",
|
minimum_os_version = "9.0",
|
||||||
ipa_post_processor = strip_framework,
|
ipa_post_processor = strip_framework,
|
||||||
@ -859,20 +825,14 @@ plist_fragment(
|
|||||||
"""
|
"""
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>{telegram_bundle_id}.Display</string>
|
<string>{telegram_bundle_id}.Display</string>
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>{telegram_build_number}</string>
|
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>en</string>
|
<string>en</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
<string>Display</string>
|
<string>Display</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>{telegram_version}</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>FMWK</string>
|
<string>FMWK</string>
|
||||||
""".format(
|
""".format(
|
||||||
telegram_bundle_id = telegram_bundle_id,
|
telegram_bundle_id = telegram_bundle_id,
|
||||||
telegram_version = telegram_version,
|
|
||||||
telegram_build_number = telegram_build_number,
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -930,6 +890,8 @@ ios_framework(
|
|||||||
],
|
],
|
||||||
infoplists = [
|
infoplists = [
|
||||||
":DisplayInfoPlist",
|
":DisplayInfoPlist",
|
||||||
|
":BuildNumberInfoPlist",
|
||||||
|
":VersionInfoPlist",
|
||||||
],
|
],
|
||||||
frameworks = [
|
frameworks = [
|
||||||
":SwiftSignalKitFramework",
|
":SwiftSignalKitFramework",
|
||||||
@ -949,20 +911,14 @@ plist_fragment(
|
|||||||
"""
|
"""
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>{telegram_bundle_id}.TelegramUI</string>
|
<string>{telegram_bundle_id}.TelegramUI</string>
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>{telegram_build_number}</string>
|
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>en</string>
|
<string>en</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
<string>TelegramUI</string>
|
<string>TelegramUI</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>{telegram_version}</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>FMWK</string>
|
<string>FMWK</string>
|
||||||
""".format(
|
""".format(
|
||||||
telegram_bundle_id = telegram_bundle_id,
|
telegram_bundle_id = telegram_bundle_id,
|
||||||
telegram_version = telegram_version,
|
|
||||||
telegram_build_number = telegram_build_number,
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -977,12 +933,13 @@ ios_framework(
|
|||||||
],
|
],
|
||||||
infoplists = [
|
infoplists = [
|
||||||
":TelegramUIInfoPlist",
|
":TelegramUIInfoPlist",
|
||||||
|
":BuildNumberInfoPlist",
|
||||||
|
":VersionInfoPlist",
|
||||||
],
|
],
|
||||||
frameworks = [
|
frameworks = [
|
||||||
":MtProtoKitFramework",
|
":MtProtoKitFramework",
|
||||||
":SwiftSignalKitFramework",
|
":SwiftSignalKitFramework",
|
||||||
":PostboxFramework",
|
":PostboxFramework",
|
||||||
#":TelegramApiFramework",
|
|
||||||
":SyncCoreFramework",
|
":SyncCoreFramework",
|
||||||
":TelegramCoreFramework",
|
":TelegramCoreFramework",
|
||||||
":AsyncDisplayKitFramework",
|
":AsyncDisplayKitFramework",
|
||||||
@ -1068,6 +1025,7 @@ ios_extension(
|
|||||||
infoplists = [
|
infoplists = [
|
||||||
":ShareInfoPlist",
|
":ShareInfoPlist",
|
||||||
":VersionInfoPlist",
|
":VersionInfoPlist",
|
||||||
|
":BuildNumberInfoPlist",
|
||||||
":AppNameInfoPlist",
|
":AppNameInfoPlist",
|
||||||
],
|
],
|
||||||
minimum_os_version = "9.0",
|
minimum_os_version = "9.0",
|
||||||
@ -1136,6 +1094,7 @@ ios_extension(
|
|||||||
infoplists = [
|
infoplists = [
|
||||||
":NotificationContentInfoPlist",
|
":NotificationContentInfoPlist",
|
||||||
":VersionInfoPlist",
|
":VersionInfoPlist",
|
||||||
|
":BuildNumberInfoPlist",
|
||||||
":AppNameInfoPlist",
|
":AppNameInfoPlist",
|
||||||
],
|
],
|
||||||
minimum_os_version = "10.0",
|
minimum_os_version = "10.0",
|
||||||
@ -1207,6 +1166,7 @@ ios_extension(
|
|||||||
infoplists = [
|
infoplists = [
|
||||||
":WidgetInfoPlist",
|
":WidgetInfoPlist",
|
||||||
":VersionInfoPlist",
|
":VersionInfoPlist",
|
||||||
|
":BuildNumberInfoPlist",
|
||||||
":AppNameInfoPlist",
|
":AppNameInfoPlist",
|
||||||
],
|
],
|
||||||
minimum_os_version = "14.0",
|
minimum_os_version = "14.0",
|
||||||
@ -1296,6 +1256,7 @@ ios_extension(
|
|||||||
infoplists = [
|
infoplists = [
|
||||||
":IntentsInfoPlist",
|
":IntentsInfoPlist",
|
||||||
":VersionInfoPlist",
|
":VersionInfoPlist",
|
||||||
|
":BuildNumberInfoPlist",
|
||||||
":AppNameInfoPlist",
|
":AppNameInfoPlist",
|
||||||
],
|
],
|
||||||
minimum_os_version = "10.0",
|
minimum_os_version = "10.0",
|
||||||
@ -1305,7 +1266,6 @@ ios_extension(
|
|||||||
":SwiftSignalKitFramework",
|
":SwiftSignalKitFramework",
|
||||||
":PostboxFramework",
|
":PostboxFramework",
|
||||||
":TelegramCoreFramework",
|
":TelegramCoreFramework",
|
||||||
#":TelegramApiFramework",
|
|
||||||
":SyncCoreFramework",
|
":SyncCoreFramework",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
@ -1347,6 +1307,7 @@ ios_extension(
|
|||||||
infoplists = [
|
infoplists = [
|
||||||
":NotificationServiceInfoPlist",
|
":NotificationServiceInfoPlist",
|
||||||
":VersionInfoPlist",
|
":VersionInfoPlist",
|
||||||
|
":BuildNumberInfoPlist",
|
||||||
":AppNameInfoPlist",
|
":AppNameInfoPlist",
|
||||||
],
|
],
|
||||||
minimum_os_version = "10.0",
|
minimum_os_version = "10.0",
|
||||||
@ -1356,8 +1317,6 @@ ios_extension(
|
|||||||
":MtProtoKitFramework",
|
":MtProtoKitFramework",
|
||||||
":SwiftSignalKitFramework",
|
":SwiftSignalKitFramework",
|
||||||
":PostboxFramework",
|
":PostboxFramework",
|
||||||
#":TelegramApiFramework",
|
|
||||||
#":SyncCoreFramework",
|
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -1542,7 +1501,9 @@ ios_application(
|
|||||||
entitlements = ":TelegramEntitlements.entitlements",
|
entitlements = ":TelegramEntitlements.entitlements",
|
||||||
infoplists = [
|
infoplists = [
|
||||||
":TelegramInfoPlist",
|
":TelegramInfoPlist",
|
||||||
":AdditionalInfoPlist",
|
":BuildNumberInfoPlist",
|
||||||
|
":VersionInfoPlist",
|
||||||
|
":UrlTypesInfoPlist",
|
||||||
],
|
],
|
||||||
ipa_post_processor = ":AddAlternateIcons",
|
ipa_post_processor = ":AddAlternateIcons",
|
||||||
resources = [
|
resources = [
|
||||||
|
|||||||
@ -44,7 +44,7 @@ def run_executable_with_output(path, arguments):
|
|||||||
return output_string
|
return output_string
|
||||||
|
|
||||||
|
|
||||||
def call_executable(arguments, use_clean_environment=True):
|
def call_executable(arguments, use_clean_environment=True, check_result=True):
|
||||||
executable_path = resolve_executable(arguments[0])
|
executable_path = resolve_executable(arguments[0])
|
||||||
if executable_path is None:
|
if executable_path is None:
|
||||||
raise Exception('Could not resolve {} to a valid executable file'.format(arguments[0]))
|
raise Exception('Could not resolve {} to a valid executable file'.format(arguments[0]))
|
||||||
@ -53,7 +53,13 @@ def call_executable(arguments, use_clean_environment=True):
|
|||||||
resolved_env = get_clean_env()
|
resolved_env = get_clean_env()
|
||||||
else:
|
else:
|
||||||
resolved_env = os.environ
|
resolved_env = os.environ
|
||||||
subprocess.check_call([executable_path] + arguments[1:], env=resolved_env)
|
|
||||||
|
resolved_arguments = [executable_path] + arguments[1:]
|
||||||
|
|
||||||
|
if check_result:
|
||||||
|
subprocess.check_call(resolved_arguments, env=resolved_env)
|
||||||
|
else:
|
||||||
|
subprocess.call(resolved_arguments, env=resolved_env)
|
||||||
|
|
||||||
|
|
||||||
def get_bazel_version(bazel_path):
|
def get_bazel_version(bazel_path):
|
||||||
@ -106,6 +112,10 @@ class BuildEnvironment:
|
|||||||
configuration_path = os.path.join(self.base_path, 'versions.json')
|
configuration_path = os.path.join(self.base_path, 'versions.json')
|
||||||
with open(configuration_path) as file:
|
with open(configuration_path) as file:
|
||||||
configuration_dict = json.load(file)
|
configuration_dict = json.load(file)
|
||||||
|
if configuration_dict['app'] is None:
|
||||||
|
raise Exception('Missing app version in {}'.format(configuration_path))
|
||||||
|
else:
|
||||||
|
self.app_version = configuration_dict['app']
|
||||||
if configuration_dict['bazel'] is None:
|
if configuration_dict['bazel'] is None:
|
||||||
raise Exception('Missing bazel version in {}'.format(configuration_path))
|
raise Exception('Missing bazel version in {}'.format(configuration_path))
|
||||||
else:
|
else:
|
||||||
|
|||||||
@ -22,6 +22,7 @@ class BazelCommandLine:
|
|||||||
self.remote_cache = None
|
self.remote_cache = None
|
||||||
self.cache_dir = None
|
self.cache_dir = None
|
||||||
self.additional_args = None
|
self.additional_args = None
|
||||||
|
self.build_number = None
|
||||||
self.configuration_args = None
|
self.configuration_args = None
|
||||||
self.configuration_path = None
|
self.configuration_path = None
|
||||||
|
|
||||||
@ -106,6 +107,9 @@ class BazelCommandLine:
|
|||||||
def add_additional_args(self, additional_args):
|
def add_additional_args(self, additional_args):
|
||||||
self.additional_args = additional_args
|
self.additional_args = additional_args
|
||||||
|
|
||||||
|
def set_build_number(self, build_number):
|
||||||
|
self.build_number = build_number
|
||||||
|
|
||||||
def set_configuration_path(self, path):
|
def set_configuration_path(self, path):
|
||||||
self.configuration_path = path
|
self.configuration_path = path
|
||||||
|
|
||||||
@ -162,10 +166,17 @@ class BazelCommandLine:
|
|||||||
print('TelegramBuild: running {}'.format(combined_arguments))
|
print('TelegramBuild: running {}'.format(combined_arguments))
|
||||||
call_executable(combined_arguments)
|
call_executable(combined_arguments)
|
||||||
|
|
||||||
|
def get_define_arguments(self):
|
||||||
|
return [
|
||||||
|
'--define=buildNumber={}'.format(self.build_number),
|
||||||
|
'--define=telegramVersion={}'.format(self.build_environment.app_version)
|
||||||
|
]
|
||||||
|
|
||||||
def get_project_generation_arguments(self):
|
def get_project_generation_arguments(self):
|
||||||
combined_arguments = []
|
combined_arguments = []
|
||||||
combined_arguments += self.common_args
|
combined_arguments += self.common_args
|
||||||
combined_arguments += self.common_debug_args
|
combined_arguments += self.common_debug_args
|
||||||
|
combined_arguments += self.get_define_arguments()
|
||||||
|
|
||||||
if self.remote_cache is not None:
|
if self.remote_cache is not None:
|
||||||
combined_arguments += [
|
combined_arguments += [
|
||||||
@ -195,6 +206,7 @@ class BazelCommandLine:
|
|||||||
|
|
||||||
combined_arguments += self.common_args
|
combined_arguments += self.common_args
|
||||||
combined_arguments += self.common_build_args
|
combined_arguments += self.common_build_args
|
||||||
|
combined_arguments += self.get_define_arguments()
|
||||||
|
|
||||||
if self.remote_cache is not None:
|
if self.remote_cache is not None:
|
||||||
combined_arguments += [
|
combined_arguments += [
|
||||||
@ -268,10 +280,14 @@ def generate_project(arguments):
|
|||||||
|
|
||||||
resolve_configuration(bazel_command_line, arguments)
|
resolve_configuration(bazel_command_line, arguments)
|
||||||
|
|
||||||
|
bazel_command_line.set_build_number(arguments.buildNumber)
|
||||||
|
|
||||||
disable_extensions = False
|
disable_extensions = False
|
||||||
if arguments.disableExtensions is not None:
|
if arguments.disableExtensions is not None:
|
||||||
disable_extensions = arguments.disableExtensions
|
disable_extensions = arguments.disableExtensions
|
||||||
|
|
||||||
|
call_executable(['killall', 'Xcode'], check_result=False)
|
||||||
|
|
||||||
generate(
|
generate(
|
||||||
build_environment=bazel_command_line.build_environment,
|
build_environment=bazel_command_line.build_environment,
|
||||||
disable_extensions=disable_extensions,
|
disable_extensions=disable_extensions,
|
||||||
@ -296,6 +312,7 @@ def build(arguments):
|
|||||||
resolve_configuration(bazel_command_line, arguments)
|
resolve_configuration(bazel_command_line, arguments)
|
||||||
|
|
||||||
bazel_command_line.set_configuration(arguments.configuration)
|
bazel_command_line.set_configuration(arguments.configuration)
|
||||||
|
bazel_command_line.set_build_number(arguments.buildNumber)
|
||||||
|
|
||||||
bazel_command_line.invoke_build()
|
bazel_command_line.invoke_build()
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
telegram_build_number = "10000"
|
|
||||||
telegram_version = "7.3"
|
|
||||||
telegram_bundle_id = "ph.telegra.Telegraph"
|
telegram_bundle_id = "ph.telegra.Telegraph"
|
||||||
telegram_api_id = "8"
|
telegram_api_id = "8"
|
||||||
telegram_team_id = "C67CF9S4VU"
|
|
||||||
telegram_api_hash = "7245de8e747a0d6fbe11f7cc14fcc0bb"
|
telegram_api_hash = "7245de8e747a0d6fbe11f7cc14fcc0bb"
|
||||||
|
telegram_team_id = "C67CF9S4VU"
|
||||||
telegram_app_center_id = "0"
|
telegram_app_center_id = "0"
|
||||||
telegram_is_internal_build = "false"
|
telegram_is_internal_build = "false"
|
||||||
telegram_is_appstore_build = "true"
|
telegram_is_appstore_build = "true"
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"app": "7.3",
|
||||||
"bazel": "3.7.0",
|
"bazel": "3.7.0",
|
||||||
"xcode": "12.3"
|
"xcode": "12.3"
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user