- 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
This commit is contained in:
Marshall Greenblatt 2010-11-18 03:01:34 +00:00
parent 811a0ce08b
commit 227b9df643
4 changed files with 16 additions and 14 deletions

21
cef.gyp
View File

@ -125,24 +125,21 @@
}, },
], ],
'copies': [ '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/', 'destination': '<(PRODUCT_DIR)/cefclient.app/Contents/MacOS/',
'files': ['<(PRODUCT_DIR)/libffmpegsumo.dylib'], 'files': [
}, '<(PRODUCT_DIR)/libcef.dylib',
{ '<(PRODUCT_DIR)/libffmpegsumo.dylib',
# TODO(tony): We should have cefclient.app load plugins from 'tests/cefclient/cefclient_mac_app.sh',
# <(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/'],
}, },
{ {
# Add the WebCore resources to the bundle. # Add the WebCore resources to the bundle.
'destination': '<(PRODUCT_DIR)/cefclient.app/Contents/', 'destination': '<(PRODUCT_DIR)/cefclient.app/Contents/',
'files': ['../third_party/WebKit/WebCore/Resources/'], 'files': [
'../third_party/WebKit/WebCore/Resources/',
],
}, },
], ],
'link_settings': { 'link_settings': {

View File

@ -109,7 +109,7 @@ CefHandler::RetVal ClientHandler::HandleLoadError(CefRefPtr<CefBrowser> browser,
ss << L"<html><head><title>Load Failed</title></head>" ss << L"<html><head><title>Load Failed</title></head>"
L"<body><h1>Load Failed</h1>" L"<body><h1>Load Failed</h1>"
L"<h2>Load of URL " << failedUrl << L"<h2>Load of URL " << failedUrl <<
L"failed with error code " << static_cast<int>(errorCode) << L" failed with error code " << static_cast<int>(errorCode) <<
L".</h2></body>" L".</h2></body>"
L"</html>"; L"</html>";
errorText = ss.str(); errorText = ss.str();

View File

@ -0,0 +1,5 @@
#!/bin/sh
DIR=$(cd "$(dirname "$0")"; pwd)
export DYLD_FALLBACK_LIBRARY_PATH="$DIR:/lib:/usr/lib"
exec "$DIR/cefclient"

View File

@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>English</string> <string>English</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string> <string>cefclient_mac_app.sh</string>
<key>CFBundleIconFile</key> <key>CFBundleIconFile</key>
<string>cefclient.icns</string> <string>cefclient.icns</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>