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

Unified Diff: tools/gn/docs/reference.md

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: Add unit tests & support for bundle_data_filter 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/docs/reference.md
diff --git a/tools/gn/docs/reference.md b/tools/gn/docs/reference.md
index 85fba666c4f46ad084d01858bbd135b1a22e6446..89245a721364eea76c6ba758761ef4c8d59c3ebc 100644
--- a/tools/gn/docs/reference.md
+++ b/tools/gn/docs/reference.md
@@ -1111,6 +1111,54 @@
```
+## **copy_bundle_data**: Declare a target that copy "bundle_data" files.
+
+```
+ Similar to the "copy" target, but the list of files to copy comes
+ from the "bundle_data" property of all dependencies recursively.
+ It can be used to copy files required at runtime by the application
+ into a location where it can be found.
+
+ This uses the "copy_bundle_data" tool from the toolchain.
+
+ See "gn help copy" for more information.
+
+```
+
+### **Examples**
+
+```
+ # A source_set that has a runtime dependency expressed as bundle_data
+ source_set("icu") {
+ sources = [ "icu.h", "icu.cc" ]
+ bundle_data = [ "icudtl.dat" ]
+ }
+
+ # Main application executable.
+ executable("app.app") {
+ visibility = [ ":app" ]
+ deps = [ ":icu" ]
+ output_name = "$root_build_dir/app.app/app"
+ sources = [ "main.cc" ]
+ }
+
+ # Copy runtime dependencies into the application bundle, filtering
+ # the .xcassets files as they need to be compiled into a .car file
+ # on Mac/iOS.
+ copy_bundle_data("app.bundle") {
+ visibility = [ ":app" ]
+ deps = [ ":icu" ] # Same deps as the executable.
+ outputs = [ $root_build_dir/app.app/{{source_file_name}}" ]
+ bundle_data_filter = [ "*.xcassets" ]
+ }
+
+ # Main application target.
+ group("app") {
+ deps = [ ":app.app", "app.bundle" ]
+ }
+
+
+```
## **declare_args**: Declare build arguments.
```
@@ -1284,8 +1332,9 @@
precompiled_header, precompiled_source
Deps: data_deps, deps, public_deps
Dependent configs: all_dependent_configs, public_configs
- General: check_includes, configs, data, inputs, output_name,
- output_extension, public, sources, testonly, visibility
+ General: bundle_data, check_includes, configs, data, inputs,
+ output_name, output_extension, public, sources, testonly,
+ visibility
```
@@ -1740,8 +1789,9 @@
precompiled_header, precompiled_source
Deps: data_deps, deps, public_deps
Dependent configs: all_dependent_configs, public_configs
- General: check_includes, configs, data, inputs, output_name,
- output_extension, public, sources, testonly, visibility
+ General: bundle_data, check_includes, configs, data, inputs,
+ output_name, output_extension, public, sources, testonly,
+ visibility
```
@@ -2101,8 +2151,9 @@
precompiled_header, precompiled_source
Deps: data_deps, deps, public_deps
Dependent configs: all_dependent_configs, public_configs
- General: check_includes, configs, data, inputs, output_name,
- output_extension, public, sources, testonly, visibility
+ General: bundle_data, check_includes, configs, data, inputs,
+ output_name, output_extension, public, sources, testonly,
+ visibility
```
@@ -2142,8 +2193,9 @@
precompiled_header, precompiled_source
Deps: data_deps, deps, public_deps
Dependent configs: all_dependent_configs, public_configs
- General: check_includes, configs, data, inputs, output_name,
- output_extension, public, sources, testonly, visibility
+ General: bundle_data, check_includes, configs, data, inputs,
+ output_name, output_extension, public, sources, testonly,
+ visibility
```
@@ -2166,8 +2218,9 @@
precompiled_header, precompiled_source
Deps: data_deps, deps, public_deps
Dependent configs: all_dependent_configs, public_configs
- General: check_includes, configs, data, inputs, output_name,
- output_extension, public, sources, testonly, visibility
+ General: bundle_data, check_includes, configs, data, inputs,
+ output_name, output_extension, public, sources, testonly,
+ visibility
```
@@ -3352,6 +3405,16 @@
```
+## **bundle_data**: Runtime data dependency (Mac/iOS).
+
+```
+ List files that are required at runtime by the current target and
+ should be copied into the application bundle.
+
+ See also "gn help copy_bundle_data".
+
+
+```
## **cflags***: Flags passed to the C compiler.
```
@@ -3424,6 +3487,16 @@
```
+## **bundle_data_filter**: Exclusions for copy_bundle_data.
+
+```
+ List of file patterns that need to be excluded from the application
+ bundle. All files matching this pattern will be excluded.
+
+ See also "gn help copy_bundle_data".
+
+
+```
## **cflags***: Flags passed to the C compiler.
```

Powered by Google App Engine
This is Rietveld 408576698