Closed GoogleCodeExporter closed 9 years ago
After building cefclient do the following:
1. Exit XCode.
2. Open the cefclient application bundle.
3. Edit the included Info.plist file.
4. Change the CFBundleExecutable value from cefclient_mac_app.sh to cefclient.
5. Rename cefclient.app twice (this will cause the OS to pick up the Info.plist
changes).
6. Open XCode -- you can now debug the project.
More information on application bundles is available here:
http://www.mactipsandtricks.com/articles/Wiley_HT_appBundles.lasso
The cefclient_mac_app.sh script is necessary for setting
DYLD_FALLBACK_LIBRARY_PATH so that the application can be executed via the app
bundle. I'm open to other ways of handling this so that both app bundle
execution and debugging can work at the same time.
Original comment by magreenb...@gmail.com
on 4 Mar 2011 at 4:12
Hm... After reading these (
http://lessons.runrev.com/spaces/lessons/buckets/784/lessons/15029-Linking-an-OS
X-external-bundle-with-a-dylib-library and
http://qin.laya.com/tech_coding_help/dylib_linking.html ) it seems the better
way to do it would be by running post-build script for install_name_tool.
I think chrome.gyp already has something for this, but I have not tried it
myself.
Original comment by azasyp...@gmail.com
on 4 Mar 2011 at 9:07
Here is a patch that should solve this issue. I did not have time to do a
completely clean build, but this will eliminate the cefclient_mac_app.sh script
and allow you to run cefclient from the bundle, directly running the binary,
and within Xcode seamlessly. The trick is to modify cef.gyp to set the install
name of libcef.dylib to @executable_path/libcef.dylib. This instructs the
dynamic loader to look in the executable's path for the lib, and is dynamic so
moving the entire bundle still works. Could use a bit more testing to confirm
everything. Without this, the dylib automatically sets the install name to the
default location for a dylib (/usr/local/lib).
Patch created against tag 198 at src/cef.
Original comment by krun...@gmail.com
on 9 Mar 2011 at 10:10
Attachments:
[deleted comment]
I cleaned my source tree and left my Mac building last night and when I got
back to it CEF was up and running in the debugger. :)
Then I thought rather than setting LD_DYLIB_INSTALL_NAME, you might be able to
set INSTALL_PATH to '@executable_path' to override the default /usr/local/lib
setting from gyp. I am testing that now to see if the name of the library is
automatically and correctly set based on that path.
Original comment by krun...@gmail.com
on 10 Mar 2011 at 2:45
Yes it looks like INSTALL_PATH is a better choice. New patch attached.
Original comment by krun...@gmail.com
on 10 Mar 2011 at 2:51
Attachments:
Any feedback on setting INSTALL_PATH to @executable_path in the gyp file? I
believe this fixes debugging cefclient while allowing the app to be run from
the bundle or directly running the binary.
Original comment by krun...@gmail.com
on 22 Mar 2011 at 6:46
It works great, thanks. Committed as revision 204.
Original comment by magreenb...@gmail.com
on 22 Mar 2011 at 11:00
Original issue reported on code.google.com by
azasyp...@gmail.com
on 4 Mar 2011 at 3:55