bc307eca946ac2ca4eaf4b5cb168e39293504a24
[scilab.git] / scilab / modules / core / src / c / InitScilab.c
1 /*
2  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3  * Copyright (C) 2006 - INRIA - Allan CORNET
4  *
5  * This file must be used under the terms of the CeCILL.
6  * This source file is licensed as described in the file COPYING, which
7  * you should have received as part of this distribution.  The terms
8  * are also available at
9  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
10  *
11  */
12 #include "InitScilab.h"
13 #include "InitializeCore.h"
14 #include "../../../console/includes/InitializeConsole.h"
15 #include "../../../tclsci/includes/InitializeTclTk.h"
16 #include "../../../localization/includes/InitializeLocalization.h"
17 #include "../../../graphics/includes/graphicModuleLoad.h"
18 #include "../../../jvm/includes/InitializeJVM.h"
19 #ifdef _MSC_VER
20 #include "../../../windows_tools/includes/InitializeWindows_tools.h"
21 #endif
22 #include "../../../gui/includes/InitializeGUI.h"
23 #include "../../../string/includes/InitializeString.h"
24 #include "scilabmode.h"
25 #include "SetScilabEnvironment.h"
26 #include "../../../jvm/includes/loadBackGroundClassPath.h"
27 /*--------------------------------------------------------------------------*/
28 int C2F(initscilab) (void)
29 {
30
31     SetScilabEnvironment();
32
33     InitializeString();
34
35     InitializeLocalization();
36
37 #ifdef _MSC_VER
38     InitializeWindows_tools();
39 #endif
40
41     InitializeCore();
42
43     if (getScilabMode() != SCILAB_NWNI)
44     {
45         InitializeJVM();
46         InitializeGUI();
47
48         /* create needed data structure if not already created */
49         loadGraphicModule();
50     }
51
52     /* Initialize console: lines... */
53     InitializeConsole();
54
55     if (getScilabMode() != SCILAB_NWNI)
56     {
57         loadBackGroundClassPath();
58     }
59     return 0;
60 }
61
62 /*--------------------------------------------------------------------------*/