|
From: <cod...@go...> - 2009-06-09 21:40:15
|
Author: M0...@gm...
Date: Tue Jun 9 14:25:01 2009
New Revision: 559
Added:
branches/speedy/Bulk.class
branches/speedy/MdlInstall.module
branches/speedy/Package.class
Modified:
branches/speedy/.lang/.pot
branches/speedy/.lang/Conf0.pot
branches/speedy/.lang/MdlBootMngr.pot
branches/speedy/.lang/MdlMain.pot
branches/speedy/.lang/Step7.pot
branches/speedy/Conf0.class
branches/speedy/Conf0.form
branches/speedy/MdlBootMngr.module
branches/speedy/MdlMain.module
branches/speedy/Step7.class
Log:
- Debugged installation process
- Debugged bootloader setup step.
- Re-designed the way lilo.conf gets generated.
Modified: branches/speedy/.lang/.pot
==============================================================================
--- branches/speedy/.lang/.pot (original)
+++ branches/speedy/.lang/.pot Tue Jun 9 14:25:01 2009
@@ -14,156 +14,116 @@
msgid "VectorLinux Installer"
msgstr ""
-#: Conf0.class:54
-msgid "Installation found in"
-msgstr ""
-
-#: Conf0.class:72
-msgid "Include in boot menu"
-msgstr ""
-
-#: Conf0.class:92
-msgid "Name"
-msgstr ""
-
-#: Conf0.class:110
-msgid "Initial RAM disk image"
+#: Conf0.class:254
+msgid "Found on"
msgstr ""
-#: Conf0.class:133
-msgid "Kernel boot options"
+#: Conf0.class:258
+msgid "Label"
msgstr ""
-#: Conf0.class:159
-msgid "Add option to boot this operating system into text mode"
+#: Conf0.class:292
+msgid "Include this operating system in boot menu"
msgstr ""
-#: Conf0.class:258
-msgid "Found on"
+#: Conf0.class:364 MdlBootMngr.module:178
+msgid "Standard"
msgstr ""
-#: Conf0.class:262
-msgid "Label"
+#: Conf0.class:364
+msgid "Bootplash Med"
msgstr ""
-#: Conf0.class:277
-msgid "Include this operating system in boot menu"
+#: Conf0.class:364 MdlBootMngr.module:182
+msgid "Bootsplash High"
msgstr ""
-#: Conf0.class:281
-msgid "Make this the default operating system to boot"
+#: Conf0.class:364 MdlBootMngr.module:184
+msgid "Bootsplash Extra High"
msgstr ""
-#: Conf0.class:423 Step1.class:434 Step3a1.class:22 Step3a1a.class:186
+#: Conf0.class:496 Step1.class:434 Step3a1.class:22 Step3a1a.class:186
#: Step7a.class:144
msgid "WARNING:"
msgstr ""
-#: Conf0.class:423
+#: Conf0.class:496
msgid "Selecting this option will bypass your boot manager configuration."
msgstr ""
-#: Conf0.class:423
+#: Conf0.class:496
msgid "You may not be able to start your"
msgstr ""
-#: Conf0.class:423
+#: Conf0.class:496
msgid "installation. Do not choose this option"
msgstr ""
-#: Conf0.class:423
+#: Conf0.class:496
msgid "unless you are fully aware of what you are doing."
msgstr ""
-#: Conf0.class:578
-msgid "Unable to find boot arguments for OS in"
-msgstr ""
-
-#: Conf0.class:586
-msgid "Offer"
-msgstr ""
-
-#: Conf0.class:586
-msgid "as a bootable choice"
-msgstr ""
-
-#: Conf0.class:633
-msgid "Title"
-msgstr ""
-
-#: Conf0.class:655
-msgid "Initial RAM Disk"
-msgstr ""
-
-#: Conf0.class:711
-msgid "Include this Operating System in boot menu"
-msgstr ""
-
-#: Conf0.class:720
-msgid "Boot this operating system by default"
-msgstr ""
-
-#: Conf0.class:814
+#: Conf0.class:895
msgid "Bootsector"
msgstr ""
-#: Conf0.class:816 MdlBootMngr.module:164
+#: Conf0.class:897 MdlBootMngr.module:166
msgid "MBR Of"
msgstr ""
-#: Conf0.class:818 MdlBootMngr.module:170
+#: Conf0.class:899 MdlBootMngr.module:172
msgid "Floppy"
msgstr ""
-#: Conf0.class:872
+#: Conf0.class:984
msgid "System Bootloader Configuration"
msgstr ""
-#: Conf0.class:888
+#: Conf0.class:1000
msgid "Select system boot manager to use"
msgstr ""
-#: Conf0.class:897
+#: Conf0.class:1009
msgid "LILO"
msgstr ""
-#: Conf0.class:904
+#: Conf0.class:1016
msgid "GRUB"
msgstr ""
-#: Conf0.class:910
+#: Conf0.class:1022
msgid "NONE"
msgstr ""
-#: Conf0.class:919
+#: Conf0.class:1031
msgid "Boot Menu Options"
msgstr ""
-#: Conf0.class:929
+#: Conf0.class:1041
msgid "Target"
msgstr ""
-#: Conf0.class:941
+#: Conf0.class:1053
msgid "Video Resolution"
msgstr ""
-#: Conf0.class:960
+#: Conf0.class:1072
msgid "Prompt Time Out"
msgstr ""
-#: Conf0.class:971
+#: Conf0.class:1083
msgid "Seconds"
msgstr ""
-#: Conf0.class:978
+#: Conf0.class:1089
msgid "Boot Default"
msgstr ""
-#: Conf0.class:1001
+#: Conf0.class:1111
msgid "DETECTED OPERATING SYSTEMS."
msgstr ""
-#: Conf0.class:1017
+#: Conf0.class:1127
msgid "Tab 0"
msgstr ""
@@ -256,7 +216,7 @@
msgid "When finished, Click"
msgstr ""
-#: Conf3.class:47 MdlMain.module:652 Step3a1a.class:177 Step3a2.class:359
+#: Conf3.class:47 MdlMain.module:630 Step3a1a.class:177 Step3a2.class:359
#: Step3a3a.class:72 Step5.class:177
msgid "to continue"
msgstr ""
@@ -617,49 +577,37 @@
msgid "Select the location to which we will resize"
msgstr ""
-#: MdlBootMngr.module:152
+#: MdlBootMngr.module:153
msgid "None"
msgstr ""
-#: MdlBootMngr.module:166
+#: MdlBootMngr.module:168
msgid "Bootsector Of"
msgstr ""
-#: MdlBootMngr.module:176
-msgid "Standard"
-msgstr ""
-
-#: MdlBootMngr.module:178
-msgid "Bootsplash Med"
-msgstr ""
-
#: MdlBootMngr.module:180
-msgid "Bootsplash High"
-msgstr ""
-
-#: MdlBootMngr.module:182
-msgid "Bootsplash Extra High"
+msgid "Bootsplash Med"
msgstr ""
-#: MdlBootMngr.module:425
+#: MdlBootMngr.module:418
msgid "MBR of"
msgstr ""
-#: MdlBootMngr.module:433
+#: MdlBootMngr.module:426
msgid "Bootsector of"
msgstr ""
-#: MdlBootMngr.module:482
+#: MdlBootMngr.module:475
msgid "You must select one operating system to be started by default"
msgstr ""
-#: MdlBootMngr.module:500
+#: MdlBootMngr.module:493
msgid ""
"Found duplicate operating system names. Please use unique labels for
each "
"menu entry"
msgstr ""
-#: MdlBootMngr.module:503
+#: MdlBootMngr.module:496
msgid "Check these boxes to make sure they have unique names"
msgstr ""
@@ -683,59 +631,59 @@
msgid "with"
msgstr ""
-#: MdlMain.module:551
+#: MdlMain.module:528
msgid "Preparing system partitions"
msgstr ""
-#: MdlMain.module:553
+#: MdlMain.module:530
msgid "An error occurred while preparing partitions. Unable to continue"
msgstr ""
-#: MdlMain.module:568
+#: MdlMain.module:546
msgid "Error during installation of required software. Unable to continue"
msgstr ""
-#: MdlMain.module:621
+#: MdlMain.module:599
msgid "Unable to install contents of"
msgstr ""
-#: MdlMain.module:621
+#: MdlMain.module:599
msgid "Cannot continue"
msgstr ""
-#: MdlMain.module:652
+#: MdlMain.module:630
msgid "Installation is complete. Click"
msgstr ""
-#: MdlMain.module:654
+#: MdlMain.module:632
msgid "Installation complete... Click"
msgstr ""
-#: MdlMain.module:654
+#: MdlMain.module:632
msgid "to continue."
msgstr ""
-#: MdlMain.module:656
+#: MdlMain.module:634
msgid "Error while installing kernels and initrds"
msgstr ""
-#: MdlMain.module:679
+#: MdlMain.module:657
msgid "Unable to install the components of"
msgstr ""
-#: MdlMain.module:679
+#: MdlMain.module:657
msgid "Unable to continue."
msgstr ""
-#: MdlMain.module:768
+#: MdlMain.module:746
msgid "Installing"
msgstr ""
-#: MdlMain.module:768
+#: MdlMain.module:746
msgid "Part of"
msgstr ""
-#: MdlMain.module:771
+#: MdlMain.module:749
msgid "Error installing"
msgstr ""
@@ -1507,35 +1455,35 @@
msgid "Select Installation Mode"
msgstr ""
-#: Step7.class:146
+#: Step7.class:143
msgid "Full Install"
msgstr ""
-#: Step7.class:156
+#: Step7.class:153
msgid "Install everthing in the image (Fully Automated)"
msgstr ""
-#: Step7.class:164 Step8.class:140
+#: Step7.class:161 Step8.class:140
msgid "Customized"
msgstr ""
-#: Step7.class:174
+#: Step7.class:171
msgid "Select the components you wish to install (Advanced)"
msgstr ""
-#: Step7.class:182 Step8.class:142
+#: Step7.class:179 Step8.class:142
msgid "Minimal"
msgstr ""
-#: Step7.class:192
+#: Step7.class:189
msgid "Install the most minimal working confuguration (For older hardware)"
msgstr ""
-#: Step7.class:205
+#: Step7.class:202
msgid "Include Development Tools"
msgstr ""
-#: Step7.class:218
+#: Step7.class:215
msgid "Include Light-weight graphical environment"
msgstr ""
Modified: branches/speedy/.lang/Conf0.pot
==============================================================================
--- branches/speedy/.lang/Conf0.pot (original)
+++ branches/speedy/.lang/Conf0.pot Tue Jun 9 14:25:01 2009
@@ -14,155 +14,115 @@
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: Conf0.class:54
-msgid "Installation found in"
-msgstr ""
-
-#: Conf0.class:72
-msgid "Include in boot menu"
-msgstr ""
-
-#: Conf0.class:92
-msgid "Name"
-msgstr ""
-
-#: Conf0.class:110
-msgid "Initial RAM disk image"
+#: Conf0.class:254
+msgid "Found on"
msgstr ""
-#: Conf0.class:133
-msgid "Kernel boot options"
+#: Conf0.class:258
+msgid "Label"
msgstr ""
-#: Conf0.class:159
-msgid "Add option to boot this operating system into text mode"
+#: Conf0.class:292
+msgid "Include this operating system in boot menu"
msgstr ""
-#: Conf0.class:258
-msgid "Found on"
+#: Conf0.class:364
+msgid "Standard"
msgstr ""
-#: Conf0.class:262
-msgid "Label"
+#: Conf0.class:364
+msgid "Bootplash Med"
msgstr ""
-#: Conf0.class:277
-msgid "Include this operating system in boot menu"
+#: Conf0.class:364
+msgid "Bootsplash High"
msgstr ""
-#: Conf0.class:281
-msgid "Make this the default operating system to boot"
+#: Conf0.class:364
+msgid "Bootsplash Extra High"
msgstr ""
-#: Conf0.class:423
+#: Conf0.class:496
msgid "WARNING:"
msgstr ""
-#: Conf0.class:423
+#: Conf0.class:496
msgid "Selecting this option will bypass your boot manager configuration."
msgstr ""
-#: Conf0.class:423
+#: Conf0.class:496
msgid "You may not be able to start your"
msgstr ""
-#: Conf0.class:423
+#: Conf0.class:496
msgid "installation. Do not choose this option"
msgstr ""
-#: Conf0.class:423
+#: Conf0.class:496
msgid "unless you are fully aware of what you are doing."
msgstr ""
-#: Conf0.class:578
-msgid "Unable to find boot arguments for OS in"
-msgstr ""
-
-#: Conf0.class:586
-msgid "Offer"
-msgstr ""
-
-#: Conf0.class:586
-msgid "as a bootable choice"
-msgstr ""
-
-#: Conf0.class:633
-msgid "Title"
-msgstr ""
-
-#: Conf0.class:655
-msgid "Initial RAM Disk"
-msgstr ""
-
-#: Conf0.class:711
-msgid "Include this Operating System in boot menu"
-msgstr ""
-
-#: Conf0.class:720
-msgid "Boot this operating system by default"
-msgstr ""
-
-#: Conf0.class:814
+#: Conf0.class:895
msgid "Bootsector"
msgstr ""
-#: Conf0.class:816
+#: Conf0.class:897
msgid "MBR Of"
msgstr ""
-#: Conf0.class:818
+#: Conf0.class:899
msgid "Floppy"
msgstr ""
-#: Conf0.class:872
+#: Conf0.class:984
msgid "System Bootloader Configuration"
msgstr ""
-#: Conf0.class:888
+#: Conf0.class:1000
msgid "Select system boot manager to use"
msgstr ""
-#: Conf0.class:897
+#: Conf0.class:1009
msgid "LILO"
msgstr ""
-#: Conf0.class:904
+#: Conf0.class:1016
msgid "GRUB"
msgstr ""
-#: Conf0.class:910
+#: Conf0.class:1022
msgid "NONE"
msgstr ""
-#: Conf0.class:919
+#: Conf0.class:1031
msgid "Boot Menu Options"
msgstr ""
-#: Conf0.class:929
+#: Conf0.class:1041
msgid "Target"
msgstr ""
-#: Conf0.class:941
+#: Conf0.class:1053
msgid "Video Resolution"
msgstr ""
-#: Conf0.class:960
+#: Conf0.class:1072
msgid "Prompt Time Out"
msgstr ""
-#: Conf0.class:971
+#: Conf0.class:1083
msgid "Seconds"
msgstr ""
-#: Conf0.class:978
+#: Conf0.class:1089
msgid "Boot Default"
msgstr ""
-#: Conf0.class:1001
+#: Conf0.class:1111
msgid "DETECTED OPERATING SYSTEMS."
msgstr ""
-#: Conf0.class:1017
+#: Conf0.class:1127
msgid "Tab 0"
msgstr ""
Modified: branches/speedy/.lang/MdlBootMngr.pot
==============================================================================
--- branches/speedy/.lang/MdlBootMngr.pot (original)
+++ branches/speedy/.lang/MdlBootMngr.pot Tue Jun 9 14:25:01 2009
@@ -14,55 +14,55 @@
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: MdlBootMngr.module:152
+#: MdlBootMngr.module:153
msgid "None"
msgstr ""
-#: MdlBootMngr.module:164
+#: MdlBootMngr.module:166
msgid "MBR Of"
msgstr ""
-#: MdlBootMngr.module:166
+#: MdlBootMngr.module:168
msgid "Bootsector Of"
msgstr ""
-#: MdlBootMngr.module:170
+#: MdlBootMngr.module:172
msgid "Floppy"
msgstr ""
-#: MdlBootMngr.module:176
+#: MdlBootMngr.module:178
msgid "Standard"
msgstr ""
-#: MdlBootMngr.module:178
+#: MdlBootMngr.module:180
msgid "Bootsplash Med"
msgstr ""
-#: MdlBootMngr.module:180
+#: MdlBootMngr.module:182
msgid "Bootsplash High"
msgstr ""
-#: MdlBootMngr.module:182
+#: MdlBootMngr.module:184
msgid "Bootsplash Extra High"
msgstr ""
-#: MdlBootMngr.module:425
+#: MdlBootMngr.module:418
msgid "MBR of"
msgstr ""
-#: MdlBootMngr.module:433
+#: MdlBootMngr.module:426
msgid "Bootsector of"
msgstr ""
-#: MdlBootMngr.module:482
+#: MdlBootMngr.module:475
msgid "You must select one operating system to be started by default"
msgstr ""
-#: MdlBootMngr.module:500
+#: MdlBootMngr.module:493
msgid "Found duplicate operating system names. Please use unique labels
for each menu entry"
msgstr ""
-#: MdlBootMngr.module:503
+#: MdlBootMngr.module:496
msgid "Check these boxes to make sure they have unique names"
msgstr ""
Modified: branches/speedy/.lang/MdlMain.pot
==============================================================================
--- branches/speedy/.lang/MdlMain.pot (original)
+++ branches/speedy/.lang/MdlMain.pot Tue Jun 9 14:25:01 2009
@@ -34,63 +34,63 @@
msgid "with"
msgstr ""
-#: MdlMain.module:551
+#: MdlMain.module:528
msgid "Preparing system partitions"
msgstr ""
-#: MdlMain.module:553
+#: MdlMain.module:530
msgid "An error occurred while preparing partitions. Unable to continue"
msgstr ""
-#: MdlMain.module:568
+#: MdlMain.module:546
msgid "Error during installation of required software. Unable to continue"
msgstr ""
-#: MdlMain.module:621
+#: MdlMain.module:599
msgid "Unable to install contents of"
msgstr ""
-#: MdlMain.module:621
+#: MdlMain.module:599
msgid "Cannot continue"
msgstr ""
-#: MdlMain.module:652
+#: MdlMain.module:630
msgid "Installation is complete. Click"
msgstr ""
-#: MdlMain.module:652
+#: MdlMain.module:630
msgid "to continue"
msgstr ""
-#: MdlMain.module:654
+#: MdlMain.module:632
msgid "Installation complete... Click"
msgstr ""
-#: MdlMain.module:654
+#: MdlMain.module:632
msgid "to continue."
msgstr ""
-#: MdlMain.module:656
+#: MdlMain.module:634
msgid "Error while installing kernels and initrds"
msgstr ""
-#: MdlMain.module:679
+#: MdlMain.module:657
msgid "Unable to install the components of"
msgstr ""
-#: MdlMain.module:679
+#: MdlMain.module:657
msgid "Unable to continue."
msgstr ""
-#: MdlMain.module:768
+#: MdlMain.module:746
msgid "Installing"
msgstr ""
-#: MdlMain.module:768
+#: MdlMain.module:746
msgid "Part of"
msgstr ""
-#: MdlMain.module:771
+#: MdlMain.module:749
msgid "Error installing"
msgstr ""
Modified: branches/speedy/.lang/Step7.pot
==============================================================================
--- branches/speedy/.lang/Step7.pot (original)
+++ branches/speedy/.lang/Step7.pot Tue Jun 9 14:25:01 2009
@@ -18,35 +18,35 @@
msgid "Select Installation Mode"
msgstr ""
-#: Step7.class:146
+#: Step7.class:143
msgid "Full Install"
msgstr ""
-#: Step7.class:156
+#: Step7.class:153
msgid "Install everthing in the image (Fully Automated)"
msgstr ""
-#: Step7.class:164
+#: Step7.class:161
msgid "Customized"
msgstr ""
-#: Step7.class:174
+#: Step7.class:171
msgid "Select the components you wish to install (Advanced)"
msgstr ""
-#: Step7.class:182
+#: Step7.class:179
msgid "Minimal"
msgstr ""
-#: Step7.class:192
+#: Step7.class:189
msgid "Install the most minimal working confuguration (For older hardware)"
msgstr ""
-#: Step7.class:205
+#: Step7.class:202
msgid "Include Development Tools"
msgstr ""
-#: Step7.class:218
+#: Step7.class:215
msgid "Include Light-weight graphical environment"
msgstr ""
Added: branches/speedy/Bulk.class
==============================================================================
--- (empty file)
+++ branches/speedy/Bulk.class Tue Jun 9 14:25:01 2009
@@ -0,0 +1,46 @@
+' 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 $Name AS String
+PRIVATE $Contents AS String[]
+
+PROPERTY Name AS String
+PROPERTY Contents AS String[]
+
+
+PRIVATE FUNCTION Name_Read() AS String
+
+ RETURN $Name
+
+END
+
+PRIVATE SUB Name_Write(Value AS String)
+
+ $Name = Value
+
+END
+
+PRIVATE FUNCTION Contents_Read() AS String[]
+
+ RETURN $Contents
+
+END
+
+PRIVATE SUB Contents_Write(Value AS String[])
+
+ $Contents = Value
+
+END
Modified: branches/speedy/Conf0.class
==============================================================================
--- branches/speedy/Conf0.class (original)
+++ branches/speedy/Conf0.class Tue Jun 9 14:25:01 2009
@@ -15,207 +15,203 @@
' along with vinstall-ng. If not, see <http://www.gnu.org/licenses/>.
'=====================================================================================
-PUBLIC objinitrds AS NEW Object[]
-PUBLIC objChecks AS NEW Object[]
-PUBLIC objappends AS NEW Object[]
-PUBLIC objNames AS NEW Object[]
-PUBLIC objDefOs AS NEW Object[]
-PUBLIC objMenuObjects AS NEW Object[]
-PUBLIC objKernels AS NEW Object[]
+PUBLIC objIncludes AS NEW Object[]
+PUBLIC objLabels AS NEW Object[]
+PUBLIC objAppends 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 = ClsGlobal.sDistroName
- 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 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 = ClsGlobal.sDistroName
+' 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 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()
@@ -255,33 +251,51 @@
ME.TsOsList.Index = ME.TsOsList.Count - 1
TsOsList.Text = entry.Root
tl = NEW TextLabel(TsOsList)
- tl.Text = entry.sLIloLabel & Space(1) & ("Found on") & Space(1) &
entry.Root
+ tl.Text = entry.sGrubLabel & Space(1) & ("Found on") & Space(1) &
entry.Root
tl.Height = 24
tl.Expand = TRUE
tl = NEW TextLabel(ME.TsOsList)
tl.Text = ("Label")
tl.Height = 24
- tl.Width = 100
+ tl.Width = 150
tl.Expand = FALSE
tl.Alignment = Align.Left
tb = NEW TextBox(ME.TsOsList) AS "NameBox"
tb.Height = 24
tb.Expand = TRUE
+ tb.tag = entry.Root
tb.Text = entry.sLIloLabel
+ objLabels.Add(tb)
+
+ ' tl = NEW textlabel(TsOsList)
+ ' tl.text = ("Startup Options")
+ ' tl.Height = 24
+ ' tl.Width = 150
+ ' tl.Expand = FALSE
+ ' tl.Alignment = align.Left
+
+ ' tb = NEW TextBox(ME.TsOsList) AS "BootOptions"
+ ' tb.height = 24
+ ' tb.text = entry.StartupOptions
+ ' tb.tag = entry.Root
+ ' tb.Expand = TRUE
+ ' objappends.Add(tb)
+
chk = NEW CheckBox(ME.TsOsList) AS "IncludeBox"
chk.Height = 24
- chk.Value = entry.Enabled
+ chk.Value = TRUE
+ entry.Enabled = chk.Value
chk.Expand = TRUE
+ chk.Tag = entry.Root
chk.Text = ("Include this operating system in boot menu")
+ objIncludes.Add(chk)
+
- chk = NEW CheckBox(ME.TsOsList) AS "DefOs"
- chk.Expand = TRUE
- chk.Text = ("Make this the default operating system to boot")
- chk.Value = entry.IsDefault
- chk.Height = 24
-
+ IF entry.osType = "linux" THEN
+ TsOsList.Picture = Picture.Load("images/tux.png")
+ END IF
INC ME.TsOsList.Count
@@ -294,14 +308,73 @@
END
+PUBLIC SUB IncludeBox_Click()
+
+ DIM entry AS BootMenuEntry
+ FOR EACH entry IN MdlBootMngr.objMenuEntries
+ IF entry.root = LAST.tag THEN entry.Enabled = LAST.value
+ NEXT
+
+END
+
+
+PUBLIC SUB BootOptions_Change()
+
+ DIM entry AS BootMenuEntry
+ FOR EACH entry IN MdlBootMngr.objMenuEntries
+ IF entry.Root = LAST.tag THEN
+ entry.StartupOptions = LAST.text
+ END IF
+ NEXT
+
+END
+
+
+
+PUBLIC SUB NameBox_KeyRelease()
+
+ DIM entry AS BootMenuEntry
+
+ IF ME.rbLilo.Value = TRUE THEN
+ ' do nt allow spaces
+ IF Key.Text = " " THEN LAST.text = Left(LAST.text, Len(LAST.text) - 1)
+
+ END IF
+
+ FOR EACH entry IN MdlBootMngr.objMenuEntries
+ IF entry.root = LAST.tag THEN
+ entry.Label = LAST.text
+ END IF
+ NEXT
+
+ ME.cbDefBoot.Clear
+ ME.List_Def_Boot_Options()
+
+
+
+
+END
+
+
+
PUBLIC SUB Form_Open()
DIM ent AS BootMenuEntry
- 'MdlBootMngr.CREATE_MENU_ENTRY_OBJECTS()
- FOR EACH ent IN MdlBootMngr.objMenuEntries
- PRINT ent.sGrubLabel & " on " & ent.Root
- NEXT
+
+ ME.cbVidRes.List = [("Standard"), ("Bootplash Med"), ("Bootsplash
High"), ("Bootsplash Extra High")]
+ MdlBootMngr.Display_Bootmanager_Target_Options(ME.cbTarget)
+ ME.List_Def_Boot_Options()
ME.POPULATE_MENU_TABSTRIP()
+ ME.rbLilo_Click()
+END
+
+PUBLIC SUB List_Def_Boot_Options()
+
+DIM entry AS BootMenuEntry
+ FOR EACH entry IN MdlBootMngr.objMenuEntries
+ ME.cbDefBoot.Add(entry.Label)
+ NEXT
+
END
@@ -313,13 +386,13 @@
PUBLIC SUB OnExit()
IF rbNone.Value = TRUE THEN RETURN
-
- IF MdlBootMngr.CHECK_LILO_VALUES(FALSE) > 0 THEN
- RETURN
- STOP EVENT
- END IF
+ '
+ ' IF MdlBootMngr.CHECK_LILO_VALUES(FALSE) > 0 THEN
+ ' RETURN
+ ' STOP EVENT
+ ' END IF
MdlBootMngr.GENERATE_LILO_HEADER()
- MdlBootMngr.GENERATE_LILO_OS_LIST()
+ 'MdlBootMngr.GENERATE_LILO_OS_LIST()
' after that's done, we need to run lilo. The config file has already
been saved to /mnt/target/etc/lilo.conf
IF Exist(ClsGlobal.sTargetPath &/ "etc" &/ "lilo.conf") THEN
MdlBootMngr.SETUP_LILO_BOOT_MANAGER()
@@ -337,23 +410,23 @@
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 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()
@@ -364,15 +437,15 @@
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 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()
@@ -445,20 +518,28 @@
END
PUBLIC SUB rbLilo_Click()
- DIM i AS Integer
- DIM $ob AS Object
- ME.Toggle_window_controls(TRUE)
-
- FOR i = 0 TO TsOsList.Count - 1
- FOR EACH $ob IN TsOsList[i].Children
- $ob.Delete
+ DIM entry AS BootMenuEntry
+ DIM tb AS TextBox
+ IF MdlBootMngr.objMenuEntries THEN
+ FOR EACH entry IN MdlBootMngr.objMenuEntries
+ entry.Label = Replace(entry.Label, " ", "")
+ entry.Label = Trim(entry.Label)
+ entry.Label = Left(entry.Label, 15)
+ FOR EACH tb IN objLabels
+ IF tb.tag = entry.root THEN
+ tb.Text = entry.Label
+ tb.MaxLength = 15
+ END IF
NEXT
-
- TRY TsOsList[i].Delete
NEXT
- TsOsList.Count = 1
- ME.PROBE_SYSTEM_FOR_OS(LCase(LAST.text))
- Timer1.Enabled = TRUE
+
+ FOR EACH tb IN objLabels
+ tb.Text = Replace(tb.Text, " ", "")
+ NEXT
+ END IF
+
+
+
END
@@ -536,244 +617,244 @@
END
-PUBLIC SUB PROBE_SYSTEM_FOR_OS(sBootManager AS String)
-
- DIM sDump, sOs, sRoot, sLongDesc, sType, sTitle AS String
- DIM i AS Integer
- DIM sOsList, sOsLine, sBootLine, sDumparr AS String[]
- DIM sKernel, sInitrd, sAppendLine AS String
- DIM sBootargs AS String
- DIM entry AS BootMenuEntry
-
- SHELL "/bin/os-prober > /tmp/os.lst" WAIT
-
- sOsList = Split(Trim(File.Load("/tmp/os.lst")), gb.NewLine)
- FOR i = 0 TO sOsList.Max
- TsOsList.Index = TsOsList.Count - 1
- sOsLine = Split(Trim(sOsList[i]), ":")
- sType = Trim(sOsLine[3])
- sLongDesc = Trim(sOsLine[1])
- sOs = Trim(sOsLine[2])
- sRoot = Trim(sOsLine[0])
- IF sBootManager LIKE "lilo" THEN
- sTitle = sOs
- ELSE
- sTitle = sLongDesc
- END IF
-
- ' Message(sLongDesc & " was found in " & sRoot)
- ' -= NOW I NEED TO GET THE KERNEL, INITRD AND APPEND LINES FOR
THIS OS. =-
- IF sType LIKE "linux" THEN
- ' this function will return an array separated by "," in this
order
- ' /path/to/kernel, /path/to/initrd, appendline here
- SHELL "/bin/linux-boot-prober " & sRoot & "
>/tmp/bootargs.lst" WAIT ' we need to hunt these arguments for every OS
found
- sBootargs = MdlBootMngr.Get_OS_Boot_Params(sRoot)
- IF NOT (sBootargs) THEN
- DEBUG "Attempting to detect boot parameters for " & sRoot
- sBootargs = ME.determine_boot_parameters(sRoot) ' manually
search for boot parameters.
- END IF
-
- IF NOT (sBootargs) THEN
- '= CAN NOT FIND BOOT ARGUMENTS FOR THIS OS ='
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< DO SOMETHING ABOUT THIS.... WE NEED
TO FIND THESE VALUES IN CASE THE PROBER FAILS >>>>>>>>>>>>>>>>>>>>>>>>>>>>
- PRINT ("Unable to find boot arguments for OS in") &
Space(1) & sRoot
- PRINT "WARNING: default values filled in... this might
not work"
- 'RETURN
- ELSE
- sBootLine = Split(sbootargs, ",")
- sKernel = sBootLine[0]
- sInitrd = sBootLine[1]
- sAppendLine = sBootLine[2]
- PRINT ("Offer") & Space(1) & sTitle & Space(1) & ("as a
bootable choice")
- PRINT " --\\ Kernel=" & sKernel
- PRINT " --\\ Initrd=" & sInitrd
- PRINT " --\\ Root=" & sRoot
- 'print " --\ Options=" &
-
- END IF
- TsOsList.Current.Text = sRoot
- Populate_linux_tab(sRoot, sTitle, sKernel, sInitrd,
sAppendLine, sBootManager)
- ' create object for global configuration
- entry = NEW BootMenuEntry
- entry.Enabled = TRUE
- entry.Root = sRoot
- entry.Label = sTitle
- entry.kernel = skernel
- entry.initrd = sInitrd
- entry.StartupOptions = sAppendLine
-
- MdlBootMngr.objMenuEntries.Add(entry) ' add this to the
global variable
- INC TsOsList.Count
-
- END IF
-
- NEXT
-TRY DEC TsOsList.Count ' remove trailing empty tab
-END
-
-PUBLIC SUB Populate_linux_tab($OsRoot AS String, $Title AS String, $kernel
AS String, $initrd AS String, $appendline AS String, sBootLoader AS String)
-
- DIM $tb AS TextBox
- DIM $tl AS textlabel
- DIM $cb AS ComboBox
- DIM $cont AS HBox
- DIM $chk AS CheckBox
-
-
- $cont = NEW HBox(ME.TsOsList)
- $cont.Height = 12
- $cont.Expand = TRUE
- $cont = NEW HBox(ME.TsOsList)
- $cont.Height = 28
- $cont.Expand = TRUE
- $cont.Spacing = 4
- $cont.Padding = 2
-
- $tl = NEW TextLabel($cont)
- WITH $tl
- .text = ("Title") '--------------- title label -----------
- .Expand = FALSE
- .height = 28
- .Width = 64
- .Alignment = Align.Left
- END WITH
- $tb = NEW TextBox($cont) AS "OsNameBox" ' ------------ Title text box
------------
- WITH $tb
- .Height = 28
- .Tag = $OsRoot
- .Expand = TRUE
- .Text = $Title
- IF sBootLoader LIKE "lilo" THEN
- .MaxLength = 15
- ELSE
- .MaxLength = 64
- END IF
- END WITH
- objNames.Add($tb)
- $tl = NEW TextLabel($cont) '---------------------------- initrd label
-------------
- WITH $tl
- .Height = 28
- .Text = ("Initial RAM Disk")
- .Alignment = Align.Left
- .Width = 150
- .Expand = FALSE
- END WITH
- $cb = NEW ComboBox($cont) '-------------------------- initrd combobox
--------------
- WITH $cb
- .ReadOnly = TRUE
- .Tag = $OsRoot
- .List = [$initrd]
- .Height = 28
- .Expand = FALSE
- .Width = 200
- END WITH
- objinitrds.Add($cb)
- $cont = NEW HBox(TsOsList) ' --------------------------- new container
(hbox) ----------
- $cont.Height = 28
- $cont.Expand = TRUE
-
- $tl = NEW TextLabel($cont) ' ------------------------ append label
(holds the kernel path (hidden))----------------------
- WITH $tl
- .Text = ("Kernel boot options")
- .Width = 150
- .Height = 28
- .Name = $OsRoot
- .Expand = FALSE
- .Tag = $kernel ' set the kernel path here..
- .Alignment = Align.Left
- END WITH
- objKernels.Add($tl)
- $tb = NEW TextBox($cont)
- WITH $tb
- .Height = 28
- .Tag = $OsRoot
- IF InStr($AppendLine, "append") THEN
- .Text = Right($appendline, Len($appendline) - Len("append"))
-
- ELSE
- .Text = $appendline
- END IF
- .Text = Trim(Replace(.Text, "\"", ""))
- IF Left(Trim(.Text)) = "=" THEN
- .Text = Right(.Text, Len(.Text) - 1)
- END IF
- .Text = Trim(.Text)
-
- .Expand = TRUE
- END WITH
- objappends.Add($tb)
-
- $chk = NEW CheckBox(TsOsList) AS "IncludeOs"
- WITH $chk
- .Expand = TRUE
- .Value = TRUE
- .Height = 28
- .Tag = $OsRoot
- .Text = ("Include this Operating System in boot menu")
- END WITH
- objMenuObjects.Add($chk) ' Add to array of bootable OS's
- $chk = NEW CheckBox(TsOsList) AS "DefOS"
- WITH $chk
- .Expand = TRUE
- .Value = FALSE
- .Height = 28
- .Tag = $OsRoot
- .Text = ("Boot this operating system by default")
- END WITH
- objDefOs.Add($chk)
-
-
-
-END
+' PUBLIC SUB PROBE_SYSTEM_FOR_OS(sBootManager AS String)
+'
+' DIM sDump, sOs, sRoot, sLongDesc, sType, sTitle AS String
+' DIM i AS Integer
+' DIM sOsList, sOsLine, sBootLine, sDumparr AS String[]
+' DIM sKernel, sInitrd, sAppendLine AS String
+' DIM sBootargs AS String
+' DIM entry AS BootMenuEntry
+'
+' SHELL "/bin/os-prober > /tmp/os.lst" WAIT
+'
+' sOsList = Split(Trim(File.Load("/tmp/os.lst")), gb.NewLine)
+' FOR i = 0 TO sOsList.Max
+' TsOsList.Index = TsOsList.Count - 1
+' sOsLine = Split(Trim(sOsList[i]), ":")
+' sType = Trim(sOsLine[3])
+' sLongDesc = Trim(sOsLine[1])
+' sOs = Trim(sOsLine[2])
+' sRoot = Trim(sOsLine[0])
+' IF sBootManager LIKE "lilo" THEN
+' sTitle = sOs
+' ELSE
+' sTitle = sLongDesc
+' END IF
+'
+' ' Message(sLongDesc & " was found in " & sRoot)
+' ' -= NOW I NEED TO GET THE KERNEL, INITRD AND APPEND LINES FOR
THIS OS. =-
+' IF sType LIKE "linux" THEN
+' ' this function will return an array separated by "," in
this order
+' ' /path/to/kernel, /path/to/initrd, appendline here
+' SHELL "/bin/linux-boot-prober " & sRoot & "
>/tmp/bootargs.lst" WAIT ' we need to hunt these arguments for every OS
found
+' sBootargs = MdlBootMngr.Get_OS_Boot_Params(sRoot)
+' IF NOT (sBootargs) THEN
+' DEBUG "Attempting to detect boot parameters for " & sRoot
+' sBootargs = ME.determine_boot_parameters(sRoot) '
manually search for boot parameters.
+' END IF
+'
+' IF NOT (sBootargs) THEN
+' '= CAN NOT FIND BOOT ARGUMENTS FOR THIS OS ='
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< DO SOMETHING ABOUT THIS.... WE NEED
TO FIND THESE VALUES IN CASE THE PROBER FAILS >>>>>>>>>>>>>>>>>>>>>>>>>>>>
+' PRINT ("Unable to find boot arguments for OS in") &
Space(1) & sRoot
+' PRINT "WARNING: default values filled in... this might
not work"
+' 'RETURN
+' ELSE
+' sBootLine = Split(sbootargs, ",")
+' sKernel = sBootLine[0]
+' sInitrd = sBootLine[1]
+' sAppendLine = sBootLine[2]
+' PRINT ("Offer") & Space(1) & sTitle & Space(1) & ("as a
bootable choice")
+' PRINT " --\\ Kernel=" & sKernel
+' PRINT " --\\ Initrd=" & sInitrd
+' PRINT " --\\ Root=" & sRoot
+' 'print " --\ Options=" &
+'
+' END IF
+' TsOsList.Current.Text = sRoot
+' Populate_linux_tab(sRoot, sTitle, sKernel, sInitrd,
sAppendLine, sBootManager)
+' ' create object for global configuration
+' entry = NEW BootMenuEntry
+' entry.Enabled = TRUE
+' entry.Root = sRoot
+' entry.Label = sTitle
+' entry.kernel = skernel
+' entry.initrd = sInitrd
+' entry.StartupOptions = sAppendLine
+'
+' MdlBootMngr.objMenuEntries.Add(entry) ' add this to
the global variable
+' INC TsOsList.Count
+'
+' END IF
+'
+' NEXT
+' TRY DEC TsOsList.Count ' remove trailing empty tab
+' END
-PUBLIC SUB DefOS_Click()
-
- DIM cb AS CheckBox
- DIM tb AS TextBox
- DIM entry AS BootMenuEntry
-
- IF objDefOs.Count > 1 THEN
- FOR EACH cb IN objDefOs
- IF cb <> LAST THEN cb.Value = FALSE
- NEXT
- END IF
- FOR EACH tb IN objNames
- IF tb.Tag = LAST.tag THEN
- 'cbDefBoot.Tag = tb.Text
- ClsGlobal.sDefBoot = tb.Text
- END IF
- NEXT
- 'END IF
- IF LAST.value = FALSE THEN
- FOR EACH tb IN objNames
- IF tb.Tag = LAST.tag THEN
- IF cbDefBoot.Tag = tb.Text THEN
- IF ClsGlobal.sDefBoot = tb.Text THEN ClsGlobal.sDefBoot = ""
- ' cbDefBoot.Tag = ""
- END IF
- END IF
- NEXT
- END IF
-
- FOR EACH entry IN MdlBootMngr.objMenuEntries
- entry.IsDefault = FALSE
- NEXT
-
- IF LAST.value = TRUE THEN
- FOR EACH entry IN MdlBootMngr.objMenuEntries
- IF entry.root = LAST.tag THEN
- entry.IsDefault = TRUE
- ELSE
- entry.IsDefault = FALSE
- END IF
- NEXT
- ELSE
- FOR EACH entry IN MdlBootMngr.objMenuEntries
- IF entry.root = LAST.tag THEN entry.IsDefault = FALSE
- NEXT
- END IF
-
+' PUBLIC SUB Populate_linux_tab($OsRoot AS String, $Title AS String,
$kernel AS String, $initrd AS String, $appendline AS String, sBootLoader AS
String)
+'
+' DIM $tb AS TextBox
+' DIM $tl AS textlabel
+' DIM $cb AS ComboBox
+' DIM $cont AS HBox
+' DIM $chk AS CheckBox
+'
+'
+' $cont = NEW HBox(ME.TsOsList)
+' $cont.Height = 12
+' $cont.Expand = TRUE
+' $cont = NEW HBox(ME.TsOsList)
+' $cont.Height = 28
+' $cont.Expand = TRUE
+' $cont.Spacing = 4
+' $cont.Padding = 2
+'
+' $tl = NEW TextLabel($cont)
+' WITH $tl
+' .text = ("Title") '--------------- title label -----------
+' .Expand = FALSE
+' .height = 28
+' .Width = 64
+' .Alignment = Align.Left
+' END WITH
+' $tb = NEW TextBox($cont) AS "OsNameBox" ' ------------ Title text
box ------------
+' WITH $tb
+' .Height = 28
+' .Tag = $OsRoot
+' .Expand = TRUE
+' .Text = $Title
+' IF sBootLoader LIKE "lilo" THEN
+' .MaxLength = 15
+' ELSE
+' .MaxLength = 64
+' END IF
+' END WITH
+' objNames.Add($tb)
+' $tl = NEW TextLabel($cont) '---------------------------- initrd
label -------------
+' WITH $tl
+' .Height = 28
+' .Text = ("Initial RAM Disk")
+' .Alignment = Align.Left
+' .Width = 150
+' .Expand = FALSE
+' END WITH
+' $cb = NEW ComboBox($cont) '-------------------------- initrd
combobox --------------
+' WITH $cb
+' .ReadOnly = TRUE
+' .Tag = $OsRoot
+' .List = [$initrd]
+' .Height = 28
+' .Expand = FALSE
+' .Width = 200
+' END WITH
+' objinitrds.Add($cb)
+' $cont = NEW HBox(TsOsList) ' --------------------------- new
container (hbox) ----------
+' $cont.Height = 28
+' $cont.Expand = TRUE
+'
+' $tl = NEW TextLabel($cont) ' ------------------------ append label
(holds the kernel path (hidden))----------------------
+' WITH $tl
+' .Text = ("Kernel boot options")
+' .Width = 150
+' .Height = 28
+' .Name = $OsRoot
+' .Expand = FALSE
+' .Tag = $kernel ' set the kernel path here..
+' .Alignment = Align.Left
+' END WITH
+' objKernels.Add($tl)
+' $tb = NEW TextBox($cont)
+' WITH $tb
+' .Height = 28
+' .Tag = $OsRoot
+' IF InStr($AppendLine, "append") THEN
+' .Text = Right($appendline, Len($appendline) - Len("append"))
+'
+' ELSE
+' .Text = $appendline
+' END IF
+' .Text = Trim(Replace(.Text, "\"", ""))
+' IF Left(Trim(.Text)) = "=" THEN
+' .Text = Right(.Text, Len(.Text) - 1)
+' END IF
+' .Text = Trim(.Text)
+'
+' .Expand = TRUE
+' END WITH
+' objappends.Add($tb)
+'
+' $chk = NEW CheckBox(TsOsList) AS "IncludeOs"
+' WITH $chk
+' .Expand = TRUE
+' .Value = TRUE
+' .Height = 28
+' .Tag = $OsRoot
+' .Text = ("Include this Operating System in boot menu")
+' END WITH
+' objMenuObjects.Add($chk) ' Add to array of bootable OS's
+' $chk = NEW CheckBox(TsOsList) AS "DefOS"
+' WITH $chk
+' .Expand = TRUE
+' .Value = FALSE
+' .Height = 28
+' .Tag = $OsRoot
+' .Text = ("Boot this operating system by default")
+' END WITH
+' objDefOs.Add($chk)
+'
+'
+'
+' END
-END
+' PUBLIC SUB DefOS_Click()
+'
+' DIM cb AS CheckBox
+' DIM tb AS TextBox
+' DIM entry AS BootMenuEntry
+'
+' IF objDefOs.Count > 1 THEN
+' FOR EACH cb IN objDefOs
+' IF cb <> LAST THEN cb.Value = FALSE
+' NEXT
+' END IF
+' FOR EACH tb IN objNames
+' IF tb.Tag = LAST.tag THEN
+' 'cbDefBoot.Tag = tb.Text
+' ClsGlobal.sDefBoot = tb.Text
+' END IF
+' NEXT
+' 'END IF
+' IF LAST.value = FALSE THEN
+' FOR EACH tb IN objNames
+' IF tb.Tag = LAST.tag THEN
+' IF cbDefBoot.Tag = tb.Text THEN
+' IF ClsGlobal.sDefBoot = tb.Text THEN ClsGlobal.sDefBoot = ""
+' ' cbDefBoot.Tag = ""
+' END IF
+' END IF
+' NEXT
+' END IF
+'
+' FOR EACH entry IN MdlBootMngr.objMenuEntries
+' entry.IsDefault = FALSE
+' NEXT
+'
+' IF LAST.value = TRUE THEN
+' FOR EACH entry IN MdlBootMngr.objMenuEntries
+' IF entry.root = LAST.tag THEN
+' entry.IsDefault = TRUE
+' ELSE
+' entry.IsDefault = FALSE
+' END IF
+' NEXT
+' ELSE
+' FOR EACH entry IN MdlBootMngr.objMenuEntries
+' IF entry.root = LAST.tag THEN entry.IsDefault = FALSE
+' NEXT
+' END IF
+'
+'
+' END
PUBLIC SUB TLoSlIST_MouseDown()
@@ -781,23 +862,23 @@
END
-PUBLIC SUB OsNameBox_KeyRelease()
-
- DIM cb AS CheckBox
- DIM menu AS BootMenuEntry
- FOR EACH cb IN objDefOs
- IF cb.Value = TRUE THEN
- IF cb.Tag = LAST.tag THEN ' we are modifying the default OS value
- cbDefBoot.Tag = LAST.text
- END IF
- END IF
- NEXT
- FOR EACH menu IN MdlBootMngr.objMenuEntries
- IF menu.Root = LAST.tag THEN
- menu.Label = LAST.text
- END IF
- NEXT
-END
+' PUBLIC SUB OsNameBox_KeyRelease()
+'
+' DIM cb AS CheckBox
+' DIM menu AS BootMenuEntry
+' FOR EACH cb IN objDefOs
+' IF cb.Value = TRUE THEN
+' IF cb.Tag = LAST.tag THEN ' we are modifying the default OS value
+' cbDefBoot.Tag = LAST.text
+' END IF
+' END IF
+' NEXT
+' FOR EACH menu IN MdlBootMngr.objMenuEntries
+' IF menu.Root = LAST.tag THEN
+' menu.Label = LAST.text
+' END IF
+' NEXT
+' END
PUBLIC SUB Timer1_Timer()
@@ -822,3 +903,34 @@
END
+
+PUBLIC SUB TextLabel4_MouseDown()
+
+
+
+END
+
+PUBLIC SUB cbDefBoot_Click()
+
+ DIM entry AS BootMenuEntry
+ FOR EACH entry IN MdlBootMngr.objMenuEntries
+ entry.IsDefault = FALSE
+ NEXT
+
+ FOR EACH entry IN MdlBootMngr.objMenuEntries
+ IF entry.Label = Trim(LAST.text) THEN
+ entry.IsDefault = TRUE
+ 'PRINT "Default OS is now set to " & entry.Label
+ END IF
+ NEXT
+
+
+
+
+END
+
+PUBLIC SUB cbVidRes_Click()
+
+ MdlBootMngr.sVidMode = LAST.text
+
+END
Modified: branches/speedy/Conf0.form
==============================================================================
--- branches/speedy/Conf0.form (original)
+++ branches/speedy/Conf0.form Tue Jun 9 14:25:01 2009
@@ -98,13 +98,11 @@
}
{ TextLabel4 TextLabel
MoveScaled(38,0,15,3.5)
- Visible = False
Text = ("Boot Default")
Alignment = Align.Right
}
{ cbDefBoot ComboBox
MoveScaled(56,0,25,3.5)
- Visible = False
Text = ("")
ReadOnly = True
}
Modified: branches/speedy/MdlBootMngr.module
==============================================================================
--- branches/speedy/MdlBootMngr.module (original)
+++ branches/speedy/MdlBootMngr.module Tue Jun 9 14:25:01 2009
@@ -22,6 +22,7 @@
' PUBLIC objNames AS Object[]
PRIVATE $chroot AS Process
PUBLIC bScanned AS Boolean
+PUBLIC sVidMode AS String
PUBLIC objMenuEntries AS NEW Object[]
PUBLIC FUNCTION ID_LINUX(sMountedLocation AS String) AS String
@@ -159,6 +160,7 @@
DIM sTarget, sVidMod, sDefBoot, sVGA, sVidImput, sVidText, sOutput AS
String
DIM iTimeOut AS Integer
DIM sOsList AS String
+ DIM entry AS BootMenuEntry
sTarget = Trim(ClsGlobal.BootMngrTarget)
IF InStr(sTarget, ("MBR Of")) THEN
@@ -171,10 +173,10 @@
sTarget = "/dev/df0"
END IF
- sVidImput = Trim(Conf0.cbVidRes.Text)
+ sVidImput = Trim(ME.sVidMode)
SELECT CASE sVidImput
CASE ("Standard")
- sVGA = "normal"
+ svga = "normal"
CASE ("Bootsplash Med")
svga = "788"
CASE ("Bootsplash High")
@@ -184,7 +186,7 @@
END SELECT
sVidText = "# VESA framebuffer console @ 1024x768x64k \n" &
-"vga = " & sVga & "\n" &
+"vga = " & svga & "\n" &
"# Normal VGA console \n" &
"#vga = normal \n" &
"#VESA framebuffer console @ 1024 x768x64k \n" &
@@ -205,10 +207,18 @@
"#vga = 784 \n" &
"#VESA framebuffer console @ 640 x480x256 \n" &
"#vga = 769 \n" &
-"# Begin listing OS Choices \n" & gb.NewLine
+"# Begin listing OS Choices \n"
- sOsList = ME.get_Final_OS_list_for_lilo()
- sDefBoot = ClsGlobal.sDefBoot
+ IF Conf0.rbLilo.Value = TRUE THEN
+ sOsList = ME.GENERATE_LILO_OS_LIST("lilo")
+ ELSE
+ 'sOsList = ME.GENERATE_LILO_OS_LIST("grub")
+ END IF
+ FOR EACH entry IN MdlBootMngr.objMenuEntries
+ IF entry.IsDefault = TRUE THEN
+ sDefBoot = entry.Label
+ END IF
+ NEXT
iTimeOut = Conf0.SbTimeOut.Value * 10
sOutput = "# LILO Configuration File \n" &
@@ -222,14 +232,18 @@
"#\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" &
- sVidText & gb.NewLine & sOsList & gb.NewLine
+ "reset \n"
+ IF Exist(ClsGlobal.sTargetPath &/ "boot" &/ "bitmap" &/ "boot.bmp") THEN
+ sOutput = sOutput & "bitmap = /boot/bitmap/boot.bmp \n \n"
+ END IF
+
+ sOutput = sOutput & sVidText & gb.NewLine & sOsList & gb.NewLine
File.Save(Temp("lilo.in"), sOutput)
+ File.Save(ClsGlobal.sTargetPath &/ "etc" &/ "lilo.conf", sOutput)
+
'Message(File.Load(Temp("lilo.in")))
@@ -294,27 +308,25 @@
DIM cbx AS CheckBox
DIM cb AS ComboBox
DIM tl AS TextLabel
- DIM sKernel, sInitrd, sArch AS String
+ DIM sKernel, sInitrd, sArch, sTmpMnt, sHostPart AS String
+ DIM entry AS BootMenuEntry
' find kernels and initrds, copy them to /boot on the target dir
' can't use /boot/tamu anymore... all has to go into /boot
- FOR EACH cbx IN Conf0.objMenuObjects
- IF cbx.Value = TRUE THEN
- FOR EACH tl IN Conf0.objKernels
- IF cbx.Tag = tl.Name THEN sKernel = tl.Tag
- NEXT
- FOR EACH cb IN Conf0.objinitrds
- IF cb.tag = tl.Name THEN sInitrd = cb.Text
-
- NEXT
- END IF
- ' now that we got kernel and initrd, copy them over
- IF sKernel AND IF sInitrd THEN
- SHELL "cp " & sKernel & Space(1) & ClsGlobal.sTargetPath &/ "boot"
- SHELL "cp " & sInitrd & Space(1) & ClsGlobal.sTargetPath &/ "boot"
+ FOR EACH entry IN MdlBootMngr.objMenuEntries
+ IF entry.Enabled = TRUE THEN
+ sTmpMnt = Right(entry.Root, Len(entry.Root) - Len("/dev/"))
+ sHostPart = sTmpMnt
+ sTmpMnt = "/mnt" &/ sTmpMnt
+
+ SHELL "mount -o ro " & entry.Root & Space(1) & sTmpMnt WAIT
+ DEBUG "Importing kernel for " & entry.Label
+ SHELL "cp " & sTmpMnt &/ entry.kernel & Space(1) &
ClsGlobal.sTargetPath &/ entry.kernel & "-" & sHostPart WAIT
+ entry.kernel = entry.kernel & "-" & sHostPart
+ SHELL "umount " & sTmpMnt WAIT
END IF
-
- NEXT
+ NEXT
+
' determine wether we need to update modules
EXEC ["uname", "-r"] TO sArch
@@ -352,60 +364,41 @@
PRINT sLine
END
+PUBLIC SUB Process_Error(Errormessage AS String)
+
+ PRINT Errormessage
+
+
+END
-PUBLIC SUB GENERATE_LILO_OS_LIST()
+PUBLIC SUB GENERATE_LILO_OS_LIST(sBootManager AS String) AS String
+
+ DIM entry AS BootMenuEntry
+ DIM sRet AS String
+ DIM tempentry AS String
- DIM ckb AS CheckBox
- DIM cb AS ComboBox
- DIM tb AS TextBox
- DIM tl AS TextLabel
- DIM sTitle, sRoot, sInitrd, sKernel, sAppend AS String
- DIM sBody AS String
- DIM sHeader, sFullFile AS String
-
- FOR EACH ckb IN Conf0.objMenuObjects
- IF ckb.Value = TRUE THEN
- sRoot = ckb.Tag
- FOR EACH tb IN Conf0.objNames
- IF tb.Tag = ckb.Tag THEN sTitle = tb.Text
- NEXT
- ' get the initrd
- FOR EACH cb IN Conf0.objinitrds
- IF cb.Tag = sRoot THEN sInitrd = Trim(cb.Text)
- NEXT
- ' get the append line
- FOR EACH tb IN Conf0.objappends
- IF tb.tag = sRoot THEN sAppend = tb.Text
- NEXT
- FOR EACH tl IN Conf0.objKernels
- IF tl.Name = sRoot THEN sKernel = tl.Tag
- NEXT
- sBody = sBody & gb.NewLine &
- "# Menu entry for " & sTitle & "\n" &
- "image = " & Trim(sKernel) & "\n" &
- "root = " & sRoot & "\n" &
- "label = " & sTitle & "\n" &
- "append = \"" & sAppend & "\"\n" &
- "read-only \n"
- 'IF sBody THEN Message(Trim(sBody))
+ IF sBootManager LIKE "lilo" THEN
+ FOR EACH entry IN MdlBootMngr.objMenuEntries
+ IF entry.Enabled = TRUE THEN
+ tempentry = "# Menu entry for " & entry.sGrubLabel & "\n" &
+ "image = " & Trim(entry.kernel) & "\n" &
+ Space(5) & "root = " & entry.Root & "\n" &
+ Space(5) & "label = " & entry.Label & "\n" &
+ Space(5) & "read-only" & "\n"
+ 'Space(5) & "# append = " & entry.StartupOptions & "\n" & '
commented by default because this may be wrong.
+
END IF
-
- ' Reset these variables for future use
- sKernel = ""
- sRoot = ""
- sTitle = ""
- sAppend = ""
+ sRet = sRet & tempentry
NEXT
- 'IF sBody THEN Message(sBody)
- 'load the header
- sHeader = File.Load(Temp("lilo.in"))
- sFullFile = sHeader & sBody
- 'Message(sFullFile)
- IF Exist(ClsGlobal.sTargetPath &/ "etc/lilo.conf") THEN MOVE
ClsGlobal.sTargetPath &/ "etc/lilo.conf" TO ClsGlobal.sTargetPath
&/ "etc/lilo.old"
-
- File.Save(ClsGlobal.sTargetPath &/ "etc/lilo.conf", Trim(sFullFile))
+ ELSE ' in the case of grub
+ ' no code for this yet.
+ END IF
+ RETURN Trim(sRet)
+
+
+
END
@@ -532,7 +525,7 @@
entry.Root = sRawLine[0]
entry.sLIloLabel = sR...
[truncated message content] |