mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Temp
This commit is contained in:
parent
f67494ad12
commit
8385c4d331
1
.bazelrc
1
.bazelrc
@ -1,2 +1,3 @@
|
||||
build --strategy=Genrule=local
|
||||
build --apple_platform_type=ios
|
||||
build --cxxopt='-std=c++14'
|
||||
|
@ -52,4 +52,6 @@ local_repository(
|
||||
path = "build-system/bazel-rules/rules_apple_extras",
|
||||
)
|
||||
|
||||
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
|
||||
|
||||
bazel_skylib_workspace()
|
||||
|
@ -48,6 +48,10 @@ swift_library(
|
||||
"//submodules/openssl:openssl",
|
||||
"//submodules/OpenSSLEncryptionProvider:OpenSSLEncryptionProvider",
|
||||
"//submodules/WalletCore:WalletCore",
|
||||
"//submodules/BuildConfig:BuildConfig",
|
||||
"//submodules/AppBundle:AppBundle",
|
||||
#"//submodules/SolidRoundedButtonNode:SolidRoundedButtonNode",
|
||||
#"//submodules/WalletUI:WalletUI",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -1,17 +1,18 @@
|
||||
load(
|
||||
"@rules_apple_extras//apple:objc_library.bzl",
|
||||
"objc_library",
|
||||
)
|
||||
|
||||
objc_library(
|
||||
name = "AppBundle",
|
||||
enable_modules = True,
|
||||
module_name = "AppBundle",
|
||||
enable_modules = True,
|
||||
srcs = glob([
|
||||
"Source/AppBundle/*.m",
|
||||
]),
|
||||
hdrs = glob([
|
||||
"Source/AppBundle/*.h",
|
||||
]),
|
||||
includes = [
|
||||
"Source",
|
||||
],
|
||||
sdk_frameworks = [
|
||||
"Foundation",
|
||||
"UIKit",
|
||||
|
39
submodules/BuildConfig/BUILD
Normal file
39
submodules/BuildConfig/BUILD
Normal file
@ -0,0 +1,39 @@
|
||||
load(
|
||||
"@rules_apple_extras//apple:objc_library.bzl",
|
||||
"objc_library",
|
||||
)
|
||||
|
||||
load(
|
||||
"@bazel_skylib//rules:common_settings.bzl",
|
||||
"string_flag",
|
||||
)
|
||||
|
||||
string_flag(
|
||||
name = "apiId",
|
||||
build_setting_default = "",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
objc_library(
|
||||
name = "BuildConfig",
|
||||
module_name = "BuildConfig",
|
||||
enable_modules = True,
|
||||
srcs = glob([
|
||||
"Sources/*.m",
|
||||
]),
|
||||
copts = [
|
||||
'-DAPP_CONFIG_API_ID=0',
|
||||
'-DAPP_CONFIG_API_HASH="1"',
|
||||
'-DAPP_CONFIG_HOCKEYAPP_ID="1"',
|
||||
'-DAPP_CONFIG_IS_INTERNAL_BUILD=false',
|
||||
'-DAPP_CONFIG_IS_APPSTORE_BUILD=true',
|
||||
'-DAPP_CONFIG_APPSTORE_ID=0',
|
||||
'-DAPP_SPECIFIC_URL_SCHEME="1"',
|
||||
],
|
||||
hdrs = glob([
|
||||
"Sources/*.h",
|
||||
]),
|
||||
deps = [
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
16
submodules/SolidRoundedButtonNode/BUILD
Normal file
16
submodules/SolidRoundedButtonNode/BUILD
Normal file
@ -0,0 +1,16 @@
|
||||
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
|
||||
|
||||
swift_library(
|
||||
name = "SolidRoundedButtonNode",
|
||||
module_name = "SolidRoundedButtonNode",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
|
||||
"//submodules/Display:Display",
|
||||
],
|
||||
visibility = [
|
||||
"//visibility:public",
|
||||
],
|
||||
)
|
@ -5,6 +5,8 @@ load(
|
||||
|
||||
objc_library(
|
||||
name = "TonBinding",
|
||||
module_name = "TonBinding",
|
||||
enable_modules = True,
|
||||
srcs = glob([
|
||||
"Sources/**/*.m",
|
||||
"Sources/**/*.mm",
|
||||
@ -12,6 +14,9 @@ objc_library(
|
||||
hdrs = glob([
|
||||
"Sources/**/*.h",
|
||||
]),
|
||||
copts = [
|
||||
"-std=c++14",
|
||||
],
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SSignalKit:SSignalKit",
|
||||
"//submodules/openssl:openssl",
|
||||
|
51
submodules/WalletUI/BUILD
Normal file
51
submodules/WalletUI/BUILD
Normal file
@ -0,0 +1,51 @@
|
||||
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
|
||||
|
||||
'''apple_resource(
|
||||
name = "WalletUIResources",
|
||||
files = glob([
|
||||
"Resources/**/*",
|
||||
], exclude = ["Resources/**/.*"]),
|
||||
visibility = ["PUBLIC"],
|
||||
)'''
|
||||
|
||||
'''apple_asset_catalog(
|
||||
name = 'WalletUIAssets',
|
||||
dirs = [
|
||||
"WalletImages.xcassets",
|
||||
],
|
||||
visibility = ["PUBLIC"],
|
||||
)'''
|
||||
|
||||
swift_library(
|
||||
name = "WalletUI",
|
||||
module_name = "WalletUI",
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
|
||||
"//submodules/Display:Display",
|
||||
"//submodules/OverlayStatusController:OverlayStatusController",
|
||||
"//submodules/AppBundle:AppBundle",
|
||||
"//submodules/SolidRoundedButtonNode:SolidRoundedButtonNode",
|
||||
"//submodules/AlertUI:AlertUI",
|
||||
"//submodules/Camera:Camera",
|
||||
"//submodules/QrCode:QrCode",
|
||||
"//submodules/MergeLists:MergeLists",
|
||||
"//submodules/GlassButtonNode:GlassButtonNode",
|
||||
"//submodules/UrlEscaping:UrlEscaping",
|
||||
"//submodules/LocalAuth:LocalAuth",
|
||||
"//submodules/ScreenCaptureDetection:ScreenCaptureDetection",
|
||||
"//submodules/AnimatedStickerNode:AnimatedStickerNode",
|
||||
"//submodules/WalletUrl:WalletUrl",
|
||||
"//submodules/WalletCore:WalletCore",
|
||||
"//submodules/StringPluralization:StringPluralization",
|
||||
"//submodules/ActivityIndicator:ActivityIndicator",
|
||||
"//submodules/ProgressNavigationButtonNode:ProgressNavigationButtonNode",
|
||||
"//submodules/Markdown:Markdown",
|
||||
],
|
||||
visibility = [
|
||||
"//visibility:public",
|
||||
],
|
||||
)
|
@ -40,50 +40,60 @@ ton_lib_names = [
|
||||
"tonlib",
|
||||
]
|
||||
|
||||
genrule(
|
||||
name = "",
|
||||
)
|
||||
|
||||
genrule(
|
||||
name = "ton_build",
|
||||
srcs = [
|
||||
"build-ton.sh",
|
||||
"iOS.cmake",
|
||||
"tonlib-src.zip",
|
||||
"tonlib-src.tar.gz",
|
||||
"//submodules/openssl:openssl_include",
|
||||
"//submodules/openssl:libcrypto.a",
|
||||
],
|
||||
cmd_bash =
|
||||
"""
|
||||
set -ex
|
||||
|
||||
cp $(location :build-ton.sh) "$(RULEDIR)/"
|
||||
cp $(location :iOS.cmake) "$(RULEDIR)/"
|
||||
unzip
|
||||
cp $(location :iOS.cmake) "$(RULEDIR)/"
|
||||
"tonlib-src.zip",
|
||||
tar -xzf $(location tonlib-src.tar.gz) -C "$(RULEDIR)/"
|
||||
|
||||
mkdir -p "$(RULEDIR)/openssl_headers/openssl"
|
||||
mkdir -p "$(RULEDIR)/openssl_headers/include/openssl"
|
||||
mkdir -p "$(RULEDIR)/openssl_headers/lib"
|
||||
cp -f "$(location //submodules/openssl:libcrypto.a)" "$(RULEDIR)/openssl_headers/lib/"
|
||||
for f in $(locations //submodules/openssl:openssl_include); do
|
||||
cp -f "$$f" "$(RULEDIR)/openssl_headers/openssl/"
|
||||
cp -f "$$f" "$(RULEDIR)/openssl_headers/include/openssl/"
|
||||
done
|
||||
mkdir -p "$(RULEDIR)/Public/ton"
|
||||
|
||||
sh $(RULEDIR)/build-ton.sh "$(RULEDIR)/Public/ton" $(RULEDIR) "$(RULEDIR)/openssl_headers"
|
||||
""",
|
||||
outs = ["Public/ton/" + x for x in ton_headers],
|
||||
sh $(RULEDIR)/build-ton.sh "$(RULEDIR)" "$(RULEDIR)" "$(RULEDIR)/openssl_headers"
|
||||
""" +
|
||||
"\n".join([
|
||||
"cp -f \"$(RULEDIR)/build/out/include/{}\" \"$(location Public/ton/include/{})\"".format(header, header) for header in ton_headers
|
||||
]) +
|
||||
"\n" +
|
||||
"\n".join([
|
||||
"cp -f \"$(RULEDIR)/build/out/lib/lib{}.a\" \"$(location Public/ton/lib/lib{}.a)\"".format(lib, lib) for lib in ton_lib_names
|
||||
]),
|
||||
outs = ["Public/ton/include/" + x for x in ton_headers] +
|
||||
["Public/ton/lib/lib{}.a".format(x) for x in ton_lib_names],
|
||||
visibility = [
|
||||
"//visibility:public",
|
||||
]
|
||||
)
|
||||
|
||||
#ton_header_targets = gen_header_targets(ton_header_paths, "ton_header_", "", "ton_build", "build/out/include")
|
||||
|
||||
cc_library(
|
||||
name = "ton_lib",
|
||||
srcs = [":lib" + x + ".a" for x in ton_lib_names],
|
||||
srcs = [":Public/ton/lib/lib" + x + ".a" for x in ton_lib_names],
|
||||
)
|
||||
|
||||
objc_library(
|
||||
name = "ton",
|
||||
hdrs = ["Public/ton/" + x for x in ton_headers],
|
||||
module_name = "ton",
|
||||
enable_modules = True,
|
||||
hdrs = [":Public/ton/include/" + x for x in ton_headers],
|
||||
includes = [
|
||||
"Public/ton/include",
|
||||
],
|
||||
deps = [
|
||||
":ton_lib",
|
||||
],
|
||||
|
@ -3,9 +3,9 @@
|
||||
set -x
|
||||
set -e
|
||||
|
||||
OUT_DIR="$1"
|
||||
SOURCE_DIR="$2"
|
||||
openssl_base_path="$3"
|
||||
OUT_DIR="$(pwd)/$1"
|
||||
SOURCE_DIR="$(pwd)/$2"
|
||||
openssl_base_path="$(pwd)/$3"
|
||||
|
||||
if [ -z "$openssl_base_path" ]; then
|
||||
echo "Usage: sh build-ton.sh path/to/openssl"
|
||||
|
BIN
submodules/ton/tonlib-src.tar.gz
Normal file
BIN
submodules/ton/tonlib-src.tar.gz
Normal file
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user