build: [gn mac] copy ffmpeg lib to framework bundle (#14225)

* build: [gn mac] copy ffmpeg lib to framework bundle

* Pull build config from enviroment variable

* build: use component ffmpeg in testing mode
This commit is contained in:
Robo 2018-08-21 02:32:52 +05:30 committed by John Kleinschmidt
parent 26925e6d48
commit fc730cc705
3 changed files with 25 additions and 2 deletions

View file

@ -437,6 +437,27 @@ if (is_mac) {
]
}
if (!is_component_build) {
bundle_data("electron_framework_libraries") {
sources = []
public_deps = []
if (is_component_ffmpeg) {
sources += [
"$root_out_dir/libffmpeg.dylib",
]
public_deps += [
"//third_party/ffmpeg:ffmpeg",
]
}
outputs = [
"{{bundle_contents_dir}}/Libraries/{{source_file_part}}",
]
}
} else {
group("electron_framework_libraries") {
}
}
bundle_data("electron_crashpad_helper") {
sources = [
"$root_out_dir/crashpad_handler",
@ -460,6 +481,7 @@ if (is_mac) {
]
deps = [
":electron_framework_resources",
":electron_framework_libraries",
":electron_xibs",
]
if (!is_mas_build) {

View file

@ -4,4 +4,4 @@ is_component_build = false
is_official_build = false
dcheck_always_on = true
symbol_level = 1
use_jumbo_build = true
is_component_ffmpeg = true

View file

@ -37,7 +37,8 @@ phases:
"$SCCACHE_WRAPPER" -s
echo "##vso[task.setvariable variable=SCCACHE_WRAPPER]$SCCACHE_WRAPPER"
echo "##vso[task.setvariable variable=CHROMIUM_BUILDTOOLS_PATH]`pwd`/buildtools"
gn gen out/Default --args='import("//electron/build/args/testing.gn") cc_wrapper="'"$SCCACHE_WRAPPER"'"'
echo "GN gen for: $GN_CONFIG"
gn gen out/Default --args='import("'$GN_CONFIG'") cc_wrapper="'"$SCCACHE_WRAPPER"'"'
name: GN_gen
- bash: |