Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1541)

Unified Diff: build/toolchain/mac/BUILD.gn

Issue 1752873002: Use bundle_data and create_bundle to add support for iOS app bundle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-create-bundle
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: build/toolchain/mac/BUILD.gn
diff --git a/build/toolchain/mac/BUILD.gn b/build/toolchain/mac/BUILD.gn
index 6410317af4d324e68bf2c055bd31c7d07620757e..0c168fe0ad365781a9d997edc3cfd41b136a0780 100644
--- a/build/toolchain/mac/BUILD.gn
+++ b/build/toolchain/mac/BUILD.gn
@@ -8,6 +8,7 @@
import("../goma.gni")
import("//build/config/ios/ios_sdk.gni")
+import("//build/config/mac/mac_sdk.gni")
assert(host_os == "mac")
@@ -232,6 +233,34 @@ template("mac_toolchain") {
description = copy_description
}
+ tool("copy_bundle_data") {
+ command = "rm -rf {{output}} && " +
+ "./gyp-mac-tool copy-bundle-resource {{source}} {{output}} True"
+ description = "COPY_BUNDLE_DATA {{source}} {{output}}"
+ }
+ tool("compile_xcassets") {
+ if (is_ios) {
+ _configuration = "Release"
+ if (is_debug) {
+ _configuration = "Debug"
+ }
+
+ _compile_xcassets_env =
+ "IPHONEOS_DEPLOYMENT_TARGET=$ios_deployment_target " +
+ "CONFIGURATION=$ios_sdk_name-$_configuration " +
+ "CONTENTS_FOLDER_PATH=\$(dirname {{output}})"
+ } else {
+ _compile_xcassets_env =
+ "MACOSX_DEPLOYMENT_TARGET=$mac_deployment_target " +
+ "UNLOCALIZED_RESOURCES_FOLDER_PATH=\$(dirname {{output}})"
+ }
+
+ command = "rm -f {{output}} && " +
+ "env $_compile_xcassets_env ./gyp-mac-tool compile-xcassets " +
+ "{} {{inputs}}"
+ description = "COMPILE_XCASSETS {{inputs}} {{output}}"
+ }
+
toolchain_args() {
current_cpu = invoker.toolchain_cpu
current_os = invoker.toolchain_os
« build/config/ios/rules.gni ('K') | « build/config/ios/rules.gni ('k') | testing/test.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698