]> git.lyx.org Git - lyx.git/blob - src/main.C
prepare for 1.1.6pre2
[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-2000 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 "frontends/GUIRunTime.h"
18
19
20 int main(int argc, char * argv[])
21 {
22         int const val = GUIRunTime::initApplication(argc, argv);
23         if (val)
24                 return val;
25
26         // lyx_localedir is used by gettext_init() is we have
27         //   i18n support built-in
28         string lyx_localedir = GetEnvPath("LYX_LOCALEDIR");
29         if (lyx_localedir.empty())
30                 lyx_localedir = LOCALEDIR;
31         
32         // initialize for internationalized version *EK*
33         locale_init(); // macro
34         gettext_init(); // macro
35
36 #ifdef __EMX__
37         _wildcard(&argc, &argv);
38 #endif
39
40         LyX lyx(&argc, argv);
41         return 0; // SUCCESS
42 }