On 05.05.2011 21:39, Peter Kümmel wrote:
On 05.05.2011 13:50, Jean-Marc Lasgouttes wrote:
Here is my patch for included libintl. Part of it is a IMO better fix to
the startup assertion encountered with cmake. I guess the code is not
linked against libintl, because I get
Index: development/cmake/config.h.cmake
Index: src/LyX.cpp
===================================================================
--- src/LyX.cpp (revision 38589)
+++ src/LyX.cpp (working copy)
@@ -292,10 +292,11 @@
try {
init_package(os::utf8_argv(0), string(), string(),
top_build_dir_is_one_level_up);
+ // we do not get to this point when init_package throws an
exception
+ locale_init();
} catch (ExceptionMessage const& message) {
LYXERR(Debug::LOCALE, message.title_ + ", " + message.details_);
}
- locale_init();
// Here we need to parse the command line. At least
// we need to parse for "-dbg" and "-help"
Index: src/support/gettext.cpp
===================================================================
--- src/support/gettext.cpp (revision 38589)
+++ src/support/gettext.cpp (working copy)
@@ -38,9 +38,7 @@
setlocale(LC_MESSAGES, "");
# endif
setlocale(LC_CTYPE, "");
- if (support::packageInitialized()) {
- Messages::init();
- }
+ Messages::init();
#endif
setlocale(LC_NUMERIC, "C");
}
Index: src/support/Package.h
===================================================================
--- src/support/Package.h (revision 38589)
+++ src/support/Package.h (working copy)
@@ -52,8 +52,6 @@
std::string const& command_line_user_support_dir,
exe_build_dir_to_top_build_dir);
-bool packageInitialized();
-
/** Accessor to the global data.
* Asserts that init_package() has been called first.
*/
Index: src/support/Package.cpp
===================================================================
--- src/support/Package.cpp (revision 38589)
+++ src/support/Package.cpp (working copy)
@@ -65,12 +65,6 @@
}
-bool packageInitialized()
-{
- return initialised_;
-}
-
-
Package const& package()
{
LASSERT(initialised_, /**/);
This removes the patch for
http://www.lyx.org/trac/ticket/7407
locale_init(); asserts and the try/catch doesn't help.
Tried it again, seems I was wrong.
Peter