1999-09-27 18:44:28 +00:00
|
|
|
/* This file is part of
|
2002-03-21 17:27:08 +00:00
|
|
|
* ======================================================
|
|
|
|
*
|
1999-09-27 18:44:28 +00:00
|
|
|
* LyX, The Document Processor
|
2002-03-21 17:27:08 +00:00
|
|
|
*
|
1999-10-02 16:21:10 +00:00
|
|
|
* Copyright 1995 Matthias Ettrich
|
2001-05-30 13:53:44 +00:00
|
|
|
* Copyright 1995-2001 The LyX Team.
|
1999-09-27 18:44:28 +00:00
|
|
|
*
|
1999-11-15 12:01:38 +00:00
|
|
|
* ====================================================== */
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
#include <config.h>
|
2000-03-28 02:18:55 +00:00
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
#include "lyx_main.h"
|
|
|
|
#include "gettext.h"
|
|
|
|
#include "LString.h"
|
2002-06-12 02:54:19 +00:00
|
|
|
#include "lyx_gui.h"
|
1999-10-02 16:21:10 +00:00
|
|
|
#include "support/filetools.h"
|
2001-05-17 15:11:01 +00:00
|
|
|
#include "support/os.h"
|
2000-09-11 15:30:21 +00:00
|
|
|
#include "frontends/GUIRunTime.h"
|
1999-09-27 18:44:28 +00:00
|
|
|
|
2000-03-28 02:18:55 +00:00
|
|
|
|
|
|
|
int main(int argc, char * argv[])
|
|
|
|
{
|
2001-05-17 15:11:01 +00:00
|
|
|
os::init(&argc, &argv);
|
2000-09-19 11:18:35 +00:00
|
|
|
int const val = GUIRunTime::initApplication(argc, argv);
|
2000-09-11 15:30:21 +00:00
|
|
|
if (val)
|
|
|
|
return val;
|
2000-06-12 11:27:15 +00:00
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
// lyx_localedir is used by gettext_init() is we have
|
|
|
|
// i18n support built-in
|
1999-10-02 16:21:10 +00:00
|
|
|
string lyx_localedir = GetEnvPath("LYX_LOCALEDIR");
|
1999-09-27 18:44:28 +00:00
|
|
|
if (lyx_localedir.empty())
|
|
|
|
lyx_localedir = LOCALEDIR;
|
2002-03-21 17:27:08 +00:00
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
// initialize for internationalized version *EK*
|
2002-03-21 17:27:08 +00:00
|
|
|
locale_init();
|
|
|
|
gettext_init(lyx_localedir);
|
1999-09-27 18:44:28 +00:00
|
|
|
|
1999-11-15 12:01:38 +00:00
|
|
|
LyX lyx(&argc, argv);
|
2000-02-04 09:38:32 +00:00
|
|
|
return 0; // SUCCESS
|
1999-09-27 18:44:28 +00:00
|
|
|
}
|