|
From: <cod...@go...> - 2008-08-08 15:02:11
|
Author: M0...@gm...
Date: Fri Aug 8 08:01:15 2008
New Revision: 110
Modified:
branches/iVL/FrmLilo.class
branches/iVL/MdlConfLilo.module
branches/iVL/MdlLiloOsList.module
Log:
- Fixed problem in LILO setup window
Append options are now available all the time, but the module removes
the "splash={value}" from the append line if
"Standard" resolution is selected.
- Modified OS List module to uniquely label each linux install found. This
is done by adding the partition address to
where the OS is found to the OS name.
- Added limitations to make sure the OS Label is not longer than 15
characters, and does not contain spaces
- Added floppy detection to lilo targets (this will hide the floppy option
if no floppy drive exists (makes sense)
- Added SATA and USB detection for lilo targets. This will allow lilo to be
installed in USB and SATA devices
(LILO WILL work from USB if the BIOS can boot from USB)
Modified: branches/iVL/FrmLilo.class
==============================================================================
--- branches/iVL/FrmLilo.class (original)
+++ branches/iVL/FrmLilo.class Fri Aug 8 08:01:15 2008
@@ -85,15 +85,22 @@
'MdlLiloOsList.LIST_LILO_OS_CHOICES()
IF Trim(ME.FBResolution.Text) = "Standard" THEN
FOR EACH box IN MdlLiloOsList.txtAppends
- box.Enabled = FALSE
- box.text = "Not available in \'Standard\' resolution mode"
- box.Width = MdlObjSizer.get_object_width(box.text) + 12
+ 'box.Enabled = FALSE
+ box.text = Replace(box.text, "splash=silent", "") '"Not available in
\'Standard\' resolution mode"
+ box.Width = box.Parent.Width - MdlLiloOsList.iAppendLeft - 12
NEXT
ELSE
FOR EACH box IN MdlLiloOsList.txtAppends
box.Enabled = TRUE
- box.text = "splash=silent"
+ IF InStr(box.text, "splash=") = FALSE THEN
+ IF box.text <> "" THEN
+ box.text = box.text & " splash=silent"
+ ELSE
+ box.text = "splash=silent"
+ END IF
+
+ END IF
box.Width = box.Parent.Width - MdlLiloOsList.iAppendLeft - 12
NEXT
END IF
Modified: branches/iVL/MdlConfLilo.module
==============================================================================
--- branches/iVL/MdlConfLilo.module (original)
+++ branches/iVL/MdlConfLilo.module Fri Aug 8 08:01:15 2008
@@ -25,8 +25,9 @@
DIM sListarr AS String[]
DIM i AS Integer
DIM sTarget AS String
+ DIM sDump AS String
- SHELL "probedisk | grep disk |cut -f 1 -d \\|" TO sList
+ SHELL "probedisk | grep -v cdrom |cut -f 1 -d \\|" TO sList
sList = Trim(sList)
sListarr = Split(sList, "\n")
FOR i = 0 TO sListarr.count - 1
@@ -38,8 +39,10 @@
IF LCase(ClsPartSel.fRoot) <> "xfs" THEN
.Add("Sector")
END IF
-
+ SHELL "lsdev | grep floppy" TO sDump
+ IF sDump <> "" THEN
.Add("Floppy")
+ END IF
END WITH
Modified: branches/iVL/MdlLiloOsList.module
==============================================================================
--- branches/iVL/MdlLiloOsList.module (original)
+++ branches/iVL/MdlLiloOsList.module Fri Aug 8 08:01:15 2008
@@ -18,6 +18,7 @@
PRIVATE cbarr AS Object[]
PRIVATE sText AS String
PUBLIC txtAppends AS Object[]
+PUBLIC txtNames AS Object[]
PUBLIC iAppendLeft AS Integer
PUBLIC SUB LIST_LILO_OS_CHOICES()
@@ -37,10 +38,12 @@
DIM txtAppnd AS TextBox
DIM cbInclude AS CheckBox
DIM tl AS TextLabel
+ DIM sShortAddr AS String
x = 4
y = 4
txtAppends = NEW Object[]
+txtNames = NEW Object[]
FrmLilo.TabStrip1.Count = 1
cbarr = NEW Object[]
@@ -66,22 +69,23 @@
'create a temporary monunt dir
TRY MKDIR "/tmp/lilo_tmp"
FOR i = 0 TO arrLinux.Count - 1
+ sShortAddr = Right(arrLinux[i], Len(arrLinux[i]) -
RInStr(arrLinux[i], "/"))
SHELL "mount " & arrLinux[i] & Space(1) & "/tmp/lilo_tmp" WAIT
' now check for a vmlinuz
IF Exist("/tmp/lilo_tmp/boot/vmlinuz") = TRUE THEN
sLiloDesc = ME.ID_DISTRO("/tmp/lilo_tmp")
FrmLilo.TabStrip1.Count = i + 1
- IF sLiloDesc <> "Linux" THEN
- FrmLilo.TabStrip1[i].text = sLiloDesc & " Linux"
- ELSE
- FrmLilo.TabStrip1[i].text = sLiloDesc
- END IF
+
+ FrmLilo.TabStrip1[i].text = sLiloDesc & "-" & sShortAddr
+
+ FrmLilo.TabStrip1[i].text = sLiloDesc & "-" & sShortAddr
+
WITH FrmLilo.TabStrip1
.Index = i
tl = NEW TextLabel(FrmLilo.TabStrip1) AS "OSIntro"
WITH tl
- .text = "Operating system resides in " & arrLinux[i]
+ .text = "Operating system installed in " & arrLinux[i]
.Move(4, 4, MdlObjSizer.get_object_width(.text) + 4, 27)
END WITH
@@ -107,11 +111,15 @@
txtAppnd = NEW TextBox(FrmLilo.TabStrip1) AS "NameBox"
WITH txtAppnd
.Width = tl.Width * 4
- .text = sLiloDesc
+ .text = FrmLilo.TabStrip1.Current.text 'sLiloDesc
.Height = tl.Height
.x = tl.left + tl.Width + 8
.y = tl.Top
+ .MaxLength = 15
+ .tag = arrLinux[i]
+
END WITH
+ txtNames.Add(txtAppnd)
tl = NEW TextLabel(FrmLilo.TabStrip1) AS "AppndLbl"
WITH tl
.text = "Kernel boot options"
@@ -127,12 +135,13 @@
.Move(tl.Left + tl.Width + 8, tl.top, tl.Width)
IF FrmLilo.sVidMode <> "Standard" THEN
.Enabled = TRUE
- .text = "splash=silent"
+ .text = .text & " splash=silent"
.Width = FrmLilo.TabStrip1.Width - tl.Width
ELSE
- .Enabled = FALSE
- .Text = "not available in \'Standard\' Resolution mode"
- .Width = MdlObjSizer.get_object_width(.text) + 12
+ '.Enabled = FALSE
+ '.Text = "not available in \'Standard\' Resolution mode"
+ .Text = .text & Replace(.text, "splash=silent", "")
+ .Width = FrmLilo.TabStrip1.Width - tl.Width
END IF
.Height = 27
txtAppends.Add(txtAppnd)
@@ -157,6 +166,22 @@
Message("Excluding " & FrmLilo.TabStrip1.Current.text & " from the boot
menu")
END IF
+
+END
+
+PUBLIC SUB NameBox_keyrelease()
+
+ DIM tx AS TextBox
+ FOR EACH tx IN txtNames
+ IF tx.tag = LAST.tag THEN
+ tx.text = Replace(LAST.text, " ", "")
+ FrmLilo.TabStrip1.Current.text = LAST.text
+ END IF
+
+
+ NEXT
+
+
END
|