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

Unified Diff: content/shell/BUILD.gn

Issue 1915863003: [Mac/GN] Build content_shell and content_shell_framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-info-plist
Patch Set: Created 4 years, 8 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 | « components/test_runner/BUILD.gn ('k') | content/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/BUILD.gn
diff --git a/content/shell/BUILD.gn b/content/shell/BUILD.gn
index 8e59d0d52dd06e41b59c86bb53e856b569a7e918..3d907c78299eb7466c32b472ade92125a32f1f0a 100644
--- a/content/shell/BUILD.gn
+++ b/content/shell/BUILD.gn
@@ -15,6 +15,7 @@ if (is_android) {
import("//build/config/android/config.gni")
} else if (is_mac) {
import("//build/config/mac/rules.gni")
+ import("//build_overrides/v8.gni")
}
declare_args() {
@@ -429,11 +430,22 @@ if (is_android) {
]
}
} else if (is_mac) {
- group("content_shell") {
+ mac_app_bundle("content_shell") {
testonly = true
+ output_name = content_shell_product_name
+ sources = [
+ "app/shell_main.cc",
+ ]
deps = [
- ":content_shell_lib",
+ ":content_shell_framework_bundle_data",
+ ":content_shell_resources_bundle_data",
+
+ # TODO(rsesek): Remove this after GYP is gone, since it only needs to
+ # be here per the comment in blink_test_platform_support_mac.mm about
+ # the bundle structure.
+ "//components/test_runner:resources",
]
+ info_plist = "app/app-Info.plist"
}
} else {
# TODO(brettw) when GYP is no longer necessary, delete
@@ -469,15 +481,6 @@ if (is_android) {
}
}
- if (is_mac) {
- # TODO(GYP) lots of stuff from GYP file here including helper_app and
- # postbuilds.
- output_name = content_shell_product_name
- deps = [
- ":framework",
- ]
- }
-
if (is_linux && !is_component_build) {
# Set rpath to find our own libfreetype even in a non-component build.
configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
@@ -504,36 +507,153 @@ if (is_win) {
}
if (is_mac) {
- # TODO(GYP) this should be a bundle. Lots of other stuff in this target.
- # GYP version: content/content_shell.gypi:content_shell_framework
- shared_library("framework") {
+ mac_xib_bundle_data("content_shell_framework_xibs") {
+ sources = [
+ "app/English.lproj/HttpAuth.xib",
+ "app/English.lproj/MainMenu.xib",
+ ]
+ output_path = "{{bundle_resources_dir}}/English.lproj"
+ }
+
+ bundle_data("content_shell_framework_resources") {
+ sources = [
+ "$root_out_dir/content_shell.pak",
+ "$root_out_dir/icudtl.dat",
+ "resources/missingImage.png",
+ "resources/textAreaResizeCorner.png",
+ ]
+
+ public_deps = [
+ ":pak",
+ ]
+
+ deps = [
+ "//third_party/icu:icudata",
+ ]
+
+ if (v8_use_external_startup_data) {
+ sources += [
+ "$root_out_dir/natives_blob.bin",
+ "$root_out_dir/snapshot_blob.bin",
+ ]
+ public_deps += [ "//v8" ]
+ }
+
+ outputs = [
+ "{{bundle_resources_dir}}/{{source_file_part}}",
+ ]
+ }
+
+ if (enable_plugins) {
+ bundle_data("content_shell_framework_plugins") {
+ sources = [
+ "$root_out_dir/blink_deprecated_test_plugin.plugin",
+ "$root_out_dir/blink_test_plugin.plugin",
+ ]
+
+ outputs = [
+ "{{bundle_root_dir}}/{{source_file_part}}",
+ ]
+
+ public_deps = [
+ "//ppapi:blink_deprecated_test_plugin",
+ "//ppapi:blink_test_plugin",
+ ]
+ }
+ }
+
+ content_shell_framework_name = "$content_shell_product_name Framework"
+ content_shell_helper_name = "$content_shell_product_name Helper"
+
+ mac_framework_bundle("content_shell_framework") {
testonly = true
- # TODO(GYP) bug 546894: Fix GN and toolchains to handle spaces here.
- #output_name = "$content_shell_product_name Framework"
- output_name = "content_shell_framework" # Temporary one with no spaces.
+ output_name = content_shell_framework_name
sources = [
"app/shell_content_main.cc",
"app/shell_content_main.h",
]
+ # TODO(rsesek): Handle these missing pieces:
+ # - crash_inspector
+ # - crash_report_sender.app
+
deps = [
+ ":content_shell_framework_resources",
+ ":content_shell_framework_xibs",
":content_shell_lib",
+ "//third_party/icu:icudata",
+ ]
+
+ if (enable_plugins) {
+ deps += [ ":content_shell_framework_plugins" ]
+ }
+
+ ldflags = [
+ "-install_name",
+ "@executable_path/../Frameworks/$output_name.framework/$output_name",
]
+
+ info_plist = "app/framework-Info.plist"
}
mac_app_bundle("content_shell_helper_app") {
testonly = true
- output_name = "$content_shell_product_name Helper"
+ output_name = content_shell_helper_name
sources = [
"app/shell_main.cc",
]
deps = [
- ":framework",
+ ":content_shell_framework+link",
]
info_plist = "app/helper-Info.plist"
}
+
+ action("fix_helper_link_framework") {
+ testonly = true
+ script = "//build/config/mac/xcrun.py"
+ inputs = [
+ "$root_out_dir/$content_shell_helper_name.app/Contents/MacOS/$content_shell_helper_name",
+ ]
+ outputs = [
+ "$root_out_dir/$content_shell_helper_name.app/Contents/MacOS/.",
Dirk Pranke 2016/04/25 21:50:28 Does this work with 'MacOS/$content_shell_helper_n
Dirk Pranke 2016/04/25 21:50:28 Yeah, the 'MacOS/.' is just weird; I'd use 'MacOS/
Robert Sesek 2016/04/25 22:08:00 That's what I wanted to do, but ninja/GN then comp
Robert Sesek 2016/04/25 22:08:00 Done.
Nico 2016/04/26 17:35:48 The output is the directory containing the input?
+ ]
+ args = [
+ "install_name_tool",
+ "-change",
+ "@executable_path/../Frameworks/$content_shell_framework_name.framework/$content_shell_framework_name",
+ "@executable_path/../../../$content_shell_framework_name.framework/$content_shell_framework_name",
+ ] + rebase_path(inputs, root_build_dir)
+ public_deps = [
+ ":content_shell_helper_app",
+ ]
+ }
+
+ bundle_data("content_shell_framework_bundle_data") {
+ testonly = true
+ sources = [
+ "$root_out_dir/$content_shell_framework_name.framework",
+ "$root_out_dir/$content_shell_helper_name.app",
+ ]
+ outputs = [
+ "{{bundle_root_dir}}/Frameworks/{{source_file_part}}",
+ ]
+ public_deps = [
+ ":content_shell_framework+link",
+ ":fix_helper_link_framework",
+ ]
+ }
+
+ bundle_data("content_shell_resources_bundle_data") {
+ testonly = true
+ sources = [
+ "app/app.icns",
+ ]
+ outputs = [
+ "{{bundle_resources_dir}}/{{source_file_part}}",
+ ]
+ }
}
mojom("mojo_bindings") {
« no previous file with comments | « components/test_runner/BUILD.gn ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698