| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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/features.gni") | 5 import("//build/config/features.gni") |
| 6 import("//build/config/ui.gni") | 6 import("//build/config/ui.gni") |
| 7 import("//build/util/process_version.gni") | 7 import("//build/util/process_version.gni") |
| 8 import("//extensions/features/features.gni") | 8 import("//extensions/features/features.gni") |
| 9 import("//testing/test.gni") | 9 import("//testing/test.gni") |
| 10 import("//tools/grit/grit_rule.gni") | 10 import("//tools/grit/grit_rule.gni") |
| 11 if (is_mac) { |
| 12 import("//build/config/mac/rules.gni") |
| 13 import("//third_party/icu/config.gni") |
| 14 import("//v8/gni/v8.gni") |
| 15 } |
| 11 | 16 |
| 12 assert(enable_extensions) | 17 assert(enable_extensions) |
| 13 | 18 |
| 14 grit("resources") { | 19 grit("resources") { |
| 15 source = "app_shell_resources.grd" | 20 source = "app_shell_resources.grd" |
| 16 outputs = [ | 21 outputs = [ |
| 17 "grit/app_shell_resources.h", | 22 "grit/app_shell_resources.h", |
| 18 "app_shell_resources.pak", | 23 "app_shell_resources.pak", |
| 19 ] | 24 ] |
| 20 } | 25 } |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 if (is_linux) { | 210 if (is_linux) { |
| 206 deps += [ "//components/nacl/loader:nacl_helper" ] | 211 deps += [ "//components/nacl/loader:nacl_helper" ] |
| 207 | 212 |
| 208 if (enable_nacl_nonsfi) { | 213 if (enable_nacl_nonsfi) { |
| 209 deps += [ "//components/nacl/loader:helper_nonsfi" ] | 214 deps += [ "//components/nacl/loader:helper_nonsfi" ] |
| 210 } | 215 } |
| 211 } | 216 } |
| 212 } | 217 } |
| 213 } | 218 } |
| 214 | 219 |
| 215 executable("app_shell") { | 220 if (is_mac) { |
| 216 # testonly because :app_shell_lib is testonly. See :app_shell_lib comment. | 221 mac_app_bundle("app_shell") { |
| 217 testonly = true | 222 testonly = true |
| 218 sources = [ | 223 output_name = "App Shell" |
| 219 "app/shell_main.cc", | 224 sources = [ |
| 220 ] | 225 "app/shell_main.cc", |
| 226 ] |
| 227 deps = [ |
| 228 ":app_shell_framework_bundle_data", |
| 229 "//build/config/sanitizers:deps", |
| 230 "//extensions:shell_and_test_pak", |
| 231 ] |
| 232 ldflags = [ |
| 233 "-rpath", |
| 234 "@executable_path/../", |
| 235 ] |
| 236 info_plist = "app/app-Info.plist" |
| 237 } |
| 238 } else { |
| 239 executable("app_shell") { |
| 240 # testonly because :app_shell_lib is testonly. See :app_shell_lib comment. |
| 241 testonly = true |
| 242 sources = [ |
| 243 "app/shell_main.cc", |
| 244 ] |
| 221 | 245 |
| 222 deps = [ | 246 deps = [ |
| 223 ":app_shell_lib", | 247 ":app_shell_lib", |
| 224 "//build/config/sanitizers:deps", | 248 "//build/config/sanitizers:deps", |
| 225 "//build/win:default_exe_manifest", | 249 "//build/win:default_exe_manifest", |
| 226 "//extensions:shell_and_test_pak", | 250 "//extensions:shell_and_test_pak", |
| 227 ] | 251 ] |
| 228 | 252 |
| 229 if (is_win) { | 253 if (is_win) { |
| 230 configs += [ "//build/config/win:windowed" ] | 254 configs += [ "//build/config/win:windowed" ] |
| 231 configs -= [ "//build/config/win:console" ] | 255 configs -= [ "//build/config/win:console" ] |
| 232 } | 256 } |
| 233 | |
| 234 if (is_mac) { | |
| 235 output_name = "App Shell" | |
| 236 | |
| 237 # TODO(GYP): Mac bundling. See also content_shell which this is basically | |
| 238 # a copy-paste of. | |
| 239 deps += [ ":app_shell_framework" ] | |
| 240 | |
| 241 # TODO(GYP): Mac app_shell_helper stuff. | |
| 242 } | 257 } |
| 243 } | 258 } |
| 244 | 259 |
| 245 test("app_shell_unittests") { | 260 test("app_shell_unittests") { |
| 246 sources = [ | 261 sources = [ |
| 247 "../test/extensions_unittests_main.cc", | 262 "../test/extensions_unittests_main.cc", |
| 248 "browser/api/identity/identity_api_unittest.cc", | 263 "browser/api/identity/identity_api_unittest.cc", |
| 249 "browser/shell_oauth2_token_service_unittest.cc", | 264 "browser/shell_oauth2_token_service_unittest.cc", |
| 250 "browser/shell_prefs_unittest.cc", | 265 "browser/shell_prefs_unittest.cc", |
| 251 "common/shell_content_client_unittest.cc", | 266 "common/shell_content_client_unittest.cc", |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 process_version("version_header") { | 311 process_version("version_header") { |
| 297 template_file = "common/version.h.in" | 312 template_file = "common/version.h.in" |
| 298 sources = [ | 313 sources = [ |
| 299 "//build/util/LASTCHANGE", | 314 "//build/util/LASTCHANGE", |
| 300 "//chrome/VERSION", | 315 "//chrome/VERSION", |
| 301 ] | 316 ] |
| 302 output = "$target_gen_dir/common/version.h" | 317 output = "$target_gen_dir/common/version.h" |
| 303 } | 318 } |
| 304 | 319 |
| 305 if (is_mac) { | 320 if (is_mac) { |
| 306 # TODO(GYP) this should be a bundle. Lots of other stuff in this target. | 321 bundle_data("app_shell_framework_resources") { |
| 307 # Should be able to copy content shell framework (this is basically a | 322 sources = [ |
| 308 # copy-paste of that target). | 323 "$root_gen_dir/extensions/shell/app_shell_resources.pak", |
| 309 shared_library("app_shell_framework") { | 324 "$root_out_dir/extensions_shell_and_test.pak", |
| 325 ] |
| 326 public_deps = [ |
| 327 ":resources_grit", |
| 328 "//extensions:shell_and_test_pak", |
| 329 ] |
| 330 if (icu_use_data_file) { |
| 331 sources += [ "$root_out_dir/icudtl.dat" ] |
| 332 public_deps += [ "//third_party/icu:icudata" ] |
| 333 } |
| 334 if (v8_use_external_startup_data) { |
| 335 sources += [ |
| 336 "$root_out_dir/natives_blob.bin", |
| 337 "$root_out_dir/snapshot_blob.bin", |
| 338 ] |
| 339 public_deps += [ "//v8" ] |
| 340 } |
| 341 outputs = [ |
| 342 "{{bundle_resources_dir}}/{{source_file_part}}", |
| 343 ] |
| 344 } |
| 345 |
| 346 mac_framework_bundle("app_shell_framework") { |
| 310 testonly = true | 347 testonly = true |
| 348 output_name = "App Shell Framework" |
| 311 sources = [ | 349 sources = [ |
| 312 "app/shell_main_mac.cc", | 350 "app/shell_main_mac.cc", |
| 313 "app/shell_main_mac.h", | 351 "app/shell_main_mac.h", |
| 314 ] | 352 ] |
| 353 public_deps = [ |
| 354 ":app_shell_lib", |
| 355 ] |
| 315 deps = [ | 356 deps = [ |
| 316 ":app_shell_lib", | 357 ":app_shell_framework_resources", |
| 358 ] |
| 359 ldflags = [ "-Wl,-install_name,@rpath/Frameworks/App Shell Framework.framewo
rk/App Shell Framework" ] |
| 360 if (is_component_build) { |
| 361 ldflags += [ |
| 362 "-rpath", |
| 363 "@loader_path/../../../..", |
| 364 ] |
| 365 } |
| 366 info_plist = "app/framework-Info.plist" |
| 367 } |
| 368 |
| 369 mac_app_bundle("app_shell_helper_app") { |
| 370 testonly = true |
| 371 output_name = "App Shell Helper" |
| 372 sources = [ |
| 373 "app/shell_main.cc", |
| 374 ] |
| 375 deps = [ |
| 376 ":app_shell_framework+link", |
| 377 "//build/config/sanitizers:deps", |
| 378 ] |
| 379 ldflags = [ |
| 380 "-rpath", |
| 381 "@executable_path/../../../..", |
| 382 ] |
| 383 info_plist = "app/helper-Info.plist" |
| 384 } |
| 385 |
| 386 bundle_data("app_shell_framework_bundle_data") { |
| 387 testonly = true |
| 388 sources = [ |
| 389 "$root_out_dir/App Shell Framework.framework", |
| 390 "$root_out_dir/App Shell Helper.app", |
| 391 ] |
| 392 outputs = [ |
| 393 "{{bundle_root_dir}}/Frameworks/{{source_file_part}}", |
| 394 ] |
| 395 public_deps = [ |
| 396 ":app_shell_framework+link", |
| 397 ":app_shell_helper_app", |
| 317 ] | 398 ] |
| 318 } | 399 } |
| 319 } | 400 } |
| 320 | 401 |
| 321 source_set("browser_tests") { | 402 source_set("browser_tests") { |
| 322 testonly = true | 403 testonly = true |
| 323 sources = [ | 404 sources = [ |
| 324 "browser/geolocation/geolocation_apitest.cc", | 405 "browser/geolocation/geolocation_apitest.cc", |
| 325 "browser/shell_browsertest.cc", | 406 "browser/shell_browsertest.cc", |
| 326 "test/shell_apitest.cc", | 407 "test/shell_apitest.cc", |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 "//extensions/browser", | 443 "//extensions/browser", |
| 363 ] | 444 ] |
| 364 | 445 |
| 365 if (is_chromeos) { | 446 if (is_chromeos) { |
| 366 deps += [ | 447 deps += [ |
| 367 "//chromeos:test_support", | 448 "//chromeos:test_support", |
| 368 "//components/keyed_service/content", | 449 "//components/keyed_service/content", |
| 369 ] | 450 ] |
| 370 } | 451 } |
| 371 } | 452 } |
| OLD | NEW |