MacOS bundle for HelloWorld

47 views
Skip to first unread message

Panutat Tejasen

unread,
Aug 16, 2020, 1:25:45 AM8/16/20
to skia-discuss
Dear all,

I tried to create an executable bundle (.app) on MacOS for HelloWorld example. Here's my BUILD.gn

if (skia_use_gl && !skia_use_angle && (is_linux || is_win || is_mac || is_ios || is_android )) {
test_app("HelloWorld") {
is_shared_library = is_android
sources = [ "example/HelloWorld.cpp" ]
libs = []

deps = [
":flags",
":gpu_tool_utils",
":sk_app",
":skia",
":tool_utils",
]
}
if( is_mac ) {
bundle_data("HelloWorld_info_plist") {
sources = [ "example/HelloWorld_info.plist" ]
outputs = [ "{{bundle_contents_dir}}/Info.plist" ]
testonly = true
deps = [
":HelloWorld.app"
]
}
bundle_data("HelloWorld_bundle_executable") {
sources = [ "$root_build_dir/HelloWorld" ]
outputs = [ "{{bundle_executable_dir}}/HelloWorld" ]
testonly = true
deps = [
":HelloWorld",
":HelloWorld.app"
]
}
create_bundle("HelloWorld.app") {
product_type = "com.apple.product-type.application"
testonly = true
bundle_root_dir = "${root_build_dir}/HelloWorld.app"
bundle_contents_dir = "${bundle_root_dir}/Contents"
bundle_resources_dir = "${bundle_contents_dir}/Resources"
bundle_executable_dir = "${bundle_contents_dir}/MacOS"
deps = [ ":HelloWorld" ]
}
}
}

However, it never produce the "HelloWorld.app" - could anyone advise what did I wrong? Best Regards, Moz

Jim Van Verth

unread,
Aug 17, 2020, 9:41:06 AM8/17/20
to skia-discuss
Nothing immediately jumps out, but the bundling configuration in gn can be a little tetchy. You might look at our ios setup in gn/ios.gni as an example.

--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/b4198032-acd7-477c-9523-e9f822d947ddo%40googlegroups.com.


--

Jim Van Verth | Software Engineer | jvan...@google.com | 919-210-7664

Jhon

unread,
Sep 25, 2021, 12:44:26 PMSep 25
to skia-discuss
Panutat Tejasen. did u resolve ur dependency?
Reply all
Reply to author
Forward
0 new messages