From dcfb6ddd9c6a764f0e375896cfdc5eb0547fb891 Mon Sep 17 00:00:00 2001 From: Peter <> Date: Sun, 25 Aug 2019 17:06:43 +0400 Subject: [PATCH] Temp --- .../xcshareddata/xcschemes/App.xcscheme | 86 ++++++++++++++++++- .../xcshareddata/xcschemes/App.xcscheme | 14 +-- App/Sources/Temp.swift | 2 +- Config/buck_rule_macros.bzl | 17 +++- get_dsym.sh | 18 ++++ .../xcshareddata/xcschemes/Emoji.xcscheme | 4 +- 6 files changed, 127 insertions(+), 14 deletions(-) create mode 100644 get_dsym.sh diff --git a/App/App.xcodeproj/xcshareddata/xcschemes/App.xcscheme b/App/App.xcodeproj/xcshareddata/xcschemes/App.xcscheme index 6ca885fee6..73dfbeadbe 100644 --- a/App/App.xcodeproj/xcshareddata/xcschemes/App.xcscheme +++ b/App/App.xcodeproj/xcshareddata/xcschemes/App.xcscheme @@ -1 +1,85 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/App/App.xcworkspace/xcshareddata/xcschemes/App.xcscheme b/App/App.xcworkspace/xcshareddata/xcschemes/App.xcscheme index b87a16666f..2fc992b57d 100644 --- a/App/App.xcworkspace/xcshareddata/xcschemes/App.xcscheme +++ b/App/App.xcworkspace/xcshareddata/xcschemes/App.xcscheme @@ -15,7 +15,7 @@ @@ -29,7 +29,7 @@ @@ -43,7 +43,7 @@ @@ -57,7 +57,7 @@ @@ -71,7 +71,7 @@ @@ -103,7 +103,7 @@ @@ -122,7 +122,7 @@ diff --git a/App/Sources/Temp.swift b/App/Sources/Temp.swift index 6b09379998..055945aae6 100644 --- a/App/Sources/Temp.swift +++ b/App/Sources/Temp.swift @@ -9,7 +9,7 @@ public final class AppDelegate: NSObject, UIApplicationDelegate { override init() { super.init() - print("OK".isSingleEmoji) + print("OK6".isSingleEmoji) } public func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { diff --git a/Config/buck_rule_macros.bzl b/Config/buck_rule_macros.bzl index a1142324de..ffb8bdcf4e 100644 --- a/Config/buck_rule_macros.bzl +++ b/Config/buck_rule_macros.bzl @@ -59,7 +59,6 @@ def apple_lib( swift_compiler_flags = swift_compiler_flags, preferred_linkage = "shared", link_style = "static", - #linker_flags = ["-Wl,-install_name,@rpath/%sFramework.framework/%sFramework" % (name, name)], linker_flags = ["-Wl,-install_name,@rpath/lib%s.dylib" % (name)], ) else: @@ -68,6 +67,7 @@ def apple_lib( srcs = srcs, header_namespace = name, module_name = name, + soname = "lib" + name + ".dylib", headers = headers, exported_headers = exported_headers, deps = deps, @@ -82,9 +82,17 @@ def apple_lib( swift_compiler_flags = swift_compiler_flags, preferred_linkage = "shared", link_style = "static", - #linker_flags = ["-Wl,-install_name,@rpath/%sFramework.framework/%sFramework" % (name, name)], linker_flags = ["-Wl,-install_name,@rpath/lib%s.dylib" % (name)], ) + native.apple_bundle( + name = name + "Framework", + visibility = visibility, + binary = ":" + name + "#shared", + extension = "framework", + info_plist = "Info.plist", + info_plist_substitutions = info_plist_substitutions(name), + ) + else: native.apple_library( name = name, @@ -92,6 +100,9 @@ def apple_lib( headers = headers, exported_headers = exported_headers, deps = deps, + exported_deps = exported_deps, + extra_xcode_files = extra_xcode_files, + frameworks = frameworks, visibility = visibility, swift_version = swift_version, configs = library_configs(), @@ -220,6 +231,6 @@ def framework_bundle_dependencies(names): pass else: for name in names: - #result.append(name + "Framework") + result.append(name + "#shared") pass return result diff --git a/get_dsym.sh b/get_dsym.sh new file mode 100644 index 0000000000..07fc150120 --- /dev/null +++ b/get_dsym.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +rm -rf "DSYM-out" +mkdir -p "DSYM-out" + +PLATFORM="iphonesimulator-x86_64" + +for DEPENDENCY in $(buck query "kind('apple_library|apple_binary', deps('//App:App#$PLATFORM', 1))"); do + case "$DEPENDENCY" in + *"#"*) + ;; + *) + DEPENDENCY="$DEPENDENCY#$PLATFORM" + ;; + esac + DSYM_PATH="buck-out/gen/$(echo "$DEPENDENCY" | sed -e "s/#/#apple-dsym,/" | sed -e "s#^//##" | sed -e "s#:#/#").dSYM" + cp -f -r "$DSYM_PATH" "DSYM-out/" +done diff --git a/submodules/Emoji/Emoji.xcodeproj/xcshareddata/xcschemes/Emoji.xcscheme b/submodules/Emoji/Emoji.xcodeproj/xcshareddata/xcschemes/Emoji.xcscheme index 6a43507ec1..cd1d497165 100644 --- a/submodules/Emoji/Emoji.xcodeproj/xcshareddata/xcschemes/Emoji.xcscheme +++ b/submodules/Emoji/Emoji.xcodeproj/xcshareddata/xcschemes/Emoji.xcscheme @@ -15,7 +15,7 @@ @@ -46,7 +46,7 @@