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

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

Issue 2023223002: [GN] Add script to compile assets catalog without using tools/gyp. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@{0}
Patch Set: Use mac_sdk_name in "compile_xcassets" tool definition Created 4 years, 7 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
« no previous file with comments | « no previous file | build/toolchain/mac/compile_xcassets.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/toolchain/mac/BUILD.gn
diff --git a/build/toolchain/mac/BUILD.gn b/build/toolchain/mac/BUILD.gn
index 82eacab28eba0fb0596b1ec649ae3dc20ee422c0..e3d65c72bdeca4041e99146a826853a6b66606f9 100644
--- a/build/toolchain/mac/BUILD.gn
+++ b/build/toolchain/mac/BUILD.gn
@@ -244,25 +244,19 @@ template("mac_toolchain") {
description = "COPY_BUNDLE_DATA {{source}} {{output}}"
}
tool("compile_xcassets") {
+ _tool = rebase_path("//build/toolchain/mac/compile_xcassets.py",
+ root_build_dir)
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}})"
+ _sdk_name = ios_sdk_name
+ _min_deployment_target = ios_deployment_target
} else {
- _compile_xcassets_env =
- "MACOSX_DEPLOYMENT_TARGET=$mac_deployment_target " +
- "UNLOCALIZED_RESOURCES_FOLDER_PATH=\$(dirname {{output}})"
+ _sdk_name = mac_sdk_name
+ _min_deployment_target = mac_deployment_target
}
-
command = "rm -f {{output}} && " +
- "env $_compile_xcassets_env ./gyp-mac-tool compile-xcassets " +
- "{} {{inputs}}"
+ "python $_tool -p $_sdk_name -t $_min_deployment_target " +
+ "-o {{output}} {{inputs}}"
+
description = "COMPILE_XCASSETS {{output}}"
}
« no previous file with comments | « no previous file | build/toolchain/mac/compile_xcassets.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698