@@ -206,35 +206,33 @@ std::unique_ptr<ROOT::RWebDisplayHandle> RCefWebDisplayHandle::CefCreator::Displ
206206 TString cef_main = TROOT::GetBinDir () + " /cef_main" ;
207207 cef_string_ascii_to_utf16 (cef_main.Data (), cef_main.Length (), &settings.browser_subprocess_path );
208208
209- #ifdef OS_LINUX
210- // on linux resource directory copied to lib/
211- TString path2 = TROOT::GetLibDir () + " /locales" ;
212- cef_string_ascii_to_utf16 (path2.Data (), path2.Length (), &settings.locales_dir_path );
213- TString path3 = TROOT::GetLibDir ();
214- cef_string_ascii_to_utf16 (path3.Data (), path3.Length (), &settings.resources_dir_path );
215- #endif
216-
217- #ifdef OS_WIN
218- // on windows resource directory copied to bin/
219- TString path2 = TROOT::GetBinDir () + " /locales" ;
220- cef_string_ascii_to_utf16 (path2.Data (), path2.Length (), &settings.locales_dir_path );
221- TString path3 = TROOT::GetBinDir ();
222- cef_string_ascii_to_utf16 (path3.Data (), path3.Length (), &settings.resources_dir_path );
223- #endif
224-
225209#ifdef OS_MACOSX
226210 // on mac there is framework directory, where resources and libs are combined together
227211 TString path = TROOT::GetDataDir () + " /Frameworks/Chromium Embedded Framework.framework" ;
228212 cef_string_ascii_to_utf16 (path.Data (), path.Length (), &settings.framework_dir_path );
229213
230-
214+ // add CEF libraries to DYLD library path
231215 TString dypath = gSystem ->Getenv (" DYLD_LIBRARY_PATH" );
232216 if (dypath.Length () > 0 )
233217 dypath.Append (" :" );
234218 dypath.Append (path + " /Libraries/" );
235219 gSystem ->Setenv (" DYLD_LIBRARY_PATH" , dypath);
236220#endif
237221
222+ #ifdef OS_WIN
223+ TString resource_dir = TROOT::GetBinDir ();
224+ cef_string_ascii_to_utf16 (resource_dir.Data (), resource_dir.Length (), &settings.resources_dir_path );
225+ TString locales_dir = TROOT::GetDataDir () + " /Frameworks/cef/locales" ;
226+ cef_string_ascii_to_utf16 (locales_dir.Data (), locales_dir.Length (), &settings.locales_dir_path );
227+ #endif
228+
229+ #ifdef OS_LINUX
230+ TString resource_dir = TROOT::GetLibDir ();
231+ cef_string_ascii_to_utf16 (resource_dir.Data (), resource_dir.Length (), &settings.resources_dir_path );
232+ TString locales_dir = TROOT::GetDataDir () + " /Frameworks/cef/locales" ;
233+ cef_string_ascii_to_utf16 (locales_dir.Data (), locales_dir.Length (), &settings.locales_dir_path );
234+ #endif
235+
238236 settings.no_sandbox = true ;
239237 // if (gROOT->IsWebDisplayBatch()) settings.single_process = true;
240238
0 commit comments