mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-15 13:35:19 +00:00
Apply sticker thumbnail fixes
WIP WIP WIP WIP
This commit is contained in:
parent
2fbe175639
commit
a49ae70f43
553
BUCK
553
BUCK
@ -1,553 +0,0 @@
|
||||
load("//Config:utils.bzl",
|
||||
"library_configs",
|
||||
)
|
||||
|
||||
load("//Config:configs.bzl",
|
||||
"app_binary_configs",
|
||||
"share_extension_configs",
|
||||
"widget_extension_configs",
|
||||
"notification_content_extension_configs",
|
||||
"notification_service_extension_configs",
|
||||
"intents_extension_configs",
|
||||
"watch_extension_binary_configs",
|
||||
"watch_binary_configs",
|
||||
"info_plist_substitutions",
|
||||
"app_info_plist_substitutions",
|
||||
"share_extension_info_plist_substitutions",
|
||||
"widget_extension_info_plist_substitutions",
|
||||
"notification_content_extension_info_plist_substitutions",
|
||||
"notification_service_extension_info_plist_substitutions",
|
||||
"intents_extension_info_plist_substitutions",
|
||||
"watch_extension_info_plist_substitutions",
|
||||
"watch_info_plist_substitutions",
|
||||
"DEVELOPMENT_LANGUAGE",
|
||||
)
|
||||
|
||||
load("//Config:buck_rule_macros.bzl",
|
||||
"apple_lib",
|
||||
"framework_binary_dependencies",
|
||||
"framework_bundle_dependencies",
|
||||
"glob_map",
|
||||
"glob_sub_map",
|
||||
"merge_maps",
|
||||
)
|
||||
|
||||
framework_dependencies = [
|
||||
"//submodules/MtProtoKit:MtProtoKit",
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||
"//submodules/Postbox:Postbox",
|
||||
"//submodules/TelegramApi:TelegramApi",
|
||||
"//submodules/SyncCore:SyncCore",
|
||||
"//submodules/TelegramCore:TelegramCore",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
|
||||
"//submodules/Display:Display",
|
||||
"//submodules/TelegramUI:TelegramUI",
|
||||
]
|
||||
|
||||
resource_dependencies = [
|
||||
"//submodules/LegacyComponents:LegacyComponentsResources",
|
||||
"//submodules/TelegramUI:TelegramUIAssets",
|
||||
"//submodules/TelegramUI:TelegramUIResources",
|
||||
#"//submodules/WalletUI:WalletUIAssets",
|
||||
#"//submodules/WalletUI:WalletUIResources",
|
||||
"//submodules/PasswordSetupUI:PasswordSetupUIResources",
|
||||
"//submodules/PasswordSetupUI:PasswordSetupUIAssets",
|
||||
"//submodules/OverlayStatusController:OverlayStatusControllerResources",
|
||||
"//:AppResources",
|
||||
"//:AppStringResources",
|
||||
"//:InfoPlistStringResources",
|
||||
"//:AppIntentVocabularyResources",
|
||||
"//:Icons",
|
||||
"//:AdditionalIcons",
|
||||
"//:LaunchScreen",
|
||||
]
|
||||
|
||||
build_phase_scripts = [
|
||||
]
|
||||
|
||||
apple_resource(
|
||||
name = "AppResources",
|
||||
files = glob([
|
||||
"Telegram-iOS/Resources/**/*",
|
||||
], exclude = ["Telegram-iOS/Resources/**/.*"]),
|
||||
visibility = ["PUBLIC"],
|
||||
)
|
||||
|
||||
apple_resource(
|
||||
name = "AppStringResources",
|
||||
files = [],
|
||||
variants = glob([
|
||||
"Telegram-iOS/*.lproj/Localizable.strings",
|
||||
]),
|
||||
visibility = ["PUBLIC"],
|
||||
)
|
||||
|
||||
apple_resource(
|
||||
name = "AppIntentVocabularyResources",
|
||||
files = [],
|
||||
variants = glob([
|
||||
"Telegram-iOS/*.lproj/AppIntentVocabulary.plist",
|
||||
]),
|
||||
visibility = ["PUBLIC"],
|
||||
)
|
||||
|
||||
apple_resource(
|
||||
name = "InfoPlistStringResources",
|
||||
files = [],
|
||||
variants = glob([
|
||||
"Telegram-iOS/*.lproj/InfoPlist.strings",
|
||||
]),
|
||||
visibility = ["PUBLIC"],
|
||||
)
|
||||
|
||||
apple_asset_catalog(
|
||||
name = "Icons",
|
||||
dirs = [
|
||||
"Telegram-iOS/Icons.xcassets",
|
||||
"Telegram-iOS/AppIcons.xcassets",
|
||||
],
|
||||
app_icon = "AppIconLLC",
|
||||
visibility = ["PUBLIC"],
|
||||
)
|
||||
|
||||
apple_resource(
|
||||
name = "AdditionalIcons",
|
||||
files = glob([
|
||||
"Telegram-iOS/*.png",
|
||||
]),
|
||||
visibility = ["PUBLIC"],
|
||||
)
|
||||
|
||||
apple_resource(
|
||||
name = "LaunchScreen",
|
||||
files = [
|
||||
"Telegram-iOS/Base.lproj/LaunchScreen.xib",
|
||||
],
|
||||
visibility = ["PUBLIC"],
|
||||
)
|
||||
|
||||
apple_library(
|
||||
name = "AppLibrary",
|
||||
visibility = [
|
||||
"//:",
|
||||
"//...",
|
||||
],
|
||||
configs = library_configs(),
|
||||
swift_version = native.read_config("swift", "version"),
|
||||
srcs = [
|
||||
"Telegram-iOS/main.m",
|
||||
"Telegram-iOS/Application.swift"
|
||||
],
|
||||
deps = [
|
||||
]
|
||||
+ framework_binary_dependencies(framework_dependencies),
|
||||
)
|
||||
|
||||
apple_binary(
|
||||
name = "AppBinary",
|
||||
visibility = [
|
||||
"//:",
|
||||
"//...",
|
||||
],
|
||||
configs = app_binary_configs(),
|
||||
swift_version = native.read_config("swift", "version"),
|
||||
srcs = [
|
||||
"SupportFiles/Empty.swift",
|
||||
],
|
||||
deps = [
|
||||
":AppLibrary",
|
||||
]
|
||||
+ resource_dependencies,
|
||||
)
|
||||
|
||||
apple_bundle(
|
||||
name = "Telegram",
|
||||
visibility = [
|
||||
"//:",
|
||||
],
|
||||
extension = "app",
|
||||
binary = ":AppBinary",
|
||||
product_name = "Telegram",
|
||||
info_plist = "Telegram-iOS/Info.plist",
|
||||
info_plist_substitutions = app_info_plist_substitutions(),
|
||||
deps = [
|
||||
":ShareExtension",
|
||||
":WidgetExtension",
|
||||
":NotificationContentExtension",
|
||||
":NotificationServiceExtension",
|
||||
":IntentsExtension",
|
||||
":WatchApp#watch",
|
||||
]
|
||||
+ framework_bundle_dependencies(framework_dependencies),
|
||||
)
|
||||
|
||||
# Share Extension
|
||||
|
||||
apple_binary(
|
||||
name = "ShareBinary",
|
||||
srcs = glob([
|
||||
"Share/**/*.swift",
|
||||
]),
|
||||
configs = share_extension_configs(),
|
||||
linker_flags = [
|
||||
"-e",
|
||||
"_NSExtensionMain",
|
||||
"-Xlinker",
|
||||
"-rpath",
|
||||
"-Xlinker",
|
||||
"/usr/lib/swift",
|
||||
"-Xlinker",
|
||||
"-rpath",
|
||||
"-Xlinker",
|
||||
"@executable_path/../../Frameworks",
|
||||
],
|
||||
deps = [
|
||||
"//submodules/TelegramUI:TelegramUI#shared",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
],
|
||||
)
|
||||
|
||||
apple_bundle(
|
||||
name = "ShareExtension",
|
||||
binary = ":ShareBinary",
|
||||
extension = "appex",
|
||||
info_plist = "Share/Info.plist",
|
||||
info_plist_substitutions = share_extension_info_plist_substitutions(),
|
||||
deps = [
|
||||
],
|
||||
xcode_product_type = "com.apple.product-type.app-extension",
|
||||
)
|
||||
|
||||
# Widget
|
||||
|
||||
apple_binary(
|
||||
name = "WidgetBinary",
|
||||
srcs = glob([
|
||||
"Widget/**/*.swift",
|
||||
]),
|
||||
configs = widget_extension_configs(),
|
||||
swift_compiler_flags = [
|
||||
"-application-extension",
|
||||
],
|
||||
linker_flags = [
|
||||
"-e",
|
||||
"_NSExtensionMain",
|
||||
"-Xlinker",
|
||||
"-rpath",
|
||||
"-Xlinker",
|
||||
"/usr/lib/swift",
|
||||
"-Xlinker",
|
||||
"-rpath",
|
||||
"-Xlinker",
|
||||
"@executable_path/../../Frameworks",
|
||||
],
|
||||
deps = [
|
||||
"//submodules/BuildConfig:BuildConfig",
|
||||
"//submodules/WidgetItems:WidgetItems",
|
||||
"//submodules/AppLockState:AppLockState",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/NotificationCenter.framework",
|
||||
],
|
||||
)
|
||||
|
||||
apple_bundle(
|
||||
name = "WidgetExtension",
|
||||
binary = ":WidgetBinary",
|
||||
extension = "appex",
|
||||
info_plist = "Widget/Info.plist",
|
||||
info_plist_substitutions = widget_extension_info_plist_substitutions(),
|
||||
deps = [
|
||||
],
|
||||
xcode_product_type = "com.apple.product-type.app-extension",
|
||||
)
|
||||
|
||||
# Notification Content
|
||||
|
||||
apple_binary(
|
||||
name = "NotificationContentBinary",
|
||||
srcs = glob([
|
||||
"NotificationContent/**/*.swift",
|
||||
]),
|
||||
configs = notification_content_extension_configs(),
|
||||
swift_compiler_flags = [
|
||||
"-application-extension",
|
||||
],
|
||||
linker_flags = [
|
||||
"-e",
|
||||
"_NSExtensionMain",
|
||||
"-Xlinker",
|
||||
"-rpath",
|
||||
"-Xlinker",
|
||||
"/usr/lib/swift",
|
||||
"-Xlinker",
|
||||
"-rpath",
|
||||
"-Xlinker",
|
||||
"@executable_path/../../Frameworks",
|
||||
],
|
||||
deps = [
|
||||
"//submodules/TelegramUI:TelegramUI#shared",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UserNotificationsUI.framework",
|
||||
],
|
||||
)
|
||||
|
||||
apple_bundle(
|
||||
name = "NotificationContentExtension",
|
||||
binary = ":NotificationContentBinary",
|
||||
extension = "appex",
|
||||
info_plist = "NotificationContent/Info.plist",
|
||||
info_plist_substitutions = notification_content_extension_info_plist_substitutions(),
|
||||
deps = [
|
||||
],
|
||||
xcode_product_type = "com.apple.product-type.app-extension",
|
||||
)
|
||||
|
||||
#Notification Service
|
||||
|
||||
apple_binary(
|
||||
name = "NotificationServiceBinary",
|
||||
srcs = glob([
|
||||
"NotificationService/**/*.m",
|
||||
"NotificationService/**/*.swift",
|
||||
]),
|
||||
headers = glob([
|
||||
"NotificationService/**/*.h",
|
||||
]),
|
||||
bridging_header = "NotificationService/NotificationService-Bridging-Header.h",
|
||||
configs = notification_service_extension_configs(),
|
||||
swift_compiler_flags = [
|
||||
"-application-extension",
|
||||
],
|
||||
linker_flags = [
|
||||
"-e",
|
||||
"_NSExtensionMain",
|
||||
"-Xlinker",
|
||||
"-rpath",
|
||||
"-Xlinker",
|
||||
"/usr/lib/swift",
|
||||
"-Xlinker",
|
||||
"-rpath",
|
||||
"-Xlinker",
|
||||
"@executable_path/../../Frameworks",
|
||||
],
|
||||
deps = [
|
||||
"//submodules/BuildConfig:BuildConfig",
|
||||
"//submodules/MtProtoKit:MtProtoKit#shared",
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/EncryptionProvider:EncryptionProvider",
|
||||
"//submodules/Database/ValueBox:ValueBox",
|
||||
"//submodules/Database/PostboxDataTypes:PostboxDataTypes",
|
||||
"//submodules/Database/MessageHistoryReadStateTable:MessageHistoryReadStateTable",
|
||||
"//submodules/Database/MessageHistoryMetadataTable:MessageHistoryMetadataTable",
|
||||
"//submodules/Database/PreferencesTable:PreferencesTable",
|
||||
"//submodules/Database/PeerTable:PeerTable",
|
||||
"//submodules/sqlcipher:sqlcipher",
|
||||
"//submodules/AppLockState:AppLockState",
|
||||
"//submodules/NotificationsPresentationData:NotificationsPresentationData",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UserNotifications.framework",
|
||||
],
|
||||
)
|
||||
|
||||
apple_bundle(
|
||||
name = "NotificationServiceExtension",
|
||||
binary = ":NotificationServiceBinary",
|
||||
extension = "appex",
|
||||
info_plist = "NotificationService/Info.plist",
|
||||
info_plist_substitutions = notification_service_extension_info_plist_substitutions(),
|
||||
deps = [
|
||||
],
|
||||
xcode_product_type = "com.apple.product-type.app-extension",
|
||||
)
|
||||
|
||||
# Intents
|
||||
|
||||
apple_binary(
|
||||
name = "IntentsBinary",
|
||||
srcs = glob([
|
||||
"SiriIntents/**/*.swift",
|
||||
]),
|
||||
configs = intents_extension_configs(),
|
||||
swift_compiler_flags = [
|
||||
"-application-extension",
|
||||
],
|
||||
linker_flags = [
|
||||
"-e",
|
||||
"_NSExtensionMain",
|
||||
"-Xlinker",
|
||||
"-rpath",
|
||||
"-Xlinker",
|
||||
"/usr/lib/swift",
|
||||
"-Xlinker",
|
||||
"-rpath",
|
||||
"-Xlinker",
|
||||
"@executable_path/../../Frameworks",
|
||||
],
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/Postbox:Postbox#shared",
|
||||
"//submodules/TelegramApi:TelegramApi#shared",
|
||||
"//submodules/SyncCore:SyncCore#shared",
|
||||
"//submodules/TelegramCore:TelegramCore#shared",
|
||||
"//submodules/BuildConfig:BuildConfig",
|
||||
"//submodules/OpenSSLEncryptionProvider:OpenSSLEncryptionProvider",
|
||||
"//submodules/AppLockState:AppLockState",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/Intents.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/Contacts.framework",
|
||||
],
|
||||
)
|
||||
|
||||
apple_bundle(
|
||||
name = "IntentsExtension",
|
||||
binary = ":IntentsBinary",
|
||||
extension = "appex",
|
||||
info_plist = "SiriIntents/Info.plist",
|
||||
info_plist_substitutions = intents_extension_info_plist_substitutions(),
|
||||
deps = [
|
||||
],
|
||||
xcode_product_type = "com.apple.product-type.app-extension",
|
||||
)
|
||||
|
||||
# Watch
|
||||
|
||||
apple_resource(
|
||||
name = "WatchAppStringResources",
|
||||
files = [],
|
||||
variants = glob([
|
||||
"Telegram-iOS/*.lproj/Localizable.strings",
|
||||
]),
|
||||
visibility = ["PUBLIC"],
|
||||
)
|
||||
|
||||
apple_resource(
|
||||
name = "WatchAppExtensionResources",
|
||||
files = glob([
|
||||
"Watch/Extension/Resources/**/*",
|
||||
], exclude = ["Watch/Extension/Resources/**/.*"]),
|
||||
visibility = ["PUBLIC"],
|
||||
)
|
||||
|
||||
apple_binary(
|
||||
name = "WatchAppExtensionBinary",
|
||||
srcs = glob([
|
||||
"Watch/Extension/**/*.m",
|
||||
"Watch/SSignalKit/**/*.m",
|
||||
"Watch/Bridge/**/*.m",
|
||||
"Watch/WatchCommonWatch/**/*.m",
|
||||
]),
|
||||
headers = merge_maps([
|
||||
glob_map(glob([
|
||||
"Watch/Extension/*.h",
|
||||
"Watch/Bridge/*.h",
|
||||
])),
|
||||
glob_sub_map("Watch/Extension/", glob([
|
||||
"Watch/Extension/SSignalKit/*.h",
|
||||
])),
|
||||
glob_sub_map("Watch/", glob([
|
||||
"Watch/WatchCommonWatch/*.h",
|
||||
])),
|
||||
]),
|
||||
compiler_flags = [
|
||||
"-DTARGET_OS_WATCH=1",
|
||||
],
|
||||
linker_flags = [
|
||||
"-e",
|
||||
"_WKExtensionMain",
|
||||
"-lWKExtensionMainLegacy",
|
||||
],
|
||||
configs = watch_extension_binary_configs(),
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/UserNotifications.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/CoreLocation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/CoreGraphics.framework",
|
||||
],
|
||||
deps = [
|
||||
":WatchAppStringResources",
|
||||
":WatchAppExtensionResources",
|
||||
],
|
||||
)
|
||||
|
||||
apple_bundle(
|
||||
name = "WatchAppExtension",
|
||||
binary = ":WatchAppExtensionBinary",
|
||||
extension = "appex",
|
||||
info_plist = "Watch/Extension/Info.plist",
|
||||
info_plist_substitutions = watch_extension_info_plist_substitutions(),
|
||||
xcode_product_type = "com.apple.product-type.watchkit2-extension",
|
||||
)
|
||||
|
||||
apple_resource(
|
||||
name = "WatchAppResources",
|
||||
dirs = [],
|
||||
files = glob(["Watch/Extension/Resources/*.png"])
|
||||
)
|
||||
|
||||
apple_asset_catalog(
|
||||
name = "WatchAppAssets",
|
||||
dirs = [
|
||||
"Watch/App/Assets.xcassets",
|
||||
],
|
||||
app_icon = "AppIcon",
|
||||
visibility = ["PUBLIC"],
|
||||
)
|
||||
|
||||
apple_resource(
|
||||
name = "WatchAppInterface",
|
||||
files = [
|
||||
"Watch/App/Base.lproj/Interface.storyboard",
|
||||
],
|
||||
visibility = ["PUBLIC"],
|
||||
)
|
||||
|
||||
apple_binary(
|
||||
name = "WatchAppBinary",
|
||||
configs = watch_binary_configs(),
|
||||
deps = [
|
||||
":WatchAppResources",
|
||||
":WatchAppAssets",
|
||||
":WatchAppInterface",
|
||||
":WatchAppStringResources",
|
||||
],
|
||||
)
|
||||
|
||||
apple_bundle(
|
||||
name = "WatchApp",
|
||||
binary = ":WatchAppBinary",
|
||||
visibility = [
|
||||
"//:",
|
||||
],
|
||||
extension = "app",
|
||||
info_plist = "Watch/App/Info.plist",
|
||||
info_plist_substitutions = watch_info_plist_substitutions(),
|
||||
xcode_product_type = "com.apple.product-type.application.watchapp2",
|
||||
deps = [
|
||||
":WatchAppExtension",
|
||||
],
|
||||
)
|
||||
|
||||
# Package
|
||||
|
||||
apple_package(
|
||||
name = "AppPackage",
|
||||
bundle = ":Telegram",
|
||||
)
|
||||
|
||||
xcode_workspace_config(
|
||||
name = "workspace",
|
||||
workspace_name = "Telegram_Buck",
|
||||
src_target = ":Telegram",
|
||||
)
|
10
Config/BUCK
10
Config/BUCK
@ -1,10 +0,0 @@
|
||||
# This file can be depended upon for any apple_test_lib rules.
|
||||
genrule(
|
||||
name = "test_info_plist",
|
||||
visibility = ["PUBLIC"],
|
||||
srcs = [
|
||||
"BuckSupportFiles/TestInfo.plist",
|
||||
],
|
||||
out = 'TestInfo.plist',
|
||||
cmd = 'cp $SRCDIR/BuckSupportFiles/TestInfo.plist $OUT',
|
||||
)
|
@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
@ -1,321 +0,0 @@
|
||||
load("//Config:utils.bzl",
|
||||
"library_configs",
|
||||
"dynamic_library_configs",
|
||||
)
|
||||
|
||||
text_section_items = [
|
||||
"__text",
|
||||
]
|
||||
|
||||
text_section_rename_linker_flags = [] #["-Wl,-rename_section,__TEXT,%s,__MEXT,%s" % (name, name) for name in text_section_items] + ["-Wl,-segprot,__MEXT,rx,rx"]
|
||||
|
||||
section_rename_linker_flags = text_section_rename_linker_flags
|
||||
|
||||
def apple_lib(
|
||||
name,
|
||||
visibility = ["PUBLIC"],
|
||||
srcs = [],
|
||||
headers = [],
|
||||
exported_headers = [],
|
||||
extra_xcode_files = [],
|
||||
deps = [],
|
||||
exported_deps = [],
|
||||
additional_linker_flags = None,
|
||||
exported_preprocessor_flags = [],
|
||||
exported_linker_flags = [],
|
||||
frameworks = [],
|
||||
weak_frameworks = [],
|
||||
swift_version = None,
|
||||
modular = True,
|
||||
compiler_flags = None,
|
||||
platform_compiler_flags = None,
|
||||
swift_compiler_flags = None,
|
||||
warning_as_error = False,
|
||||
suppress_warnings = False,
|
||||
has_cpp = False,
|
||||
framework = False):
|
||||
swift_version = swift_version or native.read_config('swift', 'version')
|
||||
swift_compiler_flags = swift_compiler_flags or []
|
||||
|
||||
resolved_frameworks = frameworks
|
||||
|
||||
if native.read_config("xcode", "beta") == "True":
|
||||
warning_as_error = False
|
||||
|
||||
if platform_compiler_flags != None:
|
||||
if compiler_flags != None:
|
||||
fail("compiler_flags and platform_compiler_flags are mutually exclusive")
|
||||
compiler_flags = []
|
||||
for i in range(len(platform_compiler_flags)):
|
||||
if warning_as_error:
|
||||
platform_compiler_flags[i][1].append("-Werror")
|
||||
elif suppress_warnings:
|
||||
platform_compiler_flags[i][1].append("-w")
|
||||
else:
|
||||
compiler_flags = compiler_flags or []
|
||||
if warning_as_error:
|
||||
compiler_flags.append("-Werror")
|
||||
elif suppress_warnings:
|
||||
compiler_flags.append("-w")
|
||||
|
||||
if warning_as_error:
|
||||
swift_compiler_flags.append("-warnings-as-errors")
|
||||
elif suppress_warnings:
|
||||
swift_compiler_flags.append("-suppress-warnings")
|
||||
|
||||
if framework:
|
||||
additional_linker_flags = additional_linker_flags or []
|
||||
if has_cpp:
|
||||
linker_flags = [
|
||||
"-lc++",
|
||||
"-lz"
|
||||
]
|
||||
else:
|
||||
linker_flags = []
|
||||
|
||||
if native.read_config("custom", "mode") == "project":
|
||||
resolved_linker_flags = linker_flags + additional_linker_flags + ["-Wl,-install_name,@rpath/lib%s.dylib" % (name)]
|
||||
resolved_frameworks = resolved_frameworks + ["$SDKROOT/System/Library/Frameworks/%s.framework" % x for x in weak_frameworks]
|
||||
else:
|
||||
resolved_linker_flags = linker_flags + additional_linker_flags + ["-Wl,-install_name,@rpath/%s.framework/%s" % (name, name)]
|
||||
for framework in weak_frameworks:
|
||||
resolved_linker_flags = resolved_linker_flags + ["-Wl,-weak_framework,%s" % framework]
|
||||
|
||||
resolved_linker_flags = resolved_linker_flags + section_rename_linker_flags
|
||||
|
||||
native.apple_library(
|
||||
name = name + "",
|
||||
srcs = srcs,
|
||||
header_namespace = name,
|
||||
module_name = name,
|
||||
soname = "lib" + name + ".dylib",
|
||||
headers = headers,
|
||||
exported_headers = exported_headers,
|
||||
deps = deps,
|
||||
exported_deps = exported_deps,
|
||||
extra_xcode_files = extra_xcode_files,
|
||||
frameworks = resolved_frameworks,
|
||||
visibility = visibility,
|
||||
swift_version = swift_version,
|
||||
configs = dynamic_library_configs(),
|
||||
modular = modular,
|
||||
compiler_flags = compiler_flags,
|
||||
platform_compiler_flags = platform_compiler_flags,
|
||||
swift_compiler_flags = swift_compiler_flags,
|
||||
preferred_linkage = "shared",
|
||||
#link_style = "static",
|
||||
linker_flags = resolved_linker_flags,
|
||||
)
|
||||
else:
|
||||
additional_linker_flags = additional_linker_flags or []
|
||||
if has_cpp:
|
||||
linker_flags = [
|
||||
"-lc++",
|
||||
"-lz"
|
||||
]
|
||||
else:
|
||||
linker_flags = []
|
||||
|
||||
resolved_exported_linker_flags = exported_linker_flags + linker_flags + additional_linker_flags
|
||||
|
||||
if native.read_config("custom", "mode") == "project":
|
||||
resolved_frameworks = resolved_frameworks + ["$SDKROOT/System/Library/Frameworks/%s.framework" % x for x in weak_frameworks]
|
||||
else:
|
||||
for framework in weak_frameworks:
|
||||
resolved_exported_linker_flags = resolved_exported_linker_flags + ["-Wl,-weak_framework,%s" % framework]
|
||||
|
||||
native.apple_library(
|
||||
name = name,
|
||||
srcs = srcs,
|
||||
headers = headers,
|
||||
exported_headers = exported_headers,
|
||||
deps = deps,
|
||||
exported_deps = exported_deps,
|
||||
exported_linker_flags = resolved_exported_linker_flags,
|
||||
extra_xcode_files = extra_xcode_files,
|
||||
frameworks = resolved_frameworks,
|
||||
visibility = visibility,
|
||||
swift_version = swift_version,
|
||||
configs = library_configs(),
|
||||
modular = modular,
|
||||
compiler_flags = compiler_flags,
|
||||
platform_compiler_flags = platform_compiler_flags,
|
||||
swift_compiler_flags = swift_compiler_flags,
|
||||
preferred_linkage = "static",
|
||||
exported_preprocessor_flags = exported_preprocessor_flags,
|
||||
)
|
||||
|
||||
def static_library(
|
||||
name,
|
||||
visibility = ["PUBLIC"],
|
||||
has_cpp = False,
|
||||
srcs = [],
|
||||
headers = [],
|
||||
exported_headers = [],
|
||||
extra_xcode_files = [],
|
||||
deps = [],
|
||||
additional_linker_flags = None,
|
||||
exported_preprocessor_flags = [],
|
||||
exported_linker_flags = [],
|
||||
frameworks = [],
|
||||
weak_frameworks = [],
|
||||
info_plist = None,
|
||||
info_plist_substitutions = {},
|
||||
modular = True,
|
||||
compiler_flags = None,
|
||||
platform_compiler_flags = None,
|
||||
swift_compiler_flags = None,
|
||||
warning_as_error = False,
|
||||
suppress_warnings = True
|
||||
):
|
||||
apple_lib(
|
||||
name = name,
|
||||
srcs = srcs,
|
||||
has_cpp = has_cpp,
|
||||
exported_headers = exported_headers,
|
||||
headers = headers,
|
||||
modular = modular,
|
||||
compiler_flags = compiler_flags,
|
||||
platform_compiler_flags = platform_compiler_flags,
|
||||
swift_compiler_flags = swift_compiler_flags,
|
||||
extra_xcode_files = extra_xcode_files,
|
||||
deps = deps,
|
||||
additional_linker_flags = additional_linker_flags,
|
||||
exported_preprocessor_flags = exported_preprocessor_flags,
|
||||
exported_linker_flags = exported_linker_flags,
|
||||
frameworks = frameworks,
|
||||
weak_frameworks = weak_frameworks,
|
||||
warning_as_error = warning_as_error,
|
||||
suppress_warnings = suppress_warnings
|
||||
)
|
||||
|
||||
def framework(
|
||||
name,
|
||||
visibility = ["PUBLIC"],
|
||||
has_cpp = False,
|
||||
srcs = [],
|
||||
headers = [],
|
||||
exported_headers = [],
|
||||
extra_xcode_files = [],
|
||||
deps = [],
|
||||
exported_deps = [],
|
||||
additional_linker_flags = None,
|
||||
frameworks = [],
|
||||
weak_frameworks = [],
|
||||
info_plist = None,
|
||||
info_plist_substitutions = {},
|
||||
modular = True,
|
||||
compiler_flags = None,
|
||||
platform_compiler_flags = None,
|
||||
swift_compiler_flags = None,
|
||||
warning_as_error = False,
|
||||
suppress_warnings = True):
|
||||
apple_lib(
|
||||
name = name,
|
||||
srcs = srcs,
|
||||
has_cpp = has_cpp,
|
||||
exported_headers = exported_headers,
|
||||
headers = headers,
|
||||
modular = modular,
|
||||
compiler_flags = compiler_flags,
|
||||
platform_compiler_flags = platform_compiler_flags,
|
||||
swift_compiler_flags = swift_compiler_flags,
|
||||
extra_xcode_files = extra_xcode_files,
|
||||
deps = deps,
|
||||
exported_deps = exported_deps,
|
||||
additional_linker_flags = additional_linker_flags,
|
||||
frameworks = frameworks,
|
||||
weak_frameworks = weak_frameworks,
|
||||
warning_as_error = warning_as_error,
|
||||
suppress_warnings = suppress_warnings,
|
||||
framework = True
|
||||
)
|
||||
|
||||
|
||||
CXX_SRC_EXT = ["mm", "cpp", "S"]
|
||||
def apple_cxx_lib(
|
||||
srcs = [],
|
||||
additional_exported_linker_flags = [],
|
||||
**kwargs):
|
||||
c_srcs, cxx_srcs = [], []
|
||||
|
||||
cxx_compile_flags = native.read_config("cxx", "cxxflags").split(" ")
|
||||
cxx_compile_flags.append("-w")
|
||||
|
||||
for file_ in srcs:
|
||||
if file_.split(".")[-1] in CXX_SRC_EXT:
|
||||
cxx_srcs.append((file_, cxx_compile_flags))
|
||||
else:
|
||||
c_srcs.append(file_)
|
||||
apple_lib(
|
||||
srcs = c_srcs + cxx_srcs,
|
||||
exported_linker_flags = [
|
||||
"-lc++",
|
||||
"-lz"
|
||||
] + additional_exported_linker_flags,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
def framework_binary_dependencies(names):
|
||||
result = []
|
||||
for name in names:
|
||||
result.append(name + "#shared")
|
||||
return result
|
||||
|
||||
def framework_bundle_dependencies(names):
|
||||
result = []
|
||||
if native.read_config("custom", "mode") == "project":
|
||||
for name in names:
|
||||
pass
|
||||
else:
|
||||
for name in names:
|
||||
result.append(name + "#shared")
|
||||
return result
|
||||
|
||||
def gen_header_targets(header_paths, prefix, flavor, source_rule, source_path):
|
||||
result = dict()
|
||||
for header_path in header_paths:
|
||||
name = prefix + header_path.replace('/', '_sub_')
|
||||
native.genrule(
|
||||
name = name + flavor,
|
||||
cmd = 'cp $(location :' + source_rule + ')/' + source_path + '/' + header_path + ' $OUT',
|
||||
out = name,
|
||||
)
|
||||
result[header_path] = ':' + name + flavor
|
||||
return result
|
||||
|
||||
def merge_maps(dicts):
|
||||
result = dict()
|
||||
for d in dicts:
|
||||
for key in d:
|
||||
if key in result and result[key] != d[key]:
|
||||
fail(
|
||||
"Conflicting files in file search paths. " +
|
||||
"\"%s\" maps to both \"%s\" and \"%s\"." %
|
||||
(key, result[key], d[key]),
|
||||
)
|
||||
result.update(d)
|
||||
return result
|
||||
|
||||
def basename(p):
|
||||
return p.rpartition("/")[-1]
|
||||
|
||||
def glob_map(glob_results):
|
||||
result = dict()
|
||||
for path in glob_results:
|
||||
file_name = basename(path)
|
||||
if file_name in result:
|
||||
fail('\"%s\" maps to both \"%s\" and \"%s\"' % (file_name, result[file_name], path))
|
||||
result[file_name] = path
|
||||
return result
|
||||
|
||||
def glob_sub_map(prefix, glob_specs, exclude = []):
|
||||
result = dict()
|
||||
for path in native.glob(glob_specs, exclude = exclude):
|
||||
if not path.startswith(prefix):
|
||||
fail('\"%s\" does not start with \"%s\"' % (path, prefix))
|
||||
file_key = path[len(prefix):]
|
||||
if file_key in result:
|
||||
fail('\"%s\" maps to both \"%s\" and \"%s\"' % (file_key, result[file_key], path))
|
||||
result[file_key] = path
|
||||
return result
|
548
Telegram/BUCK
548
Telegram/BUCK
@ -1,548 +0,0 @@
|
||||
load("//Config:utils.bzl",
|
||||
"library_configs",
|
||||
)
|
||||
|
||||
load("//Config:configs.bzl",
|
||||
"app_binary_configs",
|
||||
"share_extension_configs",
|
||||
"widget_extension_configs",
|
||||
"notification_content_extension_configs",
|
||||
"notification_service_extension_configs",
|
||||
"intents_extension_configs",
|
||||
"watch_extension_binary_configs",
|
||||
"watch_binary_configs",
|
||||
"info_plist_substitutions",
|
||||
"app_info_plist_substitutions",
|
||||
"share_extension_info_plist_substitutions",
|
||||
"widget_extension_info_plist_substitutions",
|
||||
"notification_content_extension_info_plist_substitutions",
|
||||
"notification_service_extension_info_plist_substitutions",
|
||||
"intents_extension_info_plist_substitutions",
|
||||
"watch_extension_info_plist_substitutions",
|
||||
"watch_info_plist_substitutions",
|
||||
"DEVELOPMENT_LANGUAGE",
|
||||
)
|
||||
|
||||
load("//Config:buck_rule_macros.bzl",
|
||||
"apple_lib",
|
||||
"framework_binary_dependencies",
|
||||
"framework_bundle_dependencies",
|
||||
"glob_map",
|
||||
"glob_sub_map",
|
||||
"merge_maps",
|
||||
)
|
||||
|
||||
framework_dependencies = [
|
||||
"//submodules/MtProtoKit:MtProtoKit",
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||
"//submodules/Postbox:Postbox",
|
||||
"//submodules/TelegramApi:TelegramApi",
|
||||
"//submodules/SyncCore:SyncCore",
|
||||
"//submodules/TelegramCore:TelegramCore",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
|
||||
"//submodules/Display:Display",
|
||||
"//submodules/TelegramUI:TelegramUI",
|
||||
]
|
||||
|
||||
resource_dependencies = [
|
||||
"//submodules/LegacyComponents:LegacyComponentsAssets",
|
||||
"//submodules/LegacyComponents:LegacyComponentsResources",
|
||||
"//submodules/TelegramUI:TelegramUIAssets",
|
||||
"//submodules/TelegramUI:TelegramUIResources",
|
||||
#"//submodules/WalletUI:WalletUIAssets",
|
||||
#"//submodules/WalletUI:WalletUIResources",
|
||||
"//submodules/PasswordSetupUI:PasswordSetupUIResources",
|
||||
"//submodules/PasswordSetupUI:PasswordSetupUIAssets",
|
||||
"//submodules/OverlayStatusController:OverlayStatusControllerResources",
|
||||
":AppResources",
|
||||
":AppStringResources",
|
||||
":InfoPlistStringResources",
|
||||
":AppIntentVocabularyResources",
|
||||
":Icons",
|
||||
":AdditionalIcons",
|
||||
":LaunchScreen",
|
||||
]
|
||||
|
||||
build_phase_scripts = [
|
||||
]
|
||||
|
||||
apple_resource(
|
||||
name = "AppResources",
|
||||
files = glob([
|
||||
"Telegram-iOS/Resources/**/*",
|
||||
], exclude = ["Telegram-iOS/Resources/**/.*"]),
|
||||
visibility = ["PUBLIC"],
|
||||
)
|
||||
|
||||
apple_resource(
|
||||
name = "AppStringResources",
|
||||
files = [],
|
||||
variants = glob([
|
||||
"Telegram-iOS/*.lproj/Localizable.strings",
|
||||
]),
|
||||
visibility = ["PUBLIC"],
|
||||
)
|
||||
|
||||
apple_resource(
|
||||
name = "AppIntentVocabularyResources",
|
||||
files = [],
|
||||
variants = glob([
|
||||
"Telegram-iOS/*.lproj/AppIntentVocabulary.plist",
|
||||
]),
|
||||
visibility = ["PUBLIC"],
|
||||
)
|
||||
|
||||
apple_resource(
|
||||
name = "InfoPlistStringResources",
|
||||
files = [],
|
||||
variants = glob([
|
||||
"Telegram-iOS/*.lproj/InfoPlist.strings",
|
||||
]),
|
||||
visibility = ["PUBLIC"],
|
||||
)
|
||||
|
||||
apple_asset_catalog(
|
||||
name = "Icons",
|
||||
dirs = [
|
||||
"Telegram-iOS/Icons.xcassets",
|
||||
"Telegram-iOS/AppIcons.xcassets",
|
||||
],
|
||||
app_icon = "AppIconLLC",
|
||||
visibility = ["PUBLIC"],
|
||||
)
|
||||
|
||||
apple_resource(
|
||||
name = "AdditionalIcons",
|
||||
files = glob([
|
||||
"Telegram-iOS/*.png",
|
||||
]),
|
||||
visibility = ["PUBLIC"],
|
||||
)
|
||||
|
||||
apple_resource(
|
||||
name = "LaunchScreen",
|
||||
files = [
|
||||
"Telegram-iOS/Base.lproj/LaunchScreen.xib",
|
||||
],
|
||||
visibility = ["PUBLIC"],
|
||||
)
|
||||
|
||||
apple_library(
|
||||
name = "AppLibrary",
|
||||
visibility = [
|
||||
"//...",
|
||||
],
|
||||
configs = library_configs(),
|
||||
swift_version = native.read_config("swift", "version"),
|
||||
srcs = [
|
||||
"Telegram-iOS/main.m",
|
||||
"Telegram-iOS/Application.swift"
|
||||
],
|
||||
deps = [
|
||||
]
|
||||
+ framework_binary_dependencies(framework_dependencies),
|
||||
)
|
||||
|
||||
apple_binary(
|
||||
name = "AppBinary",
|
||||
visibility = [
|
||||
"//...",
|
||||
],
|
||||
configs = app_binary_configs(),
|
||||
swift_version = native.read_config("swift", "version"),
|
||||
srcs = [
|
||||
"SupportFiles/Empty.swift",
|
||||
],
|
||||
deps = [
|
||||
":AppLibrary",
|
||||
]
|
||||
+ resource_dependencies,
|
||||
)
|
||||
|
||||
apple_bundle(
|
||||
name = "Telegram",
|
||||
visibility = [
|
||||
"//Telegram:...",
|
||||
],
|
||||
extension = "app",
|
||||
binary = ":AppBinary",
|
||||
product_name = "Telegram",
|
||||
info_plist = "Telegram-iOS/Info.plist",
|
||||
info_plist_substitutions = app_info_plist_substitutions(),
|
||||
deps = [
|
||||
":ShareExtension",
|
||||
":WidgetExtension",
|
||||
":NotificationContentExtension",
|
||||
":NotificationServiceExtension",
|
||||
":IntentsExtension",
|
||||
":WatchApp#watch",
|
||||
]
|
||||
+ framework_bundle_dependencies(framework_dependencies),
|
||||
)
|
||||
|
||||
# Share Extension
|
||||
|
||||
apple_binary(
|
||||
name = "ShareBinary",
|
||||
srcs = glob([
|
||||
"Share/**/*.swift",
|
||||
]),
|
||||
configs = share_extension_configs(),
|
||||
linker_flags = [
|
||||
"-e",
|
||||
"_NSExtensionMain",
|
||||
"-Xlinker",
|
||||
"-rpath",
|
||||
"-Xlinker",
|
||||
"/usr/lib/swift",
|
||||
"-Xlinker",
|
||||
"-rpath",
|
||||
"-Xlinker",
|
||||
"@executable_path/../../Frameworks",
|
||||
],
|
||||
deps = [
|
||||
"//submodules/TelegramUI:TelegramUI#shared",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
],
|
||||
)
|
||||
|
||||
apple_bundle(
|
||||
name = "ShareExtension",
|
||||
binary = ":ShareBinary",
|
||||
extension = "appex",
|
||||
info_plist = "Share/Info.plist",
|
||||
info_plist_substitutions = share_extension_info_plist_substitutions(),
|
||||
deps = [
|
||||
],
|
||||
xcode_product_type = "com.apple.product-type.app-extension",
|
||||
)
|
||||
|
||||
# Widget
|
||||
|
||||
apple_binary(
|
||||
name = "WidgetBinary",
|
||||
srcs = glob([
|
||||
"Widget/**/*.swift",
|
||||
]),
|
||||
configs = widget_extension_configs(),
|
||||
swift_compiler_flags = [
|
||||
"-application-extension",
|
||||
],
|
||||
linker_flags = [
|
||||
"-e",
|
||||
"_NSExtensionMain",
|
||||
"-Xlinker",
|
||||
"-rpath",
|
||||
"-Xlinker",
|
||||
"/usr/lib/swift",
|
||||
"-Xlinker",
|
||||
"-rpath",
|
||||
"-Xlinker",
|
||||
"@executable_path/../../Frameworks",
|
||||
],
|
||||
deps = [
|
||||
"//submodules/BuildConfig:BuildConfig",
|
||||
"//submodules/WidgetItems:WidgetItems",
|
||||
"//submodules/AppLockState:AppLockState",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/NotificationCenter.framework",
|
||||
],
|
||||
)
|
||||
|
||||
apple_bundle(
|
||||
name = "WidgetExtension",
|
||||
binary = ":WidgetBinary",
|
||||
extension = "appex",
|
||||
info_plist = "Widget/Info.plist",
|
||||
info_plist_substitutions = widget_extension_info_plist_substitutions(),
|
||||
deps = [
|
||||
],
|
||||
xcode_product_type = "com.apple.product-type.app-extension",
|
||||
)
|
||||
|
||||
# Notification Content
|
||||
|
||||
apple_binary(
|
||||
name = "NotificationContentBinary",
|
||||
srcs = glob([
|
||||
"NotificationContent/**/*.swift",
|
||||
]),
|
||||
configs = notification_content_extension_configs(),
|
||||
swift_compiler_flags = [
|
||||
"-application-extension",
|
||||
],
|
||||
linker_flags = [
|
||||
"-e",
|
||||
"_NSExtensionMain",
|
||||
"-Xlinker",
|
||||
"-rpath",
|
||||
"-Xlinker",
|
||||
"/usr/lib/swift",
|
||||
"-Xlinker",
|
||||
"-rpath",
|
||||
"-Xlinker",
|
||||
"@executable_path/../../Frameworks",
|
||||
],
|
||||
deps = [
|
||||
"//submodules/TelegramUI:TelegramUI#shared",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UserNotificationsUI.framework",
|
||||
],
|
||||
)
|
||||
|
||||
apple_bundle(
|
||||
name = "NotificationContentExtension",
|
||||
binary = ":NotificationContentBinary",
|
||||
extension = "appex",
|
||||
info_plist = "NotificationContent/Info.plist",
|
||||
info_plist_substitutions = notification_content_extension_info_plist_substitutions(),
|
||||
deps = [
|
||||
],
|
||||
xcode_product_type = "com.apple.product-type.app-extension",
|
||||
)
|
||||
|
||||
#Notification Service
|
||||
|
||||
apple_binary(
|
||||
name = "NotificationServiceBinary",
|
||||
srcs = glob([
|
||||
"NotificationService/Sources/*.swift",
|
||||
]),
|
||||
configs = notification_service_extension_configs(),
|
||||
swift_compiler_flags = [
|
||||
"-application-extension",
|
||||
],
|
||||
linker_flags = [
|
||||
"-e",
|
||||
"_NSExtensionMain",
|
||||
"-Xlinker",
|
||||
"-rpath",
|
||||
"-Xlinker",
|
||||
"/usr/lib/swift",
|
||||
"-Xlinker",
|
||||
"-rpath",
|
||||
"-Xlinker",
|
||||
"@executable_path/../../Frameworks",
|
||||
],
|
||||
deps = [
|
||||
"//Telegram/NotificationService/NotificationServiceObjC:NotificationServiceObjC",
|
||||
"//submodules/BuildConfig:BuildConfig",
|
||||
"//submodules/MtProtoKit:MtProtoKit#shared",
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/EncryptionProvider:EncryptionProvider",
|
||||
"//submodules/Database/ValueBox:ValueBox",
|
||||
"//submodules/Database/PostboxDataTypes:PostboxDataTypes",
|
||||
"//submodules/Database/MessageHistoryReadStateTable:MessageHistoryReadStateTable",
|
||||
"//submodules/Database/MessageHistoryMetadataTable:MessageHistoryMetadataTable",
|
||||
"//submodules/Database/PreferencesTable:PreferencesTable",
|
||||
"//submodules/Database/PeerTable:PeerTable",
|
||||
"//submodules/sqlcipher:sqlcipher",
|
||||
"//submodules/AppLockState:AppLockState",
|
||||
"//submodules/NotificationsPresentationData:NotificationsPresentationData",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UserNotifications.framework",
|
||||
],
|
||||
)
|
||||
|
||||
apple_bundle(
|
||||
name = "NotificationServiceExtension",
|
||||
binary = ":NotificationServiceBinary",
|
||||
extension = "appex",
|
||||
info_plist = "NotificationService/Info.plist",
|
||||
info_plist_substitutions = notification_service_extension_info_plist_substitutions(),
|
||||
deps = [
|
||||
],
|
||||
xcode_product_type = "com.apple.product-type.app-extension",
|
||||
)
|
||||
|
||||
# Intents
|
||||
|
||||
apple_binary(
|
||||
name = "IntentsBinary",
|
||||
srcs = glob([
|
||||
"SiriIntents/**/*.swift",
|
||||
]),
|
||||
configs = intents_extension_configs(),
|
||||
swift_compiler_flags = [
|
||||
"-application-extension",
|
||||
],
|
||||
linker_flags = [
|
||||
"-e",
|
||||
"_NSExtensionMain",
|
||||
"-Xlinker",
|
||||
"-rpath",
|
||||
"-Xlinker",
|
||||
"/usr/lib/swift",
|
||||
"-Xlinker",
|
||||
"-rpath",
|
||||
"-Xlinker",
|
||||
"@executable_path/../../Frameworks",
|
||||
],
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/Postbox:Postbox#shared",
|
||||
"//submodules/TelegramApi:TelegramApi#shared",
|
||||
"//submodules/SyncCore:SyncCore#shared",
|
||||
"//submodules/TelegramCore:TelegramCore#shared",
|
||||
"//submodules/BuildConfig:BuildConfig",
|
||||
"//submodules/OpenSSLEncryptionProvider:OpenSSLEncryptionProvider",
|
||||
"//submodules/AppLockState:AppLockState",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/Intents.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/Contacts.framework",
|
||||
],
|
||||
)
|
||||
|
||||
apple_bundle(
|
||||
name = "IntentsExtension",
|
||||
binary = ":IntentsBinary",
|
||||
extension = "appex",
|
||||
info_plist = "SiriIntents/Info.plist",
|
||||
info_plist_substitutions = intents_extension_info_plist_substitutions(),
|
||||
deps = [
|
||||
],
|
||||
xcode_product_type = "com.apple.product-type.app-extension",
|
||||
)
|
||||
|
||||
# Watch
|
||||
|
||||
apple_resource(
|
||||
name = "WatchAppStringResources",
|
||||
files = [],
|
||||
variants = glob([
|
||||
"Telegram-iOS/*.lproj/Localizable.strings",
|
||||
]),
|
||||
visibility = ["PUBLIC"],
|
||||
)
|
||||
|
||||
apple_resource(
|
||||
name = "WatchAppExtensionResources",
|
||||
files = glob([
|
||||
"Watch/Extension/Resources/**/*",
|
||||
], exclude = ["Watch/Extension/Resources/**/.*"]),
|
||||
visibility = ["PUBLIC"],
|
||||
)
|
||||
|
||||
apple_binary(
|
||||
name = "WatchAppExtensionBinary",
|
||||
srcs = glob([
|
||||
"Watch/Extension/**/*.m",
|
||||
"Watch/SSignalKit/**/*.m",
|
||||
"Watch/Bridge/**/*.m",
|
||||
"Watch/WatchCommonWatch/**/*.m",
|
||||
]),
|
||||
headers = merge_maps([
|
||||
glob_map(glob([
|
||||
"Watch/Extension/*.h",
|
||||
"Watch/Bridge/*.h",
|
||||
])),
|
||||
glob_sub_map("Watch/Extension/", glob([
|
||||
"Watch/Extension/SSignalKit/*.h",
|
||||
])),
|
||||
glob_sub_map("Watch/", glob([
|
||||
"Watch/WatchCommonWatch/*.h",
|
||||
])),
|
||||
]),
|
||||
compiler_flags = [
|
||||
"-DTARGET_OS_WATCH=1",
|
||||
],
|
||||
linker_flags = [
|
||||
"-e",
|
||||
"_WKExtensionMain",
|
||||
"-lWKExtensionMainLegacy",
|
||||
],
|
||||
configs = watch_extension_binary_configs(),
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/UserNotifications.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/CoreLocation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/CoreGraphics.framework",
|
||||
],
|
||||
deps = [
|
||||
":WatchAppStringResources",
|
||||
":WatchAppExtensionResources",
|
||||
],
|
||||
)
|
||||
|
||||
apple_bundle(
|
||||
name = "WatchAppExtension",
|
||||
binary = ":WatchAppExtensionBinary",
|
||||
extension = "appex",
|
||||
info_plist = "Watch/Extension/Info.plist",
|
||||
info_plist_substitutions = watch_extension_info_plist_substitutions(),
|
||||
xcode_product_type = "com.apple.product-type.watchkit2-extension",
|
||||
)
|
||||
|
||||
apple_resource(
|
||||
name = "WatchAppResources",
|
||||
dirs = [],
|
||||
files = glob(["Watch/Extension/Resources/*.png"])
|
||||
)
|
||||
|
||||
apple_asset_catalog(
|
||||
name = "WatchAppAssets",
|
||||
dirs = [
|
||||
"Watch/App/Assets.xcassets",
|
||||
],
|
||||
app_icon = "AppIcon",
|
||||
visibility = ["PUBLIC"],
|
||||
)
|
||||
|
||||
apple_resource(
|
||||
name = "WatchAppInterface",
|
||||
files = [
|
||||
"Watch/App/Base.lproj/Interface.storyboard",
|
||||
],
|
||||
visibility = ["PUBLIC"],
|
||||
)
|
||||
|
||||
apple_binary(
|
||||
name = "WatchAppBinary",
|
||||
configs = watch_binary_configs(),
|
||||
deps = [
|
||||
":WatchAppResources",
|
||||
":WatchAppAssets",
|
||||
":WatchAppInterface",
|
||||
":WatchAppStringResources",
|
||||
],
|
||||
)
|
||||
|
||||
apple_bundle(
|
||||
name = "WatchApp",
|
||||
binary = ":WatchAppBinary",
|
||||
visibility = [
|
||||
"//Telegram:...",
|
||||
],
|
||||
extension = "app",
|
||||
info_plist = "Watch/App/Info.plist",
|
||||
info_plist_substitutions = watch_info_plist_substitutions(),
|
||||
xcode_product_type = "com.apple.product-type.application.watchapp2",
|
||||
deps = [
|
||||
":WatchAppExtension",
|
||||
],
|
||||
)
|
||||
|
||||
# Package
|
||||
|
||||
apple_package(
|
||||
name = "AppPackage",
|
||||
bundle = ":Telegram",
|
||||
)
|
||||
|
||||
xcode_workspace_config(
|
||||
name = "workspace",
|
||||
workspace_name = "Telegram_Buck",
|
||||
src_target = ":Telegram",
|
||||
)
|
178
Telegram/BUILD
178
Telegram/BUILD
@ -1,3 +1,7 @@
|
||||
load("@bazel_skylib//rules:common_settings.bzl",
|
||||
"bool_flag",
|
||||
)
|
||||
|
||||
load("@build_bazel_rules_apple//apple:ios.bzl",
|
||||
"ios_application",
|
||||
"ios_extension",
|
||||
@ -18,13 +22,10 @@ load("//build-system/bazel-utils:plist_fragment.bzl",
|
||||
)
|
||||
|
||||
load(
|
||||
"//build-input/data:variables.bzl",
|
||||
"telegram_build_number",
|
||||
"telegram_version",
|
||||
"@build_configuration//:variables.bzl",
|
||||
"telegram_bundle_id",
|
||||
"telegram_aps_environment",
|
||||
"telegram_team_id",
|
||||
"telegram_disable_extensions",
|
||||
)
|
||||
|
||||
config_setting(
|
||||
@ -34,6 +35,19 @@ config_setting(
|
||||
},
|
||||
)
|
||||
|
||||
bool_flag(
|
||||
name = "disableExtensions",
|
||||
build_setting_default = False,
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
config_setting(
|
||||
name = "disableExtensionsSetting",
|
||||
flag_values = {
|
||||
":disableExtensions": "True",
|
||||
},
|
||||
)
|
||||
|
||||
genrule(
|
||||
name = "empty",
|
||||
outs = ["empty.swift"],
|
||||
@ -190,14 +204,20 @@ swift_library(
|
||||
)
|
||||
|
||||
plist_fragment(
|
||||
name = "AdditionalInfoPlist",
|
||||
name = "BuildNumberInfoPlist",
|
||||
extension = "plist",
|
||||
template =
|
||||
"""
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>{telegram_version}</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>{telegram_build_number}</string>
|
||||
<string>{buildNumber}</string>
|
||||
"""
|
||||
)
|
||||
|
||||
plist_fragment(
|
||||
name = "UrlTypesInfoPlist",
|
||||
extension = "plist",
|
||||
template =
|
||||
"""
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
@ -210,16 +230,6 @@ plist_fragment(
|
||||
<string>telegram</string>
|
||||
</array>
|
||||
</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>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
@ -232,8 +242,6 @@ plist_fragment(
|
||||
</dict>
|
||||
</array>
|
||||
""".format(
|
||||
telegram_version = telegram_version,
|
||||
telegram_build_number = telegram_build_number,
|
||||
telegram_bundle_id = telegram_bundle_id,
|
||||
)
|
||||
)
|
||||
@ -371,13 +379,8 @@ plist_fragment(
|
||||
template =
|
||||
"""
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>{telegram_version}</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>{telegram_build_number}</string>
|
||||
""".format(
|
||||
telegram_version = telegram_version,
|
||||
telegram_build_number = telegram_build_number,
|
||||
)
|
||||
<string>{telegramVersion}</string>
|
||||
"""
|
||||
)
|
||||
|
||||
plist_fragment(
|
||||
@ -478,11 +481,12 @@ watchos_extension(
|
||||
infoplists = [
|
||||
":WatchExtensionInfoPlist",
|
||||
":VersionInfoPlist",
|
||||
":BuildNumberInfoPlist",
|
||||
":AppNameInfoPlist",
|
||||
":WatchExtensionNSExtensionInfoPlist",
|
||||
],
|
||||
minimum_os_version = "5.0",
|
||||
provisioning_profile = "//build-input/data/provisioning-profiles:WatchExtension.mobileprovision",
|
||||
provisioning_profile = "@build_configuration//provisioning:WatchExtension.mobileprovision",
|
||||
resources = [
|
||||
":TelegramWatchExtensionResources",
|
||||
],
|
||||
@ -505,11 +509,12 @@ watchos_application(
|
||||
infoplists = [
|
||||
":WatchAppInfoPlist",
|
||||
":VersionInfoPlist",
|
||||
"BuildNumberInfoPlist",
|
||||
":AppNameInfoPlist",
|
||||
":WatchAppCompanionInfoPlist",
|
||||
],
|
||||
minimum_os_version = "5.0",
|
||||
provisioning_profile = "//build-input/data/provisioning-profiles:WatchApp.mobileprovision",
|
||||
provisioning_profile = "@build_configuration//provisioning:WatchApp.mobileprovision",
|
||||
resources = [
|
||||
":TelegramWatchAppResources",
|
||||
":TelegramWatchAppAssets",
|
||||
@ -528,20 +533,14 @@ plist_fragment(
|
||||
"""
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>{telegram_bundle_id}.MtProtoKit</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>{telegram_build_number}</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>MtProtoKit</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>{telegram_version}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
""".format(
|
||||
telegram_bundle_id = telegram_bundle_id,
|
||||
telegram_version = telegram_version,
|
||||
telegram_build_number = telegram_build_number,
|
||||
)
|
||||
)
|
||||
|
||||
@ -556,6 +555,8 @@ ios_framework(
|
||||
],
|
||||
infoplists = [
|
||||
":MtProtoKitInfoPlist",
|
||||
":BuildNumberInfoPlist",
|
||||
":VersionInfoPlist",
|
||||
],
|
||||
minimum_os_version = "9.0",
|
||||
ipa_post_processor = strip_framework,
|
||||
@ -571,20 +572,14 @@ plist_fragment(
|
||||
"""
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>{telegram_bundle_id}.SwiftSignalKit</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>{telegram_build_number}</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>SwiftSignalKit</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>{telegram_version}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
""".format(
|
||||
telegram_bundle_id = telegram_bundle_id,
|
||||
telegram_version = telegram_version,
|
||||
telegram_build_number = telegram_build_number,
|
||||
)
|
||||
)
|
||||
|
||||
@ -599,6 +594,8 @@ ios_framework(
|
||||
],
|
||||
infoplists = [
|
||||
":SwiftSignalKitInfoPlist",
|
||||
":BuildNumberInfoPlist",
|
||||
":VersionInfoPlist",
|
||||
],
|
||||
minimum_os_version = "9.0",
|
||||
ipa_post_processor = strip_framework,
|
||||
@ -614,20 +611,14 @@ plist_fragment(
|
||||
"""
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>{telegram_bundle_id}.Postbox</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>{telegram_build_number}</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Postbox</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>{telegram_version}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
""".format(
|
||||
telegram_bundle_id = telegram_bundle_id,
|
||||
telegram_version = telegram_version,
|
||||
telegram_build_number = telegram_build_number,
|
||||
)
|
||||
)
|
||||
|
||||
@ -642,6 +633,8 @@ ios_framework(
|
||||
],
|
||||
infoplists = [
|
||||
":PostboxInfoPlist",
|
||||
":BuildNumberInfoPlist",
|
||||
":VersionInfoPlist",
|
||||
],
|
||||
frameworks = [
|
||||
":SwiftSignalKitFramework",
|
||||
@ -660,20 +653,14 @@ plist_fragment(
|
||||
"""
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>{telegram_bundle_id}.TelegramApi</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>{telegram_build_number}</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>TelegramApi</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>{telegram_version}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
""".format(
|
||||
telegram_bundle_id = telegram_bundle_id,
|
||||
telegram_version = telegram_version,
|
||||
telegram_build_number = telegram_build_number,
|
||||
)
|
||||
)
|
||||
|
||||
@ -688,6 +675,8 @@ ios_framework(
|
||||
],
|
||||
infoplists = [
|
||||
":TelegramApiInfoPlist",
|
||||
":BuildNumberInfoPlist",
|
||||
":VersionInfoPlist",
|
||||
],
|
||||
minimum_os_version = "9.0",
|
||||
ipa_post_processor = strip_framework,
|
||||
@ -703,20 +692,14 @@ plist_fragment(
|
||||
"""
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>{telegram_bundle_id}.SyncCore</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>{telegram_build_number}</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>SyncCore</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>{telegram_version}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
""".format(
|
||||
telegram_bundle_id = telegram_bundle_id,
|
||||
telegram_version = telegram_version,
|
||||
telegram_build_number = telegram_build_number,
|
||||
)
|
||||
)
|
||||
|
||||
@ -731,6 +714,8 @@ ios_framework(
|
||||
],
|
||||
infoplists = [
|
||||
":SyncCoreInfoPlist",
|
||||
":BuildNumberInfoPlist",
|
||||
":VersionInfoPlist",
|
||||
],
|
||||
frameworks = [
|
||||
":SwiftSignalKitFramework",
|
||||
@ -750,20 +735,14 @@ plist_fragment(
|
||||
"""
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>{telegram_bundle_id}.TelegramCore</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>{telegram_build_number}</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>TelegramCore</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>{telegram_version}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
""".format(
|
||||
telegram_bundle_id = telegram_bundle_id,
|
||||
telegram_version = telegram_version,
|
||||
telegram_build_number = telegram_build_number,
|
||||
)
|
||||
)
|
||||
|
||||
@ -778,13 +757,14 @@ ios_framework(
|
||||
],
|
||||
infoplists = [
|
||||
":TelegramCoreInfoPlist",
|
||||
":BuildNumberInfoPlist",
|
||||
":VersionInfoPlist",
|
||||
],
|
||||
frameworks = [
|
||||
":MtProtoKitFramework",
|
||||
":SwiftSignalKitFramework",
|
||||
":PostboxFramework",
|
||||
":SyncCoreFramework",
|
||||
#":TelegramApiFramework",
|
||||
],
|
||||
minimum_os_version = "9.0",
|
||||
ipa_post_processor = strip_framework,
|
||||
@ -800,20 +780,14 @@ plist_fragment(
|
||||
"""
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>{telegram_bundle_id}.AsyncDisplayKit</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>{telegram_build_number}</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>AsyncDisplayKit</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>{telegram_version}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
""".format(
|
||||
telegram_bundle_id = telegram_bundle_id,
|
||||
telegram_version = telegram_version,
|
||||
telegram_build_number = telegram_build_number,
|
||||
)
|
||||
)
|
||||
|
||||
@ -828,6 +802,8 @@ ios_framework(
|
||||
],
|
||||
infoplists = [
|
||||
":AsyncDisplayKitInfoPlist",
|
||||
":BuildNumberInfoPlist",
|
||||
":VersionInfoPlist",
|
||||
],
|
||||
minimum_os_version = "9.0",
|
||||
ipa_post_processor = strip_framework,
|
||||
@ -843,20 +819,14 @@ plist_fragment(
|
||||
"""
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>{telegram_bundle_id}.Display</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>{telegram_build_number}</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Display</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>{telegram_version}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
""".format(
|
||||
telegram_bundle_id = telegram_bundle_id,
|
||||
telegram_version = telegram_version,
|
||||
telegram_build_number = telegram_build_number,
|
||||
)
|
||||
)
|
||||
|
||||
@ -914,6 +884,8 @@ ios_framework(
|
||||
],
|
||||
infoplists = [
|
||||
":DisplayInfoPlist",
|
||||
":BuildNumberInfoPlist",
|
||||
":VersionInfoPlist",
|
||||
],
|
||||
frameworks = [
|
||||
":SwiftSignalKitFramework",
|
||||
@ -933,20 +905,14 @@ plist_fragment(
|
||||
"""
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>{telegram_bundle_id}.TelegramUI</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>{telegram_build_number}</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>TelegramUI</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>{telegram_version}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
""".format(
|
||||
telegram_bundle_id = telegram_bundle_id,
|
||||
telegram_version = telegram_version,
|
||||
telegram_build_number = telegram_build_number,
|
||||
)
|
||||
)
|
||||
|
||||
@ -961,12 +927,13 @@ ios_framework(
|
||||
],
|
||||
infoplists = [
|
||||
":TelegramUIInfoPlist",
|
||||
":BuildNumberInfoPlist",
|
||||
":VersionInfoPlist",
|
||||
],
|
||||
frameworks = [
|
||||
":MtProtoKitFramework",
|
||||
":SwiftSignalKitFramework",
|
||||
":PostboxFramework",
|
||||
#":TelegramApiFramework",
|
||||
":SyncCoreFramework",
|
||||
":TelegramCoreFramework",
|
||||
":AsyncDisplayKitFramework",
|
||||
@ -1052,10 +1019,11 @@ ios_extension(
|
||||
infoplists = [
|
||||
":ShareInfoPlist",
|
||||
":VersionInfoPlist",
|
||||
":BuildNumberInfoPlist",
|
||||
":AppNameInfoPlist",
|
||||
],
|
||||
minimum_os_version = "9.0",
|
||||
provisioning_profile = "//build-input/data/provisioning-profiles:Share.mobileprovision",
|
||||
provisioning_profile = "@build_configuration//provisioning:Share.mobileprovision",
|
||||
deps = [":ShareExtensionLib"],
|
||||
frameworks = [
|
||||
":TelegramUIFramework"
|
||||
@ -1120,10 +1088,11 @@ ios_extension(
|
||||
infoplists = [
|
||||
":NotificationContentInfoPlist",
|
||||
":VersionInfoPlist",
|
||||
":BuildNumberInfoPlist",
|
||||
":AppNameInfoPlist",
|
||||
],
|
||||
minimum_os_version = "10.0",
|
||||
provisioning_profile = "//build-input/data/provisioning-profiles:NotificationContent.mobileprovision",
|
||||
provisioning_profile = "@build_configuration//provisioning:NotificationContent.mobileprovision",
|
||||
deps = [":NotificationContentExtensionLib"],
|
||||
frameworks = [
|
||||
":TelegramUIFramework"
|
||||
@ -1182,11 +1151,12 @@ ios_extension(
|
||||
infoplists = [
|
||||
":WidgetInfoPlist",
|
||||
":VersionInfoPlist",
|
||||
":BuildNumberInfoPlist",
|
||||
":AppNameInfoPlist",
|
||||
],
|
||||
minimum_os_version = "14.0",
|
||||
provides_main = True,
|
||||
provisioning_profile = "//build-input/data/provisioning-profiles:Widget.mobileprovision",
|
||||
provisioning_profile = "@build_configuration//provisioning:Widget.mobileprovision",
|
||||
deps = [":WidgetExtensionLib"],
|
||||
frameworks = [],
|
||||
)
|
||||
@ -1261,16 +1231,16 @@ ios_extension(
|
||||
infoplists = [
|
||||
":IntentsInfoPlist",
|
||||
":VersionInfoPlist",
|
||||
":BuildNumberInfoPlist",
|
||||
":AppNameInfoPlist",
|
||||
],
|
||||
minimum_os_version = "10.0",
|
||||
provisioning_profile = "//build-input/data/provisioning-profiles:Intents.mobileprovision",
|
||||
provisioning_profile = "@build_configuration//provisioning:Intents.mobileprovision",
|
||||
deps = [":IntentsExtensionLib"],
|
||||
frameworks = [
|
||||
":SwiftSignalKitFramework",
|
||||
":PostboxFramework",
|
||||
":TelegramCoreFramework",
|
||||
#":TelegramApiFramework",
|
||||
":SyncCoreFramework",
|
||||
],
|
||||
)
|
||||
@ -1312,17 +1282,16 @@ ios_extension(
|
||||
infoplists = [
|
||||
":NotificationServiceInfoPlist",
|
||||
":VersionInfoPlist",
|
||||
":BuildNumberInfoPlist",
|
||||
":AppNameInfoPlist",
|
||||
],
|
||||
minimum_os_version = "10.0",
|
||||
provisioning_profile = "//build-input/data/provisioning-profiles:NotificationService.mobileprovision",
|
||||
provisioning_profile = "@build_configuration//provisioning:NotificationService.mobileprovision",
|
||||
deps = ["//Telegram/NotificationService:NotificationServiceExtensionLib"],
|
||||
frameworks = [
|
||||
":MtProtoKitFramework",
|
||||
":SwiftSignalKitFramework",
|
||||
":PostboxFramework",
|
||||
#":TelegramApiFramework",
|
||||
#":SyncCoreFramework",
|
||||
],
|
||||
)
|
||||
|
||||
@ -1503,11 +1472,13 @@ ios_application(
|
||||
),
|
||||
families = ["iphone", "ipad"],
|
||||
minimum_os_version = "9.0",
|
||||
provisioning_profile = "//build-input/data/provisioning-profiles:Telegram.mobileprovision",
|
||||
provisioning_profile = "@build_configuration//provisioning:Telegram.mobileprovision",
|
||||
entitlements = ":TelegramEntitlements.entitlements",
|
||||
infoplists = [
|
||||
":TelegramInfoPlist",
|
||||
":AdditionalInfoPlist",
|
||||
":BuildNumberInfoPlist",
|
||||
":VersionInfoPlist",
|
||||
":UrlTypesInfoPlist",
|
||||
],
|
||||
ipa_post_processor = ":AddAlternateIcons",
|
||||
resources = [
|
||||
@ -1528,13 +1499,16 @@ ios_application(
|
||||
strings = [
|
||||
":AppStringResources",
|
||||
],
|
||||
extensions = [] if telegram_disable_extensions else [
|
||||
":ShareExtension",
|
||||
":NotificationContentExtension",
|
||||
":NotificationServiceExtension",
|
||||
":IntentsExtension",
|
||||
#":WidgetExtension",
|
||||
],
|
||||
extensions = select({
|
||||
":disableExtensionsSetting": [],
|
||||
"//conditions:default": [
|
||||
":ShareExtension",
|
||||
":NotificationContentExtension",
|
||||
":NotificationServiceExtension",
|
||||
":IntentsExtension",
|
||||
":WidgetExtension",
|
||||
],
|
||||
}),
|
||||
watch_application = ":TelegramWatchApp",
|
||||
deps = [
|
||||
":Main",
|
||||
|
@ -1,23 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "NotificationServiceObjC",
|
||||
srcs = glob([
|
||||
"Sources/*.m",
|
||||
]),
|
||||
headers = glob([
|
||||
"Sources/*.h",
|
||||
]),
|
||||
exported_headers = glob([
|
||||
"PublicHeaders/**/*.h",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/BuildConfig:BuildConfig",
|
||||
"//submodules/MtProtoKit:MtProtoKit#shared",
|
||||
"//submodules/NotificationsPresentationData:NotificationsPresentationData",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
148
build-system/Make/BuildEnvironment.py
Normal file
148
build-system/Make/BuildEnvironment.py
Normal file
@ -0,0 +1,148 @@
|
||||
import json
|
||||
import os
|
||||
import platform
|
||||
import subprocess
|
||||
|
||||
|
||||
def is_apple_silicon():
|
||||
if platform.processor() == 'arm':
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
def get_clean_env():
|
||||
clean_env = os.environ.copy()
|
||||
clean_env['PATH'] = '/usr/bin:/bin:/usr/sbin:/sbin'
|
||||
return clean_env
|
||||
|
||||
|
||||
def resolve_executable(program):
|
||||
def is_executable(fpath):
|
||||
return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
|
||||
|
||||
for path in get_clean_env()["PATH"].split(os.pathsep):
|
||||
executable_file = os.path.join(path, program)
|
||||
if is_executable(executable_file):
|
||||
return executable_file
|
||||
return None
|
||||
|
||||
|
||||
def run_executable_with_output(path, arguments):
|
||||
executable_path = resolve_executable(path)
|
||||
if executable_path is None:
|
||||
raise Exception('Could not resolve {} to a valid executable file'.format(path))
|
||||
|
||||
process = subprocess.Popen(
|
||||
[executable_path] + arguments,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
env=get_clean_env()
|
||||
)
|
||||
output_data, _ = process.communicate()
|
||||
output_string = output_data.decode('utf-8')
|
||||
return output_string
|
||||
|
||||
|
||||
def call_executable(arguments, use_clean_environment=True, check_result=True):
|
||||
executable_path = resolve_executable(arguments[0])
|
||||
if executable_path is None:
|
||||
raise Exception('Could not resolve {} to a valid executable file'.format(arguments[0]))
|
||||
|
||||
if use_clean_environment:
|
||||
resolved_env = get_clean_env()
|
||||
else:
|
||||
resolved_env = os.environ
|
||||
|
||||
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):
|
||||
command_result = run_executable_with_output(bazel_path, ['--version']).strip('\n')
|
||||
if not command_result.startswith('bazel '):
|
||||
raise Exception('{} is not a valid bazel binary'.format(bazel_path))
|
||||
command_result.replace('bazel ', '')
|
||||
return command_result
|
||||
|
||||
|
||||
def get_xcode_version():
|
||||
xcode_path = run_executable_with_output('xcode-select', ['-p']).strip('\n')
|
||||
if not os.path.isdir(xcode_path):
|
||||
print('The path reported by \'xcode-select -p\' does not exist')
|
||||
exit(1)
|
||||
|
||||
plist_path = '{}/../Info.plist'.format(xcode_path)
|
||||
|
||||
info_plist_lines = run_executable_with_output('plutil', [
|
||||
'-p', plist_path
|
||||
]).split('\n')
|
||||
|
||||
pattern = 'CFBundleShortVersionString" => '
|
||||
for line in info_plist_lines:
|
||||
index = line.find(pattern)
|
||||
if index != -1:
|
||||
version = line[index + len(pattern):].strip('"')
|
||||
return version
|
||||
|
||||
print('Could not parse the Xcode version from {}'.format(plist_path))
|
||||
exit(1)
|
||||
|
||||
|
||||
class BuildEnvironment:
|
||||
def __init__(
|
||||
self,
|
||||
base_path,
|
||||
bazel_path,
|
||||
bazel_x86_64_path,
|
||||
override_bazel_version,
|
||||
override_xcode_version
|
||||
):
|
||||
self.base_path = os.path.expanduser(base_path)
|
||||
self.bazel_path = os.path.expanduser(bazel_path)
|
||||
if bazel_x86_64_path is not None:
|
||||
self.bazel_x86_64_path = os.path.expanduser(bazel_x86_64_path)
|
||||
else:
|
||||
self.bazel_x86_64_path = None
|
||||
|
||||
configuration_path = os.path.join(self.base_path, 'versions.json')
|
||||
with open(configuration_path) as 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:
|
||||
raise Exception('Missing bazel version in {}'.format(configuration_path))
|
||||
else:
|
||||
self.bazel_version = configuration_dict['bazel']
|
||||
if configuration_dict['xcode'] is None:
|
||||
raise Exception('Missing xcode version in {}'.format(configuration_path))
|
||||
else:
|
||||
self.xcode_version = configuration_dict['xcode']
|
||||
|
||||
actual_bazel_version = get_bazel_version(self.bazel_path)
|
||||
if actual_bazel_version != self.bazel_version:
|
||||
if override_bazel_version:
|
||||
print('Overriding the required bazel version {} with {} as reported by {}'.format(
|
||||
self.bazel_version, actual_bazel_version, self.bazel_path))
|
||||
self.bazel_version = actual_bazel_version
|
||||
else:
|
||||
print('Required bazel version is {}, but {} is reported by {}'.format(
|
||||
self.bazel_version, actual_bazel_version, self.bazel_path))
|
||||
exit(1)
|
||||
|
||||
actual_xcode_version = get_xcode_version()
|
||||
if actual_xcode_version != self.xcode_version:
|
||||
if override_xcode_version:
|
||||
print('Overriding the required Xcode version {} with {} as reported by \'xcode-select -p\''.format(
|
||||
self.xcode_version, actual_xcode_version, self.bazel_path))
|
||||
self.xcode_version = actual_xcode_version
|
||||
else:
|
||||
print('Required Xcode version is {}, but {} is reported by \'xcode-select -p\''.format(
|
||||
self.xcode_version, actual_xcode_version, self.bazel_path))
|
||||
exit(1)
|
472
build-system/Make/Make.py
Normal file
472
build-system/Make/Make.py
Normal file
@ -0,0 +1,472 @@
|
||||
#!/bin/python3
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import shlex
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
from BuildEnvironment import is_apple_silicon, resolve_executable, call_executable, BuildEnvironment
|
||||
from ProjectGeneration import generate
|
||||
|
||||
|
||||
class BazelCommandLine:
|
||||
def __init__(self, bazel_path, bazel_x86_64_path, override_bazel_version, override_xcode_version):
|
||||
self.build_environment = BuildEnvironment(
|
||||
base_path=os.getcwd(),
|
||||
bazel_path=bazel_path,
|
||||
bazel_x86_64_path=bazel_x86_64_path,
|
||||
override_bazel_version=override_bazel_version,
|
||||
override_xcode_version=override_xcode_version
|
||||
)
|
||||
self.remote_cache = None
|
||||
self.cache_dir = None
|
||||
self.additional_args = None
|
||||
self.build_number = None
|
||||
self.configuration_args = None
|
||||
self.configuration_path = None
|
||||
|
||||
self.common_args = [
|
||||
# https://docs.bazel.build/versions/master/command-line-reference.html
|
||||
# Ask bazel to print the actual resolved command line options.
|
||||
'--announce_rc',
|
||||
|
||||
# https://github.com/bazelbuild/rules_swift
|
||||
# If enabled, Swift compilation actions will use the same global Clang module
|
||||
# cache used by Objective-C compilation actions. This is disabled by default
|
||||
# because under some circumstances Clang module cache corruption can cause the
|
||||
# Swift compiler to crash (sometimes when switching configurations or syncing a
|
||||
# repository), but disabling it also causes a noticeable build time regression
|
||||
# so it can be explicitly re-enabled by users who are not affected by those
|
||||
# crashes.
|
||||
'--features=swift.use_global_module_cache',
|
||||
|
||||
# https://docs.bazel.build/versions/master/command-line-reference.html
|
||||
# Print the subcommand details in case of failure.
|
||||
'--verbose_failures',
|
||||
]
|
||||
|
||||
self.common_build_args = [
|
||||
# https://github.com/bazelbuild/rules_swift
|
||||
# If enabled and whole module optimisation is being used, the `*.swiftdoc`,
|
||||
# `*.swiftmodule` and `*-Swift.h` are generated with a separate action
|
||||
# rather than as part of the compilation.
|
||||
'--features=swift.split_derived_files_generation',
|
||||
|
||||
# https://github.com/bazelbuild/rules_swift
|
||||
# If enabled the skip function bodies frontend flag is passed when using derived
|
||||
# files generation.
|
||||
'--features=swift.skip_function_bodies_for_derived_files',
|
||||
|
||||
# Set the number of parallel processes to match the available CPU core count.
|
||||
'--jobs={}'.format(os.cpu_count()),
|
||||
]
|
||||
|
||||
self.common_debug_args = [
|
||||
# https://github.com/bazelbuild/rules_swift
|
||||
# If enabled, Swift compilation actions will use batch mode by passing
|
||||
# `-enable-batch-mode` to `swiftc`. This is a new compilation mode as of
|
||||
# Swift 4.2 that is intended to speed up non-incremental non-WMO builds by
|
||||
# invoking a smaller number of frontend processes and passing them batches of
|
||||
# source files.
|
||||
'--features=swift.enable_batch_mode',
|
||||
|
||||
# https://docs.bazel.build/versions/master/command-line-reference.html
|
||||
# Set the number of parallel jobs per module to saturate the available CPU resources.
|
||||
'--swiftcopt=-j{}'.format(os.cpu_count() - 1),
|
||||
]
|
||||
|
||||
self.common_release_args = [
|
||||
# https://github.com/bazelbuild/rules_swift
|
||||
# Enable whole module optimization.
|
||||
'--features=swift.opt_uses_wmo',
|
||||
|
||||
# https://github.com/bazelbuild/rules_swift
|
||||
# Use -Osize instead of -O when building swift modules.
|
||||
'--features=swift.opt_uses_osize',
|
||||
|
||||
# --num-threads 0 forces swiftc to generate one object file per module; it:
|
||||
# 1. resolves issues with the linker caused by the swift-objc mixing.
|
||||
# 2. makes the resulting binaries significantly smaller (up to 9% for this project).
|
||||
'--swiftcopt=-num-threads', '--swiftcopt=0',
|
||||
|
||||
# Strip unsused code.
|
||||
'--features=dead_strip',
|
||||
'--objc_enable_binary_stripping',
|
||||
|
||||
# Always embed bitcode into Watch binaries. This is required by the App Store.
|
||||
'--apple_bitcode=watchos=embedded',
|
||||
]
|
||||
|
||||
def add_remote_cache(self, host):
|
||||
self.remote_cache = host
|
||||
|
||||
def add_cache_dir(self, path):
|
||||
self.cache_dir = path
|
||||
|
||||
def add_additional_args(self, 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):
|
||||
self.configuration_path = path
|
||||
|
||||
def set_configuration(self, configuration):
|
||||
if configuration == 'debug_arm64':
|
||||
self.configuration_args = [
|
||||
# bazel debug build configuration
|
||||
'-c', 'dbg',
|
||||
|
||||
# Build single-architecture binaries. It is almost 2 times faster is 32-bit support is not required.
|
||||
'--ios_multi_cpus=arm64',
|
||||
|
||||
# Always build universal Watch binaries.
|
||||
'--watchos_cpus=armv7k,arm64_32'
|
||||
] + self.common_debug_args
|
||||
elif configuration == 'release_arm64':
|
||||
self.configuration_args = [
|
||||
# bazel optimized build configuration
|
||||
'-c', 'opt',
|
||||
|
||||
# Build single-architecture binaries. It is almost 2 times faster is 32-bit support is not required.
|
||||
'--ios_multi_cpus=arm64',
|
||||
|
||||
# Always build universal Watch binaries.
|
||||
'--watchos_cpus=armv7k,arm64_32'
|
||||
] + self.common_release_args
|
||||
elif configuration == 'release':
|
||||
self.configuration_args = [
|
||||
# bazel optimized build configuration
|
||||
'-c', 'opt',
|
||||
|
||||
# Build universal binaries.
|
||||
'--ios_multi_cpus=armv7,arm64',
|
||||
|
||||
# Always build universal Watch binaries.
|
||||
'--watchos_cpus=armv7k,arm64_32'
|
||||
|
||||
# Generate DSYM files when building.
|
||||
'--apple_generate_dsym',
|
||||
|
||||
# Require DSYM files as build output.
|
||||
'--output_groups=+dsyms'
|
||||
] + self.common_release_args
|
||||
else:
|
||||
raise Exception('Unknown configuration {}'.format(configuration))
|
||||
|
||||
def invoke_clean(self):
|
||||
combined_arguments = [
|
||||
self.build_environment.bazel_path,
|
||||
'clean',
|
||||
'--expunge'
|
||||
]
|
||||
|
||||
print('TelegramBuild: running {}'.format(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):
|
||||
combined_arguments = []
|
||||
combined_arguments += self.common_args
|
||||
combined_arguments += self.common_debug_args
|
||||
combined_arguments += self.get_define_arguments()
|
||||
|
||||
if self.remote_cache is not None:
|
||||
combined_arguments += [
|
||||
'--remote_cache={}'.format(self.remote_cache),
|
||||
'--experimental_remote_downloader="{}"'.format(self.remote_cache)
|
||||
]
|
||||
elif self.cache_dir is not None:
|
||||
combined_arguments += [
|
||||
'--disk_cache={path}'.format(path=self.cache_dir)
|
||||
]
|
||||
|
||||
return combined_arguments
|
||||
|
||||
def invoke_build(self):
|
||||
combined_arguments = [
|
||||
self.build_environment.bazel_path,
|
||||
'build',
|
||||
'Telegram/Telegram'
|
||||
]
|
||||
|
||||
if self.configuration_path is None:
|
||||
raise Exception('configuration_path is not defined')
|
||||
|
||||
combined_arguments += [
|
||||
'--override_repository=build_configuration={}'.format(self.configuration_path)
|
||||
]
|
||||
|
||||
combined_arguments += self.common_args
|
||||
combined_arguments += self.common_build_args
|
||||
combined_arguments += self.get_define_arguments()
|
||||
|
||||
if self.remote_cache is not None:
|
||||
combined_arguments += [
|
||||
'--remote_cache={}'.format(self.remote_cache),
|
||||
'--experimental_remote_downloader="{}"'.format(self.remote_cache)
|
||||
]
|
||||
elif self.cache_dir is not None:
|
||||
combined_arguments += [
|
||||
'--disk_cache={path}'.format(path=self.cache_dir)
|
||||
]
|
||||
|
||||
combined_arguments += self.configuration_args
|
||||
|
||||
print('TelegramBuild: running {}'.format(combined_arguments))
|
||||
call_executable(combined_arguments)
|
||||
|
||||
|
||||
def clean(arguments):
|
||||
bazel_command_line = BazelCommandLine(
|
||||
bazel_path=arguments.bazel,
|
||||
bazel_x86_64_path=None,
|
||||
override_bazel_version=arguments.overrideBazelVersion,
|
||||
override_xcode_version=arguments.overrideXcodeVersion
|
||||
)
|
||||
|
||||
bazel_command_line.invoke_clean()
|
||||
|
||||
|
||||
def resolve_configuration(bazel_command_line: BazelCommandLine, arguments):
|
||||
if arguments.configurationGenerator is not None:
|
||||
configuration_generator_arguments = shlex.split(arguments.configurationGenerator)
|
||||
|
||||
configuration_generator_executable = resolve_executable(configuration_generator_arguments[0])
|
||||
|
||||
if configuration_generator_executable is None:
|
||||
print('{} is not a valid executable'.format(configuration_generator_arguments[0]))
|
||||
exit(1)
|
||||
|
||||
temp_configuration_path = tempfile.mkdtemp()
|
||||
|
||||
resolved_configuration_generator_arguments = [configuration_generator_executable]
|
||||
resolved_configuration_generator_arguments += configuration_generator_arguments[1:]
|
||||
resolved_configuration_generator_arguments += [temp_configuration_path]
|
||||
|
||||
call_executable(resolved_configuration_generator_arguments, use_clean_environment=False)
|
||||
|
||||
print('TelegramBuild: using generated configuration in {}'.format(temp_configuration_path))
|
||||
bazel_command_line.set_configuration_path(temp_configuration_path)
|
||||
elif arguments.configurationPath is not None:
|
||||
absolute_configuration_path = os.path.abspath(arguments.configurationPath)
|
||||
if not os.path.isdir(absolute_configuration_path):
|
||||
print('Error: {} does not exist'.format(absolute_configuration_path))
|
||||
exit(1)
|
||||
bazel_command_line.set_configuration_path(absolute_configuration_path)
|
||||
else:
|
||||
raise Exception('Neither configurationPath nor configurationGenerator are set')
|
||||
|
||||
|
||||
def generate_project(arguments):
|
||||
bazel_command_line = BazelCommandLine(
|
||||
bazel_path=arguments.bazel,
|
||||
bazel_x86_64_path=arguments.bazel_x86_64,
|
||||
override_bazel_version=arguments.overrideBazelVersion,
|
||||
override_xcode_version=arguments.overrideXcodeVersion
|
||||
)
|
||||
|
||||
if arguments.cacheDir is not None:
|
||||
bazel_command_line.add_cache_dir(arguments.cacheDir)
|
||||
elif arguments.cacheHost is not None:
|
||||
bazel_command_line.add_remote_cache(arguments.cacheDir)
|
||||
|
||||
resolve_configuration(bazel_command_line, arguments)
|
||||
|
||||
bazel_command_line.set_build_number(arguments.buildNumber)
|
||||
|
||||
disable_extensions = False
|
||||
if arguments.disableExtensions is not None:
|
||||
disable_extensions = arguments.disableExtensions
|
||||
|
||||
call_executable(['killall', 'Xcode'], check_result=False)
|
||||
|
||||
generate(
|
||||
build_environment=bazel_command_line.build_environment,
|
||||
disable_extensions=disable_extensions,
|
||||
configuration_path=bazel_command_line.configuration_path,
|
||||
bazel_app_arguments=bazel_command_line.get_project_generation_arguments()
|
||||
)
|
||||
|
||||
|
||||
def build(arguments):
|
||||
bazel_command_line = BazelCommandLine(
|
||||
bazel_path=arguments.bazel,
|
||||
bazel_x86_64_path=None,
|
||||
override_bazel_version=arguments.overrideBazelVersion,
|
||||
override_xcode_version=arguments.overrideXcodeVersion
|
||||
)
|
||||
|
||||
if arguments.cacheDir is not None:
|
||||
bazel_command_line.add_cache_dir(arguments.cacheDir)
|
||||
elif arguments.cacheHost is not None:
|
||||
bazel_command_line.add_remote_cache(arguments.cacheDir)
|
||||
|
||||
resolve_configuration(bazel_command_line, arguments)
|
||||
|
||||
bazel_command_line.set_configuration(arguments.configuration)
|
||||
bazel_command_line.set_build_number(arguments.buildNumber)
|
||||
|
||||
bazel_command_line.invoke_build()
|
||||
|
||||
|
||||
def add_project_and_build_common_arguments(current_parser: argparse.ArgumentParser):
|
||||
group = current_parser.add_mutually_exclusive_group(required=True)
|
||||
group.add_argument(
|
||||
'--configurationPath',
|
||||
help='''
|
||||
Path to a folder containing build configuration and provisioning profiles.
|
||||
See build-system/example-configuration for an example.
|
||||
''',
|
||||
metavar='path'
|
||||
)
|
||||
group.add_argument(
|
||||
'--configurationGenerator',
|
||||
help='''
|
||||
A command line invocation that will dynamically generate the configuration data
|
||||
(project constants and provisioning profiles).
|
||||
The expression will be parsed according to the shell parsing rules into program and arguments parts.
|
||||
The program will be then invoked with the given arguments plus the path to the output directory.
|
||||
See build-system/generate-configuration.sh for an example.
|
||||
Example: --configurationGenerator="sh ~/my_script.sh argument1"
|
||||
''',
|
||||
metavar='command'
|
||||
)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser(prog='Make')
|
||||
|
||||
parser.add_argument(
|
||||
'--verbose',
|
||||
action='store_true',
|
||||
default=False,
|
||||
help='Print debug info'
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
'--bazel',
|
||||
required=True,
|
||||
help='Use custom bazel binary',
|
||||
metavar='path'
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
'--overrideBazelVersion',
|
||||
action='store_true',
|
||||
help='Override bazel version with the actual version reported by the bazel binary'
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
'--overrideXcodeVersion',
|
||||
action='store_true',
|
||||
help='Override xcode version with the actual version reported by \'xcode-select -p\''
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
'--bazelArguments',
|
||||
required=False,
|
||||
help='Add additional arguments to all bazel invocations.',
|
||||
metavar='arguments'
|
||||
)
|
||||
|
||||
cacheTypeGroup = parser.add_mutually_exclusive_group()
|
||||
cacheTypeGroup.add_argument(
|
||||
'--cacheHost',
|
||||
required=False,
|
||||
help='Use remote build artifact cache to speed up rebuilds (See https://github.com/buchgr/bazel-remote).',
|
||||
metavar='http://host:9092'
|
||||
)
|
||||
cacheTypeGroup.add_argument(
|
||||
'--cacheDir',
|
||||
required=False,
|
||||
help='Cache build artifacts in a local directory to speed up rebuilds.',
|
||||
metavar='path'
|
||||
)
|
||||
|
||||
subparsers = parser.add_subparsers(dest='commandName', help='Commands')
|
||||
|
||||
cleanParser = subparsers.add_parser(
|
||||
'clean', help='''
|
||||
Clean local bazel cache. Does not affect files cached remotely (via --cacheHost=...) or
|
||||
locally in an external directory ('--cacheDir=...')
|
||||
'''
|
||||
)
|
||||
|
||||
generateProjectParser = subparsers.add_parser('generateProject', help='Generate Xcode project')
|
||||
if is_apple_silicon():
|
||||
generateProjectParser.add_argument(
|
||||
'--bazel_x86_64',
|
||||
required=True,
|
||||
help='A standalone bazel x86_64 binary is required to generate a project on Apple Silicon.',
|
||||
metavar='path'
|
||||
)
|
||||
generateProjectParser.add_argument(
|
||||
'--buildNumber',
|
||||
required=False,
|
||||
type=int,
|
||||
default=10000,
|
||||
help='Build number.',
|
||||
metavar='number'
|
||||
)
|
||||
add_project_and_build_common_arguments(generateProjectParser)
|
||||
generateProjectParser.add_argument(
|
||||
'--disableExtensions',
|
||||
action='store_true',
|
||||
default=False,
|
||||
help='''
|
||||
The generated project will not include app extensions.
|
||||
This allows Xcode to properly index the source code.
|
||||
'''
|
||||
)
|
||||
|
||||
buildParser = subparsers.add_parser('build', help='Build the app')
|
||||
buildParser.add_argument(
|
||||
'--buildNumber',
|
||||
required=True,
|
||||
type=int,
|
||||
help='Build number.',
|
||||
metavar='number'
|
||||
)
|
||||
add_project_and_build_common_arguments(buildParser)
|
||||
buildParser.add_argument(
|
||||
'--configuration',
|
||||
choices=[
|
||||
'debug_arm64',
|
||||
'release_arm64',
|
||||
'release_universal'
|
||||
],
|
||||
required=True,
|
||||
help='Build configuration'
|
||||
)
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
parser.print_help()
|
||||
sys.exit(1)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.verbose:
|
||||
print(args)
|
||||
|
||||
if args.commandName is None:
|
||||
exit(0)
|
||||
|
||||
try:
|
||||
if args.commandName == 'clean':
|
||||
clean(arguments=args)
|
||||
elif args.commandName == 'generateProject':
|
||||
generate_project(arguments=args)
|
||||
elif args.commandName == 'build':
|
||||
build(arguments=args)
|
||||
else:
|
||||
raise Exception('Unknown command')
|
||||
except KeyboardInterrupt:
|
||||
pass
|
155
build-system/Make/ProjectGeneration.py
Normal file
155
build-system/Make/ProjectGeneration.py
Normal file
@ -0,0 +1,155 @@
|
||||
import json
|
||||
import os
|
||||
import shutil
|
||||
|
||||
from BuildEnvironment import is_apple_silicon, call_executable, BuildEnvironment
|
||||
|
||||
|
||||
def remove_directory(path):
|
||||
if os.path.isdir(path):
|
||||
shutil.rmtree(path)
|
||||
|
||||
|
||||
def generate(build_environment: BuildEnvironment, disable_extensions, configuration_path, bazel_app_arguments):
|
||||
project_path = os.path.join(build_environment.base_path, 'build-input/gen/project')
|
||||
app_target = 'Telegram'
|
||||
|
||||
'''
|
||||
TULSI_APP="build-input/gen/project/Tulsi.app"
|
||||
TULSI="$TULSI_APP/Contents/MacOS/Tulsi"
|
||||
|
||||
rm -rf "$GEN_DIRECTORY/${APP_TARGET}.tulsiproj"
|
||||
rm -rf "$TULSI_APP"
|
||||
'''
|
||||
|
||||
os.makedirs(project_path, exist_ok=True)
|
||||
remove_directory('{}/Tulsi.app'.format(project_path))
|
||||
remove_directory('{project}/{target}.tulsiproj'.format(project=project_path, target=app_target))
|
||||
|
||||
tulsi_path = os.path.join(project_path, 'Tulsi.app/Contents/MacOS/Tulsi')
|
||||
|
||||
if is_apple_silicon():
|
||||
tulsi_build_bazel_path = build_environment.bazel_x86_64_path
|
||||
if tulsi_build_bazel_path is None or not os.path.isfile(tulsi_build_bazel_path):
|
||||
print('Could not find a valid bazel x86_64 binary at {}'.format(tulsi_build_bazel_path))
|
||||
exit(1)
|
||||
else:
|
||||
tulsi_build_bazel_path = build_environment.bazel_path
|
||||
|
||||
current_dir = os.getcwd()
|
||||
os.chdir(os.path.join(build_environment.base_path, 'build-system/tulsi'))
|
||||
call_executable([
|
||||
tulsi_build_bazel_path,
|
||||
'build', '//:tulsi',
|
||||
'--xcode_version={}'.format(build_environment.xcode_version),
|
||||
'--use_top_level_targets_for_symlinks',
|
||||
'--verbose_failures'
|
||||
])
|
||||
os.chdir(current_dir)
|
||||
|
||||
bazel_wrapper_path = os.path.abspath('build-input/gen/project/bazel')
|
||||
|
||||
bazel_wrapper_arguments = []
|
||||
bazel_wrapper_arguments += ['--override_repository=build_configuration={}'.format(configuration_path)]
|
||||
if disable_extensions and False:
|
||||
bazel_wrapper_arguments += ['--//Telegram:disableExtensions']
|
||||
|
||||
with open(bazel_wrapper_path, 'wb') as bazel_wrapper:
|
||||
bazel_wrapper.write('''#!/bin/sh
|
||||
{bazel} "$@" {arguments}
|
||||
'''.format(
|
||||
bazel=build_environment.bazel_path,
|
||||
arguments=' '.join(bazel_wrapper_arguments)
|
||||
).encode('utf-8'))
|
||||
|
||||
call_executable(['chmod', '+x', bazel_wrapper_path])
|
||||
|
||||
call_executable([
|
||||
'unzip', '-oq',
|
||||
'build-system/tulsi/bazel-bin/tulsi.zip',
|
||||
'-d', project_path
|
||||
])
|
||||
|
||||
user_defaults_path = os.path.expanduser('~/Library/Preferences/com.google.Tulsi.plist')
|
||||
if os.path.isfile(user_defaults_path):
|
||||
os.unlink(user_defaults_path)
|
||||
|
||||
with open(user_defaults_path, 'wb') as user_defaults:
|
||||
user_defaults.write('''
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>defaultBazelURL</key>
|
||||
<string>{}</string>
|
||||
</dict>
|
||||
</plist>
|
||||
'''.format(bazel_wrapper_path).encode('utf-8'))
|
||||
|
||||
bazel_build_arguments = []
|
||||
bazel_build_arguments += ['--override_repository=build_configuration={}'.format(configuration_path)]
|
||||
if disable_extensions:
|
||||
bazel_build_arguments += ['--//Telegram:disableExtensions']
|
||||
|
||||
call_executable([
|
||||
tulsi_path,
|
||||
'--',
|
||||
'--verbose',
|
||||
'--create-tulsiproj', app_target,
|
||||
'--workspaceroot', './',
|
||||
'--bazel', bazel_wrapper_path,
|
||||
'--outputfolder', project_path,
|
||||
'--target', '{target}:{target}'.format(target=app_target),
|
||||
'--build-options', ' '.join(bazel_build_arguments)
|
||||
])
|
||||
|
||||
additional_arguments = []
|
||||
additional_arguments += ['--override_repository=build_configuration={}'.format(configuration_path)]
|
||||
additional_arguments += bazel_app_arguments
|
||||
if disable_extensions:
|
||||
additional_arguments += ['--//Telegram:disableExtensions']
|
||||
|
||||
additional_arguments_string = ' '.join(additional_arguments)
|
||||
|
||||
tulsi_config_path = 'build-input/gen/project/{target}.tulsiproj/Configs/{target}.tulsigen'.format(target=app_target)
|
||||
with open(tulsi_config_path, 'rb') as tulsi_config:
|
||||
tulsi_config_json = json.load(tulsi_config)
|
||||
for category in ['BazelBuildOptionsDebug', 'BazelBuildOptionsRelease']:
|
||||
tulsi_config_json['optionSet'][category]['p'] += ' {}'.format(additional_arguments_string)
|
||||
tulsi_config_json['sourceFilters'] = [
|
||||
'Telegram/...',
|
||||
'submodules/...',
|
||||
'third-party/...'
|
||||
]
|
||||
with open(tulsi_config_path, 'wb') as tulsi_config:
|
||||
tulsi_config.write(json.dumps(tulsi_config_json, indent=2).encode('utf-8'))
|
||||
|
||||
call_executable([
|
||||
tulsi_path,
|
||||
'--',
|
||||
'--verbose',
|
||||
'--genconfig', '{project}/{target}.tulsiproj:{target}'.format(project=project_path, target=app_target),
|
||||
'--bazel', bazel_wrapper_path,
|
||||
'--outputfolder', project_path,
|
||||
'--no-open-xcode'
|
||||
])
|
||||
|
||||
xcodeproj_path = '{project}/{target}.xcodeproj'.format(project=project_path, target=app_target)
|
||||
|
||||
bazel_build_settings_path = '{}/.tulsi/Scripts/bazel_build_settings.py'.format(xcodeproj_path)
|
||||
|
||||
with open(bazel_build_settings_path, 'rb') as bazel_build_settings:
|
||||
bazel_build_settings_contents = bazel_build_settings.read().decode('utf-8')
|
||||
bazel_build_settings_contents = bazel_build_settings_contents.replace(
|
||||
'BUILD_SETTINGS = BazelBuildSettings(',
|
||||
'import os\nBUILD_SETTINGS = BazelBuildSettings('
|
||||
)
|
||||
bazel_build_settings_contents = bazel_build_settings_contents.replace(
|
||||
'\'--cpu=ios_arm64\'',
|
||||
'\'--cpu=ios_arm64\'.replace(\'ios_arm64\', \'ios_sim_arm64\' if os.environ.get(\'EFFECTIVE_PLATFORM_NAME\') '
|
||||
'== \'-iphonesimulator\' else \'ios_arm64\')'
|
||||
)
|
||||
with open(bazel_build_settings_path, 'wb') as bazel_build_settings:
|
||||
bazel_build_settings.write(bazel_build_settings_contents.encode('utf-8'))
|
||||
|
||||
call_executable(['open', xcodeproj_path])
|
@ -1 +1 @@
|
||||
Subproject commit eca50db5a95a50b2be8367d644aebf4d1d880c52
|
||||
Subproject commit bfb54953cee1bc985ba8113dd2e635e1d294abdb
|
@ -1 +0,0 @@
|
||||
3.7.0
|
11
build-system/example-configuration/provisioning/BUILD
Normal file
11
build-system/example-configuration/provisioning/BUILD
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
exports_files([
|
||||
"Intents.mobileprovision",
|
||||
"NotificationContent.mobileprovision",
|
||||
"NotificationService.mobileprovision",
|
||||
"Share.mobileprovision",
|
||||
"Telegram.mobileprovision",
|
||||
"WatchApp.mobileprovision",
|
||||
"WatchExtension.mobileprovision",
|
||||
"Widget.mobileprovision",
|
||||
])
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
10
build-system/example-configuration/variables.bzl
Normal file
10
build-system/example-configuration/variables.bzl
Normal file
@ -0,0 +1,10 @@
|
||||
telegram_bundle_id = "ph.telegra.Telegraph"
|
||||
telegram_api_id = "8"
|
||||
telegram_api_hash = "7245de8e747a0d6fbe11f7cc14fcc0bb"
|
||||
telegram_team_id = "C67CF9S4VU"
|
||||
telegram_app_center_id = "0"
|
||||
telegram_is_internal_build = "false"
|
||||
telegram_is_appstore_build = "true"
|
||||
telegram_appstore_id = "0"
|
||||
telegram_app_specific_url_scheme = "tg"
|
||||
telegram_aps_environment = "production"
|
7
build-system/example-generate-configuration
Executable file
7
build-system/example-generate-configuration
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ ! -d "$1" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp -R build-system/example-configuration/* "$1/"
|
@ -1,129 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
FASTLANE="$(which fastlane)"
|
||||
|
||||
EXPECTED_VARIABLES=(\
|
||||
APPLE_ID \
|
||||
BASE_BUNDLE_ID \
|
||||
APP_NAME \
|
||||
TEAM_ID \
|
||||
PROVISIONING_DIRECTORY \
|
||||
)
|
||||
|
||||
MISSING_VARIABLES="0"
|
||||
for VARIABLE_NAME in ${EXPECTED_VARIABLES[@]}; do
|
||||
if [ "${!VARIABLE_NAME}" = "" ]; then
|
||||
echo "$VARIABLE_NAME not defined"
|
||||
MISSING_VARIABLES="1"
|
||||
fi
|
||||
done
|
||||
if [ "$MISSING_VARIABLES" == "1" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "$PROVISIONING_DIRECTORY" ]; then
|
||||
echo "Directory $PROVISIONING_DIRECTORY does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
BASE_DIR=$(mktemp -d)
|
||||
FASTLANE_DIR="$BASE_DIR/fastlane"
|
||||
mkdir "$FASTLANE_DIR"
|
||||
FASTFILE="$FASTLANE_DIR/Fastfile"
|
||||
|
||||
touch "$FASTFILE"
|
||||
|
||||
CREDENTIALS=(\
|
||||
--username "$APPLE_ID" \
|
||||
--team_id "$TEAM_ID" \
|
||||
)
|
||||
export FASTLANE_SKIP_UPDATE_CHECK=1
|
||||
|
||||
APP_EXTENSIONS=(\
|
||||
Share \
|
||||
SiriIntents \
|
||||
NotificationContent \
|
||||
NotificationService \
|
||||
Widget \
|
||||
)
|
||||
|
||||
echo "lane :manage_app do" >> "$FASTFILE"
|
||||
echo " produce(" >> "$FASTFILE"
|
||||
echo " username: '$APPLE_ID'," >> "$FASTFILE"
|
||||
echo " app_identifier: '${BASE_BUNDLE_ID}'," >> "$FASTFILE"
|
||||
echo " app_name: '$APP_NAME'," >> "$FASTFILE"
|
||||
echo " language: 'English'," >> "$FASTFILE"
|
||||
echo " app_version: '1.0'," >> "$FASTFILE"
|
||||
echo " team_id: '$TEAM_ID'," >> "$FASTFILE"
|
||||
echo " skip_itc: true," >> "$FASTFILE"
|
||||
echo " )" >> "$FASTFILE"
|
||||
|
||||
echo " produce(" >> "$FASTFILE"
|
||||
echo " username: '$APPLE_ID'," >> "$FASTFILE"
|
||||
echo " app_identifier: '${BASE_BUNDLE_ID}.watchkitapp'," >> "$FASTFILE"
|
||||
echo " app_name: '$APP_NAME Watch App'," >> "$FASTFILE"
|
||||
echo " language: 'English'," >> "$FASTFILE"
|
||||
echo " app_version: '1.0'," >> "$FASTFILE"
|
||||
echo " team_id: '$TEAM_ID'," >> "$FASTFILE"
|
||||
echo " skip_itc: true," >> "$FASTFILE"
|
||||
echo " )" >> "$FASTFILE"
|
||||
|
||||
echo " produce(" >> "$FASTFILE"
|
||||
echo " username: '$APPLE_ID'," >> "$FASTFILE"
|
||||
echo " app_identifier: '${BASE_BUNDLE_ID}.watchkitapp.watchkitextension'," >> "$FASTFILE"
|
||||
echo " app_name: '$APP_NAME Watch App Extension'," >> "$FASTFILE"
|
||||
echo " language: 'English'," >> "$FASTFILE"
|
||||
echo " app_version: '1.0'," >> "$FASTFILE"
|
||||
echo " team_id: '$TEAM_ID'," >> "$FASTFILE"
|
||||
echo " skip_itc: true," >> "$FASTFILE"
|
||||
echo " )" >> "$FASTFILE"
|
||||
|
||||
for EXTENSION in ${APP_EXTENSIONS[@]}; do
|
||||
echo " produce(" >> "$FASTFILE"
|
||||
echo " username: '$APPLE_ID'," >> "$FASTFILE"
|
||||
echo " app_identifier: '${BASE_BUNDLE_ID}.${EXTENSION}'," >> "$FASTFILE"
|
||||
echo " app_name: '${APP_NAME} ${EXTENSION}'," >> "$FASTFILE"
|
||||
echo " language: 'English'," >> "$FASTFILE"
|
||||
echo " app_version: '1.0'," >> "$FASTFILE"
|
||||
echo " team_id: '$TEAM_ID'," >> "$FASTFILE"
|
||||
echo " skip_itc: true," >> "$FASTFILE"
|
||||
echo " )" >> "$FASTFILE"
|
||||
done
|
||||
|
||||
echo "end" >> "$FASTFILE"
|
||||
|
||||
pushd "$BASE_DIR"
|
||||
|
||||
fastlane cert ${CREDENTIALS[@]} --development
|
||||
|
||||
fastlane manage_app
|
||||
|
||||
fastlane produce group -g "group.$BASE_BUNDLE_ID" -n "$APP_NAME Group" ${CREDENTIALS[@]}
|
||||
|
||||
fastlane produce enable_services -a "$BASE_BUNDLE_ID" ${CREDENTIALS[@]} \
|
||||
--app-group \
|
||||
--push-notification \
|
||||
--sirikit
|
||||
|
||||
fastlane produce associate_group -a "$BASE_BUNDLE_ID" "group.$BASE_BUNDLE_ID" ${CREDENTIALS[@]}
|
||||
for EXTENSION in ${APP_EXTENSIONS[@]}; do
|
||||
fastlane produce enable_services -a "${BASE_BUNDLE_ID}.${EXTENSION}" ${CREDENTIALS[@]} \
|
||||
--app-group
|
||||
|
||||
fastlane produce associate_group -a "${BASE_BUNDLE_ID}.${EXTENSION}" "group.$BASE_BUNDLE_ID" ${CREDENTIALS[@]}
|
||||
done
|
||||
|
||||
for DEVELOPMENT_FLAG in "--development"; do
|
||||
fastlane sigh -a "$BASE_BUNDLE_ID" ${CREDENTIALS[@]} -o "$PROVISIONING_DIRECTORY" $DEVELOPMENT_FLAG \
|
||||
--skip_install
|
||||
for EXTENSION in ${APP_EXTENSIONS[@]}; do
|
||||
fastlane sigh -a "${BASE_BUNDLE_ID}.${EXTENSION}" ${CREDENTIALS[@]} -o "$PROVISIONING_DIRECTORY" $DEVELOPMENT_FLAG \
|
||||
--skip_install
|
||||
done
|
||||
done
|
||||
|
||||
popd
|
||||
|
||||
rm -rf "$BASE_DIR"
|
@ -1 +0,0 @@
|
||||
12.1
|
@ -1,157 +0,0 @@
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
index 78ce658b9a..30c0369ab7 100644
|
||||
--- a/.gitignore
|
||||
+++ b/.gitignore
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
# IntelliJ build
|
||||
/intellij-out/
|
||||
+/.idea/
|
||||
|
||||
# Buck
|
||||
/buck-out
|
||||
diff --git a/.idea/modules.xml b/.idea/modules.xml
|
||||
deleted file mode 100644
|
||||
index 7ff823b554..0000000000
|
||||
--- a/.idea/modules.xml
|
||||
+++ /dev/null
|
||||
@@ -1,16 +0,0 @@
|
||||
-<?xml version="1.0" encoding="UTF-8"?>
|
||||
-<project version="4">
|
||||
- <component name="ProjectModuleManager">
|
||||
- <modules>
|
||||
- <module fileurl="file://$PROJECT_DIR$/buck.iml" filepath="$PROJECT_DIR$/buck.iml" />
|
||||
- <module fileurl="file://$PROJECT_DIR$/tools/consistency_checker/consistency_checker.iml" filepath="$PROJECT_DIR$/tools/consistency_checker/consistency_checker.iml" />
|
||||
- <module fileurl="file://$PROJECT_DIR$/tools/documentation_generator/documentation_generator.iml" filepath="$PROJECT_DIR$/tools/documentation_generator/documentation_generator.iml" />
|
||||
- <module fileurl="file://$PROJECT_DIR$/tools/build/modules/modules.iml" filepath="$PROJECT_DIR$/tools/build/modules/modules.iml" />
|
||||
- <module fileurl="file://$PROJECT_DIR$/src/com/facebook/buck/multitenant/multitenant.iml" filepath="$PROJECT_DIR$/src/com/facebook/buck/multitenant/multitenant.iml" />
|
||||
- <module fileurl="file://$PROJECT_DIR$/programs/programs.iml" filepath="$PROJECT_DIR$/programs/programs.iml" />
|
||||
- <module fileurl="file://$PROJECT_DIR$/skunkworks/protobuck/protobuck.iml" filepath="$PROJECT_DIR$/skunkworks/protobuck/protobuck.iml" />
|
||||
- <module fileurl="file://$PROJECT_DIR$/python-dsl/python-dsl.iml" filepath="$PROJECT_DIR$/python-dsl/python-dsl.iml" />
|
||||
- <module fileurl="file://$PROJECT_DIR$/scripts/scripts.iml" filepath="$PROJECT_DIR$/scripts/scripts.iml" />
|
||||
- </modules>
|
||||
- </component>
|
||||
-</project>
|
||||
\ No newline at end of file
|
||||
diff --git a/src/com/facebook/buck/apple/AppleBundle.java b/src/com/facebook/buck/apple/AppleBundle.java
|
||||
index d895ab9a79..ad42beb302 100644
|
||||
--- a/src/com/facebook/buck/apple/AppleBundle.java
|
||||
+++ b/src/com/facebook/buck/apple/AppleBundle.java
|
||||
@@ -992,7 +992,11 @@ public class AppleBundle extends AbstractBuildRuleWithDeclaredAndExtraDeps
|
||||
keys.put("DTPlatformName", new NSString(platform.getName()));
|
||||
keys.put("DTPlatformVersion", new NSString(sdkVersion));
|
||||
keys.put("DTSDKName", new NSString(sdkName + sdkVersion));
|
||||
- keys.put("MinimumOSVersion", new NSString(minOSVersion));
|
||||
+ if (infoPlistSubstitutions.containsKey("MinimumOSVersion")) {
|
||||
+ keys.put("MinimumOSVersion", new NSString(infoPlistSubstitutions.get("MinimumOSVersion")));
|
||||
+ } else {
|
||||
+ keys.put("MinimumOSVersion", new NSString(minOSVersion));
|
||||
+ }
|
||||
if (platformBuildVersion.isPresent()) {
|
||||
keys.put("DTPlatformBuild", new NSString(platformBuildVersion.get()));
|
||||
keys.put("DTSDKBuild", new NSString(platformBuildVersion.get()));
|
||||
@@ -1185,9 +1189,10 @@ public class AppleBundle extends AbstractBuildRuleWithDeclaredAndExtraDeps
|
||||
|
||||
// .framework bundles will be code-signed when they're copied into the containing bundle.
|
||||
private boolean needCodeSign() {
|
||||
- return binary.isPresent()
|
||||
+ return false;
|
||||
+ /*return binary.isPresent()
|
||||
&& ApplePlatform.needsCodeSign(platform.getName())
|
||||
- && !extension.equals(FRAMEWORK_EXTENSION);
|
||||
+ && !extension.equals(FRAMEWORK_EXTENSION);*/
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/com/facebook/buck/apple/MultiarchFileInfos.java b/src/com/facebook/buck/apple/MultiarchFileInfos.java
|
||||
index c078b2e134..030f9fc289 100644
|
||||
--- a/src/com/facebook/buck/apple/MultiarchFileInfos.java
|
||||
+++ b/src/com/facebook/buck/apple/MultiarchFileInfos.java
|
||||
@@ -177,7 +177,12 @@ public class MultiarchFileInfos {
|
||||
cxxBuckConfig.shouldCacheLinks(),
|
||||
BuildTargetPaths.getGenPath(
|
||||
projectFilesystem, buildTarget, multiarchOutputPathFormat));
|
||||
- graphBuilder.addToIndex(multiarchFile);
|
||||
+ Optional<BuildRule> existingRule2 = graphBuilder.getRuleOptional(multiarchFile.getBuildTarget());
|
||||
+ if (existingRule2.isPresent()) {
|
||||
+ return existingRule2.get();
|
||||
+ } else {
|
||||
+ graphBuilder.addToIndex(multiarchFile);
|
||||
+ }
|
||||
return multiarchFile;
|
||||
} else {
|
||||
return new NoopBuildRule(buildTarget, projectFilesystem);
|
||||
diff --git a/src/com/facebook/buck/features/apple/project/ProjectGenerator.java b/src/com/facebook/buck/features/apple/project/ProjectGenerator.java
|
||||
index 8db968b982..b10f793d8e 100644
|
||||
--- a/src/com/facebook/buck/features/apple/project/ProjectGenerator.java
|
||||
+++ b/src/com/facebook/buck/features/apple/project/ProjectGenerator.java
|
||||
@@ -825,6 +825,7 @@ public class ProjectGenerator {
|
||||
Optional.of(xcodeDescriptions.getXCodeDescriptions()));
|
||||
if (bundleRequiresRemovalOfAllTransitiveFrameworks(targetNode)) {
|
||||
copiedRules = rulesWithoutFrameworkBundles(copiedRules);
|
||||
+ copiedRules = rulesWithoutDylibs(copiedRules);
|
||||
} else if (bundleRequiresAllTransitiveFrameworks(binaryNode, bundleLoaderNode)) {
|
||||
copiedRules =
|
||||
ImmutableSet.<TargetNode<?>>builder()
|
||||
@@ -954,6 +955,22 @@ public class ProjectGenerator {
|
||||
.toImmutableList();
|
||||
}
|
||||
|
||||
+ private ImmutableList<TargetNode<?>> rulesWithoutDylibs(
|
||||
+ Iterable<TargetNode<?>> copiedRules) {
|
||||
+ return RichStream.from(copiedRules)
|
||||
+ .filter(
|
||||
+ input ->
|
||||
+ TargetNodes.castArg(input, AppleLibraryDescriptionArg.class)
|
||||
+ .map(argTargetNode -> {
|
||||
+ if (argTargetNode.getBuildTarget().getFlavors().contains(CxxDescriptionEnhancer.SHARED_FLAVOR)) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ return true;
|
||||
+ })
|
||||
+ .orElse(true))
|
||||
+ .toImmutableList();
|
||||
+ }
|
||||
+
|
||||
private ImmutableList<TargetNode<?>> rulesWithoutBundleLoader(
|
||||
Iterable<TargetNode<?>> copiedRules, TargetNode<?> bundleLoader) {
|
||||
return RichStream.from(copiedRules).filter(x -> !bundleLoader.equals(x)).toImmutableList();
|
||||
@@ -2316,8 +2333,9 @@ public class ProjectGenerator {
|
||||
.transform(
|
||||
bundleExtension -> {
|
||||
switch (bundleExtension) {
|
||||
- case APP:
|
||||
case APPEX:
|
||||
+ return false;
|
||||
+ case APP:
|
||||
case PLUGIN:
|
||||
case BUNDLE:
|
||||
case XCTEST:
|
||||
@@ -2515,7 +2533,7 @@ public class ProjectGenerator {
|
||||
|
||||
librarySearchPaths.add("$DT_TOOLCHAIN_DIR/usr/lib/swift/$PLATFORM_NAME");
|
||||
if (options.shouldLinkSystemSwift()) {
|
||||
- librarySearchPaths.add("$DT_TOOLCHAIN_DIR/usr/lib/swift-5.0/$PLATFORM_NAME");
|
||||
+ //librarySearchPaths.add("$DT_TOOLCHAIN_DIR/usr/lib/swift-5.0/$PLATFORM_NAME");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3444,7 +3462,7 @@ public class ProjectGenerator {
|
||||
|
||||
PBXFileReference fileReference = getLibraryFileReference(targetNode);
|
||||
PBXBuildFile buildFile = new PBXBuildFile(fileReference);
|
||||
- if (fileReference.getExplicitFileType().equals(Optional.of("wrapper.framework"))) {
|
||||
+ if (fileReference.getExplicitFileType().equals(Optional.of("wrapper.framework")) || fileReference.getExplicitFileType().equals(Optional.of("compiled.mach-o.dylib"))) {
|
||||
UnflavoredBuildTargetView buildTarget =
|
||||
targetNode.getBuildTarget().getUnflavoredBuildTarget();
|
||||
if (frameworkTargets.contains(buildTarget)) {
|
||||
@@ -4696,6 +4714,9 @@ public class ProjectGenerator {
|
||||
|
||||
private static boolean bundleRequiresRemovalOfAllTransitiveFrameworks(
|
||||
TargetNode<? extends HasAppleBundleFields> targetNode) {
|
||||
+ if (targetNode.getConstructorArg().getXcodeProductType().equals(Optional.of("com.apple.product-type.app-extension"))) {
|
||||
+ return true;
|
||||
+ }
|
||||
return isFrameworkBundle(targetNode.getConstructorArg());
|
||||
}
|
||||
|
@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
ls []
|
||||
|
||||
if [ ! -f "" ]; then
|
||||
exit 1
|
||||
fi
|
@ -1,27 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "AccountContext",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/TelegramAudio:TelegramAudio",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/TemporaryCachedPeerDataManager:TemporaryCachedPeerDataManager",
|
||||
"//submodules/DeviceLocationManager:DeviceLocationManager",
|
||||
"//submodules/MediaPlayer:UniversalMediaPlayer",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/Postbox:Postbox#shared",
|
||||
"//submodules/TelegramCore:TelegramCore#shared",
|
||||
"//submodules/SyncCore:SyncCore#shared",
|
||||
#"//submodules/WalletCore:WalletCore",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
],
|
||||
weak_frameworks = [
|
||||
"Contacts",
|
||||
],
|
||||
)
|
@ -1,19 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "AccountUtils",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/Postbox:Postbox#shared",
|
||||
"//submodules/TelegramCore:TelegramCore#shared",
|
||||
"//submodules/SyncCore:SyncCore#shared",
|
||||
"//submodules/AccountContext:AccountContext",
|
||||
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
],
|
||||
)
|
@ -1,22 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "ActionSheetPeerItem",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/Postbox:Postbox#shared",
|
||||
"//submodules/TelegramCore:TelegramCore#shared",
|
||||
"//submodules/SyncCore:SyncCore#shared",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/AvatarNode:AvatarNode",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
"//submodules/AccountContext:AccountContext",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,16 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "ActivityIndicator",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,15 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "AlertUI",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/Display:Display#shared",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,22 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "AnimatedAvatarSetNode",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/Postbox:Postbox#shared",
|
||||
"//submodules/TelegramCore:TelegramCore#shared",
|
||||
"//submodules/SyncCore:SyncCore#shared",
|
||||
"//submodules/AccountContext:AccountContext",
|
||||
"//submodules/AvatarNode:AvatarNode",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,16 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "AnimatedCountLabelNode",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,16 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "AnimatedNavigationStripeNode",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,21 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "AnimatedStickerNode",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/YuvConversion:YuvConversion",
|
||||
"//submodules/GZip:GZip",
|
||||
"//submodules/rlottie:RLottieBinding",
|
||||
"//submodules/MediaResources:MediaResources",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,29 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "AnimationUI",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/Postbox:Postbox#shared",
|
||||
"//submodules/TelegramCore:TelegramCore#shared",
|
||||
"//submodules/SyncCore:SyncCore#shared",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/YuvConversion:YuvConversion",
|
||||
"//submodules/StickerResources:StickerResources",
|
||||
"//submodules/MediaResources:MediaResources",
|
||||
"//submodules/Tuples:Tuples",
|
||||
"//submodules/GZip:GZip",
|
||||
"//submodules/rlottie:RLottieBinding",
|
||||
"//submodules/lottie-ios:Lottie",
|
||||
"//submodules/AppBundle:AppBundle",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/MobileCoreServices.framework",
|
||||
],
|
||||
)
|
@ -1,20 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "AppBundle",
|
||||
srcs = glob([
|
||||
"Sources/**/*.m",
|
||||
]),
|
||||
headers = glob([
|
||||
"Sources/**/*.h",
|
||||
]),
|
||||
exported_headers = glob([
|
||||
"PublicHeaders/**/*.h",
|
||||
]),
|
||||
deps = [
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,25 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "AppLock",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/Postbox:Postbox#shared",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
"//submodules/MonotonicTime:MonotonicTime",
|
||||
"//submodules/PasscodeUI:PasscodeUI",
|
||||
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
|
||||
"//submodules/ImageBlur:ImageBlur",
|
||||
"//submodules/AccountContext:AccountContext",
|
||||
"//submodules/AppLockState:AppLockState",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,14 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "AppLockState",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/MonotonicTime:MonotonicTime",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
],
|
||||
)
|
@ -1,29 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "ArchivedStickerPacksNotice",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/Postbox:Postbox#shared",
|
||||
"//submodules/TelegramCore:TelegramCore#shared",
|
||||
"//submodules/SyncCore:SyncCore#shared",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
"//submodules/AccountContext:AccountContext",
|
||||
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
|
||||
"//submodules/StickerResources:StickerResources",
|
||||
"//submodules/AlertUI:AlertUI",
|
||||
"//submodules/PresentationDataUtils:PresentationDataUtils",
|
||||
"//submodules/MergeLists:MergeLists",
|
||||
"//submodules/ItemListUI:ItemListUI",
|
||||
"//submodules/ItemListStickerPackItem:ItemListStickerPackItem",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
30
submodules/AsyncDisplayKit/BUCK
vendored
30
submodules/AsyncDisplayKit/BUCK
vendored
@ -1,30 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "framework")
|
||||
|
||||
public_headers = glob([
|
||||
"Source/PublicHeaders/AsyncDisplayKit/*.h",
|
||||
])
|
||||
|
||||
private_headers = glob([
|
||||
"Source/*.h",
|
||||
])
|
||||
|
||||
framework(
|
||||
name = "AsyncDisplayKit",
|
||||
srcs = glob([
|
||||
"Source/**/*.m",
|
||||
"Source/**/*.mm",
|
||||
]),
|
||||
headers = private_headers,
|
||||
exported_headers = public_headers,
|
||||
compiler_flags = [
|
||||
"-DMINIMAL_ASDK",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/QuartzCore.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/CoreMedia.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/CoreText.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/CoreGraphics.framework",
|
||||
]
|
||||
)
|
@ -1,33 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "AuthTransferUI",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/TelegramCore:TelegramCore#shared",
|
||||
"//submodules/SyncCore:SyncCore#shared",
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
"//submodules/AccountContext:AccountContext",
|
||||
"//submodules/QrCode:QrCode",
|
||||
"//submodules/Camera:Camera",
|
||||
"//submodules/GlassButtonNode:GlassButtonNode",
|
||||
"//submodules/AlertUI:AlertUI",
|
||||
"//submodules/AppBundle:AppBundle",
|
||||
"//submodules/SolidRoundedButtonNode:SolidRoundedButtonNode",
|
||||
"//submodules/OverlayStatusController:OverlayStatusController",
|
||||
"//submodules/AnimatedStickerNode:AnimatedStickerNode",
|
||||
"//submodules/Markdown:Markdown",
|
||||
"//submodules/AnimationUI:AnimationUI",
|
||||
"//submodules/PresentationDataUtils:PresentationDataUtils",
|
||||
"//submodules/DeviceAccess:DeviceAccess",
|
||||
"//submodules/UndoUI:UndoUI",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
],
|
||||
)
|
@ -1,21 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "AuthorizationUI",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/TelegramCore:TelegramCore#shared",
|
||||
"//submodules/SyncCore:SyncCore#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/TextFormat:TextFormat",
|
||||
"//submodules/Markdown:Markdown",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,23 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "AvatarNode",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/TelegramCore:TelegramCore#shared",
|
||||
"//submodules/SyncCore:SyncCore#shared",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
"//submodules/AnimationUI:AnimationUI",
|
||||
"//submodules/AppBundle:AppBundle",
|
||||
"//submodules/AccountContext:AccountContext",
|
||||
"//submodules/Emoji:Emoji",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,29 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "BotPaymentsUI",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/Postbox:Postbox#shared",
|
||||
"//submodules/TelegramCore:TelegramCore#shared",
|
||||
"//submodules/SyncCore:SyncCore#shared",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
"//submodules/LocalAuth:LocalAuth",
|
||||
"//submodules/AccountContext:AccountContext",
|
||||
"//submodules/ItemListUI:ItemListUI",
|
||||
"//submodules/PasswordSetupUI:PasswordSetupUI",
|
||||
"//submodules/PhotoResources:PhotoResources",
|
||||
"//submodules/TelegramNotices:TelegramNotices",
|
||||
"//submodules/Stripe:Stripe",
|
||||
"//submodules/CountrySelectionUI:CountrySelectionUI",
|
||||
"//submodules/AppBundle:AppBundle",
|
||||
"//submodules/PresentationDataUtils:PresentationDataUtils",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,29 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
load("//Config:app_configuration.bzl", "appConfig")
|
||||
|
||||
static_library(
|
||||
name = "BuildConfig",
|
||||
srcs = glob([
|
||||
"Sources/*.m",
|
||||
]),
|
||||
compiler_flags = [
|
||||
'-DAPP_CONFIG_API_ID=' + appConfig()["apiId"],
|
||||
'-DAPP_CONFIG_API_HASH="' + appConfig()["apiHash"] + '"',
|
||||
'-DAPP_CONFIG_APP_CENTER_ID="' + appConfig()["appCenterId"] + '"',
|
||||
'-DAPP_CONFIG_IS_INTERNAL_BUILD=' + appConfig()["isInternalBuild"],
|
||||
'-DAPP_CONFIG_IS_APPSTORE_BUILD=' + appConfig()["isAppStoreBuild"],
|
||||
'-DAPP_CONFIG_APPSTORE_ID=' + appConfig()["appStoreId"],
|
||||
'-DAPP_SPECIFIC_URL_SCHEME="' + appConfig()["appSpecificUrlScheme"] + '"',
|
||||
],
|
||||
headers = glob([
|
||||
"Sources/*.h",
|
||||
]),
|
||||
exported_headers = glob([
|
||||
"PublicHeaders/**/*.h",
|
||||
]),
|
||||
deps = [
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
],
|
||||
)
|
@ -1,20 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "BuildConfigExtra",
|
||||
srcs = glob([
|
||||
"Sources/*.m",
|
||||
]),
|
||||
headers = glob([
|
||||
"Sources/*.h",
|
||||
]),
|
||||
exported_headers = glob([
|
||||
"PublicHeaders/**/*.h",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/PKCS:PKCS",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
],
|
||||
)
|
@ -1,30 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "CallListUI",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/Postbox:Postbox#shared",
|
||||
"//submodules/TelegramCore:TelegramCore#shared",
|
||||
"//submodules/SyncCore:SyncCore#shared",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
|
||||
"//submodules/AccountContext:AccountContext",
|
||||
"//submodules/ItemListUI:ItemListUI",
|
||||
"//submodules/AvatarNode:AvatarNode",
|
||||
"//submodules/TelegramStringFormatting:TelegramStringFormatting",
|
||||
"//submodules/AlertUI:AlertUI",
|
||||
"//submodules/PresentationDataUtils:PresentationDataUtils",
|
||||
"//submodules/TelegramNotices:TelegramNotices",
|
||||
"//submodules/MergeLists:MergeLists",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,18 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "Camera",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/AVFoundation.framework",
|
||||
],
|
||||
)
|
@ -1,22 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "ChatInterfaceState",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/Postbox:Postbox#shared",
|
||||
"//submodules/TelegramCore:TelegramCore#shared",
|
||||
"//submodules/SyncCore:SyncCore#shared",
|
||||
"//submodules/TextFormat:TextFormat",
|
||||
"//submodules/AccountContext:AccountContext",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,22 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "ChatListFilterSettingsHeaderItem",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
"//submodules/ItemListUI:ItemListUI",
|
||||
"//submodules/PresentationDataUtils:PresentationDataUtils",
|
||||
"//submodules/AnimatedStickerNode:AnimatedStickerNode",
|
||||
"//submodules/AppBundle:AppBundle",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,17 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "ChatListSearchItemHeader",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
"//submodules/ListSectionHeaderNode:ListSectionHeaderNode",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,20 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "ChatListSearchItemNode",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/Postbox:Postbox#shared",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
"//submodules/SearchBarNode:SearchBarNode",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,26 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "ChatListSearchRecentPeersNode",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/Postbox:Postbox#shared",
|
||||
"//submodules/TelegramCore:TelegramCore#shared",
|
||||
"//submodules/SyncCore:SyncCore#shared",
|
||||
"//submodules/ListSectionHeaderNode:ListSectionHeaderNode",
|
||||
"//submodules/HorizontalPeerItem:HorizontalPeerItem",
|
||||
"//submodules/MergeLists:MergeLists",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
"//submodules/ContextUI:ContextUI",
|
||||
"//submodules/AccountContext:AccountContext",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,64 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "ChatListUI",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/Postbox:Postbox#shared",
|
||||
"//submodules/TelegramCore:TelegramCore#shared",
|
||||
"//submodules/SyncCore:SyncCore#shared",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
|
||||
"//submodules/AccountContext:AccountContext",
|
||||
"//submodules/TelegramBaseController:TelegramBaseController",
|
||||
"//submodules/OverlayStatusController:OverlayStatusController",
|
||||
"//submodules/AlertUI:AlertUI",
|
||||
"//submodules/PresentationDataUtils:PresentationDataUtils",
|
||||
"//submodules/UndoUI:UndoUI",
|
||||
"//submodules/TelegramNotices:TelegramNotices",
|
||||
"//submodules/SearchUI:SearchUI",
|
||||
"//submodules/MergeLists:MergeLists",
|
||||
"//submodules/ActivityIndicator:ActivityIndicator",
|
||||
"//submodules/SearchBarNode:SearchBarNode",
|
||||
"//submodules/ChatListSearchRecentPeersNode:ChatListSearchRecentPeersNode",
|
||||
"//submodules/ChatListSearchItemNode:ChatListSearchItemNode",
|
||||
"//submodules/ChatListSearchItemHeader:ChatListSearchItemHeader",
|
||||
"//submodules/TemporaryCachedPeerDataManager:TemporaryCachedPeerDataManager",
|
||||
"//submodules/PeerPresenceStatusManager:PeerPresenceStatusManager",
|
||||
"//submodules/PeerOnlineMarkerNode:PeerOnlineMarkerNode",
|
||||
"//submodules/LocalizedPeerData:LocalizedPeerData",
|
||||
"//submodules/ChatTitleActivityNode:ChatTitleActivityNode",
|
||||
"//submodules/DeleteChatPeerActionSheetItem:DeleteChatPeerActionSheetItem",
|
||||
"//submodules/LanguageSuggestionUI:LanguageSuggestionUI",
|
||||
"//submodules/ContactsPeerItem:ContactsPeerItem",
|
||||
"//submodules/ContactListUI:ContactListUI",
|
||||
"//submodules/PhotoResources:PhotoResources",
|
||||
"//submodules/AppBundle:AppBundle",
|
||||
"//submodules/ContextUI:ContextUI",
|
||||
"//submodules/PhoneNumberFormat:PhoneNumberFormat",
|
||||
"//submodules/TelegramIntents:TelegramIntents",
|
||||
"//submodules/ItemListPeerActionItem:ItemListPeerActionItem",
|
||||
"//submodules/AnimatedStickerNode:AnimatedStickerNode",
|
||||
"//submodules/SolidRoundedButtonNode:SolidRoundedButtonNode",
|
||||
"//submodules/TooltipUI:TooltipUI",
|
||||
"//submodules/ListMessageItem:ListMessageItem",
|
||||
"//submodules/ChatMessageInteractiveMediaBadge:ChatMessageInteractiveMediaBadge",
|
||||
"//submodules/MediaPlayer:UniversalMediaPlayer",
|
||||
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
|
||||
"//submodules/GalleryData:GalleryData",
|
||||
"//submodules/InstantPageUI:InstantPageUI",
|
||||
"//submodules/ListSectionHeaderNode:ListSectionHeaderNode",
|
||||
"//submodules/ChatInterfaceState:ChatInterfaceState",
|
||||
"//submodules/GridMessageSelectionNode:GridMessageSelectionNode",
|
||||
"//submodules/ChatListFilterSettingsHeaderItem:ChatListFilterSettingsHeaderItem",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,20 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "ChatMessageInteractiveMediaBadge",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
"//submodules/TextFormat:TextFormat",
|
||||
"//submodules/RadialStatusNode:RadialStatusNode",
|
||||
"//submodules/AppBundle:AppBundle",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,17 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "ChatTitleActivityNode",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/LegacyComponents:LegacyComponents",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,17 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "CheckNode",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/LegacyComponents:LegacyComponents",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,20 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "CloudData",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/Postbox:Postbox#shared",
|
||||
"//submodules/MtProtoKit:MtProtoKit#shared",
|
||||
"//submodules/EncryptionProvider:EncryptionProvider",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
],
|
||||
weak_frameworks = [
|
||||
"CloudKit",
|
||||
],
|
||||
)
|
@ -1,25 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "ComposePollUI",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/Postbox:Postbox#shared",
|
||||
"//submodules/TelegramCore:TelegramCore#shared",
|
||||
"//submodules/SyncCore:SyncCore#shared",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
"//submodules/ItemListUI:ItemListUI",
|
||||
"//submodules/AccountContext:AccountContext",
|
||||
"//submodules/AlertUI:AlertUI",
|
||||
"//submodules/PresentationDataUtils:PresentationDataUtils",
|
||||
"//submodules/TextFormat:TextFormat",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,38 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "ContactListUI",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/Postbox:Postbox#shared",
|
||||
"//submodules/TelegramCore:TelegramCore#shared",
|
||||
"//submodules/SyncCore:SyncCore#shared",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
"//submodules/AccountContext:AccountContext",
|
||||
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
|
||||
"//submodules/MergeLists:MergeLists",
|
||||
"//submodules/SearchUI:SearchUI",
|
||||
"//submodules/ChatListSearchItemHeader:ChatListSearchItemHeader",
|
||||
"//submodules/ItemListPeerItem:ItemListPeerItem",
|
||||
"//submodules/ContactsPeerItem:ContactsPeerItem",
|
||||
"//submodules/ChatListSearchItemNode:ChatListSearchItemNode",
|
||||
"//submodules/TelegramPermissionsUI:TelegramPermissionsUI",
|
||||
"//submodules/TelegramNotices:TelegramNotices",
|
||||
"//submodules/AlertUI:AlertUI",
|
||||
"//submodules/PresentationDataUtils:PresentationDataUtils",
|
||||
"//submodules/ShareController:ShareController",
|
||||
"//submodules/AppBundle:AppBundle",
|
||||
"//submodules/OverlayStatusController:OverlayStatusController",
|
||||
"//submodules/PhoneNumberFormat:PhoneNumberFormat",
|
||||
"//submodules/SolidRoundedButtonNode:SolidRoundedButtonNode",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,32 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "ContactsPeerItem",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/Postbox:Postbox#shared",
|
||||
"//submodules/TelegramCore:TelegramCore#shared",
|
||||
"//submodules/SyncCore:SyncCore#shared",
|
||||
"//submodules/AccountContext:AccountContext",
|
||||
"//submodules/AvatarNode:AvatarNode",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
"//submodules/CheckNode:CheckNode",
|
||||
"//submodules/TelegramStringFormatting:TelegramStringFormatting",
|
||||
"//submodules/ItemListPeerItem:ItemListPeerItem",
|
||||
"//submodules/PeerPresenceStatusManager:PeerPresenceStatusManager",
|
||||
"//submodules/ItemListUI:ItemListUI",
|
||||
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
|
||||
"//submodules/ListSectionHeaderNode:ListSectionHeaderNode",
|
||||
"//submodules/ContextUI:ContextUI",
|
||||
"//submodules/PresentationDataUtils:PresentationDataUtils",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,21 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "ContextUI",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
"//submodules/TextSelectionNode:TextSelectionNode",
|
||||
"//submodules/ReactionSelectionNode:ReactionSelectionNode",
|
||||
"//submodules/AppBundle:AppBundle",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,17 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "CounterContollerTitleView",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,23 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "CountrySelectionUI",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/Postbox:Postbox#shared",
|
||||
"//submodules/TelegramCore:TelegramCore#shared",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
"//submodules/TelegramStringFormatting:TelegramStringFormatting",
|
||||
"//submodules/SearchBarNode:SearchBarNode",
|
||||
"//submodules/AppBundle:AppBundle",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,19 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "Crc32",
|
||||
srcs = glob([
|
||||
"Sources/*.m",
|
||||
]),
|
||||
headers = glob([
|
||||
"Sources/*.h",
|
||||
]),
|
||||
exported_headers = glob([
|
||||
"PublicHeaders/**/*.h",
|
||||
]),
|
||||
deps = [
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
],
|
||||
)
|
@ -1,19 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "CryptoUtils",
|
||||
srcs = glob([
|
||||
"Sources/*.m",
|
||||
]),
|
||||
headers = glob([
|
||||
"Sources/*.h",
|
||||
]),
|
||||
exported_headers = glob([
|
||||
"PublicHeaders/**/*.h",
|
||||
]),
|
||||
deps = [
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
],
|
||||
)
|
@ -1,13 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "Buffers",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
],
|
||||
)
|
@ -1,17 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "MessageHistoryMetadataTable",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/Database/ValueBox:ValueBox",
|
||||
"//submodules/Database/Table:Table",
|
||||
"//submodules/Database/PostboxDataTypes:PostboxDataTypes",
|
||||
"//submodules/Database/PostboxCoding:PostboxCoding",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
],
|
||||
)
|
@ -1,16 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "MessageHistoryReadStateTable",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/Database/ValueBox:ValueBox",
|
||||
"//submodules/Database/Table:Table",
|
||||
"//submodules/Database/PostboxDataTypes:PostboxDataTypes",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
],
|
||||
)
|
@ -1,21 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "MurmurHash",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
"Sources/**/*.m",
|
||||
]),
|
||||
headers = glob([
|
||||
"Sources/**/*.h",
|
||||
]),
|
||||
exported_headers = glob([
|
||||
"Sources/**/*.h",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/Database/MurmurHash/Impl:MurMurHashObjC",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
],
|
||||
)
|
@ -1,18 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "MurMurHashObjC",
|
||||
srcs = glob([
|
||||
"Sources/*.m",
|
||||
]),
|
||||
headers = glob([
|
||||
"Sources/*.h",
|
||||
]),
|
||||
exported_headers = glob([
|
||||
"PublicHeaders/**/*.h",
|
||||
]),
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,17 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "PeerTable",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/Database/ValueBox:ValueBox",
|
||||
"//submodules/Database/Table:Table",
|
||||
"//submodules/Database/PostboxCoding:PostboxCoding",
|
||||
"//submodules/Database/PostboxDataTypes:PostboxDataTypes",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
],
|
||||
)
|
@ -1,15 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "PostboxCoding",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/Database/Buffers:Buffers",
|
||||
"//submodules/Database/MurmurHash:MurmurHash",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
],
|
||||
)
|
@ -1,15 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "PostboxDataTypes",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/Database/ValueBox:ValueBox",
|
||||
"//submodules/Database/PostboxCoding:PostboxCoding",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
],
|
||||
)
|
@ -1,17 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "PreferencesTable",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/Database/ValueBox:ValueBox",
|
||||
"//submodules/Database/Table:Table",
|
||||
"//submodules/Database/PostboxCoding:PostboxCoding",
|
||||
"//submodules/Database/PostboxDataTypes:PostboxDataTypes",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
],
|
||||
)
|
@ -1,14 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "Table",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/Database/ValueBox:ValueBox",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
],
|
||||
)
|
@ -1,16 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "ValueBox",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/sqlcipher:sqlcipher",
|
||||
"//submodules/Database/Buffers:Buffers",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
],
|
||||
)
|
@ -1,20 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "DateSelectionUI",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/AccountContext:AccountContext",
|
||||
"//submodules/TelegramStringFormatting:TelegramStringFormatting",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,22 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "DeleteChatPeerActionSheetItem",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/Postbox:Postbox#shared",
|
||||
"//submodules/TelegramCore:TelegramCore#shared",
|
||||
"//submodules/SyncCore:SyncCore#shared",
|
||||
"//submodules/AccountContext:AccountContext",
|
||||
"//submodules/AvatarNode:AvatarNode",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,21 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "DeviceAccess",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/TelegramCore:TelegramCore#shared",
|
||||
"//submodules/SyncCore:SyncCore#shared",
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/AccountContext:AccountContext",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
"//submodules/LegacyComponents:LegacyComponents",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/CoreLocation.framework",
|
||||
],
|
||||
)
|
@ -1,15 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "DeviceLocationManager",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/CoreLocation.framework",
|
||||
],
|
||||
)
|
@ -1,18 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "DeviceProximity",
|
||||
srcs = glob([
|
||||
"Sources/*.m",
|
||||
]),
|
||||
headers = glob([
|
||||
"Sources/*.h",
|
||||
]),
|
||||
exported_headers = glob([
|
||||
"PublicHeaders/**/*.h",
|
||||
]),
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,12 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "DirectionalPanGesture",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,20 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "framework")
|
||||
|
||||
framework(
|
||||
name = "Display",
|
||||
srcs = glob([
|
||||
"Source/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/ObjCRuntimeUtils:ObjCRuntimeUtils",
|
||||
"//submodules/UIKitRuntimeUtils:UIKitRuntimeUtils",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/AppBundle:AppBundle",
|
||||
"//submodules/Markdown:Markdown",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,13 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "Emoji",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/CoreText.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/AVFoundation.framework",
|
||||
],
|
||||
)
|
@ -1,17 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "EncryptionKeyVisualization",
|
||||
srcs = glob([
|
||||
"Sources/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/TelegramCore:TelegramCore#shared",
|
||||
"//submodules/SyncCore:SyncCore#shared",
|
||||
"//submodules/EncryptionKeyVisualization/Impl:EncryptionKeyVisualizationImpl",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,18 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "EncryptionKeyVisualizationImpl",
|
||||
srcs = glob([
|
||||
"Sources/*.m",
|
||||
]),
|
||||
headers = glob([
|
||||
"Sources/*.h",
|
||||
]),
|
||||
exported_headers = glob([
|
||||
"PublicHeaders/**/*.h",
|
||||
]),
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
)
|
@ -1,19 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "EncryptionProvider",
|
||||
srcs = glob([
|
||||
"Sources/**/*.m",
|
||||
]),
|
||||
headers = glob([
|
||||
"PublicHeaders/**/*.h",
|
||||
]),
|
||||
exported_headers = glob([
|
||||
"PublicHeaders/**/*.h",
|
||||
]),
|
||||
deps = [
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
],
|
||||
)
|
@ -1,20 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "FFMpegBinding",
|
||||
srcs = glob([
|
||||
"Sources/*.m",
|
||||
]),
|
||||
headers = glob([
|
||||
"Sources/*.h",
|
||||
]),
|
||||
exported_headers = glob([
|
||||
"Public/**/*.h",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/ffmpeg:ffmpeg",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
],
|
||||
)
|
@ -1,19 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "FastBlur",
|
||||
srcs = glob([
|
||||
"Sources/*.m",
|
||||
]),
|
||||
headers = glob([
|
||||
"Sources/*.h",
|
||||
]),
|
||||
exported_headers = glob([
|
||||
"PublicHeaders/**/*.h",
|
||||
]),
|
||||
deps = [
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
],
|
||||
)
|
@ -1,23 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "FileMediaResourceStatus",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/Postbox:Postbox#shared",
|
||||
"//submodules/TelegramCore:TelegramCore#shared",
|
||||
"//submodules/SyncCore:SyncCore#shared",
|
||||
"//submodules/AccountContext:AccountContext",
|
||||
"//submodules/MediaPlayer:UniversalMediaPlayer",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/WebKit.framework",
|
||||
],
|
||||
)
|
@ -1,17 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "GZip",
|
||||
srcs = glob([
|
||||
"Sources/*.m",
|
||||
]),
|
||||
headers = glob([
|
||||
"Sources/*.h",
|
||||
]),
|
||||
exported_headers = glob([
|
||||
"Sources/*.h",
|
||||
]),
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
],
|
||||
)
|
@ -1,31 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "GalleryData",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/Postbox:Postbox#shared",
|
||||
"//submodules/TelegramCore:TelegramCore#shared",
|
||||
"//submodules/SyncCore:SyncCore#shared",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
"//submodules/AccountContext:AccountContext",
|
||||
"//submodules/AppBundle:AppBundle",
|
||||
"//submodules/PresentationDataUtils:PresentationDataUtils",
|
||||
"//submodules/InstantPageUI:InstantPageUI",
|
||||
"//submodules/GalleryUI:GalleryUI",
|
||||
"//submodules/PeerAvatarGalleryUI:PeerAvatarGalleryUI",
|
||||
"//submodules/MediaResources:MediaResources",
|
||||
"//submodules/WebsiteType:WebsiteType",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/QuickLook.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/SafariServices.framework",
|
||||
],
|
||||
)
|
@ -1,36 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "GalleryUI",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/Postbox:Postbox#shared",
|
||||
"//submodules/TelegramCore:TelegramCore#shared",
|
||||
"//submodules/SyncCore:SyncCore#shared",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
"//submodules/TextFormat:TextFormat",
|
||||
"//submodules/AccountContext:AccountContext",
|
||||
"//submodules/TelegramUniversalVideoContent:TelegramUniversalVideoContent",
|
||||
"//submodules/WebsiteType:WebsiteType",
|
||||
"//submodules/ScreenCaptureDetection:ScreenCaptureDetection",
|
||||
"//submodules/OpenInExternalAppUI:OpenInExternalAppUI",
|
||||
"//submodules/ShareController:ShareController",
|
||||
"//submodules/SwipeToDismissGesture:SwipeToDismissGesture",
|
||||
"//submodules/CheckNode:CheckNode",
|
||||
"//submodules/AppBundle:AppBundle",
|
||||
"//submodules/StickerPackPreviewUI:StickerPackPreviewUI",
|
||||
"//submodules/OverlayStatusController:OverlayStatusController",
|
||||
"//submodules/PresentationDataUtils:PresentationDataUtils",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/QuickLook.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/SafariServices.framework",
|
||||
],
|
||||
)
|
@ -1,24 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "GameUI",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||
"//submodules/Display:Display#shared",
|
||||
"//submodules/Postbox:Postbox#shared",
|
||||
"//submodules/TelegramCore:TelegramCore#shared",
|
||||
"//submodules/SyncCore:SyncCore#shared",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
"//submodules/AccountContext:AccountContext",
|
||||
"//submodules/ShareController:ShareController",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/WebKit.framework",
|
||||
],
|
||||
)
|
@ -1,15 +0,0 @@
|
||||
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||
|
||||
static_library(
|
||||
name = "Geocoding",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||
],
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/CoreLocation.framework",
|
||||
],
|
||||
)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user