mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Load CEF locale files from resources/l10n.
Also copy across the default (en-US) pack file after building LOOT. These changes have no effect except when debugging, in which case they remove a few error messages from the log.
This commit is contained in:
@@ -281,3 +281,11 @@ FOREACH(cef_resource cef.pak cef_100_percent.pak cef_200_percent.pak devtools_re
|
||||
"${CMAKE_SOURCE_DIR}/${CEF_ROOT}/Resources/${cef_resource}"
|
||||
$<TARGET_FILE_DIR:LOOT>)
|
||||
ENDFOREACH()
|
||||
|
||||
# Copy CEF locale resources. This is just to reduce error messages while debugging.
|
||||
FOREACH(cef_resource en-US.pak)
|
||||
add_custom_command(TARGET LOOT POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
"${CMAKE_SOURCE_DIR}/${CEF_ROOT}/Resources/locales/${cef_resource}"
|
||||
$<TARGET_FILE_DIR:LOOT>/resources/l10n)
|
||||
ENDFOREACH()
|
||||
|
||||
@@ -54,6 +54,11 @@ CefSettings GetCefSettings(bool debuggingEnabled) {
|
||||
|
||||
// Disable pack file loading if debugging is not enabled.
|
||||
cef_settings.pack_loading_disabled = !debuggingEnabled;
|
||||
|
||||
// If pack file loading is not disabled, load locale pack files from LOOT's
|
||||
// l10n path.
|
||||
CefString(&cef_settings.locales_dir_path).FromString(g_path_l10n.string());
|
||||
|
||||
return cef_settings;
|
||||
}
|
||||
|
||||
@@ -140,7 +145,6 @@ int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmd
|
||||
ReleaseMutex(hMutex);
|
||||
|
||||
// Delete the folders CEF generates that LOOT doesn't need.
|
||||
boost::filesystem::remove_all(boost::filesystem::current_path() / "locales");
|
||||
boost::filesystem::remove_all(boost::filesystem::current_path() / "pdf.dll");
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user