From: <cod...@go...> - 2008-08-08 17:35:25
|
Author: M0...@gm... Date: Fri Aug 8 10:34:39 2008 New Revision: 112 Modified: branches/iVL/FrmLilo.class branches/iVL/FrmLilo.form branches/iVL/MdlLiloOsList.module Log: - Began working on adding windows installs to the lilo config options Modified: branches/iVL/FrmLilo.class ============================================================================== --- branches/iVL/FrmLilo.class (original) +++ branches/iVL/FrmLilo.class Fri Aug 8 10:34:39 2008 @@ -29,7 +29,10 @@ ME.sVidMode = "Standard" MdlConfLilo.DISPLAY_LILO_TARGET_OPTIONS() MdlLiloOsList.LIST_LILO_OS_CHOICES() - +ME.tlList.text = "The following Operating Systems have been detected on this computer. Choose your desired option " & +"for each one of them by clicking on each tab. To proceed with the default pre-set values, simply click \'" & FMain.btnext.text & "\'" +ME.tlList.Adjust +ME.TabStrip1.Index = 0 END PUBLIC SUB YNLiloBox_Click() @@ -66,7 +69,8 @@ .LiloTarget.Move(.tlTarGet.Left + .tlTarGet.Width + 2, .tlTarGet.top, .tlBanner.Width - (.tlTarGet.Width + .tlTarGet.left)) .tlFbMode.Move(.tlBanner.Left, .tlTarGet.top + .tlTarGet.Height + 8, MdlObjSizer.get_object_width(.tlFbMode.Text) + 8) .FBResolution.Move(.tlFbMode.Left + .tlFbMode.Width + 2, .tlFbMode.top, .tlBanner.Width - (.tlFbMode.Width + .tlFbMode.Left)) - .TabStrip1.Move(.tlFbMode.Left, .tlFbMode.top + .tlFbMode.Height + 8, .ClientWidth - (.TabStrip1.left * 2), .ClientHeight - .tlBanner.Height * 5) + .tlList.Move(.tlFbMode.Left, .tlFbMode.top + .tlFbMode.Height + 12, .tlBanner.Width) + .TabStrip1.Move(.tlList.Left, .tlList.top + .tlList.Height + 8, .ClientWidth - (.TabStrip1.left * 2), .ClientHeight - .tlBanner.Height * 6) '.tlBanner2.Move(.tlFbMode.left, .FBResolution.top + .FBResolution.Height + 16, MdlObjSizer.get_object_width(.tlBanner2.Text) + 36) '.LiloAppendBox.Move(.tlBanner2.left, .tlBanner2.top + .tlBanner2.Height + 4, .ClientWidth - (.LiloAppendBox.x) * 2) END WITH @@ -106,6 +110,12 @@ NEXT END IF + + +END + +PUBLIC SUB tlBanner_MouseDown() + END Modified: branches/iVL/FrmLilo.form ============================================================================== --- branches/iVL/FrmLilo.form (original) +++ branches/iVL/FrmLilo.form Fri Aug 8 10:34:39 2008 @@ -4,41 +4,41 @@ MoveScaled(0,0,64,61) Text = ("") { tlBanner TextLabel - MoveScaled(0,0,58,4.5) + MoveScaled(1,1,58,4.5) Text = ("Configure and install lilo (Linux Boot Loader)") } - { LiloTarget ComboBox - MoveScaled(13,10,39,3.125) - Text = ("") - ReadOnly = True - List = [] - } { YNLiloBox CheckBox MoveScaled(1,5,18,3) Text = ("Don't Install Lilo") } - { FBResolution ComboBox - MoveScaled(20,15,32,3.125) + { TabStrip1 TabStrip + MoveScaled(1,31,61,22) + Index = 0 + Text = ("Tab 0") + Index = 0 + } + { tlList TextLabel + MoveScaled(1,22,57,6) + Text = ("TextLabel1") + } + { LiloTarget ComboBox + MoveScaled(13,9,39,3.125) Text = ("") ReadOnly = True - List = [("Standard"), ("Bootsplash Med"), ("Bootsplash High"), ("Bootsplash Extra high")] + List = [] } { tlTarGet TextLabel - MoveScaled(1,10,10,3.125) + MoveScaled(1,9,10,3.125) Text = ("Target") } { tlFbMode TextLabel - MoveScaled(1,15,18,3.125) + MoveScaled(1,14,18,3.125) Text = ("Video Resolution") } - { Button1 Button - MoveScaled(55,57,7,2) - Text = ("Button1") - } - { TabStrip1 TabStrip - MoveScaled(1,20,61,32) - Index = 0 - Text = ("Tab 0") - Index = 0 + { FBResolution ComboBox + MoveScaled(20,14,32,3.125) + Text = ("") + ReadOnly = True + List = [("Standard"), ("Bootsplash Med"), ("Bootsplash High"), ("Bootsplash Extra high")] } } Modified: branches/iVL/MdlLiloOsList.module ============================================================================== --- branches/iVL/MdlLiloOsList.module (original) +++ branches/iVL/MdlLiloOsList.module Fri Aug 8 10:34:39 2008 @@ -20,12 +20,92 @@ PUBLIC txtAppends AS Object[] PUBLIC txtNames AS Object[] PUBLIC iAppendLeft AS Integer -PUBLIC SUB LIST_LILO_OS_CHOICES() - +PUBLIC cbWins AS Object[] + +PUBLIC SUB LIST_WIN_INSTALL_CHOICES(iCurrentTabCnt AS Integer) DIM sFatList AS String DIM arrFat AS String[] DIM sNTFSLst AS String DIM arrNTFS AS String[] + DIM iTotalEntries AS Integer + DIM i AS Integer + DIM cb AS CheckBox + DIM tl AS TextLabel + DIM tb AS TextBox + DIM sWinPart AS String + DIM sWinAddr AS String + + ' I'd like to verify that there is actually a windows isntall there... rather than simply listing every partition + ' But I guess listing partitions will do for now + + + + SHELL "fdisk -l | grep -E \'^/dev/.* \\* .*(FAT16)\' | cut -f 1 -d \' \'" TO sFatList + sFatList = Trim(sFatList) + IF sFatList <> "" THEN + arrFat = Split(sFatList, "\n") + iTotalEntries = iTotalEntries + (arrFat.count - 1) + FOR i = 0 TO arrFat.Count - 1 + sWinPart = Trim(arrFat[i]) + sWinAddr = Right(sWinPart, Len(sWinPart) - RInStr(sWinPart, "/")) + WITH FrmLilo.TabStrip1 + .count = .count + 1 + .text = "Windows-" & sWinAddr + .Tag = sWinPart + ' now populate it with the necessary stuff + tl = NEW TextLabel(FrmLilo.TabStrip1) AS "WinBanner" + WITH tl + .text = "Operating system found in " & sWinPart + .Move(4, 12, MdlObjSizer.get_object_width(.text) + 24, 27) + .Alignment = Align.Normal + END WITH + + tl = NEW TextLabel(FrmLilo.TabStrip1) AS "WinName" + WITH tl + .text = "Name " + .Move(tl.left, tl.top + tl.height + 8, MdlObjSizer.get_object_width(.text) + 8, 27) + .Alignment = Align.Normal + END WITH + + tb = NEW TextBox(FrmLilo.TabStrip1) AS "WinNameBox" + WITH tb + .text = FrmLilo.TabStrip1.Current.Text + .MaxLength = 15 + .Height = 27 + .Width = MdlObjSizer.get_object_width(.text) * 2 + .Move(tl.left + tl.Width + 8, tl.top) + END WITH + + + cb = NEW CheckBox(FrmLilo.TabStrip1) AS "WinInclude" + WITH cb + .text = "Include this Operating System in the boot menu" + .Move(tl.left, tl.top + tl.height, MdlObjSizer.get_object_width(.text) + 36, 27) + .Value = TRUE + END WITH + END WITH ' end jacking with the tabstrip + + END IF + SHELL "fdisk -l| grep -E \'^/dev/.* \\* .*(FAT32|HPFS|NTFS|Win)\' | cut -f 1 -d \' \'" TO sNTFSLst + sNTFSLst = Trim(sNTFSLst) + IF sNTFSLst <> "" THEN + arrNTFS = Split(sNTFSLst, "\n") + iTotalEntries = iTotalEntries + (arrNTFS.Count - 1) + END IF + + IF iTotalEntries = 0 THEN + RETURN ' no need to proceed if no windows installs were found + END IF + + + +END + + + +PUBLIC SUB LIST_LILO_OS_CHOICES() + + DIM sLinuxList AS String DIM arrLinux AS String[] DIM i AS Integer @@ -47,16 +127,7 @@ 'FrmLilo.TabStrip1.Count = 1 cbarr = NEW Object[] - SHELL "fdisk -l | grep -E \'^/dev/.* \\* .*(FAT16)\' | cut -f 1 -d \' \'" TO sFatList - sFatList = Trim(sFatList) - IF sFatList <> "" THEN - arrFat = Split(sFatList, "\n") - END IF - SHELL "fdisk -l| grep -E \'^/dev/.* \\* .*(FAT32|HPFS|NTFS|Win)\' | cut -f 1 -d \' \'" TO sNTFSLst - sNTFSLst = Trim(sNTFSLst) - IF sNTFSLst <> "" THEN - arrNTFS = Split(sNTFSLst, "\n") - END IF + SHELL "fdisk -l |grep -E \'83 *Linux\' | cut -f 1 -d \' \'" TO sLinuxList 'sLinuxList = Trim(sLinuxList) @@ -82,8 +153,11 @@ .text = sLiloDesc & "-" & sShortAddr tl = NEW TextLabel(FrmLilo.TabStrip1) AS "OSIntro" WITH tl - .text = "Operating system installed in " & arrLinux[i] - .Move(4, 4, MdlObjSizer.get_object_width(.text) + 4, 27) + .text = "<b>Operating system installed in " & arrLinux[i] & "</b>" + .Move(4, 16, MdlObjSizer.get_object_width(.text) + 4, 27) + '.BackColor = Color.SelectedBackground + .Alignment = Align.Normal + '.ForeColor = Color.SelectedForeground END WITH @@ -143,7 +217,23 @@ .Height = 27 txtAppends.Add(txtAppnd) END WITH - + + ' Add an option to boot the recently installed OS to CLI mode + ClsPartSel.sRoot = "/dev/hda1" + IF sLiloDesc LIKE "Vector" THEN + IF arrLinux[i] = ClsPartSel.sRoot THEN + cbInclude = NEW CheckBox(FrmLilo.TabStrip1) AS "VlCliOption" + WITH cbInclude + .Value = FALSE + .text = "Add option to boot this Operating system into Text mode" + .Width = MdlObjSizer.get_object_width(.text) + 36 + .Height = 27 + .Move(4, tl.top + tl.Height + 12) + END WITH + END IF + END IF + + END WITH ' end jacking with the tabstrip itself |