Example #1
0
        /// <summary>
        /// Installation with progressbar.
        /// </summary>
        public void Installation()
        {
            Menu.DispInstallationDialog(0);

            Menu.DispInstallationDialog(5);

            InitDirs(); //create needed directories if they doesn't exist

            Menu.DispInstallationDialog(10);

            File.Create(@"0:\System\settings.conf");
            File.Create(@"0:\System\passwd");

            Menu.DispInstallationDialog(15);

            System.Users.Users.LoadUsers();

            Menu.DispInstallationDialog(20);

            System.Users.Users.PutUser("user:"******":admin");

            Menu.DispInstallationDialog(30);

            System.Users.Users.PutUser("user:root", Sha256.hash("root") + ":admin");

            Menu.DispInstallationDialog(40);

            string[] Users = { "root", FinalUsername };
            CreateUserDirectories(Users);

            Settings.LoadValues();

            Menu.DispInstallationDialog(50);

            if ((FinalLang.Equals("en_US")) || FinalLang.Equals("en-US"))
            {
                Settings.PutValue("language", "en_US");
                Menu.DispInstallationDialog(60);
            }
            else if ((FinalLang.Equals("fr_FR")) || FinalLang.Equals("fr-FR"))
            {
                Settings.PutValue("language", "fr_FR");
                Menu.DispInstallationDialog(60);
            }
            else if ((FinalLang.Equals("nl_NL")) || FinalLang.Equals("nl-NL"))
            {
                Settings.PutValue("language", "nl_NL");
                Menu.DispInstallationDialog(60);
            }
            else if ((FinalLang.Equals("it_IT")) || FinalLang.Equals("it-IT"))
            {
                Settings.PutValue("language", "it_IT");
                Menu.DispInstallationDialog(60);
            }

            Settings.PutValue("hostname", FinalHostname);

            Menu.DispInstallationDialog(70);

            Settings.PutValue("setuptime", Time.MonthString() + "/" + Time.DayString() + "/" + Time.YearString() + ", " + Time.TimeString(true, true, true));

            Settings.PutValue("consolemode", "null");

            Menu.DispInstallationDialog(80);

            Kernel.SystemExists = true;

            Settings.PushValues();
            System.Users.Users.PushUsers();

            Menu.DispInstallationDialog(100);

            Console.ForegroundColor = ConsoleColor.White;
            Console.BackgroundColor = ConsoleColor.Black;

            Run();
        }
Example #2
0
        /// <summary>
        /// Installation with progressbar.
        /// </summary>
        public void Installation()
        {
            Menu.DispInstallationDialog(0);

            Menu.DispInstallationDialog(5);

            InitDirs(); //create needed directories if they doesn't exist

            Menu.DispInstallationDialog(10);

            File.Create(@"0:\System\settings.conf");
            File.Create(@"0:\System\passwd");

            Menu.DispInstallationDialog(15);

            System.Users.Users.LoadUsers();

            Menu.DispInstallationDialog(20);

            System.Users.Users.PutUser("user:"******":admin");

            Menu.DispInstallationDialog(30);

            System.Users.Users.PutUser("user:root", Sha256.hash("root") + ":admin");

            Menu.DispInstallationDialog(40);

            string[] Users = { "root", FinalUsername };
            CreateUserDirectories(Users);

            Utils.Settings config = new Utils.Settings(@"0:\System\settings.conf");

            Menu.DispInstallationDialog(50);

            if ((FinalLang.Equals("en_US")) || FinalLang.Equals("en-US"))
            {
                config.PutValue("language", "en_US");
                Menu.DispInstallationDialog(60);
            }
            else if ((FinalLang.Equals("fr_FR")) || FinalLang.Equals("fr-FR"))
            {
                config.PutValue("language", "fr_FR");
                Menu.DispInstallationDialog(60);
            }
            else if ((FinalLang.Equals("nl_NL")) || FinalLang.Equals("nl-NL"))
            {
                config.PutValue("language", "nl_NL");
                Menu.DispInstallationDialog(60);
            }
            else if ((FinalLang.Equals("it_IT")) || FinalLang.Equals("it-IT"))
            {
                config.PutValue("language", "it_IT");
                Menu.DispInstallationDialog(60);
            }

            config.PutValue("hostname", FinalHostname);

            Menu.DispInstallationDialog(70);

            config.PutValue("setuptime", Time.MonthString() + "/" + Time.DayString() + "/" + Time.YearString() + ", " + Time.TimeString(true, true, true));

            config.PutValue("consolemode", "null");

            Menu.DispInstallationDialog(80);

            Kernel.SystemExists = true;

            config.PutValue("debugger", "off");

            foreach (NetworkDevice networkDevice in NetworkDevice.Devices)
            {
                File.Create(@"0:\System\" + networkDevice.Name + ".conf");
                Settings settings = new Settings(@"0:\System\" + networkDevice.Name + ".conf");
                settings.Add("ipaddress", "0.0.0.0");
                settings.Add("subnet", "0.0.0.0");
                settings.Add("gateway", "0.0.0.0");
                settings.Add("dns01", "0.0.0.0");
                settings.Push();
            }

            config.PushValues();

            Menu.DispInstallationDialog(90);

            System.Users.Users.PushUsers();

            Menu.DispInstallationDialog(100);

            Console.ForegroundColor = ConsoleColor.White;
            Console.BackgroundColor = ConsoleColor.Black;

            Run();
        }