[mono-api-info] Use XmlWriter instead of XmlDocument to make this faster.
[mono-project.git] / mono / mini / main.c
blob4ef344ecdd9b0f1b5e005e5e9a1f6b258744dadb
1 #include <config.h>
2 #include "mini.h"
4 #ifndef HOST_WIN32
5 #ifndef BUILDVER_INCLUDED
6 #include "buildver-boehm.h"
7 #endif
8 #endif
11 * If the MONO_ENV_OPTIONS environment variable is set, it uses this as a
12 * source of command line arguments that are passed to Mono before the
13 * command line arguments specified in the command line.
15 static int
16 mono_main_with_options (int argc, char *argv [])
18 mono_parse_env_options (&argc, &argv);
20 return mono_main (argc, argv);
23 #ifdef HOST_WIN32
25 #include <shellapi.h>
27 int
28 main (void)
30 int argc;
31 gunichar2** argvw;
32 gchar** argv;
33 int i;
35 argvw = CommandLineToArgvW (GetCommandLine (), &argc);
36 argv = g_new0 (gchar*, argc + 1);
37 for (i = 0; i < argc; i++)
38 argv [i] = g_utf16_to_utf8 (argvw [i], -1, NULL, NULL, NULL);
39 argv [argc] = NULL;
41 LocalFree (argvw);
43 return mono_main_with_options (argc, argv);
46 #else
48 int
49 main (int argc, char* argv[])
51 mono_build_date = build_date;
53 return mono_main_with_options (argc, argv);
56 #endif