From: <cod...@go...> - 2009-04-07 19:41:31
|
Author: M0...@gm... Date: Tue Apr 7 12:34:26 2009 New Revision: 527 Added: branches/speedy/Conf0.class branches/speedy/Conf0.form branches/speedy/Conf0Old.class branches/speedy/Conf0Old.form Modified: branches/speedy/.lang/.pot branches/speedy/.lang/Conf0.pot branches/speedy/.lang/FMain.pot branches/speedy/.lang/MdlBootMngr.pot branches/speedy/.lang/MdlMain.pot branches/speedy/.lang/Step8.pot branches/speedy/.project branches/speedy/FMain.form branches/speedy/MdlBootMngr.module branches/speedy/MdlMain.module branches/speedy/Step1.form branches/speedy/Step7.class branches/speedy/Step8.class Log: - Got bootloader window to work. Modified: branches/speedy/.lang/.pot ============================================================================== --- branches/speedy/.lang/.pot (original) +++ branches/speedy/.lang/.pot Tue Apr 7 12:34:26 2009 @@ -14,108 +14,156 @@ msgid "VectorLinux Installer" msgstr "" -#: Conf0.class:72 Step1.class:433 Step3a1.class:22 Step3a1a.class:186 -#: Step7a.class:143 -msgid "WARNING:" +#: Conf0.class:51 +msgid "Installation found in" msgstr "" -#: Conf0.class:72 -msgid "Selecting this option will bypass your boot manager configuration." +#: Conf0.class:69 +msgid "Include in boot menu" msgstr "" -#: Conf0.class:72 -msgid "" -"You may not be able to start your VectorLinux installation. Do not choose " -"this option" +#: Conf0.class:89 +msgid "Name" msgstr "" -#: Conf0.class:72 -msgid "unless you are fully aware of what you are doing." +#: Conf0.class:107 +msgid "Initial RAM disk image" msgstr "" -#: Conf0.class:129 -msgid "System Bootloader Configuration" +#: Conf0.class:130 +msgid "Kernel boot options" msgstr "" -#: Conf0.class:147 -msgid "Select bootloader to be used" +#: Conf0.class:156 +msgid "Add option to boot this operating system into text mode" msgstr "" -#: Conf0.class:155 -msgid "LILO" +#: Conf0.class:222 Conf0Old.class:67 MdlBootMngr.module:373 +msgid "Standard" msgstr "" -#: Conf0.class:161 -msgid "Grub" +#: Conf0.class:222 Conf0Old.class:67 +msgid "Bootplash Med" msgstr "" -#: Conf0.class:166 -msgid "" -"Select this option if you want to configure your system boot manager " -"manually at a later time" +#: Conf0.class:222 Conf0Old.class:67 MdlBootMngr.module:377 +msgid "Bootsplash High" msgstr "" -#: Conf0.class:168 -msgid "None (Experts Only)" +#: Conf0.class:222 Conf0Old.class:67 MdlBootMngr.module:379 +msgid "Bootsplash Extra High" msgstr "" -#: Conf0.class:176 -msgid "Boot menu options" +#: Conf0.class:352 Conf0Old.class:166 +msgid "System Bootloader Configuration" msgstr "" -#: Conf0.class:187 -msgid "Target" +#: Conf0.class:368 +msgid "Select system boot manager to use" +msgstr "" + +#: Conf0.class:376 Conf0Old.class:192 +msgid "LILO" msgstr "" -#: Conf0.class:193 -msgid "ComboBox1" +#: Conf0.class:381 +msgid "GRUB" msgstr "" -#: Conf0.class:206 -msgid "Video Resolution" +#: Conf0.class:386 +msgid "NONE" msgstr "" -#: Conf0.class:212 -msgid "ComboBox2" +#: Conf0.class:395 +msgid "Boot Menu Options" msgstr "" -#: Conf0.class:224 +#: Conf0.class:405 Conf0Old.class:224 +msgid "Target" +msgstr "" + +#: Conf0.class:417 Conf0Old.class:238 +msgid "Video Resolution" +msgstr "" + +#: Conf0.class:436 Conf0Old.class:257 msgid "Prompt Time Out" msgstr "" -#: Conf0.class:237 +#: Conf0.class:446 Conf0Old.class:270 msgid "Seconds" msgstr "" -#: Conf0.class:250 +#: Conf0.class:452 Conf0Old.class:278 msgid "Boot Default" msgstr "" -#: Conf0.class:268 -msgid "OPERATING SYSTEMS DETECTED" +#: Conf0.class:474 Conf0Old.class:308 +msgid "Tab 0" msgstr "" -#: Conf0.class:279 -msgid "Tab 0" +#: Conf0Old.class:88 Step1.class:433 Step3a1.class:22 Step3a1a.class:186 +#: Step7a.class:143 +msgid "WARNING:" +msgstr "" + +#: Conf0Old.class:88 +msgid "Selecting this option will bypass your boot manager configuration." +msgstr "" + +#: Conf0Old.class:88 +msgid "" +"You may not be able to start your VectorLinux installation. Do not choose " +"this option" +msgstr "" + +#: Conf0Old.class:88 +msgid "unless you are fully aware of what you are doing." +msgstr "" + +#: Conf0Old.class:184 +msgid "Select bootloader to be used" +msgstr "" + +#: Conf0Old.class:198 +msgid "Grub" +msgstr "" + +#: Conf0Old.class:203 +msgid "" +"Select this option if you want to configure your system boot manager " +"manually at a later time" +msgstr "" + +#: Conf0Old.class:205 +msgid "None (Experts Only)" +msgstr "" + +#: Conf0Old.class:213 +msgid "Boot menu options" +msgstr "" + +#: Conf0Old.class:297 +msgid "OPERATING SYSTEMS DETECTED" msgstr "" #: FMain.class:253 FMain0.class:253 msgid "Process Overview" msgstr "" -#: FMain.class:294 FMain0.class:294 +#: FMain.class:293 FMain0.class:294 msgid "Help" msgstr "" -#: FMain.class:307 FMain0.class:307 +#: FMain.class:306 FMain0.class:307 msgid "Back" msgstr "" -#: FMain.class:318 FMain0.class:318 +#: FMain.class:317 FMain0.class:318 msgid "Next" msgstr "" -#: FMain.class:329 FMain0.class:329 +#: FMain.class:328 FMain0.class:329 msgid "Quit" msgstr "" @@ -163,39 +211,39 @@ msgid "Select the location to which we will resize" msgstr "" -#: MdlBootMngr.module:159 -msgid "Installation found in" +#: MdlBootMngr.module:352 +msgid "None" msgstr "" -#: MdlBootMngr.module:177 -msgid "Include in boot menu" +#: MdlBootMngr.module:363 +msgid "MBR Of" msgstr "" -#: MdlBootMngr.module:197 -msgid "Name" +#: MdlBootMngr.module:365 +msgid "Bootsector Of" msgstr "" -#: MdlBootMngr.module:215 -msgid "Initial RAM disk image" +#: MdlBootMngr.module:367 +msgid "Floppy" msgstr "" -#: MdlBootMngr.module:238 -msgid "Kernel boot options" +#: MdlBootMngr.module:375 +msgid "Bootsplash Med" msgstr "" -#: MdlBootMngr.module:264 -msgid "Add option to boot this operating system into text mode" +#: MdlBootMngr.module:445 +msgid "MBR of" msgstr "" -#: MdlBootMngr.module:358 -msgid "None" +#: MdlBootMngr.module:453 +msgid "Bootsector of" msgstr "" -#: MdlMain.module:33 +#: MdlMain.module:34 msgid "Unable to format" msgstr "" -#: MdlMain.module:33 +#: MdlMain.module:34 msgid "to" msgstr "" @@ -215,7 +263,7 @@ msgid "Disk Partitioning" msgstr "" -#: MdlStartUp.module:47 Step8.class:145 +#: MdlStartUp.module:47 Step8.class:147 msgid "Software Selection" msgstr "" @@ -223,7 +271,7 @@ msgid "Installation" msgstr "" -#: MdlStartUp.module:49 Step8.class:228 +#: MdlStartUp.module:49 Step8.class:230 msgid "Installation Summary" msgstr "" @@ -927,7 +975,7 @@ msgid "Not Used" msgstr "" -#: Step6.class:190 Step8.class:80 +#: Step6.class:190 Step8.class:82 msgid "Do not format" msgstr "" @@ -963,7 +1011,7 @@ msgid "Install everthing in the image (Fully Automated)" msgstr "" -#: Step7.class:126 Step8.class:135 +#: Step7.class:126 Step8.class:137 msgid "Customized" msgstr "" @@ -971,7 +1019,7 @@ msgid "Select the components you wish to install (Advanced)" msgstr "" -#: Step7.class:144 Step8.class:137 +#: Step7.class:144 Step8.class:139 msgid "Minimal" msgstr "" @@ -1035,59 +1083,59 @@ "include in your installation." msgstr "" -#: Step8.class:48 +#: Step8.class:50 msgid "Distribution" msgstr "" -#: Step8.class:66 +#: Step8.class:68 msgid "Partitions to be used" msgstr "" -#: Step8.class:81 +#: Step8.class:83 msgid "Not Formatted" msgstr "" -#: Step8.class:81 +#: Step8.class:83 msgid "Mount to" msgstr "" -#: Step8.class:82 +#: Step8.class:84 msgid "Format to" msgstr "" -#: Step8.class:82 +#: Step8.class:84 msgid "and mount to" msgstr "" -#: Step8.class:98 +#: Step8.class:100 msgid "NO SWAP SPACE SELECTED" msgstr "" -#: Step8.class:103 +#: Step8.class:105 msgid "Swap Space" msgstr "" -#: Step8.class:116 +#: Step8.class:118 msgid "Pre-formatted to reiserfs, and used for /" msgstr "" -#: Step8.class:133 +#: Step8.class:135 msgid "Full" msgstr "" -#: Step8.class:140 +#: Step8.class:142 msgid "Installation Method" msgstr "" -#: Step8.class:146 +#: Step8.class:148 msgid "Major Components" msgstr "" -#: Step8.class:156 +#: Step8.class:158 msgid "Additional Software" msgstr "" -#: Step8.class:247 +#: Step8.class:249 msgid "" "Your VectorLinux installation is about to be performed as follows. If you " "need to make any changes, this is your last chance." Modified: branches/speedy/.lang/Conf0.pot ============================================================================== --- branches/speedy/.lang/Conf0.pot (original) +++ branches/speedy/.lang/Conf0.pot Tue Apr 7 12:34:26 2009 @@ -14,83 +14,91 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: Conf0.class:72 -msgid "WARNING:" +#: Conf0.class:51 +msgid "Installation found in" msgstr "" -#: Conf0.class:72 -msgid "Selecting this option will bypass your boot manager configuration." +#: Conf0.class:69 +msgid "Include in boot menu" msgstr "" -#: Conf0.class:72 -msgid "You may not be able to start your VectorLinux installation. Do not choose this option" +#: Conf0.class:89 +msgid "Name" msgstr "" -#: Conf0.class:72 -msgid "unless you are fully aware of what you are doing." +#: Conf0.class:107 +msgid "Initial RAM disk image" msgstr "" -#: Conf0.class:129 -msgid "System Bootloader Configuration" +#: Conf0.class:130 +msgid "Kernel boot options" msgstr "" -#: Conf0.class:147 -msgid "Select bootloader to be used" +#: Conf0.class:156 +msgid "Add option to boot this operating system into text mode" msgstr "" -#: Conf0.class:155 -msgid "LILO" +#: Conf0.class:222 +msgid "Standard" msgstr "" -#: Conf0.class:161 -msgid "Grub" +#: Conf0.class:222 +msgid "Bootplash Med" msgstr "" -#: Conf0.class:166 -msgid "Select this option if you want to configure your system boot manager manually at a later time" +#: Conf0.class:222 +msgid "Bootsplash High" msgstr "" -#: Conf0.class:168 -msgid "None (Experts Only)" +#: Conf0.class:222 +msgid "Bootsplash Extra High" msgstr "" -#: Conf0.class:176 -msgid "Boot menu options" +#: Conf0.class:352 +msgid "System Bootloader Configuration" msgstr "" -#: Conf0.class:187 -msgid "Target" +#: Conf0.class:368 +msgid "Select system boot manager to use" msgstr "" -#: Conf0.class:193 -msgid "ComboBox1" +#: Conf0.class:376 +msgid "LILO" msgstr "" -#: Conf0.class:206 -msgid "Video Resolution" +#: Conf0.class:381 +msgid "GRUB" +msgstr "" + +#: Conf0.class:386 +msgid "NONE" msgstr "" -#: Conf0.class:212 -msgid "ComboBox2" +#: Conf0.class:395 +msgid "Boot Menu Options" msgstr "" -#: Conf0.class:224 +#: Conf0.class:405 +msgid "Target" +msgstr "" + +#: Conf0.class:417 +msgid "Video Resolution" +msgstr "" + +#: Conf0.class:436 msgid "Prompt Time Out" msgstr "" -#: Conf0.class:237 +#: Conf0.class:446 msgid "Seconds" msgstr "" -#: Conf0.class:250 +#: Conf0.class:452 msgid "Boot Default" msgstr "" -#: Conf0.class:268 -msgid "OPERATING SYSTEMS DETECTED" -msgstr "" - -#: Conf0.class:279 +#: Conf0.class:474 msgid "Tab 0" msgstr "" Modified: branches/speedy/.lang/FMain.pot ============================================================================== --- branches/speedy/.lang/FMain.pot (original) +++ branches/speedy/.lang/FMain.pot Tue Apr 7 12:34:26 2009 @@ -18,19 +18,19 @@ msgid "Process Overview" msgstr "" -#: FMain.class:294 +#: FMain.class:293 msgid "Help" msgstr "" -#: FMain.class:307 +#: FMain.class:306 msgid "Back" msgstr "" -#: FMain.class:318 +#: FMain.class:317 msgid "Next" msgstr "" -#: FMain.class:329 +#: FMain.class:328 msgid "Quit" msgstr "" Modified: branches/speedy/.lang/MdlBootMngr.pot ============================================================================== --- branches/speedy/.lang/MdlBootMngr.pot (original) +++ branches/speedy/.lang/MdlBootMngr.pot Tue Apr 7 12:34:26 2009 @@ -14,31 +14,43 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: MdlBootMngr.module:159 -msgid "Installation found in" +#: MdlBootMngr.module:352 +msgid "None" msgstr "" -#: MdlBootMngr.module:177 -msgid "Include in boot menu" +#: MdlBootMngr.module:363 +msgid "MBR Of" msgstr "" -#: MdlBootMngr.module:197 -msgid "Name" +#: MdlBootMngr.module:365 +msgid "Bootsector Of" msgstr "" -#: MdlBootMngr.module:215 -msgid "Initial RAM disk image" +#: MdlBootMngr.module:367 +msgid "Floppy" msgstr "" -#: MdlBootMngr.module:238 -msgid "Kernel boot options" +#: MdlBootMngr.module:373 +msgid "Standard" msgstr "" -#: MdlBootMngr.module:264 -msgid "Add option to boot this operating system into text mode" +#: MdlBootMngr.module:375 +msgid "Bootsplash Med" msgstr "" -#: MdlBootMngr.module:358 -msgid "None" +#: MdlBootMngr.module:377 +msgid "Bootsplash High" +msgstr "" + +#: MdlBootMngr.module:379 +msgid "Bootsplash Extra High" +msgstr "" + +#: MdlBootMngr.module:445 +msgid "MBR of" +msgstr "" + +#: MdlBootMngr.module:453 +msgid "Bootsector of" msgstr "" Modified: branches/speedy/.lang/MdlMain.pot ============================================================================== --- branches/speedy/.lang/MdlMain.pot (original) +++ branches/speedy/.lang/MdlMain.pot Tue Apr 7 12:34:26 2009 @@ -14,11 +14,11 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: MdlMain.module:33 +#: MdlMain.module:34 msgid "Unable to format" msgstr "" -#: MdlMain.module:33 +#: MdlMain.module:34 msgid "to" msgstr "" Modified: branches/speedy/.lang/Step8.pot ============================================================================== --- branches/speedy/.lang/Step8.pot (original) +++ branches/speedy/.lang/Step8.pot Tue Apr 7 12:34:26 2009 @@ -14,79 +14,79 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: Step8.class:48 +#: Step8.class:50 msgid "Distribution" msgstr "" -#: Step8.class:66 +#: Step8.class:68 msgid "Partitions to be used" msgstr "" -#: Step8.class:80 +#: Step8.class:82 msgid "Do not format" msgstr "" -#: Step8.class:81 +#: Step8.class:83 msgid "Not Formatted" msgstr "" -#: Step8.class:81 +#: Step8.class:83 msgid "Mount to" msgstr "" -#: Step8.class:82 +#: Step8.class:84 msgid "Format to" msgstr "" -#: Step8.class:82 +#: Step8.class:84 msgid "and mount to" msgstr "" -#: Step8.class:98 +#: Step8.class:100 msgid "NO SWAP SPACE SELECTED" msgstr "" -#: Step8.class:103 +#: Step8.class:105 msgid "Swap Space" msgstr "" -#: Step8.class:116 +#: Step8.class:118 msgid "Pre-formatted to reiserfs, and used for /" msgstr "" -#: Step8.class:133 +#: Step8.class:135 msgid "Full" msgstr "" -#: Step8.class:135 +#: Step8.class:137 msgid "Customized" msgstr "" -#: Step8.class:137 +#: Step8.class:139 msgid "Minimal" msgstr "" -#: Step8.class:140 +#: Step8.class:142 msgid "Installation Method" msgstr "" -#: Step8.class:145 +#: Step8.class:147 msgid "Software Selection" msgstr "" -#: Step8.class:146 +#: Step8.class:148 msgid "Major Components" msgstr "" -#: Step8.class:156 +#: Step8.class:158 msgid "Additional Software" msgstr "" -#: Step8.class:228 +#: Step8.class:230 msgid "Installation Summary" msgstr "" -#: Step8.class:247 +#: Step8.class:249 msgid "Your VectorLinux installation is about to be performed as follows. If you need to make any changes, this is your last chance." msgstr "" Modified: branches/speedy/.project ============================================================================== --- branches/speedy/.project (original) +++ branches/speedy/.project Tue Apr 7 12:34:26 2009 @@ -6,6 +6,7 @@ Library=gb.gtk Library=gb.form Library=gb.desktop +Library=gb.form.mdi Library=gb.gtk.ext Arguments="en_US" TabSize=2 Added: branches/speedy/Conf0.class ============================================================================== --- (empty file) +++ branches/speedy/Conf0.class Tue Apr 7 12:34:26 2009 @@ -0,0 +1,307 @@ +' Gambas class file +' This file is part of vinstall-ng + +' vinstall-ng is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 2 of the License, or +' (at your option) any later version. + +' vinstall-ng is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. + +' You should have received a copy of the GNU General Public License +' along with vinstall-ng. If not, see <http://www.gnu.org/licenses/>. +'===================================================================================== + +PRIVATE objinitrds AS NEW Object[] +PRIVATE objChecks AS NEW Object[] +PRIVATE objappends AS NEW Object[] +PRIVATE objNames AS NEW Object[] + + +PUBLIC SUB populate_linux_entry(sLinux AS String, sLinuxRoot AS String, objTabStrip AS TabStrip) + + DIM i AS Integer + DIM tb AS TextBox + DIM tl AS TextLabel + DIM cb AS CheckBox + DIM hb AS HBox + DIM comb AS ComboBox + + IF NOT sLinux OR Len(Trim(sLinux)) <= 0 THEN RETURN + 'Message(sLinux) + IF sLinuxRoot = ClsGlobal.sRoot THEN ' This is the just installed linux + i = 0 + WITH objTabStrip + .Index = i + .Text = "VectorLinux" + END WITH + ELSE + i = objTabStrip.Count - 1 + WITH objTabStrip + .Index = i + .Text = sLinux + END WITH + END IF + + tl = NEW TextLabel(objTabStrip) AS "Banner" + WITH tl + .Text = ("Installation found in") & Space(1) & sLinuxRoot + .Height = 24 + .Alignment = Align.Left + .Width = 200 + .Expand = TRUE + '.Border = Border.Plain + '.AutoResize = TRUE + .Move(4, 4) + END WITH + hb = NEW HBox(objTabStrip) ' separator space + WITH hb + .Height = 16 + .Width = 12 + .Expand = TRUE + END WITH + cb = NEW CheckBox(objTabStrip) ' Inlcude/Exclude OS from boot menu + WITH cb + .Expand = TRUE + .Text = ("Include in boot menu") + .Value = TRUE + .Height = 24 + .Tag = sLinuxRoot + END WITH + objChecks.Add(cb) + hb = NEW HBox(objTabStrip) ' separator space + WITH hb + .Height = 12 + .Expand = TRUE + END WITH + hb = NEW HBox(objTabStrip) ' This will hold a few objects of it's own + WITH hb + .Height = 28 + .Expand = TRUE + .Padding = 2 + .Spacing = 2 + END WITH + tl = NEW TextLabel(hb) ' Name label + WITH tl + .Text = ("Name") + .Expand = FALSE + .Width = 200 + .Adjust() + .AutoResize = TRUE + .Height = .Parent.Height + .Alignment = Align.Left + END WITH + tb = NEW TextBox(hb) AS "tbOsLabel" ' Name entry box + WITH tb + .Expand = TRUE + .Height = .Parent.Height + .Text = sLinux ' default to the distro found + .Tag = sLinuxRoot + END WITH + objNames.Add(tb) + tl = NEW TextLabel(hb) ' initrd label + WITH tl + .text = ("Initial RAM disk image") + .Alignment = Align.Right + .Height = .Parent.Height + .Expand = TRUE + END WITH + + comb = NEW ComboBox(hb) ' initrd selection combobox + WITH comb + .Height = .Parent.Height + .Expand = TRUE + .READonly = TRUE + .Tag = sLinuxRoot + END WITH + ' populate the initrd box + 'Message(sLinuxRoot) + MdlBootMngr.find_initrds_for_this_linux(sLinuxRoot, comb) ' populate initrd selection + + objinitrds.Add(comb) + hb = NEW HBox(objTabStrip) ' blank space separator + hb.Height = 8 + hb.Expand = TRUE + tl = NEW TextLabel(objTabStrip) ' append line textlabel + WITH tl + .Text = ("Kernel boot options") + .Height = 24 + .Width = 200 + .Alignment = Align.Left + .Expand = FALSE + .AutoResize = TRUE + END WITH + tb = NEW TextBox(objTabStrip) ' append input line + WITH tb + .Text = "splash=silent" + .Height = 24 + .Expand = TRUE + .Tag = sLinuxRoot + END WITH + objappends.Add(tb) + + ' ======================= ONLY FOR THE OS WE JUST INSTALLED =============================== + IF sLinuxRoot = ClsGlobal.sRoot THEN + hb = NEW HBox(objTabStrip) ' yet another separator + WITH hb + .Expand = TRUE + .Height = 8 + END WITH + cb = NEW CheckBox(objTabStrip) AS "bCLIOption" + WITH cb + .Value = TRUE + .Text = ("Add option to boot this operating system into text mode") + .Height = 24 + .Expand = TRUE + .Tag = sLinuxRoot + END WITH + ' hb = NEW HBox(objTabStrip) + ' hb.Height = 4 + ' hb.Expand = TRUE + + END IF + objTabStrip.Refresh() + + + +END + + + + +PUBLIC SUB List_Other_Linuxes(objTabStrip AS TabStrip) + DIM sDump, sPartitions, sPart AS String + DIM sPartList AS String[] + DIM i AS Integer + DIM sOutcome AS String + + ' objappends = NEW Object[] + ' objChecks = NEW Object[] + ' objinitrds = NEW Object[] + ' objNames = NEW Object[] + ' + MdlBootMngr.bScanned = TRUE + + + ' First, and foremost, we will list the recently isntalled VectorLinux + 'populate_linux_entry("VectorLinux", ClsGlobal.sRoot, objTabStrip) ' This will list the newly isntall VL OS + ' Now list all other linuxes ================================================= + SHELL "probepart | grep \"^/dev\" | grep -vi swap | grep -i linux | tr -s \' \' | cut -f 1 -d \' \'" TO sDump + sDump = Trim(sDump) + IF Len(sDump) <= 0 THEN RETURN ' nothing found, VL is the only distro in this box ... + sPartList = Split(sDump, gb.NewLine) + FOR i = 0 TO sPartList.Max + sPart = Trim(Right(sPartList[i], Len(sPartList[i]) - RInStr(sPartList[i], "/"))) + + sOutcome = MdlBootMngr.Find_Linux(Trim(sPartList[i])) + IF sOutcome AND sOutcome <> "None" THEN + 'INC objTabStrip.Count + objTabStrip.Index = objTabStrip.Count - 1 + populate_linux_entry(sOutcome, Trim(sPartList[i]), objTabStrip) + INC objTabStrip.Count + END IF + 'END IF + + NEXT + DEC objTabStrip.Count ' remove the trailing blank tab from the tabstrip. + + + ' now list all other Windows os's ============================================ + + +END + + +PUBLIC SUB Form_Open() + + WITH ME + .tlbanner.Text = "<h2>" & tlbanner.text & "</h2>" + .cbVidRes.List = [("Standard"), ("Bootplash Med"), ("Bootsplash High"), ("Bootsplash Extra High")] + END WITH +'ME.Fake_Names() + ME.List_Other_Linuxes(ME.TsOsList) + ME.Update_Default_boot_choices() + MdlBootMngr.Display_Bootmanager_Target_Options(ME.cbTarget) + + +END + +PUBLIC FUNCTION GetNext() AS String + + RETURN "Conf1" + +END +PUBLIC SUB OnExit() + + + +END +PUBLIC SUB StartUp() + + + +END + +PUBLIC SUB Fake_Names() + + DIM tb AS TextBox + DIM i AS Integer + + FOR i = 0 TO 2 + TsOsList.Index = i + tb = NEW TextBox(ME.TsOsList) AS "Names" + tb.Height = 28 + tb.Width = 200 + tb.text = "Test" & i + tb.Tag = "Test" & i + objNames.Add(tb) + INC TsOsList.Count + NEXT + +END + +PUBLIC SUB Names_Change() + + + + TsOsList.Current.Text = LAST.text + ME.Update_Default_boot_choices() + + +END +PUBLIC SUB Update_Default_boot_choices() + DIM tb AS TextBox + ME.cbDefBoot.Clear + FOR EACH tb IN objNames + cbDefBoot.Add(tb.text) + NEXT + + +END + +PUBLIC SUB tbOsLabel_Change() + + LAST.text = Replace(LAST.text, " ", "") + IF Len(LAST.text) > 15 THEN + RETURN + END IF + + TsOsList.Current.Text = LAST.text + ME.Update_Default_boot_choices() + +END + + + + +PUBLIC SUB Form_Resize() + + hbox4.Height = ME.ClientH - (hbox4.top + 30) + hbox1.Width = hbox1.Parent.Width - (hbox1.Left * 2) + hbox2.Width = hbox2.Parent.Width - (hbox2.Left * 2) + hbox3.Width = hbox3.Parent.Width - (hbox3.Left * 2) + +END Added: branches/speedy/Conf0.form ============================================================================== --- (empty file) +++ branches/speedy/Conf0.form Tue Apr 7 12:34:26 2009 @@ -0,0 +1,119 @@ +# Gambas Form File 2.0 + +{ Form Form + MoveScaled(0,0,84,51) + Text = ("") + Arrangement = Arrange.Row + Padding = 2 + { HPanel1 HPanel + MoveScaled(0,0,60,5) + Expand = True + { tlbanner TextLabel + MoveScaled(12,0,33,3) + Expand = True + Text = ("System Bootloader Configuration") + } + { Separator1 Separator + MoveScaled(13,4,25,1) + Expand = True + } + } + { HPanel2 HPanel + MoveScaled(0,6,75,9) + Expand = True + { frmSelectLoader Frame + MoveScaled(-1,0,75,8) + Expand = True + Text = ("Select system boot manager to use") + { HBox2 HBox + MoveScaled(1,3,71,3.5) + Expand = True + { RadioButton1 RadioButton + MoveScaled(1,1,12,3.5) + Text = ("LILO") + } + { RadioButton2 RadioButton + MoveScaled(16,1,14,3.5) + Text = ("GRUB") + } + { RadioButton3 RadioButton + MoveScaled(42,1,17,3.5) + Text = ("NONE") + } + } + } + } + { Frame1 Frame + MoveScaled(0,16,75,11) + Expand = True + Text = ("Boot Menu Options") + { HBox1 HBox + MoveScaled(1,2,73,3.5) + Expand = True + Spacing = 2 + Padding = 2 + { lbTarget TextLabel + MoveScaled(1,0,16,3.5) + Text = ("Target") + } + { cbTarget ComboBox + MoveScaled(18,0,25,3.5) + Text = ("") + ReadOnly = True + } + { TextLabel1 TextLabel + MoveScaled(38,0,17,4) + Expand = True + Text = ("Video Resolution") + Alignment = Align.Right + } + { cbVidRes ComboBox + MoveScaled(57,0,25,3.5) + Text = ("") + ReadOnly = True + } + } + { HBox3 HBox + MoveScaled(1,6,74,3.5) + Expand = True + Spacing = 2 + Padding = 2 + { TextLabel2 TextLabel + MoveScaled(1,0,16,3.5) + Text = ("Prompt Time Out") + } + { SpinBox1 SpinBox + MoveScaled(18,0,6,3.5) + } + { TextLabel3 TextLabel + MoveScaled(25,0,11,3.5) + Expand = True + Text = ("Seconds") + Alignment = Align.Left + } + { TextLabel4 TextLabel + MoveScaled(38,0,15,3.5) + Text = ("Boot Default") + Alignment = Align.Right + } + { cbDefBoot ComboBox + MoveScaled(56,0,25,3.5) + Text = ("") + ReadOnly = True + } + } + } + { HBox4 HBox + MoveScaled(1,28,74,20) + Expand = True + Padding = 2 + { TsOsList TabStrip + MoveScaled(1,1,67,17) + Expand = True + Arrangement = Arrange.Row + Index = 0 + Text = ("Tab 0") + Index = 0 + } + } +} Added: branches/speedy/Conf0Old.class ============================================================================== --- (empty file) +++ branches/speedy/Conf0Old.class Tue Apr 7 12:34:26 2009 @@ -0,0 +1,120 @@ +' Gambas class file + +' This file is part of vinstall-ng + +' vinstall-ng is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 2 of the License, or +' (at your option) any later version. + +' vinstall-ng is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. + +' You should have received a copy of the GNU General Public License +' along with vinstall-ng. If not, see <http://www.gnu.org/licenses/>. +'===================================================================================== + + + + +PUBLIC FUNCTION GetNext() AS String + + ClsGlobal.fRunningMainForm.listview1["Step6"].Picture = MdlStartUp.pNow + ClsGlobal.fRunningMainForm.listview1["Step5"].picture = MdlStartUp.pDone + ClsGlobal.fRunningMainForm.listview1["Step4"].picture = MdlStartUp.pDone + + RETURN "Conf1" + + +END +PUBLIC SUB StartUp() + +' MdlBootMngr.Display_Bootmanager_Target_Options() + IF MdlBootMngr.bScanned = FALSE OR NOT MdlBootMngr.bScanned THEN + 'MdlBootMngr.List_Other_Linuxes(ME.TsOSListing) + ME.List_Found_Os_List(ME.TsOsListing) + MdlBootMngr.List_Default_Boot_Choices(ME.cbBootDef) + END IF + + +END + +PUBLIC SUB List_Found_Os_List(objts AS TabStrip) + + MdlBootMngr.List_Other_Linuxes(objts) + +END + + +PUBLIC SUB OnExit() + + + +END + + + +PUBLIC SUB Form_Open() + +' MdlBootMngr.trigger_default_boot_list + + + WITH ME + .tlbanner.Text = "<h2>" & tlbanner.text & "</h2>" + .tlSep.Text = "<b>" & tlsep.Text & "</b>" + .cbVidRes.List = [("Standard"), ("Bootplash Med"), ("Bootsplash High"), ("Bootsplash Extra High")] + END WITH + +END + +PUBLIC SUB Form_Resize() + + ME.HBox2.Width = ME.Frame1.Width - (ME.HBox2.Left * 2) + ME.hbox3.Width = ME.Frame2.Width - (ME.HBox3.Left * 2) + ME.HBox5.Width = ME.Frame2.Width - (ME.hbox5.Left * 2) + ME.HBox6.Width = ME.Width +' ME.TsOsListing.Height = ClsGlobal.fRunningMainForm.pnlstack.height - (ME.TsOsListing.Top + 230) + +END + +PUBLIC SUB rbNone_Click() + + IF LAST.value = TRUE THEN + Message.Warning("<b>" & ("WARNING:") & "</b><br>" & + ("Selecting this option will bypass your boot manager configuration.") & "<br>" & + ("You may not be able to start your VectorLinux installation. Do not choose this option") & "<br>" & + ("unless you are fully aware of what you are doing.")) +END IF + +END + +PUBLIC SUB tlLiloTarget_DblClick() + + Balloon("This is a test" & "<br>" & "This is another string" & "<br><br><br><br><br><br>" & "to see if the baloon has been fixed", cbLiloTarget) + +END + +PUBLIC SUB Form_Menu() + + MdlBootMngr.GENERATE_LILO_HEADER() + +END + +PUBLIC SUB HPanel1_Menu() + + + +END + +PUBLIC SUB tlbanner_Menu() + + +END + +PUBLIC SUB Timer1_Timer() + + MdlBootMngr.List_Default_Boot_Choices(ME.cbBootDef) + +END Added: branches/speedy/Conf0Old.form ============================================================================== --- (empty file) +++ branches/speedy/Conf0Old.form Tue Apr 7 12:34:26 2009 @@ -0,0 +1,137 @@ +# Gambas Form File 2.0 + +{ Form Form + MoveScaled(0,0,84,67) + Text = ("") + Arrangement = Arrange.Row + Padding = 2 + { HPanel1 HPanel + MoveScaled(0,0,60,5) + Expand = True + { tlbanner TextLabel + MoveScaled(12,0,33,3) + Expand = True + Text = ("System Bootloader Configuration") + } + { Separator1 Separator + MoveScaled(13,4,25,1) + Expand = True + } + } + { HBox1 HBox + MoveScaled(0,5,34,1) + Visible = False + Expand = True + } + { Frame1 Frame + MoveScaled(0,6,55,7) + Expand = True + Text = ("Select bootloader to be used") + { HBox2 HBox + MoveScaled(1,3,52,3) + { rbLilo RadioButton + MoveScaled(1,0,11,3) + Expand = True + Text = ("LILO") + } + { rbGrub RadioButton + MoveScaled(14,0,10,3) + Expand = True + Text = ("Grub") + } + { rbNone RadioButton + MoveScaled(26,0,16,3) + ToolTip = ("Select this option if you want to configure your system boot manager manually at a later time") + Expand = True + Text = ("None (Experts Only)") + } + } + } + { Frame2 Frame + MoveScaled(0,14,84,11) + Expand = True + Text = ("Boot menu options") + { HBox3 HBox + MoveScaled(1,2,70,3.5) + Expand = True + Spacing = 4 + Padding = 2 + { tlLiloTarget TextLabel + MoveScaled(1,0,16.25,3) + AutoResize = True + Text = ("Target") + Alignment = Align.Left + } + { cbLiloTarget ComboBox + MoveScaled(11,0,22.5,3) + Text = ("") + ReadOnly = True + } + { TextLabel1 TextLabel + MoveScaled(36,0,15,3) + Expand = True + AutoResize = True + Text = ("Video Resolution") + Alignment = Align.Right + } + { cbVidRes ComboBox + MoveScaled(52,0,22.5,3) + Text = ("") + ReadOnly = True + } + } + { HBox5 HBox + MoveScaled(1,6,78,3.5) + Spacing = 4 + Padding = 2 + { tlTimeOUt TextLabel + MoveScaled(-1,0,16.25,3) + AutoResize = True + Text = ("Prompt Time Out") + Alignment = Align.Left + } + { SbTimeOut SpinBox + MoveScaled(17,0,8,3) + Value = 5 + } + { TextLabel2 TextLabel + MoveScaled(26,0,8,3) + Expand = True + AutoResize = True + Text = ("Seconds") + Alignment = Align.Left + } + { tlBootDef TextLabel + MoveScaled(46,0,15,3) + Expand = True + AutoResize = True + Text = ("Boot Default") + Alignment = Align.Right + } + { cbBootDef ComboBox + MoveScaled(61,0,22.5,3) + Text = ("") + ReadOnly = True + } + } + } + { HBox6 HBox + MoveScaled(16,25,44,3) + Expand = True + { tlSep TextLabel + MoveScaled(5,0,36,3) + Expand = True + Text = ("OPERATING SYSTEMS DETECTED") + Alignment = Align.Center + Border = Border.Etched + } + } + { TsOsListing TabStrip + MoveScaled(1,29,81,36) + Expand = True + Arrangement = Arrange.Row + Index = 0 + Text = ("Tab 0") + Index = 0 + } +} Modified: branches/speedy/FMain.form ============================================================================== --- branches/speedy/FMain.form (original) +++ branches/speedy/FMain.form Tue Apr 7 12:34:26 2009 @@ -50,10 +50,9 @@ MoveScaled(3,34,13,1) } } - { pnlStack Panel - MoveScaled(28,2,50,37) + { pnlStack Workspace + MoveScaled(32,3,37,32) Expand = True - Border = Border.Plain } } { HBox1 HBox Modified: branches/speedy/MdlBootMngr.module ============================================================================== --- branches/speedy/MdlBootMngr.module (original) +++ branches/speedy/MdlBootMngr.module Tue Apr 7 12:34:26 2009 @@ -16,16 +16,15 @@ ' along with vinstall-ng. If not, see <http://www.gnu.org/licenses/>. '==================================================================================================== -PUBLIC objinitrds AS Object[] -PUBLIC objChecks AS Object[] -PUBLIC objappends AS Object[] -PUBLIC objNames AS Object[] - +' PUBLIC objinitrds AS Object[] +' PUBLIC objChecks AS Object[] +' PUBLIC objappends AS Object[] +' PUBLIC objNames AS Object[] PUBLIC bScanned AS Boolean PUBLIC FUNCTION ID_LINUX(sMountedLocation AS String) AS String DIM sRes AS String - + DIM sDump AS String IF Exist(sMountedLocation &/ "etc/arch-release") THEN sRes = "Arch" ELSE IF Exist(sMountedLocation &/ "etc/knoppix-version") THEN @@ -50,7 +49,23 @@ ELSE IF Exist(sMountedLocation &/ "/etc/mandrake-release") THEN sres = "Mandriva" ELSE IF Exist(sMountedLocation &/ "etc/vector-version") THEN - sres = "VectorLinux" + 'sres = "VectorLinux" + 'sDump = File.Load(sMountedLocation &/ "etc/vector-version") + SHELL "cat " & sMountedLocation &/ "etc/vector-version" TO sDump + 'Message(sDump) + IF InStr(sDump, "Light") THEN + sRes = "VL-Light" + ELSE IF InStr(sDump, "Standard") THEN + sRes = "VL-STD" + ELSE IF InStr(sDump, "SOHO") THEN + sRes = "VL-SOHO" + ELSE IF InStr(sDump, "Deluxe") THEN + sRes = "VL-SOHO DLX" + ELSE + sRes = "VectorLinux" + END IF + 'IF InStr sDump LIKE "Light" THEN + ELSE IF Exist(sMountedLocation &/ "etc/slackware-version") THEN sres = "Slackware" ELSE IF Exist(sMountedLocation & "/etc/SuSE-release") THEN @@ -65,32 +80,7 @@ sres = "Linux" END IF - - ' IF Exist(sMountedLocation &/ "etc/vector-version") THEN - ' sres = "VectorLinux" - ' ELSE IF Exist(sMountedLocation &/ "etc/slackware-version") THEN - ' sres = "Slackware" - ' ELSE IF Exist(sMountedLocation &/ "etc/Suse-release") OR Exist(sMountedLocation &/ "UnitiedLinux-release") THEN - ' sres = "SuSE" - ' ELSE IF Exist(sMountedLocation &/ "etc/gentoo-release") THEN - ' sres = "Gentoo" - ' ELSE IF Exist(sMountedLocation &/ "etc/debian_version") THEN - ' SHELL "grep -m 1 cdrom " & sMountedLocation &/ "etc" &/ "apt" &/ "sources.list | cut -d \"[\" -f2 | cut -d \" \" -f 1,2" TO sres - ' IF Len(Trim(sres)) >= 0 THEN - ' sres = Trim(Replace(sres, " ", "_")) - ' ELSE - ' sres = "Debian" - ' END IF - ' ELSE IF Exist(sMountedLocation &/ "etc/mandrake-release") THEN ' this should be mandriva now - ' sres = "Mandrake" - ' ELSE IF Exist(sMountedLocation &/ "etc/redhat-release") THEN - ' sres = "RedHat" - ' ELSE IF Exist(sMountedLocation &/ "etc/fedora-release") THEN - ' sres = "Fedora" - ' ELSE - ' sres = "Linux" - ' - ' END IF + RETURN sres @@ -129,204 +119,208 @@ END -PUBLIC SUB populate_linux_entry(sLinux AS String, sLinuxRoot AS String, objTabStrip AS TabStrip) - - DIM i AS Integer - DIM tb AS TextBox - DIM tl AS TextLabel - DIM cb AS CheckBox - DIM hb AS HBox - DIM comb AS ComboBox - - IF NOT sLinux OR Len(Trim(sLinux)) <= 0 THEN RETURN - 'Message(sLinux) - IF sLinuxRoot = ClsGlobal.sRoot THEN ' This is the just installed linux - i = 0 - WITH objTabStrip - .Index = i - .Text = "VectorLinux" - END WITH - ELSE - i = objTabStrip.Count - 1 - WITH objTabStrip - .Index = i - .Text = sLinux - END WITH - END IF - - tl = NEW TextLabel(objTabStrip) AS "Banner" - WITH tl - .Text = ("Installation found in") & Space(1) & sLinuxRoot - .Height = 24 - .Alignment = Align.Left - .Width = 200 - .Expand = TRUE - '.Border = Border.Plain - '.AutoResize = TRUE - .Move(4, 4) - END WITH - hb = NEW HBox(objTabStrip) ' separator space - WITH hb - .Height = 16 - .Width = 12 - .Expand = TRUE - END WITH - cb = NEW CheckBox(objTabStrip) ' Inlcude/Exclude OS from boot menu - WITH cb - .Expand = TRUE - .Text = ("Include in boot menu") - .Value = TRUE - .Height = 24 - .Tag = sLinuxRoot - END WITH - objChecks.Add(cb) - hb = NEW HBox(objTabStrip) ' separator space - WITH hb - .Height = 12 - .Expand = TRUE - END WITH - hb = NEW HBox(objTabStrip) ' This will hold a few objects of it's own - WITH hb - .Height = 28 - .Expand = TRUE - .Padding = 2 - .Spacing = 2 - END WITH - tl = NEW TextLabel(hb) ' Name label - WITH tl - .Text = ("Name") - .Expand = FALSE - .Width = 200 - .Adjust() - .AutoResize = TRUE - .Height = .Parent.Height - .Alignment = Align.Left - END WITH - tb = NEW TextBox(hb) ' Name entry box - WITH tb - .Expand = TRUE - .Height = .Parent.Height - .Text = sLinux ' default to the distro found - .Tag = sLinuxRoot - END WITH - objNames.Add(tb) - tl = NEW TextLabel(hb) ' initrd label - WITH tl - .text = ("Initial RAM disk image") - .Alignment = Align.Right - .Height = .Parent.Height - .Expand = TRUE - END WITH - - comb = NEW ComboBox(hb) ' initrd selection combobox - WITH comb - .Height = .Parent.Height - .Expand = TRUE - .READonly = TRUE - .Tag = sLinuxRoot - END WITH - ' populate the initrd box - 'Message(sLinuxRoot) - ME.find_initrds_for_this_linux(sLinuxRoot, comb) ' populate initrd selection - - objinitrds.Add(comb) - hb = NEW HBox(objTabStrip) ' blank space separator - hb.Height = 8 - hb.Expand = TRUE - tl = NEW TextLabel(objTabStrip) ' append line textlabel - WITH tl - .Text = ("Kernel boot options") - .Height = 24 - .Width = 200 - .Alignment = Align.Left - .Expand = FALSE - .AutoResize = TRUE - END WITH - tb = NEW TextBox(objTabStrip) ' append input line - WITH tb - .Text = "splash=silent" - .Height = 24 - .Expand = TRUE - .Tag = sLinuxRoot - END WITH - objappends.Add(tb) - - ' ======================= ONLY FOR THE OS WE JUST INSTALLED =============================== - IF sLinuxRoot = ClsGlobal.sRoot THEN - hb = NEW HBox(objTabStrip) ' yet another separator - WITH hb - .Expand = TRUE - .Height = 8 - END WITH - cb = NEW CheckBox(objTabStrip) AS "bCLIOption" - WITH cb - .Value = TRUE - .Text = ("Add option to boot this operating system into text mode") - .Height = 24 - .Expand = TRUE - .Tag = sLinuxRoot - END WITH - ' hb = NEW HBox(objTabStrip) - ' hb.Height = 4 - ' hb.Expand = TRUE - - END IF - objTabStrip.Refresh() - - - -END - - -PUBLIC SUB List_Other_Linuxes(objTabStrip AS TabStrip) ' tell me where you want the results. - - DIM sDump, sPartitions, sPart AS String - DIM sPartList AS String[] - DIM i AS Integer - DIM sOutcome AS String - - objappends = NEW Object[] - objChecks = NEW Object[] - objinitrds = NEW Object[] - objNames = NEW Object[] - - bScanned = TRUE - 'Message(ClsGlobal.sRoot) -' Message(Trim(sPartList[i])) - - ' First, and foremost, we will list the recently isntalled VectorLinux - 'populate_linux_entry("VectorLinux", ClsGlobal.sRoot, objTabStrip) ' This will list the newly isntall VL OS - ' Now list all other linuxes ================================================= - SHELL "probepart | grep \"^/dev\" | grep -vi swap | grep -i linux | tr -s \' \' | cut -f 1 -d \' \'" TO sDump - sDump = Trim(sDump) - IF Len(sDump) <= 0 THEN RETURN ' nothing found, VL is the only distro in this box ... - sPartList = Split(sDump, gb.NewLine) - FOR i = 0 TO sPartList.Max - sPart = Trim(Right(sPartList[i], Len(sPartList[i]) - RInStr(sPartList[i], "/"))) - - 'IF Trim(ClsGlobal.sRoot) <> Trim(sPartList[i]) THEN - 'sOutcome = Find_Linux(Trim(sPartList[i])) - 'Message(sOutcome) - ' will only list the linux IF one IS present - 'IF Trim(sPartList[i]) <> Trim(ClsGlobal.sRoot) THEN - 'IF Find_Linux(Trim(sPartList[i])) <> "None" THEN - sOutcome = Find_Linux(Trim(sPartList[i])) - IF sOutcome AND sOutcome <> "None" THEN - 'INC objTabStrip.Count - objTabStrip.Index = objTabStrip.Count - 1 - populate_linux_entry(sOutcome, Trim(sPartList[i]), objTabStrip) - INC objTabStrip.Count - END IF - 'END IF - - NEXT - DEC objTabStrip.Count ' remove the trailing blank tab from the tabstrip. - - - ' now list all other Windows os's ============================================ - - -END +' PUBLIC SUB populate_linux_entry(sLinux AS String, sLinuxRoot AS String, objTabStrip AS TabStrip) +' +' DIM i AS Integer +' DIM tb AS TextBox +' DIM tl AS TextLabel +' DIM cb AS CheckBox +' DIM hb AS HBox +' DIM comb AS ComboBox +' +' IF NOT sLinux OR Len(Trim(sLinux)) <= 0 THEN RETURN +' 'Message(sLinux) +' IF sLinuxRoot = ClsGlobal.sRoot THEN ' This is the just installed linux +' i = 0 +' WITH objTabStrip +' .Index = i +' .Text = "VectorLinux" +' END WITH +' ELSE +' i = objTabStrip.Count - 1 +' WITH objTabStrip +' .Index = i +' .Text = sLinux +' END WITH +' END IF +' +' tl = NEW TextLabel(objTabStrip) AS "Banner" +' WITH tl +' .Text = ("Installation found in") & Space(1) & sLinuxRoot +' .Height = 24 +' .Alignment = Align.Left +' .Width = 200 +' .Expand = TRUE +' '.Border = Border.Plain +' '.AutoResize = TRUE +' .Move(4, 4) +' END WITH +' hb = NEW HBox(objTabStrip) ' separator space +' WITH hb +' .Height = 16 +' .Width = 12 +' .Expand = TRUE +' END WITH +' cb = NEW CheckBox(objTabStrip) ' Inlcude/Exclude OS from boot menu +' WITH cb +' .Expand = TRUE +' .Text = ("Include in boot menu") +' .Value = TRUE +' .Height = 24 +' .Tag = sLinuxRoot +' END WITH +' objChecks.Add(cb) +' hb = NEW HBox(objTabStrip) ' separator space +' WITH hb +' .Height = 12 +' .Expand = TRUE +' END WITH +' hb = NEW HBox(objTabStrip) ' This will hold a few objects of it's own +' WITH hb +' .Height = 28 +' .Expand = TRUE +' .Padding = 2 +' .Spacing = 2 +' END WITH +' tl = NEW TextLabel(hb) ' Name label +' WITH tl +' .Text = ("Name") +' .Expand = FALSE +' .Width = 200 +' .Adjust() +' .AutoResize = TRUE +' .Height = .Parent.Height +' .Alignment = Align.Left +' END WITH +' tb = NEW TextBox(hb) AS "tbOsLabel" ' Name entry box +' WITH tb +' .Expand = TRUE +' .Height = .Parent.Height +' .Text = sLinux ' default to the distro found +' .Tag = sLinuxRoot +' END WITH +' objNames.Add(tb) +' tl = NEW TextLabel(hb) ' initrd label +' WITH tl +' .text = ("Initial RAM disk image") +' .Alignment = Align.Right +' .Height = .Parent.Height +' .Expand = TRUE +' END WITH +' +' comb = NEW ComboBox(hb) ' initrd selection combobox +' WITH comb +' .Height = .Parent.Height +' .Expand = TRUE +' .READonly = TRUE +' .Tag = sLinuxRoot +' END WITH +' ' populate the initrd box +' 'Message(sLinuxRoot) +' ME.find_initrds_for_this_linux(sLinuxRoot, comb) ' populate initrd selection +' +' objinitrds.Add(comb) +' hb = NEW HBox(objTabStrip) ' blank space separator +' hb.Height = 8 +' hb.Expand = TRUE +' tl = NEW TextLabel(objTabStrip) ' append line textlabel +' WITH tl +' .Text = ("Kernel boot options") +' .Height = 24 +' .Width = 200 +' .Alignment = Align.Left objappends = NEW Object[] + ' objChecks = NEW Object[] + ' objinitrds = NEW Object[] + ' objNames = NEW Object[] + +' .Expand = FALSE +' .AutoResize = TRUE +' END WITH +' tb = NEW TextBox(objTabStrip) ' append input line +' WITH tb +' .Text = "splash=silent" +' .Height = 24 +' .Expand = TRUE +' .Tag = sLinuxRoot +' END WITH +' objappends.Add(tb) +' +' ' ======================= ONLY FOR THE OS WE JUST INSTALLED =============================== +' IF sLinuxRoot = ClsGlobal.sRoot THEN +' hb = NEW HBox(objTabStrip) ' yet another separator +' WITH hb +' .Expand = TRUE +' .Height = 8 +' END WITH +' cb = NEW CheckBox(objTabStrip) AS "bCLIOption" +' WITH cb +' .Value = TRUE +' .Text = ("Add option to boot this operating system into text mode") +' .Height = 24 +' .Expand = TRUE +' .Tag = sLinuxRoot +' END WITH +' ' hb = NEW HBox(objTabStrip) +' ' hb.Height = 4 +' ' hb.Expand = TRUE +' +' END IF +' objTabStrip.Refresh() +' +' +' +' END + + +' PUBLIC SUB List_Other_Linuxes(objTabStrip AS TabStrip) ' tell me where you want the results. + +' DIM sDump, sPartitions, sPart AS String +' DIM sPartList AS String[] +' DIM i AS Integer +' DIM sOutcome AS String +' +' objappends = NEW Object[] +' objChecks = NEW Object[] +' objinitrds = NEW Object[] +' objNames = NEW Object[] +' +' bScanned = TRUE +' 'Message(ClsGlobal.sRoot) +' ' Message(Trim(sPartList[i])) +' +' ' First, and foremost, we will list the recently isntalled VectorLinux +' 'populate_linux_entry("VectorLinux", ClsGlobal.sRoot, objTabStrip) ' This will list the newly isntall VL OS +' ' Now list all other linuxes ================================================= +' SHELL "probepart | grep \"^/dev\" | grep -vi swap | grep -i linux | tr -s \' \' | cut -f 1 -d \' \'" TO sDump +' sDump = Trim(sDump) +' IF Len(sDump) <= 0 THEN RETURN ' nothing found, VL is the only distro in this box ... +' sPartList = Split(sDump, gb.NewLine) +' FOR i = 0 TO sPartList.Max +' sPart = Trim(Right(sPartList[i], Len(sPartList[i]) - RInStr(sPartList[i], "/"))) +' +' 'IF Trim(ClsGlobal.sRoot) <> Trim(sPartList[i]) THEN +' 'sOutcome = Find_Linux(Trim(sPartList[i])) +' 'Message(sOutcome) +' ' will only list the linux IF one IS present +' 'IF Trim(sPartList[i]) <> Trim(ClsGlobal.sRoot) THEN +' 'IF Find_Linux(Trim(sPartList[i])) <> "None" THEN +' sOutcome = Find_Linux(Trim(sPartList[i])) +' IF sOutcome AND sOutcome <> "None" THEN +' 'INC objTabStrip.Count +' objTabStrip.Index = objTabStrip.Count - 1 +' populate_linux_entry(sOutcome, Trim(sPartList[i]), objTabStrip) +' INC objTabStrip.Count +' END IF +' 'END IF +' +' NEXT +' DEC objTabStrip.Count ' remove the trailing blank tab from the tabstrip. +' +' +' ' now list all other Windows os's ============================================ +' +' +' END PUBLIC SUB find_initrds_for_this_linux(sLinuxRoot AS String, object AS ComboBox) @@ -358,5 +352,109 @@ object.Add(("None")) END + +PUBLIC SUB GENERATE_LILO_HEADER() + + DIM sTmp AS String + DIM sTarget, sVidMod, sDefBoot, sVGA, sVidImput, sVidText, sOutput AS String + DIM iTimeOut AS Integer + + sTarget = Trim(Conf0.cbLiloTarget.Text) + IF InStr(sTarget, ("MBR Of")) THEN + sTarget = Right(sTarget, Len(sTarget) - InStr(sTarget, "/") + 1) + ELSE IF sTarget = ("Bootsector Of") & Space(1) & ClsGlobal.sRoot THEN + sTarget = ClsGlobal.sRoot + ELSE IF sTarget = ("Floppy") THEN + sTarget = "/dev/df0" + END IF + + sVidImput = Trim(Conf0.cbVidRes.Text) + SELECT CASE sVidImput + CASE ("Standard") + sVGA = "normal" + CASE ("Bootsplash Med") + svga = "788" + CASE ("Bootsplash High") + svga = "791" + CASE ("Bootsplash Extra High") + svga = "794" + END SELECT + + sVidText = "# VESA framebuffer console @ 1024x768x64k \n" & +"vga = " & sVga & "\n" & +"# Normal VGA console \n" & +"#vga = normal \n" & +"#VESA framebuffer console @ 1024 x768x64k \n" & +"#vga = 791 \n" & +"#VESA framebuffer console @ 1024 x768x32k \n" & +"#vga = 790 \n" & +"#VESA framebuffer console @ 1024 x768x256 \n" & +"#vga = 773 \n" & +"#VESA framebuffer console @ 800 x600x64k \n" & +"#vga = 788 \n" & +"#VESA framebuffer console @ 800 x600x32k \n" & +"#vga = 787 \n" & +"#VESA framebuffer console @ 800 x600x256 \n" & +"#vga = 771 \n" & +"#VESA framebuffer console @ 640 x480x64k \n" & +"#vga = 785 \n" & +"#VESA framebuffer console @ 640 x480x32k \n" & +"#vga = 784 \n" & +"#VESA framebuffer console @ 640 x480x256 \n" & +"#vga = 769 \n" & +"# Begin listing OS Choices \n" + + + + iTimeOut = Conf0.SbTimeOut.Value * 10 + + sOutput = "# LILO Configuration File \n" & + "# Generated by the VectorLinux Installer \n \n" & + "# Begin lilo global configuration \n \n" & + "boot = " & sTarget & "\n" & + "default = " & sDefBoot & "\n" & + "prompt \n" & + "compact \n" & + "timeout = " & iTimeOut & "\n" & + "#\n#\n#\n" & + "# Override dangerous defaults that require the partition table: \n" & + "change-rules \n" & + "reset \n" & + "bitmap = /boot/bitmap/boot.bmp \n" & + "#\n#\n#\n" & + sVidText + + File.Save(Temp("lilo.in"), sOutput) + + 'Message(File.Load(Temp("lilo.in"))) + +END + +PUBLIC SUB Display_Bootmanager_Target_Options(objCB AS ComboBox) + + DIM sList, sTarget, sDump AS String + DIM sListArr AS String[] + DIM i AS Integer + DIM cb, cbl AS ComboBox + + SHELL "probedisk | grep -vi cdrom | cut -f 1 -d \'|\'" TO sList + sList = Trim(sList) + + sListArr = Split(sList, "\n").Sort(gb.Ascent) + FOR i = 0 TO sListArr.Max + sTarget = ("MBR of") & Space(1) & Trim(sListArr[i]) + objCB.Add(Trim(sTarget)) + NEXT + + 'Determine how the root partition was formatted + SHELL "df -hT /mnt/target | tr -s \' \' | grep \"^/dev\" | cut -f 2 -d \' \'" TO sDump + sDump = Trim(sDump) + IF LCase(sDump) <> "xfs" THEN + objCB.Add(("Bootsector of") & Space(1) & ClsGlobal.sRoot) + + END IF + +END + Modified: branches/speedy/MdlMain.module ============================================================================== --- branches/speedy/MdlMain.module (original) +++ branches/speedy/MdlMain.module Tue Apr 7 12:34:26 2009 @@ -16,6 +16,7 @@ ' along with vinstall-ng. If not, see <http://www.gnu.org/licenses/>. + PUBLIC FUNCTION FORMAT_THIS_PARTITION(sPartition AS String, sFilesystem AS String) AS Integer DIM hproc AS Process Modified: branches/speedy/Step1.form ============================================================================== --- branches/speedy/Step1.form (original) +++ branches/speedy/Step1.form Tue Apr 7 12:34:26 2009 @@ -27,10 +27,10 @@ Text = ("Searching your system for installable media") } { HBox1 HBox - MoveScaled(1,3,54,3) + MoveScaled(1,3,54,3.5) Expand = True { ComboBox1 ComboBox - MoveScaled(0,0,22,1) + MoveScaled(0,0,22,3.5) Expand = True Text = ("") ReadOnly = True @@ -40,7 +40,7 @@ Text = ("") } { btRescan Button - MoveScaled(30,0,19,3) + MoveScaled(30,0,19,3.5) Text = ("Search Again") Picture = Picture["icon:/16/refresh"] } Modified: branches/speedy/Step7.class ============================================================================== --- branches/speedy/Step7.class (original) +++ branches/speedy/Step7.class Tue Apr 7 12:34:26 2009 @@ -39,7 +39,7 @@ END PUBLIC SUB StartUp() - + 'ClsGlobal.fRunningMainForm.btnext.enabled = TRUE END PUBLIC SUB OnExit() Modified: branches/speedy/Step8.class ============================================================================== --- branches/speedy/Step8.class (original) +++ branches/speedy/Step8.class Tue Apr 7 12:34:26 2009 @@ -31,12 +31,14 @@ 'ME.SUMMARIZE_DISTRO_INFO() 'ME.SUMMARIZE_PARTITION_SELECTION() + END PUBLIC FUNCTION GetNext() AS String ClsGlobal.fRunningMainForm.listview1["Step4"].Picture = MdlStartUp.pNow ClsGlobal.fRunningMainForm.listview1["Step3"].picture = MdlStartUp.pDone + RETURN "Conf0" |