예제 #1
0
        internal void Boot()
        {
            lock (_bootInProgressLocker)
            {
                ConsoleManager = new ConsoleManager();

                StringLocale.SetDefaults();

                #region Ensure Directory Structure
                new DirectoryInfo(Path.Combine(Environment.CurrentDirectory, "dumps")).EnsureExists();
                new DirectoryInfo(Path.Combine(Environment.CurrentDirectory, "plugins")).EnsureExists();
                new DirectoryInfo(Path.Combine(Environment.CurrentDirectory, "libs")).EnsureExists();
                #endregion

                Installer = new Installer();

                BootTaskLoadConfig();
                BootTaskLoadPlugins();

                BootTaskRunInstaller();

                if (!BootTaskConnectMySql())
                {
                    return;
                }

                BootTaskPreparePermissions();
                BootTaskPrepareFigures();
                BootTaskPrepareHabbos();
                BootTaskPrepareRooms();

                BootTaskStartWebAdmin();

                BootTaskStartPlugins();

                ConsoleManager.Important("Core", StringLocale.GetString("CORE:BOOT_COMPLETE"));

                EventManager.WeakBind <ConsoleInputEventArgs>("stdin:after", ProcessTempInput);

                System.Console.Beep(500, 250);
            }
        }
예제 #2
0
        internal void Boot()
        {
            lock (_bootInProgressLocker)
            {
                StandardOut = new LoggingManager();
                StringLocale.SetDefaults();

                #region Ensure Directory Structure
                XmlConfig.EnsureDirectory(new DirectoryInfo(Path.Combine(Environment.CurrentDirectory, "dumps")));
                XmlConfig.EnsureDirectory(new DirectoryInfo(Path.Combine(Environment.CurrentDirectory, "plugins")));
                XmlConfig.EnsureDirectory(new DirectoryInfo(Path.Combine(Environment.CurrentDirectory, "libs")));
                #endregion

                BootTaskLoadConfig();
                BootTaskLoadPlugins();

                BootTaskRunInstaller();

                BootTaskConnectMySql();

                Task.WaitAll(new[]
                {
                    Task.Factory.StartNew(BootTaskPreparePermissions),
                    Task.Factory.StartNew(BootTaskPrepareFigures),
                    Task.Factory.StartNew(BootTaskPrepareHabbos),
                    Task.Factory.StartNew(BootTaskPrepareRooms)
                });

                Task.Factory.StartNew(BootTaskStartWebAdmin);

                BootTaskStartPlugins();

                StandardOut.Notice("Core", StringLocale.GetString("CORE:BOOT_COMPLETE"));

                Console.Beep(500, 250);
            }
        }