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

Side by Side Diff: build/config/mac/rules.gni

Issue 1950493002: [Mac/GN] Move the bundle ID and creator code into the BRANDING file, and use it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 unified diff | Download patch
« no previous file with comments | « no previous file | build/util/branding.gni » ('j') | build/util/branding.gni » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/mac/base_rules.gni") 5 import("//build/config/mac/base_rules.gni")
6 6
7 # Generates Info.plist files for Mac apps and frameworks. 7 # Generates Info.plist files for Mac apps and frameworks.
8 # 8 #
9 # Arguments 9 # Arguments
10 # 10 #
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 # output_name: 132 # output_name:
133 # (optional) string, name of the generated framework without the 133 # (optional) string, name of the generated framework without the
134 # .framework suffix. If omitted, defaults to target_name. 134 # .framework suffix. If omitted, defaults to target_name.
135 # 135 #
136 # framework_version: 136 # framework_version:
137 # (optional) string, version of the framework. Typically this is a 137 # (optional) string, version of the framework. Typically this is a
138 # single letter, like "A". If omitted, the Versions/ subdirectory 138 # single letter, like "A". If omitted, the Versions/ subdirectory
139 # structure will not be created, and build output will go directly 139 # structure will not be created, and build output will go directly
140 # into the framework subdirectory. 140 # into the framework subdirectory.
141 # 141 #
142 # extra_substitutions:
143 # (optional) string array, 'key=value' pairs for extra fields which are
144 # specified in a source Info.plist template.
145 #
142 # See "gn help shared_library" for more information on arguments supported 146 # See "gn help shared_library" for more information on arguments supported
143 # by shared library target. 147 # by shared library target.
144 template("mac_framework_bundle") { 148 template("mac_framework_bundle") {
145 assert(defined(invoker.deps), 149 assert(defined(invoker.deps),
146 "Dependencies must be specified for $target_name") 150 "Dependencies must be specified for $target_name")
147 151
148 _info_plist_target = target_name + "_info_plist" 152 _info_plist_target = target_name + "_info_plist"
149 153
150 mac_info_plist(_info_plist_target) { 154 mac_info_plist(_info_plist_target) {
151 executable_name = target_name 155 executable_name = target_name
152 if (defined(invoker.output_name)) { 156 if (defined(invoker.output_name)) {
153 executable_name = invoker.output_name 157 executable_name = invoker.output_name
154 } 158 }
155 forward_variables_from(invoker, 159 forward_variables_from(invoker,
156 [ 160 [
157 "testonly", 161 "extra_substitutions",
158 "info_plist", 162 "info_plist",
159 "info_plist_target", 163 "info_plist_target",
164 "testonly",
160 ]) 165 ])
161 } 166 }
162 167
163 _info_plist_bundle_data = _info_plist_target + "_bundle_data" 168 _info_plist_bundle_data = _info_plist_target + "_bundle_data"
164 169
165 bundle_data(_info_plist_bundle_data) { 170 bundle_data(_info_plist_bundle_data) {
166 forward_variables_from(invoker, [ "testonly" ]) 171 forward_variables_from(invoker, [ "testonly" ])
167 sources = get_target_outputs(":$_info_plist_target") 172 sources = get_target_outputs(":$_info_plist_target")
168 outputs = [ 173 outputs = [
169 "{{bundle_root_dir}}/Info.plist", 174 "{{bundle_root_dir}}/Info.plist",
(...skipping 26 matching lines...) Expand all
196 # rather than a regular source file, specify the target name in lieu 201 # rather than a regular source file, specify the target name in lieu
197 # of info_plist. The two arguments are mutually exclusive. 202 # of info_plist. The two arguments are mutually exclusive.
198 # 203 #
199 # output_name: 204 # output_name:
200 # (optional) string, name of the generated app without the 205 # (optional) string, name of the generated app without the
201 # .app suffix. If omitted, defaults to target_name. 206 # .app suffix. If omitted, defaults to target_name.
202 # 207 #
203 # extra_configs: 208 # extra_configs:
204 # (optional) list of label, additional configs to apply to the 209 # (optional) list of label, additional configs to apply to the
205 # executable target. 210 # executable target.
211 #
212 # extra_substitutions:
213 # (optional) string array, 'key=value' pairs for extra fields which are
214 # specified in a source Info.plist template.
206 template("mac_app_bundle") { 215 template("mac_app_bundle") {
207 _target_name = target_name 216 _target_name = target_name
208 _output_name = target_name 217 _output_name = target_name
209 if (defined(invoker.output_name)) { 218 if (defined(invoker.output_name)) {
210 _output_name = invoker.output_name 219 _output_name = invoker.output_name
211 } 220 }
212 221
213 _executable_target = target_name + "_executable" 222 _executable_target = target_name + "_executable"
214 _executable_bundle_data = _executable_target + "_bundle_data" 223 _executable_bundle_data = _executable_target + "_bundle_data"
215 224
216 _info_plist_target = target_name + "_info_plist" 225 _info_plist_target = target_name + "_info_plist"
217 226
218 mac_info_plist(_info_plist_target) { 227 mac_info_plist(_info_plist_target) {
219 executable_name = _output_name 228 executable_name = _output_name
220 forward_variables_from(invoker, 229 forward_variables_from(invoker,
221 [ 230 [
222 "testonly", 231 "extra_substitutions",
223 "info_plist", 232 "info_plist",
224 "info_plist_target", 233 "info_plist_target",
234 "testonly",
225 ]) 235 ])
226 } 236 }
227 237
228 executable(_executable_target) { 238 executable(_executable_target) {
229 visibility = [ ":$_executable_bundle_data" ] 239 visibility = [ ":$_executable_bundle_data" ]
230 forward_variables_from(invoker, 240 forward_variables_from(invoker,
231 "*", 241 "*",
232 [ 242 [
233 "assert_no_deps", 243 "assert_no_deps",
234 "data_deps", 244 "data_deps",
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 ]) 358 ])
349 if (!defined(deps)) { 359 if (!defined(deps)) {
350 deps = [] 360 deps = []
351 } 361 }
352 deps += [ ":$_loadable_module_bundle_data" ] 362 deps += [ ":$_loadable_module_bundle_data" ]
353 363
354 bundle_root_dir = "$root_out_dir/$_output_name.plugin/Contents" 364 bundle_root_dir = "$root_out_dir/$_output_name.plugin/Contents"
355 bundle_executable_dir = "$bundle_root_dir/MacOS" 365 bundle_executable_dir = "$bundle_root_dir/MacOS"
356 } 366 }
357 } 367 }
OLDNEW
« no previous file with comments | « no previous file | build/util/branding.gni » ('j') | build/util/branding.gni » ('J')

Powered by Google App Engine
This is Rietveld 408576698