X Tutup
Skip to content

Commit fc730cc

Browse files
deepak1556John Kleinschmidt
authored andcommitted
build: [gn mac] copy ffmpeg lib to framework bundle (electron#14225)
* build: [gn mac] copy ffmpeg lib to framework bundle * Pull build config from enviroment variable * build: use component ffmpeg in testing mode
1 parent 26925e6 commit fc730cc

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

BUILD.gn

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,27 @@ if (is_mac) {
437437
]
438438
}
439439

440+
if (!is_component_build) {
441+
bundle_data("electron_framework_libraries") {
442+
sources = []
443+
public_deps = []
444+
if (is_component_ffmpeg) {
445+
sources += [
446+
"$root_out_dir/libffmpeg.dylib",
447+
]
448+
public_deps += [
449+
"//third_party/ffmpeg:ffmpeg",
450+
]
451+
}
452+
outputs = [
453+
"{{bundle_contents_dir}}/Libraries/{{source_file_part}}",
454+
]
455+
}
456+
} else {
457+
group("electron_framework_libraries") {
458+
}
459+
}
460+
440461
bundle_data("electron_crashpad_helper") {
441462
sources = [
442463
"$root_out_dir/crashpad_handler",
@@ -460,6 +481,7 @@ if (is_mac) {
460481
]
461482
deps = [
462483
":electron_framework_resources",
484+
":electron_framework_libraries",
463485
":electron_xibs",
464486
]
465487
if (!is_mas_build) {

build/args/testing.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ is_component_build = false
44
is_official_build = false
55
dcheck_always_on = true
66
symbol_level = 1
7-
use_jumbo_build = true
7+
is_component_ffmpeg = true

vsts-gn.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ phases:
3737
"$SCCACHE_WRAPPER" -s
3838
echo "##vso[task.setvariable variable=SCCACHE_WRAPPER]$SCCACHE_WRAPPER"
3939
echo "##vso[task.setvariable variable=CHROMIUM_BUILDTOOLS_PATH]`pwd`/buildtools"
40-
gn gen out/Default --args='import("//electron/build/args/testing.gn") cc_wrapper="'"$SCCACHE_WRAPPER"'"'
40+
echo "GN gen for: $GN_CONFIG"
41+
gn gen out/Default --args='import("'$GN_CONFIG'") cc_wrapper="'"$SCCACHE_WRAPPER"'"'
4142
name: GN_gen
4243
4344
- bash: |

0 commit comments

Comments
 (0)
X Tutup