From 227b9df6435ff78d5535db1b07196814a9bcfc49 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Thu, 18 Nov 2010 03:01:34 +0000 Subject: [PATCH] - Mac: Fix cefclient app package build and execution problems. - Improve error message in ClientHandler::HandleLoadError. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@142 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- cef.gyp | 21 +++++++++------------ tests/cefclient/cefclient.cpp | 2 +- tests/cefclient/cefclient_mac_app.sh | 5 +++++ tests/cefclient/mac/Info.plist | 2 +- 4 files changed, 16 insertions(+), 14 deletions(-) create mode 100755 tests/cefclient/cefclient_mac_app.sh diff --git a/cef.gyp b/cef.gyp index 58602ebc1..3f202ae12 100644 --- a/cef.gyp +++ b/cef.gyp @@ -125,24 +125,21 @@ }, ], 'copies': [ - # TODO(ajwong): This, and the parallel chromium stanza below - # really should find a way to share file paths with - # ffmpeg.gyp so they don't diverge. (BUG=23602) { + # Add library dependencies and app launcher script to the bundle. 'destination': '<(PRODUCT_DIR)/cefclient.app/Contents/MacOS/', - 'files': ['<(PRODUCT_DIR)/libffmpegsumo.dylib'], - }, - { - # TODO(tony): We should have cefclient.app load plugins from - # <(PRODUCT_DIR)/plugins so we don't have this extra copy of - # the plugin. - 'destination': '<(PRODUCT_DIR)/cefclient.app/Contents/PlugIns/', - 'files': ['<(PRODUCT_DIR)/TestNetscapePlugIn.plugin/'], + 'files': [ + '<(PRODUCT_DIR)/libcef.dylib', + '<(PRODUCT_DIR)/libffmpegsumo.dylib', + 'tests/cefclient/cefclient_mac_app.sh', + ], }, { # Add the WebCore resources to the bundle. 'destination': '<(PRODUCT_DIR)/cefclient.app/Contents/', - 'files': ['../third_party/WebKit/WebCore/Resources/'], + 'files': [ + '../third_party/WebKit/WebCore/Resources/', + ], }, ], 'link_settings': { diff --git a/tests/cefclient/cefclient.cpp b/tests/cefclient/cefclient.cpp index 875bc5786..286cbe540 100644 --- a/tests/cefclient/cefclient.cpp +++ b/tests/cefclient/cefclient.cpp @@ -109,7 +109,7 @@ CefHandler::RetVal ClientHandler::HandleLoadError(CefRefPtr browser, ss << L"Load Failed" L"

Load Failed

" L"

Load of URL " << failedUrl << - L"failed with error code " << static_cast(errorCode) << + L" failed with error code " << static_cast(errorCode) << L".

" L""; errorText = ss.str(); diff --git a/tests/cefclient/cefclient_mac_app.sh b/tests/cefclient/cefclient_mac_app.sh new file mode 100755 index 000000000..64927fa93 --- /dev/null +++ b/tests/cefclient/cefclient_mac_app.sh @@ -0,0 +1,5 @@ +#!/bin/sh +DIR=$(cd "$(dirname "$0")"; pwd) +export DYLD_FALLBACK_LIBRARY_PATH="$DIR:/lib:/usr/lib" +exec "$DIR/cefclient" + diff --git a/tests/cefclient/mac/Info.plist b/tests/cefclient/mac/Info.plist index 83c535e41..d44fd54b7 100644 --- a/tests/cefclient/mac/Info.plist +++ b/tests/cefclient/mac/Info.plist @@ -5,7 +5,7 @@ CFBundleDevelopmentRegion English CFBundleExecutable - ${EXECUTABLE_NAME} + cefclient_mac_app.sh CFBundleIconFile cefclient.icns CFBundleIdentifier