From: <cod...@go...> - 2008-08-19 21:29:24
|
Author: M0E.lnx Date: Tue Aug 19 14:28:29 2008 New Revision: 130 Removed: branches/iVL/FrmLiloOsList.class branches/iVL/FrmLiloOsList.form branches/iVL/ToDo Modified: branches/iVL/.lang/FMain.pot branches/iVL/.project branches/iVL/FMain.class branches/iVL/FrmLilo.class branches/iVL/FrmLilo.form branches/iVL/MdlConfLilo.module branches/iVL/MdlDiskPart.module branches/iVL/MdlLiloOsList.module Log: - Lilo configutation is done ... ready for testing. (please report issues) * NOTE: Embedded GParted. A window can be found on the desktop by it's tittle, class, or role. GParted reports Both, title and class to the WM (Using xprop finds class). We need a way to search for it using the class property and see if that would give us a more accurate shot at embedding it into the installer. Modified: branches/iVL/.lang/FMain.pot ============================================================================== --- branches/iVL/.lang/FMain.pot (original) +++ branches/iVL/.lang/FMain.pot Tue Aug 19 14:28:29 2008 @@ -14,19 +14,19 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: FMain.class:274 +#: FMain.class:281 msgid "Process Overview" msgstr "" -#: FMain.class:293 +#: FMain.class:300 msgid "Next" msgstr "" -#: FMain.class:299 +#: FMain.class:306 msgid "Back" msgstr "" -#: FMain.class:305 +#: FMain.class:312 msgid "Exit" msgstr "" Modified: branches/iVL/.project ============================================================================== --- branches/iVL/.project (original) +++ branches/iVL/.project Tue Aug 19 14:28:29 2008 @@ -1,6 +1,6 @@ # Gambas Project File 2.0 Title=VectorLinux Installer -Startup=FrmLilo +Startup=MdlCore Version=0.0.33 Library=gb.gtk Library=gb.form Modified: branches/iVL/FMain.class ============================================================================== --- branches/iVL/FMain.class (original) +++ branches/iVL/FMain.class Tue Aug 19 14:28:29 2008 @@ -213,7 +213,14 @@ frmNext = FrmLilo CASE "FrmLilo" - frmNext = FrmLiloOsList + ' Now that lilo has been setup, write it to the config + MdlConfLilo.GENERATE_LILO_DOT_CONF + MdlConfLilo.GATHER_OTHER_LINUX_KERNELS_AND_INITRDS() + MdlConfLilo.WRITE_LILO_DOT_CONF() + MdlConfLilo.EXECUTE_LILO() + + + 'frmNext = FrmLiloOsList END SELECT Modified: branches/iVL/FrmLilo.class ============================================================================== --- branches/iVL/FrmLilo.class (original) +++ branches/iVL/FrmLilo.class Tue Aug 19 14:28:29 2008 @@ -21,11 +21,11 @@ PUBLIC SUB Form_Open() -ClsPartSel.sRoot = "/dev/hda1" -' FMain.FrmCurr = ME -' FMain.tvPlan["Conf0"].Selected = TRUE -' FMain.tvPlan["Conf0"].Picture = MdlCore.sNowPic -' FMain.tvPlan["Inst2"].Picture = MdlCore.sDonePic +'ClsPartSel.sRoot = "/dev/sdb1" ' + FMain.FrmCurr = ME + FMain.tvPlan["Conf0"].Selected = TRUE + FMain.tvPlan["Conf0"].Picture = MdlCore.sNowPic + FMain.tvPlan["Inst2"].Picture = MdlCore.sDonePic ME.sVidMode = "Standard" MdlConfLilo.DISPLAY_LILO_TARGET_OPTIONS() MdlLiloOsList.LIST_LILO_OS_CHOICES() @@ -92,17 +92,9 @@ .tlTimoutSec.Move(.sbTimer.Left + .sbTimer.Width + 4, .sbTimer.top, MdlObjSizer.get_object_width(.tlTimoutSec.text)) .tlDefBoot.Move(.tlFbMode.Left, .sbTimer.top, MdlObjSizer.get_object_width(.tlDefBoot.text), 27) .cbDefBoot.Move(.tlDefBoot.Left + .tlDefBoot.Width + 4, .tlDefBoot.top, .tlBanner.Width - .cbDefBoot.Left * 1.3) - '.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 / 2) - (.tlFbMode.Width + .tlFbMode.Left)) - '.tlDefaultBoot.Move(.tlFbMode.left, .tlFbMode.top + .tlFbMode.Height + 4, MdlObjSizer.get_object_width(.tlDefaultBoot.text) + 8) - '.cbDefaultOS.Move(.tlDefaultBoot.Left + .tlDefaultBoot.Width + 2, .tlDefaultBoot.top, .tlBanner.Width - (.tlDefaultBoot.width + .tldefaultboot.left)) - - '.tlTimeOUt.Move(.tlDefaultBoot.left, .tlDefaultBoot.top + .tlDefaultBoot.Height + 4, MdlObjSizer.get_object_width(.tlTimeOUt.text) + 8) - '.sbTimer.Move(.tlTimeOUt.left + .tlTimeOUt.Width + 2, .tlTimeOUt.top, 60) - '.tlTimoutSec.Move(.sbTimer.left + .sbTimer.Width + 4, .sbTimer.top, MdlObjSizer.get_object_width(.tlTimoutSec.text) + 8) .tlList.Move(.tlTimeOUt.left, .tlTimeOUt.top + .tlTimeOUt.Height + 8, .tlBanner.Width) - '.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)) END WITH @@ -140,17 +132,13 @@ END -PUBLIC SUB tlBanner_MouseDown() - - -END PUBLIC SUB Form_Menu() - MdlConfLilo.GENERATE_LILO_DOT_CONF() - MdlConfLilo.GATHER_OTHER_LINUX_KERNELS_AND_INITRDS() + 'MdlConfLilo.GENERATE_LILO_DOT_CONF() +' MdlConfLilo.GATHER_OTHER_LINUX_KERNELS_AND_INITRDS() 'MdlConfLilo.WRITE_LILO_DOT_CONF() END Modified: branches/iVL/FrmLilo.form ============================================================================== --- branches/iVL/FrmLilo.form (original) +++ branches/iVL/FrmLilo.form Tue Aug 19 14:28:29 2008 @@ -4,7 +4,7 @@ MoveScaled(0,0,70,69) Text = ("") { tlBanner TextLabel - MoveScaled(1,1,58,4.5) + MoveScaled(1,1,58,4.4286) Text = ("Configure and install lilo (Linux Boot Loader)") } { YNLiloBox CheckBox @@ -28,21 +28,23 @@ List = [] } { tlTarGet TextLabel - MoveScaled(1,9,10,3.125) + MoveScaled(1,9,10,3) Text = ("Target") + Alignment = Align.Normal } { tlFbMode TextLabel - MoveScaled(33,9,18,3.125) + MoveScaled(33,9,18,3) Text = ("Video Resolution") + Alignment = Align.Normal } { FBResolution ComboBox - MoveScaled(52,9,21,3.125) + MoveScaled(52,9,21,3) Text = ("") ReadOnly = True List = [("Standard"), ("Bootsplash Med"), ("Bootsplash High"), ("Bootsplash Extra high")] } { tlTimeOUt TextLabel - MoveScaled(1,14,18,3.125) + MoveScaled(1,14,18,3) Text = ("Prompt Timeout") Alignment = Align.Normal } @@ -51,17 +53,17 @@ Value = 3 } { tlTimoutSec TextLabel - MoveScaled(30,14,7,3.125) + MoveScaled(30,14,7,3) Text = ("Seconds") Alignment = Align.Normal } { tlDefBoot TextLabel - MoveScaled(33,14,18,3.125) + MoveScaled(33,14,18,3) Text = ("Boot Default") Alignment = Align.Normal } { cbDefBoot ComboBox - MoveScaled(52,13,21,3.125) + MoveScaled(52,13,21,3) Text = ("") ReadOnly = True List = [] Modified: branches/iVL/MdlConfLilo.module ============================================================================== --- branches/iVL/MdlConfLilo.module (original) +++ branches/iVL/MdlConfLilo.module Tue Aug 19 14:28:29 2008 @@ -68,7 +68,12 @@ 'message(sOut) ' Now we want to write the actual file to the root partition + IF Exist(ClsGlobal.sTargetMnt &/ "etc" &/ "lilo.conf") THEN + TRY MOVE ClsGlobal.sTargetMnt &/ "etc" &/ "lilo.conf" TO ClsGlobal.sTargetMnt &/ "etc" &/ "lilo.dist" + END IF + File.Save(ClsGlobal.sTargetMnt &/ "etc" &/ "lilo.conf", sOut) + IF ERROR THEN Message.Error(Error.Text & gb.NewLine & Error.Where) ' to make sure the new changes are written to the MBR, we need a copy in the local running install 'File.Save("/etc/lilo.conf", sOut) ' now run lilo @@ -85,6 +90,8 @@ SHELL "chroot " & ClsGlobal.sTargetMnt & "; /sbin/lilo || echo \'FAILED\'" TO sDump IF InStr(sDump, "FAILED") > 0 THEN Message.Error("Lilo returned an error. Please see below" & gb.NewLine & sDump) + ELSE + Message("Boot loader has been setup successfully") END IF Modified: branches/iVL/MdlDiskPart.module ============================================================================== --- branches/iVL/MdlDiskPart.module (original) +++ branches/iVL/MdlDiskPart.module Tue Aug 19 14:28:29 2008 @@ -25,10 +25,12 @@ DIM iHandle AS Integer DIM i AS Integer = 0 DIM sDump AS String - DIM sWins AS String = "GParted,/dev/sda - GParted,/dev/hda - GParted" + DIM sWins AS String = "gpartedbin,Gpartedbin" '" GParted, / dev / sda - GParted, / dev / hda - GParted "" DIM sWons AS String[] = Split(sWins, ",") 'Desktop.Find("", "GParted") + ' The window can be found on the Desktop WM_CLASS property which can be seen via the xprop application + ' We may need to implement this method here instead of the win window title method. IF Exist("/usr/sbin/gparted") = FALSE THEN Message.Error("Gparted was not found on this system. Please install gparted and try again") @@ -40,12 +42,12 @@ WAIT i = 0 - aHandle = Desktop.Find(Trim(sWons[i])) + aHandle = Desktop.Find("", Trim(sWons[i])) IF aHandle.Count = 0 THEN REPEAT WAIT 2 INC i - aHandle = Desktop.Find(sWons[i]) + aHandle = Desktop.Find("", sWons[i]) UNTIL aHandle.Count > 0 OR i = sWons.count - 1 END IF Modified: branches/iVL/MdlLiloOsList.module ============================================================================== --- branches/iVL/MdlLiloOsList.module (original) +++ branches/iVL/MdlLiloOsList.module Tue Aug 19 14:28:29 2008 @@ -347,7 +347,7 @@ ' Add an option to boot the recently installed OS to CLI mode - ClsPartSel.sRoot = "/dev/hda1" ' for testing only + 'ClsPartSel.sRoot = "/dev/sdb" ' for testing only IF sLiloDesc LIKE "Vector" THEN IF arrLinux[i] = ClsPartSel.sRoot THEN cbInclude = NEW CheckBox(FrmLilo.TabStrip1) AS "VlCliOption" @@ -422,8 +422,24 @@ PUBLIC SUB VlCliOption_click() - + DIM tb AS TextBox bVlCliOption = LAST.value + + FOR EACH tb IN ME.txtNames + IF tb.tag = LAST.tag THEN + IF bVlCliOption = TRUE THEN + IF FrmLilo.cbDefBoot.Find(tb.text & "-tui") = -1 THEN + FrmLilo.cbDefBoot.Add(tb.text & "-tui") + END IF + ELSE + IF FrmLilo.cbDefBoot.Find(tb.text & "-tui") <> -1 THEN + FrmLilo.cbDefBoot.Remove(FrmLilo.cbDefBoot.Find(tb.text & "-tui")) + END IF + END IF + END IF + NEXT + + 'PRINT bVlCliOption END |