]> git.lyx.org Git - lyx.git/blob - src/main.C
update libtool
[lyx.git] / src / main.C
1 /* This file is part of
2  * ====================================================== 
3  * 
4  *           LyX, The Document Processor
5  *       
6  *          Copyright 1995 Matthias Ettrich
7  *          Copyright 1995-2001 The LyX Team.
8  *
9  * ====================================================== */
10
11 #include <config.h>
12
13 #include "lyx_main.h"
14 #include "gettext.h"
15 #include "LString.h"
16 #include "support/filetools.h"
17 #include "support/os.h"
18 #include "frontends/GUIRunTime.h"
19
20
21 int main(int argc, char * argv[])
22 {
23         os::init(&argc, &argv);
24         int const val = GUIRunTime::initApplication(argc, argv);
25         if (val)
26                 return val;
27
28         // lyx_localedir is used by gettext_init() is we have
29         //   i18n support built-in
30         string lyx_localedir = GetEnvPath("LYX_LOCALEDIR");
31         if (lyx_localedir.empty())
32                 lyx_localedir = LOCALEDIR;
33         
34         // initialize for internationalized version *EK*
35         locale_init(); 
36         gettext_init(lyx_localedir); 
37
38         LyX lyx(&argc, argv);
39         return 0; // SUCCESS
40 }