Make sure that Package can be initialized several time.s
Make sure that Package is not used before being initialized.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35080
a592a061-630c-0410-9148-
cb99ea01b6c8
init_package(os::utf8_argv(0), string(), string(),
top_build_dir_is_one_level_up);
} catch (ExceptionMessage const & message) {}
init_package(os::utf8_argv(0), string(), string(),
top_build_dir_is_one_level_up);
} catch (ExceptionMessage const & message) {}
// Here we need to parse the command line. At least
// we need to parse for "-dbg" and "-help"
// Here we need to parse the command line. At least
// we need to parse for "-dbg" and "-help"
lyx::support::os::init(argc, argv);
lyx::support::os::init(argc, argv);
- // initialize for internationalized version *EK*
- lyx::locale_init();
-
lyx::LyX the_lyx_instance;
return the_lyx_instance.exec(argc, argv);
lyx::LyX the_lyx_instance;
return the_lyx_instance.exec(argc, argv);
#include "support/ExceptionMessage.h"
#include "support/filetools.h"
#include "support/gettext.h"
#include "support/ExceptionMessage.h"
#include "support/filetools.h"
#include "support/gettext.h"
+#include "support/lassert.h"
#include "support/lstrings.h"
#include "support/os.h"
#include "support/lstrings.h"
#include "support/os.h"
string const & command_line_user_support_dir,
exe_build_dir_to_top_build_dir top_build_dir_location)
{
string const & command_line_user_support_dir,
exe_build_dir_to_top_build_dir top_build_dir_location)
{
- // Can do so only once.
- if (initialised_)
- return;
-
package_ = Package(command_line_arg0,
command_line_system_support_dir,
command_line_user_support_dir,
package_ = Package(command_line_arg0,
command_line_system_support_dir,
command_line_user_support_dir,
Package const & package()
{
Package const & package()
{
- // Commented out because package().locale_dir() can be called
- // from the message translation code in Messages.cpp before
- // init_package() is called. Lars is on the case...
- // LASSERT(initialised_, /**/);
+ LASSERT(initialised_, /**/);
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*