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

Unified Diff: tools/gn/copy_target_generator.cc

Issue 1606553002: Add support for Mac/iOS application bundles to GN tool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: base_unittests builds and pass all tests with GN Created 4 years, 11 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: tools/gn/copy_target_generator.cc
diff --git a/tools/gn/copy_target_generator.cc b/tools/gn/copy_target_generator.cc
index 994011e824e614e5bdb5660d1a501fe2af7d5c64..bd3ef176dd1458c1cf3b9851cd22d823a7f4e391 100644
--- a/tools/gn/copy_target_generator.cc
+++ b/tools/gn/copy_target_generator.cc
@@ -42,3 +42,30 @@ void CopyTargetGenerator::DoRun() {
return;
}
}
+
+CopyBundleDataTargetGenerator::CopyBundleDataTargetGenerator(
brettw 2016/01/20 22:23:17 I don't like having this one class in the same fil
sdefresne 2016/01/21 22:00:56 Merged.
+ Target* target,
+ Scope* scope,
+ const FunctionCallNode* function_call,
+ Err* err)
+ : TargetGenerator(target, scope, function_call, err) {
+}
+
+CopyBundleDataTargetGenerator::~CopyBundleDataTargetGenerator() {
+}
+
+void CopyBundleDataTargetGenerator::DoRun() {
+ target_->set_output_type(Target::COPY_BUNDLE_DATA);
+
+ if (!FillOutputs(true))
+ return;
+
+ if (target_->action_values().outputs().list().size() != 1) {
+ *err_ = Err(function_call_, "Copy command must have exactly one output.",
+ "You must specify exactly one value in the \"outputs\" array for the "
+ "destination of the copy\n(see \"gn help copy\"). If there are "
+ "multiple sources to copy, use source expansion\n(see \"gn help "
+ "source_expansion\").");
+ return;
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698