mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Build with both systems
This commit is contained in:
parent
1e742ea3f9
commit
c274acfe07
@ -16,7 +16,8 @@ WALLET_BUCK_OPTIONS=\
|
|||||||
--config custom.isInternalBuild="${IS_INTERNAL_BUILD}" \
|
--config custom.isInternalBuild="${IS_INTERNAL_BUILD}" \
|
||||||
--config custom.isAppStoreBuild="${IS_APPSTORE_BUILD}" \
|
--config custom.isAppStoreBuild="${IS_APPSTORE_BUILD}" \
|
||||||
--config custom.appStoreId="${APPSTORE_ID}" \
|
--config custom.appStoreId="${APPSTORE_ID}" \
|
||||||
--config custom.appSpecificUrlScheme="${APP_SPECIFIC_URL_SCHEME}"
|
--config custom.appSpecificUrlScheme="${APP_SPECIFIC_URL_SCHEME}" \
|
||||||
|
--config buildfile.name=BUCK
|
||||||
|
|
||||||
BAZEL=$(shell which bazel)
|
BAZEL=$(shell which bazel)
|
||||||
|
|
||||||
@ -38,7 +39,16 @@ build_wallet: check_env
|
|||||||
//submodules/AsyncDisplayKit:AsyncDisplayKit#shared,iphoneos-arm64,iphoneos-armv7 \
|
//submodules/AsyncDisplayKit:AsyncDisplayKit#shared,iphoneos-arm64,iphoneos-armv7 \
|
||||||
//submodules/Display:Display#dwarf-and-dsym,shared,iphoneos-arm64,iphoneos-armv7 \
|
//submodules/Display:Display#dwarf-and-dsym,shared,iphoneos-arm64,iphoneos-armv7 \
|
||||||
//submodules/Display:Display#shared,iphoneos-arm64,iphoneos-armv7 \
|
//submodules/Display:Display#shared,iphoneos-arm64,iphoneos-armv7 \
|
||||||
--verbose 7 \
|
${WALLET_BUCK_OPTIONS} ${BUCK_RELEASE_OPTIONS} ${BUCK_THREADS_OPTIONS} ${BUCK_CACHE_OPTIONS}
|
||||||
|
|
||||||
|
build_debug: check_env
|
||||||
|
$(BUCK) build \
|
||||||
|
//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#dwarf-and-dsym,shared,iphoneos-arm64,iphoneos-armv7 \
|
||||||
|
//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared,iphoneos-arm64,iphoneos-armv7 \
|
||||||
|
//submodules/AsyncDisplayKit:AsyncDisplayKit#dwarf-and-dsym,shared,iphoneos-arm64,iphoneos-armv7 \
|
||||||
|
//submodules/AsyncDisplayKit:AsyncDisplayKit#shared,iphoneos-arm64,iphoneos-armv7 \
|
||||||
|
//submodules/Display:Display#dwarf-and-dsym,shared,iphoneos-arm64,iphoneos-armv7 \
|
||||||
|
//submodules/Display:Display#shared,iphoneos-arm64,iphoneos-armv7 \
|
||||||
${WALLET_BUCK_OPTIONS} ${BUCK_RELEASE_OPTIONS} ${BUCK_THREADS_OPTIONS} ${BUCK_CACHE_OPTIONS}
|
${WALLET_BUCK_OPTIONS} ${BUCK_RELEASE_OPTIONS} ${BUCK_THREADS_OPTIONS} ${BUCK_CACHE_OPTIONS}
|
||||||
|
|
||||||
wallet_package:
|
wallet_package:
|
||||||
|
@ -1,44 +0,0 @@
|
|||||||
import Foundation
|
|
||||||
import UIKit
|
|
||||||
import GZip
|
|
||||||
import AsyncDisplayKit
|
|
||||||
import SSignalKit
|
|
||||||
import SwiftSignalKit
|
|
||||||
import ObjCRuntimeUtils
|
|
||||||
import UIKitRuntimeUtils
|
|
||||||
|
|
||||||
@objc(Application)
|
|
||||||
final class Application: UIApplication {
|
|
||||||
}
|
|
||||||
|
|
||||||
@objc(AppDelegate)
|
|
||||||
final class AppDelegate: NSObject, UIApplicationDelegate {
|
|
||||||
var window: UIWindow?
|
|
||||||
|
|
||||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
|
|
||||||
self.window = UIWindow(frame: UIScreen.main.bounds)
|
|
||||||
self.window?.rootViewController = UIViewController()
|
|
||||||
self.window?.rootViewController?.view.backgroundColor = .green
|
|
||||||
self.window?.makeKeyAndVisible()
|
|
||||||
|
|
||||||
let node = ASEditableTextNode()
|
|
||||||
node.frame = CGRect(origin: CGPoint(x: 50.0, y: 50.0), size: CGSize(width: 100.0, height: 100.0))
|
|
||||||
node.backgroundColor = .blue
|
|
||||||
self.window?.rootViewController?.view.addSubnode(node)
|
|
||||||
if #available(iOS 13.0, *) {
|
|
||||||
self.window?.rootViewController?.overrideUserInterfaceStyle = .dark
|
|
||||||
}
|
|
||||||
|
|
||||||
let disposable = SSignal.single("abcd")?.start(next: { next in
|
|
||||||
print("from signal: \(String(describing: next))")
|
|
||||||
})
|
|
||||||
disposable?.dispose()
|
|
||||||
|
|
||||||
let disposable2 = Signal<Int, NoError>.single(1234).start(next: { next in
|
|
||||||
print("from swift signal: \(next)")
|
|
||||||
})
|
|
||||||
disposable2.dispose()
|
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
@ -3,14 +3,10 @@ load("//Config:buck_rule_macros.bzl", "static_library")
|
|||||||
static_library(
|
static_library(
|
||||||
name = "AppBundle",
|
name = "AppBundle",
|
||||||
srcs = glob([
|
srcs = glob([
|
||||||
"Sources/**/*.swift",
|
"Source/AppBundle/*.m",
|
||||||
"Sources/**/*.m",
|
|
||||||
]),
|
|
||||||
headers = glob([
|
|
||||||
"Sources/**/*.h",
|
|
||||||
]),
|
]),
|
||||||
exported_headers = glob([
|
exported_headers = glob([
|
||||||
"Sources/**/*.h",
|
"Source/AppBundle/*.h",
|
||||||
]),
|
]),
|
||||||
deps = [
|
deps = [
|
||||||
],
|
],
|
||||||
|
@ -61,3 +61,5 @@
|
|||||||
#import <AsyncDisplayKit/NSArray+Diffing.h>
|
#import <AsyncDisplayKit/NSArray+Diffing.h>
|
||||||
#import <AsyncDisplayKit/ASObjectDescriptionHelpers.h>
|
#import <AsyncDisplayKit/ASObjectDescriptionHelpers.h>
|
||||||
#import <AsyncDisplayKit/UIResponder+AsyncDisplayKit.h>
|
#import <AsyncDisplayKit/UIResponder+AsyncDisplayKit.h>
|
||||||
|
|
||||||
|
#import <AsyncDisplayKit/_ASCoreAnimationExtras.h>
|
||||||
|
@ -3,16 +3,11 @@ load("//Config:buck_rule_macros.bzl", "framework")
|
|||||||
framework(
|
framework(
|
||||||
name = "Display",
|
name = "Display",
|
||||||
srcs = glob([
|
srcs = glob([
|
||||||
"Display/**/*.swift",
|
"Source/**/*.swift",
|
||||||
"Display/**/*.m",
|
|
||||||
]),
|
]),
|
||||||
headers = glob([
|
|
||||||
"Display/*.h",
|
|
||||||
], exclude = ["Display/Display.h"]),
|
|
||||||
exported_headers = glob([
|
|
||||||
"Display/*.h",
|
|
||||||
], exclude = ["Display/Display.h"]),
|
|
||||||
deps = [
|
deps = [
|
||||||
|
"//submodules/ObjCRuntimeUtils:ObjCRuntimeUtils",
|
||||||
|
"//submodules/UIKitRuntimeUtils:UIKitRuntimeUtils",
|
||||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
|
||||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
|
||||||
"//submodules/AppBundle:AppBundle",
|
"//submodules/AppBundle:AppBundle",
|
||||||
|
15
submodules/ObjCRuntimeUtils/BUCK
Normal file
15
submodules/ObjCRuntimeUtils/BUCK
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||||
|
|
||||||
|
static_library(
|
||||||
|
name = "ObjCRuntimeUtils",
|
||||||
|
srcs = glob([
|
||||||
|
"Source/ObjCRuntimeUtils/*.m",
|
||||||
|
]),
|
||||||
|
exported_headers = glob([
|
||||||
|
"Source/ObjCRuntimeUtils/*.h",
|
||||||
|
]),
|
||||||
|
frameworks = [
|
||||||
|
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||||
|
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||||
|
],
|
||||||
|
)
|
@ -12,16 +12,10 @@ static_library(
|
|||||||
name = "OverlayStatusController",
|
name = "OverlayStatusController",
|
||||||
srcs = glob([
|
srcs = glob([
|
||||||
"Sources/**/*.swift",
|
"Sources/**/*.swift",
|
||||||
"Impl/**/*.m",
|
|
||||||
]),
|
|
||||||
headers = glob([
|
|
||||||
"Impl/**/*.h",
|
|
||||||
]),
|
|
||||||
exported_headers = glob([
|
|
||||||
"Impl/**/*.h",
|
|
||||||
]),
|
]),
|
||||||
deps = [
|
deps = [
|
||||||
"//submodules/Display:Display#shared",
|
"//submodules/Display:Display#shared",
|
||||||
|
"//submodules/OverlayStatusController/Impl:OverlayStatusControllerImpl",
|
||||||
],
|
],
|
||||||
frameworks = [
|
frameworks = [
|
||||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||||
|
@ -1,8 +1,18 @@
|
|||||||
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
|
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "OverlayStatusControllerResources",
|
||||||
|
srcs = glob([
|
||||||
|
"Resources/**/*",
|
||||||
|
], exclude = ["Resources/**/.*"]),
|
||||||
|
)
|
||||||
|
|
||||||
swift_library(
|
swift_library(
|
||||||
name = "OverlayStatusController",
|
name = "OverlayStatusController",
|
||||||
module_name = "OverlayStatusController",
|
module_name = "OverlayStatusController",
|
||||||
|
data = [
|
||||||
|
":OverlayStatusControllerResources",
|
||||||
|
],
|
||||||
srcs = glob([
|
srcs = glob([
|
||||||
"Sources/**/*.swift",
|
"Sources/**/*.swift",
|
||||||
]),
|
]),
|
||||||
|
15
submodules/OverlayStatusController/Impl/BUCK
Normal file
15
submodules/OverlayStatusController/Impl/BUCK
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||||
|
|
||||||
|
static_library(
|
||||||
|
name = "OverlayStatusControllerImpl",
|
||||||
|
srcs = glob([
|
||||||
|
"Sources/**/*.m",
|
||||||
|
]),
|
||||||
|
exported_headers = glob([
|
||||||
|
"Sources/**/*.h",
|
||||||
|
]),
|
||||||
|
frameworks = [
|
||||||
|
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||||
|
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||||
|
],
|
||||||
|
)
|
@ -11,8 +11,6 @@ objc_library(
|
|||||||
includes = [
|
includes = [
|
||||||
"Sources",
|
"Sources",
|
||||||
],
|
],
|
||||||
deps = [
|
|
||||||
],
|
|
||||||
visibility = [
|
visibility = [
|
||||||
"//visibility:public",
|
"//visibility:public",
|
||||||
],
|
],
|
||||||
|
@ -3,13 +3,10 @@ load("//Config:buck_rule_macros.bzl", "static_library")
|
|||||||
static_library(
|
static_library(
|
||||||
name = "SSignalKit",
|
name = "SSignalKit",
|
||||||
srcs = glob([
|
srcs = glob([
|
||||||
"*.m",
|
"Source/SSignalKit/*.m",
|
||||||
]),
|
|
||||||
headers = glob([
|
|
||||||
"*.h",
|
|
||||||
]),
|
]),
|
||||||
exported_headers = glob([
|
exported_headers = glob([
|
||||||
"*.h",
|
"Source/SSignalKit/*.h",
|
||||||
]),
|
]),
|
||||||
deps = [
|
deps = [
|
||||||
],
|
],
|
||||||
|
@ -3,10 +3,8 @@ load("//Config:buck_rule_macros.bzl", "framework")
|
|||||||
framework(
|
framework(
|
||||||
name = "SwiftSignalKit",
|
name = "SwiftSignalKit",
|
||||||
srcs = glob([
|
srcs = glob([
|
||||||
"*.swift",
|
"Source/**/*.swift",
|
||||||
]),
|
]),
|
||||||
deps = [
|
|
||||||
],
|
|
||||||
frameworks = [
|
frameworks = [
|
||||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||||
],
|
],
|
||||||
|
19
submodules/UIKitRuntimeUtils/BUCK
Normal file
19
submodules/UIKitRuntimeUtils/BUCK
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
load("//Config:buck_rule_macros.bzl", "static_library")
|
||||||
|
|
||||||
|
static_library(
|
||||||
|
name = "UIKitRuntimeUtils",
|
||||||
|
srcs = glob([
|
||||||
|
"Source/UIKitRuntimeUtils/*.m",
|
||||||
|
]),
|
||||||
|
exported_headers = glob([
|
||||||
|
"Source/UIKitRuntimeUtils/*.h",
|
||||||
|
]),
|
||||||
|
deps = [
|
||||||
|
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
|
||||||
|
"//submodules/ObjCRuntimeUtils:ObjCRuntimeUtils",
|
||||||
|
],
|
||||||
|
frameworks = [
|
||||||
|
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||||
|
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||||
|
],
|
||||||
|
)
|
@ -37,8 +37,8 @@ static_library(
|
|||||||
"//submodules/LocalAuth:LocalAuth",
|
"//submodules/LocalAuth:LocalAuth",
|
||||||
"//submodules/ScreenCaptureDetection:ScreenCaptureDetection",
|
"//submodules/ScreenCaptureDetection:ScreenCaptureDetection",
|
||||||
"//submodules/AnimatedStickerNode:AnimatedStickerNode",
|
"//submodules/AnimatedStickerNode:AnimatedStickerNode",
|
||||||
#"//submodules/WalletUrl:WalletUrl",
|
"//submodules/WalletUrl:WalletUrl",
|
||||||
#"//submodules/WalletCore:WalletCore",
|
"//submodules/WalletCore:WalletCore",
|
||||||
"//submodules/StringPluralization:StringPluralization",
|
"//submodules/StringPluralization:StringPluralization",
|
||||||
"//submodules/ActivityIndicator:ActivityIndicator",
|
"//submodules/ActivityIndicator:ActivityIndicator",
|
||||||
"//submodules/ProgressNavigationButtonNode:ProgressNavigationButtonNode",
|
"//submodules/ProgressNavigationButtonNode:ProgressNavigationButtonNode",
|
||||||
|
@ -5,12 +5,9 @@ static_library(
|
|||||||
srcs = glob([
|
srcs = glob([
|
||||||
"Sources/*.m",
|
"Sources/*.m",
|
||||||
]),
|
]),
|
||||||
headers = glob([
|
|
||||||
"Sources/*.h",
|
|
||||||
], exclude = ["Sources/YuvConversion.h"]),
|
|
||||||
exported_headers = glob([
|
exported_headers = glob([
|
||||||
"Sources/*.h",
|
"PublicHeaders/**/*.h",
|
||||||
], exclude = ["Sources/YuvConversion.h"]),
|
]),
|
||||||
frameworks = [
|
frameworks = [
|
||||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||||
"$SDKROOT/System/Library/Frameworks/Accelerate.framework",
|
"$SDKROOT/System/Library/Frameworks/Accelerate.framework",
|
||||||
|
@ -39,7 +39,7 @@ genrule(
|
|||||||
name = "ton_build",
|
name = "ton_build",
|
||||||
srcs = [
|
srcs = [
|
||||||
"build-ton-bazel.sh",
|
"build-ton-bazel.sh",
|
||||||
"iOS.cmake",
|
"iOS-bazel.cmake",
|
||||||
"tonlib-src.tar.gz",
|
"tonlib-src.tar.gz",
|
||||||
"//submodules/openssl:openssl_include",
|
"//submodules/openssl:openssl_include",
|
||||||
"//submodules/openssl:libcrypto.a",
|
"//submodules/openssl:libcrypto.a",
|
||||||
@ -59,7 +59,7 @@ genrule(
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
cp $(location :build-ton-bazel.sh) "$(RULEDIR)/"
|
cp $(location :build-ton-bazel.sh) "$(RULEDIR)/"
|
||||||
cp $(location :iOS.cmake) "$(RULEDIR)/"
|
cp $(location :iOS-bazel.cmake) "$(RULEDIR)/"
|
||||||
tar -xzf $(location tonlib-src.tar.gz) -C "$(RULEDIR)/"
|
tar -xzf $(location tonlib-src.tar.gz) -C "$(RULEDIR)/"
|
||||||
|
|
||||||
mkdir -p "$(RULEDIR)/openssl_headers/include/openssl"
|
mkdir -p "$(RULEDIR)/openssl_headers/include/openssl"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user