macOS: Add angle and swiftshader libraries to the app bundle (issue #2446)"

This commit is contained in:
Marshall Greenblatt
2018-07-25 14:58:25 -04:00
parent 339ce47575
commit 7f3c21b64a
3 changed files with 66 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
diff --git ui/gl/init/gl_initializer_mac.cc ui/gl/init/gl_initializer_mac.cc
index f4789ebf3b0e..a7f5b21da372 100644
index f4789ebf3b0e..73d66e8f5165 100644
--- ui/gl/init/gl_initializer_mac.cc
+++ ui/gl/init/gl_initializer_mac.cc
@@ -47,11 +47,8 @@ bool InitializeOneOffForSandbox() {
@@ -16,3 +16,14 @@ index f4789ebf3b0e..a7f5b21da372 100644
if (GetGLImplementation() == kGLImplementationAppleGL) {
attribs.push_back(kCGLPFARendererID);
attribs.push_back(
@@ -146,8 +143,8 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) {
// as app bundles. In that case, the .dylib is next to the executable.
base::FilePath base_dir;
if (base::mac::AmIBundled()) {
- base_dir =
- base::mac::FrameworkBundlePath().Append("Versions/Current/Libraries/");
+ // Rely on symlinks to find the correct version.
+ base_dir = base::mac::FrameworkBundlePath().Append("Libraries/");
} else {
if (!base::PathService::Get(base::FILE_EXE, &base_dir)) {
LOG(ERROR) << "PathService::Get failed.";