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

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: 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') | build/toolchain/mac/compile_xcassets.py » ('J')
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..5be4c2db4dd8378583874d017f50cc3334b66c7d 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}})"
+ _platform = 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}})"
+ _platform = "macosx"
+ _min_deployment_target = mac_deployment_target
}
-
command = "rm -f {{output}} && " +
- "env $_compile_xcassets_env ./gyp-mac-tool compile-xcassets " +
- "{} {{inputs}}"
+ "python $_tool -p $_platform -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') | build/toolchain/mac/compile_xcassets.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698