diff --git a/Wallet.makefile b/Wallet.makefile index 32cd3a29cc..cc53455b08 100644 --- a/Wallet.makefile +++ b/Wallet.makefile @@ -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: diff --git a/Wallet/SupportFiles/Empty.swift b/Wallet/SupportFiles/Empty.swift index 1dd6cc79c8..e69de29bb2 100644 --- a/Wallet/SupportFiles/Empty.swift +++ b/Wallet/SupportFiles/Empty.swift @@ -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.single(1234).start(next: { next in - print("from swift signal: \(next)") - }) - disposable2.dispose() - - return true - } -} diff --git a/submodules/AppBundle/BUCK b/submodules/AppBundle/BUCK index 7c15ea5d15..bb64ebe4e4 100644 --- a/submodules/AppBundle/BUCK +++ b/submodules/AppBundle/BUCK @@ -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 = [ ], diff --git a/submodules/AsyncDisplayKit/Source/PublicHeaders/AsyncDisplayKit/AsyncDisplayKit.h b/submodules/AsyncDisplayKit/Source/PublicHeaders/AsyncDisplayKit/AsyncDisplayKit.h index 26a43685f1..dc00ed8339 100644 --- a/submodules/AsyncDisplayKit/Source/PublicHeaders/AsyncDisplayKit/AsyncDisplayKit.h +++ b/submodules/AsyncDisplayKit/Source/PublicHeaders/AsyncDisplayKit/AsyncDisplayKit.h @@ -61,3 +61,5 @@ #import #import #import + +#import diff --git a/submodules/Display/BUCK b/submodules/Display/BUCK index 64506971d0..6fb664021d 100644 --- a/submodules/Display/BUCK +++ b/submodules/Display/BUCK @@ -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", diff --git a/submodules/ObjCRuntimeUtils/BUCK b/submodules/ObjCRuntimeUtils/BUCK new file mode 100644 index 0000000000..5e8f8d4084 --- /dev/null +++ b/submodules/ObjCRuntimeUtils/BUCK @@ -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", + ], +) diff --git a/submodules/OverlayStatusController/BUCK b/submodules/OverlayStatusController/BUCK index 834448d562..4345130a54 100644 --- a/submodules/OverlayStatusController/BUCK +++ b/submodules/OverlayStatusController/BUCK @@ -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", diff --git a/submodules/OverlayStatusController/BUILD b/submodules/OverlayStatusController/BUILD index 24a61029b2..3133e584d1 100644 --- a/submodules/OverlayStatusController/BUILD +++ b/submodules/OverlayStatusController/BUILD @@ -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", ]), diff --git a/submodules/OverlayStatusController/Impl/BUCK b/submodules/OverlayStatusController/Impl/BUCK new file mode 100644 index 0000000000..a6b891f28b --- /dev/null +++ b/submodules/OverlayStatusController/Impl/BUCK @@ -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", + ], +) diff --git a/submodules/OverlayStatusController/Impl/BUILD b/submodules/OverlayStatusController/Impl/BUILD index 7b8b2c88cc..7598e00f8a 100644 --- a/submodules/OverlayStatusController/Impl/BUILD +++ b/submodules/OverlayStatusController/Impl/BUILD @@ -11,8 +11,6 @@ objc_library( includes = [ "Sources", ], - deps = [ - ], visibility = [ "//visibility:public", ], diff --git a/submodules/SSignalKit/SSignalKit/BUCK b/submodules/SSignalKit/SSignalKit/BUCK index 8d592db616..1fbeb1d9b4 100644 --- a/submodules/SSignalKit/SSignalKit/BUCK +++ b/submodules/SSignalKit/SSignalKit/BUCK @@ -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 = [ ], diff --git a/submodules/SSignalKit/SwiftSignalKit/BUCK b/submodules/SSignalKit/SwiftSignalKit/BUCK index 6b19fa5041..b6e6e39b8c 100644 --- a/submodules/SSignalKit/SwiftSignalKit/BUCK +++ b/submodules/SSignalKit/SwiftSignalKit/BUCK @@ -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", ], diff --git a/submodules/UIKitRuntimeUtils/BUCK b/submodules/UIKitRuntimeUtils/BUCK new file mode 100644 index 0000000000..54027145ed --- /dev/null +++ b/submodules/UIKitRuntimeUtils/BUCK @@ -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", + ], +) diff --git a/submodules/WalletUI/BUCK b/submodules/WalletUI/BUCK index cbda117102..5194a2e218 100644 --- a/submodules/WalletUI/BUCK +++ b/submodules/WalletUI/BUCK @@ -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", diff --git a/submodules/YuvConversion/BUCK b/submodules/YuvConversion/BUCK index 735ac133f2..2d4675cff4 100644 --- a/submodules/YuvConversion/BUCK +++ b/submodules/YuvConversion/BUCK @@ -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", diff --git a/submodules/ton/BUILD b/submodules/ton/BUILD index e57ae88999..00d9f1d599 100644 --- a/submodules/ton/BUILD +++ b/submodules/ton/BUILD @@ -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"