From: <cod...@go...> - 2008-10-29 18:47:53
|
Author: M0...@gm... Date: Wed Oct 29 11:46:14 2008 New Revision: 245 Modified: branches/iVL/.lang/ClsGlobal.pot branches/iVL/.lang/ClsPartSel.pot branches/iVL/.lang/ClsWinDrives.pot branches/iVL/.lang/FMain.pot branches/iVL/.lang/FrmDiskPart.pot branches/iVL/.lang/FrmPartScheme.pot branches/iVL/.lang/FrmPartSel.pot branches/iVL/.lang/FrmPkgSel.pot branches/iVL/.lang/FrmSelISO.pot branches/iVL/.lang/FrmSummary.pot branches/iVL/.lang/FrmWinDrives.pot branches/iVL/.lang/MdlCore.pot branches/iVL/.lang/MdlDiskPart.pot branches/iVL/.lang/MdlObjSizer.pot branches/iVL/.lang/MdlPartSel.pot branches/iVL/.lang/MdlPkgSel.pot branches/iVL/.lang/MdlSetup.pot branches/iVL/.lang/MdlSummarize.pot branches/iVL/.lang/MdlWinDrives.pot branches/iVL/.project branches/iVL/FMain.class branches/iVL/FrmXconf.class branches/iVL/FrmXconf.form branches/iVL/MdlConfLilo.module branches/iVL/MdlLiloOsList.module Log: Beginning work on xconf module Modified: branches/iVL/.lang/ClsGlobal.pot ============================================================================== --- branches/iVL/.lang/ClsGlobal.pot (original) +++ branches/iVL/.lang/ClsGlobal.pot Wed Oct 29 11:46:14 2008 @@ -1,4 +1,4 @@ -# /home/uel/gui-installer/ClsGlobal.class +# /home/remote/projects/installer/ClsGlobal.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/ClsPartSel.pot ============================================================================== --- branches/iVL/.lang/ClsPartSel.pot (original) +++ branches/iVL/.lang/ClsPartSel.pot Wed Oct 29 11:46:14 2008 @@ -1,4 +1,4 @@ -# /home/uel/gui-installer/ClsPartSel.class +# /home/remote/projects/installer/ClsPartSel.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/ClsWinDrives.pot ============================================================================== --- branches/iVL/.lang/ClsWinDrives.pot (original) +++ branches/iVL/.lang/ClsWinDrives.pot Wed Oct 29 11:46:14 2008 @@ -1,4 +1,4 @@ -# /home/uel/gui-installer/ClsWinDrives.class +# /home/remote/projects/installer/ClsWinDrives.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FMain.pot ============================================================================== --- branches/iVL/.lang/FMain.pot (original) +++ branches/iVL/.lang/FMain.pot Wed Oct 29 11:46:14 2008 @@ -1,4 +1,4 @@ -# /home/uel/gui-installer/FMain.class +# /home/remote/projects/installer/FMain.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FrmDiskPart.pot ============================================================================== --- branches/iVL/.lang/FrmDiskPart.pot (original) +++ branches/iVL/.lang/FrmDiskPart.pot Wed Oct 29 11:46:14 2008 @@ -1,4 +1,4 @@ -# /home/uel/gui-installer/FrmDiskPart.class +# /home/remote/projects/installer/FrmDiskPart.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FrmPartScheme.pot ============================================================================== --- branches/iVL/.lang/FrmPartScheme.pot (original) +++ branches/iVL/.lang/FrmPartScheme.pot Wed Oct 29 11:46:14 2008 @@ -1,4 +1,4 @@ -# /home/uel/gui-installer/FrmPartScheme.class +# /home/remote/projects/installer/FrmPartScheme.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FrmPartSel.pot ============================================================================== --- branches/iVL/.lang/FrmPartSel.pot (original) +++ branches/iVL/.lang/FrmPartSel.pot Wed Oct 29 11:46:14 2008 @@ -1,4 +1,4 @@ -# /home/uel/gui-installer/FrmPartSel.class +# /home/remote/projects/installer/FrmPartSel.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FrmPkgSel.pot ============================================================================== --- branches/iVL/.lang/FrmPkgSel.pot (original) +++ branches/iVL/.lang/FrmPkgSel.pot Wed Oct 29 11:46:14 2008 @@ -1,4 +1,4 @@ -# /home/uel/gui-installer/FrmPkgSel.class +# /home/remote/projects/installer/FrmPkgSel.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FrmSelISO.pot ============================================================================== --- branches/iVL/.lang/FrmSelISO.pot (original) +++ branches/iVL/.lang/FrmSelISO.pot Wed Oct 29 11:46:14 2008 @@ -1,4 +1,4 @@ -# /home/uel/gui-installer/FrmSelISO.class +# /home/remote/projects/installer/FrmSelISO.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FrmSummary.pot ============================================================================== --- branches/iVL/.lang/FrmSummary.pot (original) +++ branches/iVL/.lang/FrmSummary.pot Wed Oct 29 11:46:14 2008 @@ -1,4 +1,4 @@ -# /home/uel/gui-installer/FrmSummary.class +# /home/remote/projects/installer/FrmSummary.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FrmWinDrives.pot ============================================================================== --- branches/iVL/.lang/FrmWinDrives.pot (original) +++ branches/iVL/.lang/FrmWinDrives.pot Wed Oct 29 11:46:14 2008 @@ -1,4 +1,4 @@ -# /home/uel/gui-installer/FrmWinDrives.class +# /home/remote/projects/installer/FrmWinDrives.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlCore.pot ============================================================================== --- branches/iVL/.lang/MdlCore.pot (original) +++ branches/iVL/.lang/MdlCore.pot Wed Oct 29 11:46:14 2008 @@ -1,4 +1,4 @@ -# /home/uel/gui-installer/MdlCore.module +# /home/remote/projects/installer/MdlCore.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlDiskPart.pot ============================================================================== --- branches/iVL/.lang/MdlDiskPart.pot (original) +++ branches/iVL/.lang/MdlDiskPart.pot Wed Oct 29 11:46:14 2008 @@ -1,4 +1,4 @@ -# /home/uel/gui-installer/MdlDiskPart.module +# /home/remote/projects/installer/MdlDiskPart.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlObjSizer.pot ============================================================================== --- branches/iVL/.lang/MdlObjSizer.pot (original) +++ branches/iVL/.lang/MdlObjSizer.pot Wed Oct 29 11:46:14 2008 @@ -1,4 +1,4 @@ -# /home/uel/gui-installer/MdlObjSizer.module +# /home/remote/projects/installer/MdlObjSizer.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlPartSel.pot ============================================================================== --- branches/iVL/.lang/MdlPartSel.pot (original) +++ branches/iVL/.lang/MdlPartSel.pot Wed Oct 29 11:46:14 2008 @@ -1,4 +1,4 @@ -# /home/uel/gui-installer/MdlPartSel.module +# /home/remote/projects/installer/MdlPartSel.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlPkgSel.pot ============================================================================== --- branches/iVL/.lang/MdlPkgSel.pot (original) +++ branches/iVL/.lang/MdlPkgSel.pot Wed Oct 29 11:46:14 2008 @@ -1,4 +1,4 @@ -# /home/uel/gui-installer/MdlPkgSel.module +# /home/remote/projects/installer/MdlPkgSel.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlSetup.pot ============================================================================== --- branches/iVL/.lang/MdlSetup.pot (original) +++ branches/iVL/.lang/MdlSetup.pot Wed Oct 29 11:46:14 2008 @@ -1,4 +1,4 @@ -# /home/uel/gui-installer/MdlSetup.module +# /home/remote/projects/installer/MdlSetup.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlSummarize.pot ============================================================================== --- branches/iVL/.lang/MdlSummarize.pot (original) +++ branches/iVL/.lang/MdlSummarize.pot Wed Oct 29 11:46:14 2008 @@ -1,4 +1,4 @@ -# /home/uel/gui-installer/MdlSummarize.module +# /home/remote/projects/installer/MdlSummarize.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlWinDrives.pot ============================================================================== --- branches/iVL/.lang/MdlWinDrives.pot (original) +++ branches/iVL/.lang/MdlWinDrives.pot Wed Oct 29 11:46:14 2008 @@ -1,4 +1,4 @@ -# /home/uel/gui-installer/MdlWinDrives.module +# /home/remote/projects/installer/MdlWinDrives.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.project ============================================================================== --- branches/iVL/.project (original) +++ branches/iVL/.project Wed Oct 29 11:46:14 2008 @@ -1,7 +1,7 @@ # Gambas Project File 2.0 # Compiled with Gambas 2.9.0 Title=VectorLinux Installer -Startup=MdlCore +Startup=FrmXconf Version=0.0.112 Library=gb.gtk Library=gb.form Modified: branches/iVL/FMain.class ============================================================================== --- branches/iVL/FMain.class (original) +++ branches/iVL/FMain.class Wed Oct 29 11:46:14 2008 @@ -278,7 +278,7 @@ MdlConfLilo.GENERATE_LILO_DOT_CONF() MdlConfLilo.GATHER_OTHER_LINUX_KERNELS_AND_INITRDS() MdlConfLilo.WRITE_LILO_DOT_CONF() - MdlConfLilo.EXECUTE_LILO() + IF MdlConfLilo.EXECUTE_LILO() <> 0 THEN RETURN ELSE ' lilo installation / setup has been skipped FrmLilo.tlBanner.Text = "<b>" & ("Skipping lilo setup") & "</b>" Modified: branches/iVL/FrmXconf.class ============================================================================== --- branches/iVL/FrmXconf.class (original) +++ branches/iVL/FrmXconf.class Wed Oct 29 11:46:14 2008 @@ -1,2 +1,72 @@ ' 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 SUB cbSetupMethod_Click() +DIM sMsg AS String + SELECT CASE cbSetupMethod.Text + CASE "Vesa" + smsg = ("Uses the default (failsafe) configuration.") + CASE "Probe" + smsg = ("Probe hardware to setup your Graphical Environment using your preffered settings") + CASE "Fbdev" + smsg = ("Use the console framebuffer driver") + CASE ELSE + smsg = "" + END SELECT + ME.tlChoiceExp.text = sMsg + ME.tlChoiceExp.Width = MdlObjSizer.get_object_width(sMsg) +END + +PUBLIC SUB Form_Open() + DIM sOut AS String + DIM sFileIn AS String[] + DIM sLine AS String + DIM i, imark, ii AS Integer + + Message.Warning(("We will now setup your graphical user interface. Your screen may flicker during this process")) + + 'SHELL "/usr/bin/X -configure :2 2>/dev/null" WAIT' let's assume this produced a basic xorg.conf + 'SHELL "cat /etc/X11.xorg.conf.new | grep ^Driver |cut -f 2 -d \':\'" TO sOut + + sFileIn = Split(DConv(File.Load("/etc/X11/xorg.conf")), "\n") + FOR i = 0 TO sFileIn.Count - 1 + + 'PRINT sFileIn[i] + IF InStr(sFileIn[i], "Section \"Device\"") THEN + 'PRINT sFileIn[i] + 'imark = i + 'ii = 1 + REPEAT + IF InStr(sFileIn[i + ii], "Driver") = FALSE THEN + INC ii + END IF + UNTIL InStr(sFileIn[i + ii], "Driver") OR InStr(sFileIn[i + ii], "EndSection") '= TRUE + 'Message("Found Driver: " & sFileIn[i + ii]) + sOut = Trim(Mid(sFileIn[i + ii], InStr(sFileIn[i + ii], "\"") + 1, Len(sFileIn[i + ii]) - InStr(sFileIn[i + ii], "\"") - 1)) + 'END IF + END IF + NEXT + + + FrmXconf.cbSetupMethod.Add(sOut) + FrmXconf.cbSetupMethod.text = sOut + + 'Message(sOut) + + +END Modified: branches/iVL/FrmXconf.form ============================================================================== --- branches/iVL/FrmXconf.form (original) +++ branches/iVL/FrmXconf.form Wed Oct 29 11:46:14 2008 @@ -1,6 +1,79 @@ # Gambas Form File 2.0 -{ FrmXconf Form - MoveScaled(0, 0, 64, 64) - Border = Window.Resizable +{ Form Form + MoveScaled(0,0,89,59) + Text = ("") + Arrangement = Arrange.Vertical + { hbBanner HBox + MoveScaled(1,1,77,6) + { TlBanner TextLabel + MoveScaled(1,1,27,3) + Text = ("Graphical Interface Settings") + } + { hrsep Separator + MoveScaled(3,4,14,1) + } + } + { Panel1 Panel + MoveScaled(1,8,69,13) + Arrangement = Arrange.Horizontal + AutoResize = True + { Frame1 Frame + MoveScaled(0,0,63,11) + Expand = True + Text = ("") + { tlChoiceExp TextLabel + MoveScaled(1,6,48,3) + Text = ("") + } + { cbSetupMethod ComboBox + MoveScaled(14,1,22,3) + Text = ("") + ReadOnly = True + List = [("Vesa"), ("Fbdev")] + } + { tlSetupMethod TextLabel + MoveScaled(1,1,13,3) + Text = ("Video Driver") + Alignment = Align.Normal + } + } + } + { Panel2 Panel + MoveScaled(1,21,83,34) + Arrangement = Arrange.Horizontal + AutoResize = True + { Frame2 Frame + MoveScaled(0,0,35,25) + Expand = True + Text = ("Keyboard Layout") + { cvKbdLayout ColumnView + MoveScaled(1,2,32,21) + Expand = True + } + } + { Panel3 Panel + MoveScaled(38,2,38,22) + { tlColorDepth TextLabel + MoveScaled(0,2,11,3) + Text = ("Color Depth") + Alignment = Align.Normal + } + { tlScreenRes TextLabel + MoveScaled(0,5,18,3) + Text = ("Screen Resolution") + Alignment = Align.Normal + } + { cbScreenRes ComboBox + MoveScaled(21,5,15,3) + Text = ("") + List = [("1920x1280"), ("1600x1200"), ("1280x1024"), ("1440x900"), ("1280x800"), ("1024x768"), ("800x600"), ("640x480")] + } + { cbColorDepth ComboBox + MoveScaled(12,2,24,3) + Text = ("") + List = [("24 bit True Color"), ("16 bit Pseudo Color"), ("8 bit 256 Color"), ("4 bit 16 Color"), ("1 bit Mono B/W")] + } + } + } } Modified: branches/iVL/MdlConfLilo.module ============================================================================== --- branches/iVL/MdlConfLilo.module (original) +++ branches/iVL/MdlConfLilo.module Wed Oct 29 11:46:14 2008 @@ -69,7 +69,8 @@ '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" + IF Exist(ClsGlobal.sTargetMnt &/ "etc" &/ "lilo.conf.dist") THEN KILL ClsGlobal.sTargetMnt &/ "etc" &/ "lilo.conf.dist" + TRY MOVE ClsGlobal.sTargetMnt &/ "etc" &/ "lilo.conf" TO ClsGlobal.sTargetMnt &/ "etc" &/ "lilo.conf.dist" END IF ' THE FOLLOWING LINE IS FOR TESTING ONLY @@ -80,11 +81,11 @@ ' 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 - File.Save("/tmp/target_lilo.conf", sOut) + 'File.Save("/tmp/target_lilo.conf", sOut) END -PUBLIC SUB EXECUTE_LILO() +PUBLIC FUNCTION EXECUTE_LILO() AS Integer DIM sOut AS String DIM sDump AS String @@ -93,8 +94,10 @@ SHELL "chroot " & ClsGlobal.sTargetMnt & " /sbin/lilo -v || echo \'FAILED\' " TO sDump IF InStr(sDump, "FAILED") > 0 THEN Message.Error(("Lilo returned an error. Please see below") & gb.NewLine & sDump) + RETURN 1 ELSE Message(("Boot loader has been setup successfully")) + RETURN 0 END IF 'SHELL "umount " & ClsGlobal.sTargetMnt &/ "dev" WAIT 'SHELL "umount " & ClsGlobal.sTargetMnt &/ "proc" WAIT @@ -211,7 +214,7 @@ DIM sCliSection AS String DIM sWinSection AS String DIM sBootAddr AS String - +DIM cbox AS ComboBox @@ -259,15 +262,18 @@ "read-only" & " \n \n" ENDIF - - IF bInc.tag = ClsPartSel.sRoot AND MdlLiloOsList.bVlCliOption = TRUE THEN + FOR EACH cbox IN MdlPartSel.oMountPoints + IF cbox.text = "/" AND bInc.tag = cbox.tag THEN + IF MdlLiloOsList.bVlCliOption = TRUE THEN + 'IF bInc.tag = ClsPartSel.sRoot AND MdlLiloOsList.bVlCliOption = TRUE THEN sCliSection = Replace(sSection, "append = \"" & sEntryApnd & "\"", "append = \"2 " & sEntryApnd & "\"") 'splash=silent\"") sCliSection = Replace(sCliSection, "label = " & sEntryLbl, "label = " & sEntryLbl & "-tui") sCliSection = sCliSection & gb.NewLine ELSE sCliSection = "" END IF - + END IF + NEXT ELSE sSection = "" Modified: branches/iVL/MdlLiloOsList.module ============================================================================== --- branches/iVL/MdlLiloOsList.module (original) +++ branches/iVL/MdlLiloOsList.module Wed Oct 29 11:46:14 2008 @@ -227,6 +227,7 @@ DIM tl AS TextLabel DIM sShortAddr AS String DIM iwidth AS Integer = FrmLilo.TabStrip1.Width + DIM cb AS ComboBox x = 4 y = 4 @@ -369,7 +370,9 @@ ' Add an option to boot the recently installed OS to CLI mode 'ClsPartSel.sRoot = "/dev/sdb" ' for testing only 'IF sLiloDesc LIKE "Vector" THEN - IF arrLinux[i] = ClsPartSel.sRoot THEN + FOR EACH cb IN MdlPartSel.oMountPoints + IF cb.text = "/" AND cb.tag = arrLinux[i] THEN + 'IF arrLinux[i] = ClsPartSel.sRoot THEN cbInclude = NEW CheckBox(FrmLilo.TabStrip1) AS "VlCliOption" WITH cbInclude .Value = FALSE @@ -383,6 +386,7 @@ END WITH ME.iVlTag = FrmLilo.TabStrip1.Index - 1 END IF + NEXT 'END IF END WITH ' end jacking with the tabstrip itself END IF |