]> git.lyx.org Git - lyx.git/blob - src/main.C
22e56f1708721ad49aed69b2222e170398a31a57
[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 #include <iostream>
13
14 #include "lyx_main.h"
15 #include "gettext.h"
16 #include "LString.h"
17 #include "support/filetools.h"
18 #include "frontends/GUIRunTime.h"
19
20 using std::cerr;
21 using std::endl;
22
23 GUIRunTime guiruntime;
24
25 int main(int argc, char * argv[])
26 {
27         int val = guiruntime.initApplication(argc, argv);
28         if (val)
29                 return val;
30
31         // lyx_localedir is used by gettext_init() is we have
32         //   i18n support built-in
33         string lyx_localedir = GetEnvPath("LYX_LOCALEDIR");
34         if (lyx_localedir.empty())
35                 lyx_localedir = LOCALEDIR;
36         
37         // initialize for internationalized version *EK*
38         locale_init();
39         gettext_init();
40
41 #ifdef __EMX__
42         _wildcard(&argc, &argv);
43 #endif
44
45         LyX lyx(&argc, argv);
46         return 0; // SUCCESS
47 }