MAC: CEF in dylib and icudtl.dat issue

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

MAC: CEF in dylib and icudtl.dat issue

Postby Marcin » Wed Jun 17, 2015 4:39 am

Hi,

I have a working windows version of DLL plugin loaded by 3rd party app. My DLL loads CEF and everything is fine. Now, I am porting to MAC ( I am a Win guy with little MAC OS knowledge) and I have more less the same problem as in the following topic, however I cannot get it running even with a workaround, so I do not know what I am doing wrong:

viewtopic.php?f=6&t=12823

Here is my config:

./MyDynLibFolder
myDynLib.dylib (file with linking to @loader_path/... )
myProcessHelper.app
Chromium ....framework (framework boundle)

Now, the main app is in a different folder and is a classic app boundle with the executable located in MainApp.app/Contents/MacOS and of course it is not linked to CEF3

MyDynLib is loaded corectly, I set browser_subprocess_path to myProcessHelper.app/Contents/MacOS/myProcessHelper, however when I execute CefInitialize I got the following error:

Code: Select all
[0617/001616:ERROR:icu_util.cc(144)] icudtl.dat not found in bundle
[0617/001616:FATAL:content_main_runner.cc(715)] Check failed: base::i18n::InitializeICU().


so I figured that on MAC OS CEF3 is looking for icudtl.dat in the main app working directory. The first thing I did to have a workaround was to copy or symlinks the whole CEF framework to the main app boundle (i.e. to Contents/Frameworks folder) and I got same error, however the log is a bit different:

Code: Select all
[0617/001810:VERBOSE1:pref_proxy_config_tracker_impl.cc(148)] 0x352be0: set chrome proxy config service to 0x24f3b0
[0617/001810:VERBOSE1:pref_proxy_config_tracker_impl.cc(277)] 0x352be0: Done pushing proxy to UpdateProxyConfig
[0617/001811:ERROR:icu_util.cc(144)] icudtl.dat not found in bundle
[0617/001811:FATAL:content_main_runner.cc(715)] Check failed: base::i18n::InitializeICU().


Then I tried to copy icudtl.dat to every possible location (MainApp.app/Contents/MacOS , MainApp.app, MainApp.app/../ etc.) but nothing worked.

I have not tried using locales_dir_path nor resources_dir_path and I have not tried added CEF3 reference to the MainApp using install_name_tool, however before I go experimenting, could someone pls explain me, what I should do in the MainApp.app boundle to have it working ? Where the icudtl.dat (if only this file) should be located ?

I try not to modify CEF3, so the other question is, will the way MAC is looking for icudtl.dat will be configurable in the next Chromium releases ? Is in in the plan ?

Best regards

Marcin
Marcin
Techie
 
Posts: 37
Joined: Fri Dec 06, 2013 5:07 am

Re: MAC: CEF in dylib and icudtl.dat issue

Postby Marcin » Mon Jun 22, 2015 5:26 am

OK, I figured it out myself after some experimenting.

1) CEF framework has to be in the main app boundle at Contents/Framework. It could be symlink.

2) helper app, has to be copied in the main app boundle at Contents/Framework

3) helper app name must be exactly "MAINAPPNAME Helper.app"

The workaround for the first two issues lies in the CEF sources:

https://bitbucket.org/chromiumembedded/ ... ath-to-cef

the third issue can be also addressed in changing sources if someone does not like this naming convention ;)

so, the point is, on MAC, it is not advised to you browser_subprocess_path but to embed the helper app into the main app boundle. At least this is my finding ...
Marcin
Techie
 
Posts: 37
Joined: Fri Dec 06, 2013 5:07 am

Re: MAC: CEF in dylib and icudtl.dat issue

Postby Czarek » Mon Feb 27, 2017 10:32 am

Looks like the "icudtl.dat not found in bundle" error can be fixed in CEF v56 (2924) by setting CefSettings.framework_dir_path - this option was recently added in that branch and later.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: MAC: CEF in dylib and icudtl.dat issue

Postby whittyusername69 » Thu Jan 17, 2019 9:10 pm

How do I change the name of the helper file? When I do I get an angry white broken symbol appear on the helper apps icon.
whittyusername69
Techie
 
Posts: 13
Joined: Sat Jan 12, 2019 9:34 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 111 guests