Build with both systems

This commit is contained in:
Ali 2020-02-19 04:58:49 +04:00
parent 1e742ea3f9
commit c274acfe07
16 changed files with 88 additions and 86 deletions

View File

@ -16,7 +16,8 @@ WALLET_BUCK_OPTIONS=\
--config custom.isInternalBuild="${IS_INTERNAL_BUILD}" \
--config custom.isAppStoreBuild="${IS_APPSTORE_BUILD}" \
--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)
@ -38,7 +39,16 @@ build_wallet: check_env
//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 \
--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_package:

View File

@ -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
}
}

View File

@ -3,14 +3,10 @@ load("//Config:buck_rule_macros.bzl", "static_library")
static_library(
name = "AppBundle",
srcs = glob([
"Sources/**/*.swift",
"Sources/**/*.m",
]),
headers = glob([
"Sources/**/*.h",
"Source/AppBundle/*.m",
]),
exported_headers = glob([
"Sources/**/*.h",
"Source/AppBundle/*.h",
]),
deps = [
],

View File

@ -61,3 +61,5 @@
#import <AsyncDisplayKit/NSArray+Diffing.h>
#import <AsyncDisplayKit/ASObjectDescriptionHelpers.h>
#import <AsyncDisplayKit/UIResponder+AsyncDisplayKit.h>
#import <AsyncDisplayKit/_ASCoreAnimationExtras.h>

View File

@ -3,16 +3,11 @@ load("//Config:buck_rule_macros.bzl", "framework")
framework(
name = "Display",
srcs = glob([
"Display/**/*.swift",
"Display/**/*.m",
"Source/**/*.swift",
]),
headers = glob([
"Display/*.h",
], exclude = ["Display/Display.h"]),
exported_headers = glob([
"Display/*.h",
], exclude = ["Display/Display.h"]),
deps = [
"//submodules/ObjCRuntimeUtils:ObjCRuntimeUtils",
"//submodules/UIKitRuntimeUtils:UIKitRuntimeUtils",
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
"//submodules/AppBundle:AppBundle",

View 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",
],
)

View File

@ -12,16 +12,10 @@ static_library(
name = "OverlayStatusController",
srcs = glob([
"Sources/**/*.swift",
"Impl/**/*.m",
]),
headers = glob([
"Impl/**/*.h",
]),
exported_headers = glob([
"Impl/**/*.h",
]),
deps = [
"//submodules/Display:Display#shared",
"//submodules/OverlayStatusController/Impl:OverlayStatusControllerImpl",
],
frameworks = [
"$SDKROOT/System/Library/Frameworks/Foundation.framework",

View File

@ -1,8 +1,18 @@
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
filegroup(
name = "OverlayStatusControllerResources",
srcs = glob([
"Resources/**/*",
], exclude = ["Resources/**/.*"]),
)
swift_library(
name = "OverlayStatusController",
module_name = "OverlayStatusController",
data = [
":OverlayStatusControllerResources",
],
srcs = glob([
"Sources/**/*.swift",
]),

View 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",
],
)

View File

@ -11,8 +11,6 @@ objc_library(
includes = [
"Sources",
],
deps = [
],
visibility = [
"//visibility:public",
],

View File

@ -3,13 +3,10 @@ load("//Config:buck_rule_macros.bzl", "static_library")
static_library(
name = "SSignalKit",
srcs = glob([
"*.m",
]),
headers = glob([
"*.h",
"Source/SSignalKit/*.m",
]),
exported_headers = glob([
"*.h",
"Source/SSignalKit/*.h",
]),
deps = [
],

View File

@ -3,10 +3,8 @@ load("//Config:buck_rule_macros.bzl", "framework")
framework(
name = "SwiftSignalKit",
srcs = glob([
"*.swift",
"Source/**/*.swift",
]),
deps = [
],
frameworks = [
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
],

View 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",
],
)

View File

@ -37,8 +37,8 @@ static_library(
"//submodules/LocalAuth:LocalAuth",
"//submodules/ScreenCaptureDetection:ScreenCaptureDetection",
"//submodules/AnimatedStickerNode:AnimatedStickerNode",
#"//submodules/WalletUrl:WalletUrl",
#"//submodules/WalletCore:WalletCore",
"//submodules/WalletUrl:WalletUrl",
"//submodules/WalletCore:WalletCore",
"//submodules/StringPluralization:StringPluralization",
"//submodules/ActivityIndicator:ActivityIndicator",
"//submodules/ProgressNavigationButtonNode:ProgressNavigationButtonNode",

View File

@ -5,12 +5,9 @@ static_library(
srcs = glob([
"Sources/*.m",
]),
headers = glob([
"Sources/*.h",
], exclude = ["Sources/YuvConversion.h"]),
exported_headers = glob([
"Sources/*.h",
], exclude = ["Sources/YuvConversion.h"]),
"PublicHeaders/**/*.h",
]),
frameworks = [
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
"$SDKROOT/System/Library/Frameworks/Accelerate.framework",

View File

@ -39,7 +39,7 @@ genrule(
name = "ton_build",
srcs = [
"build-ton-bazel.sh",
"iOS.cmake",
"iOS-bazel.cmake",
"tonlib-src.tar.gz",
"//submodules/openssl:openssl_include",
"//submodules/openssl:libcrypto.a",
@ -59,7 +59,7 @@ genrule(
fi
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)/"
mkdir -p "$(RULEDIR)/openssl_headers/include/openssl"