diff --git a/BUILD.gn b/BUILD.gn index 2fa21240b9d3..c2d3ec752b6a 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -22,6 +22,7 @@ import("filenames.gni") if (is_mac) { import("//build/config/mac/rules.gni") import("//third_party/icu/config.gni") + import("//ui/gl/features.gni") import("//v8/gni/v8.gni") } @@ -679,6 +680,50 @@ if (is_mac) { group("electron_framework_libraries") { } } + if (use_egl) { + # Add the ANGLE .dylibs in the Libraries directory of the Framework. + bundle_data("electron_angle_binaries") { + sources = [ + "$root_out_dir/egl_intermediates/libEGL.dylib", + "$root_out_dir/egl_intermediates/libGLESv2.dylib", + ] + outputs = [ + "{{bundle_contents_dir}}/Libraries/{{source_file_part}}", + ] + public_deps = [ + "//ui/gl:angle_library_copy", + ] + } + + # Add the SwiftShader .dylibs in the Libraries directory of the Framework. + bundle_data("electron_swiftshader_binaries") { + sources = [ + "$root_out_dir/egl_intermediates/libswiftshader_libEGL.dylib", + "$root_out_dir/egl_intermediates/libswiftshader_libGLESv2.dylib", + ] + outputs = [ + "{{bundle_contents_dir}}/Libraries/{{source_file_part}}", + ] + public_deps = [ + "//ui/gl:swiftshader_library_copy", + ] + } + } + group("electron_angle_library") { + if (use_egl) { + deps = [ + ":electron_angle_binaries", + ] + } + } + + group("electron_swiftshader_library") { + if (use_egl) { + deps = [ + ":electron_swiftshader_binaries", + ] + } + } bundle_data("electron_crashpad_helper") { sources = [ @@ -705,8 +750,10 @@ if (is_mac) { ":electron_lib", ] deps = [ + ":electron_angle_library", ":electron_framework_libraries", ":electron_framework_resources", + ":electron_swiftshader_library", ] if (!is_mas_build) { deps += [ ":electron_crashpad_helper" ] diff --git a/script/dist_zip.mac.x64.manifest b/script/dist_zip.mac.x64.manifest index d86c6258c6cf..d9a2bbc11c96 100644 --- a/script/dist_zip.mac.x64.manifest +++ b/script/dist_zip.mac.x64.manifest @@ -9,7 +9,11 @@ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/ +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libEGL.dylib +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libGLESv2.dylib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libswiftshader_libEGL.dylib +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libswiftshader_libGLESv2.dylib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/Info.plist Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/am.lproj/ diff --git a/script/dist_zip.mac_mas.x64.manifest b/script/dist_zip.mac_mas.x64.manifest index 086f65404ab1..4cb148c96670 100644 --- a/script/dist_zip.mac_mas.x64.manifest +++ b/script/dist_zip.mac_mas.x64.manifest @@ -9,7 +9,11 @@ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/ +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libEGL.dylib +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libGLESv2.dylib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libswiftshader_libEGL.dylib +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libswiftshader_libGLESv2.dylib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/Info.plist Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/am.lproj/