]> git.lyx.org Git - features.git/blob - src/main.C
several small and larger changes, read the Changelog
[features.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 FORMS_H_LOCATION
13 #include "lyx_main.h"
14 #include "gettext.h"
15 #include "LString.h"
16 #include "support/filetools.h"
17
18 // I keep these here so that it will be processed as early in
19 // the compilation process as possible.
20 #if !defined(FL_REVISION) || FL_REVISION < 88 || FL_VERSION != 0
21 #error LyX will not compile with this version of XForms.\
22        Please get version 0.89.\
23        If you want to try to compile anyway, delete this test in src/main.C.
24 #endif
25
26
27 int main(int argc, char *argv[]) {
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();
37
38 #ifdef __EMX__
39         _wildcard(&argc, &argv);
40 #endif
41
42         LyX lyx(&argc, argv);
43         return 0; // SUCCESS
44 }