Пример #1
0
        static void Main(string[] args)
        {
            Core.Platform.Instance = new Eddie.Platforms.Osx();

            CommandLine.InitSystem(Environment.CommandLine);

            // Due to a bug in Xamarin, that don't recognize resources inside Core library if Mono is bundled, we embed some resources in entry assembly.

            Core.ResourcesFiles.LoadString (Assembly.GetEntryAssembly (), "license.txt", "License.txt");
            Core.ResourcesFiles.LoadString (Assembly.GetEntryAssembly (), "thirdparty.txt", "ThirdParty.txt");
            Core.ResourcesFiles.LoadString (Assembly.GetEntryAssembly (), "tos.txt", "TOS.txt");

            Core.ResourcesFiles.Count ();

            if (CommandLine.SystemEnvironment.Exists ("cli")) {
                Core.Engine engine = new Core.Engine ();

                if (engine.Initialization (true)) {
                    engine.ConsoleStart ();
                    engine.Join ();
                }

            } else {
                Engine engine = new Engine ();

                if (engine.Initialization (false) == false)
                    return;

                NSApplication.Init ();
                NSApplication.Main (args);
            }
        }
Пример #2
0
        static void Main(string[] args)
        {
            Platform.Instance = new Eddie.Platforms.Linux();
            CommandLine.InitSystem(Environment.CommandLine);

            Engine engine = new Engine();

            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);

            if (engine.Initialization(true))
            {
                engine.ConsoleStart();
            }
        }