|
From: <cod...@go...> - 2008-07-28 02:35:03
|
Author: uelsk8s
Date: Sun Jul 27 19:34:51 2008
New Revision: 86
Added:
branches/iVL/FrmLilo.class
branches/iVL/FrmLilo.form
branches/iVL/MdlConfLilo.module
branches/iVL/MdlConfXorg.module
Log:
added rough start to lilo module
Added: branches/iVL/FrmLilo.class
==============================================================================
--- (empty file)
+++ branches/iVL/FrmLilo.class Sun Jul 27 19:34:51 2008
@@ -0,0 +1,2 @@
+' Gambas class file
+
Added: branches/iVL/FrmLilo.form
==============================================================================
--- (empty file)
+++ branches/iVL/FrmLilo.form Sun Jul 27 19:34:51 2008
@@ -0,0 +1,35 @@
+# Gambas Form File 2.0
+
+{ Form Form
+ MoveScaled(0,0,63,41)
+ Text = ("")
+ FullScreen = True
+ { tlBanner TextLabel
+ MoveScaled(0,0,58,4.5455)
+ Text = ("Configure and install lilo (Linux Boot Loader)")
+ }
+ { LiloTarget ComboBox
+ MoveScaled(1,11,45,3.2727)
+ Text = ("")
+ ReadOnly = True
+ List = [("MBR"), ("Sector"), ("Floppy")]
+ }
+ { YNLiloBox CheckBox
+ MoveScaled(1,5,18,3)
+ Text = ("Don't Install Lilo")
+ }
+ { FBResolution ComboBox
+ MoveScaled(1,18,45,3.2727)
+ Text = ("No installable images found.")
+ ReadOnly = True
+ List = [("Standard"), ("Bootsplash High"), ("Bootsplash Med"),
("Bootsplash Extra high")]
+ }
+ { LiloAppendBox TextBox
+ MoveScaled(1,27,45,3)
+ Text = ("")
+ }
+ { tlBanner2 TextLabel
+ MoveScaled(1,23,58,3)
+ Text = ("Lilo optional parameters: You may add any lilo boot
options here. ")
+ }
+}
Added: branches/iVL/MdlConfLilo.module
==============================================================================
--- (empty file)
+++ branches/iVL/MdlConfLilo.module Sun Jul 27 19:34:51 2008
@@ -0,0 +1,166 @@
+' Gambas module 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 Vmlinuz AS Object[]
+'
+' PUBLIC SUB LIST_BULK_SELECTION()
+'
+' DIM cb AS CheckBox
+' DIM i, ii, cby AS Integer
+' DIM sFIle AS String[]
+' DIM sCurrLine AS String[]
+' DIM sLine, sPkg, sDesc AS String
+' DIM vsize AS Variant
+' DIM isize AS Integer
+'
+' cby = 4
+'
+' Vmlinuz = NEW Object[]
+'
+' sFIle = Split(File.Load(Temp("SETUP.CONF")), gb.NewLine)
+' FOR i = 0 TO sFIle.count - 1
+' sLine = Trim(sFIle[i])
+' IF Left(sLine, Len("BULK")) = "BULK" THEN
+' sCurrLine = Split(sLine, ":")
+' 'line format is File_name.tlz:Size_kb:Description
+' sPkg = sCurrLine[0]
+' sDesc = sCurrLine[2]
+' vsize = sCurrLine[1]
+' IF InStr(sDesc, "\'") THEN
+' sDesc = Left(sDesc, Len(sDesc) - 1)
+' END IF
+' IF InStr(sPkg, "optional/") THEN
+'
+' cb = NEW CheckBox(FrmPkgSel.scrlInstallOpts) AS "Linux "
+' WITH cb
+' .Text = sDesc & Space(1) & "[ " & CStr(vsize)
& " KB ]"
+' .Width = MdlObjSizer.get_object_width(.Text) + 24
+' .x = 4
+' .y = cby
+' .Height = 27
+' .Tag = Right(sPkg, Len(sPkg) - InStr(sPkg, "=")
- 1)
+' .Value = TRUE
+' END WITH
+' ME.Vmlinuz.Add(cb)
+' cby = cby + cb.Height + 4
+' END IF
+' END IF
+' NEXT
+'
+' END
+'
+' PUBLIC FUNCTION WRITE_LILOCONF() AS Integer
+'
+' DIM sEntry AS String
+' DIM sPartition AS String
+' DIM sMountPoint AS String
+' DIM sMntOpts AS String
+' DIM i AS Integer
+' DIM sWinPart AS String
+' DIM sLilo AS String
+'
+' FrmInstallSys.tlCurrPkg.Text = "Writing new /etc/lilo.conf to system"
+'
+' sLilo = "# LILO configuration file" &
+' "#generated by vliloconf" &
+' "#" &
+' "#Start LILO global section" &
+'
+' sLilo = sLilo & gb.NewLine &
+' "boot = " & $LILO_TARGET
+' "DEFAULT = linux"
+' "prompt" &
+' "timeout = 100" &
+' "#Override dangerous defaults that rewrite the partition table:" &
+' "change - rules" &
+' " reset" &
+' "compact" &
+' "bitmap = /boot/bitmap/boot.bmp" &
+'
+'
+' ClsPartSel.sRoot & " / " & LCase(ClsPartSel.fRoot) & " " &
ME.fS_oPTIONS(LCase(ClsPartSel.fRoot)) & " 0 1" & gb.NewLine
+'
+' IF ClsPartSel.sTmp THEN
+' sFstab = sFstab & gb.NewLine & ClsPartSel.sTmp & " /tmp " &
LCase(ClsPartSel.fTmp) & " " & ME.fS_oPTIONS(LCase(ClsPartSel.fTmp))
& " 0 2 "
+' END IF
+'
+' sLilo = sLilo & "\n\n" &
+' "#VESA framebuffer console @ $CONSOLETYPE" &
+' "vga = $CONSOLENUM" &
+' "#Normal VGA console" &
+' "#vga = normal" &
+' "#VESA framebuffer console @ 1024 x768x64k" &
+' "#vga = 791" &
+' "#VESA framebuffer console @ 1024 x768x32k" &
+' "#vga = 790" &
+' "#VESA framebuffer console @ 1024 x768x256" &
+' "#vga = 773" &
+' "#VESA framebuffer console @ 800 x600x64k" &
+' "#vga = 788" &
+' "#VESA framebuffer console @ 800 x600x32k" &
+' "#vga = 787" &
+' "#VESA framebuffer console @ 800 x600x256" &
+' "#vga = 771" &
+' "#VESA framebuffer console @ 640 x480x64k" &
+' "#vga = 785" &
+' "#VESA framebuffer console @ 640 x480x32k" &
+' "#vga = 784" &
+' "#VESA framebuffer console @ 640 x480x256" &
+' "#vga = 769" &
+' "# END LILO global section" &
+'
+'
+' sLilo = sLilo & "\n"
+'
+' 'Message(sLilo)
+'
+' IF NOT ClsGlobal.sTargetMnt OR ClsGlobal.sTargetMnt = "" THEN
+' ClsGlobal.sTargetMnt = "/mnt/target"
+' END IF
+'
+' ';Message(ClsGlobal.sTargetMnt &/ "etc")
+' ' now save the file to /etc/fstab
+' IF Exist(ClsGlobal.sTargetMnt &/ "etc") = FALSE THEN
+' MKDIR ClsGlobal.sTargetMnt &/ "etc"
+' END IF
+' File.Save(ClsGlobal.sTargetMnt &/ "etc" &/ "lilo.conf", SConv(sLilo))
+' 'CATCH
+' 'PRINT ERROR
+' '.RETURN 1
+' 'RETURN 0
+'
+' PUBLIC FUNCTION fFind_WIN() AS String
+' 'PARTS = SHELL "fdisk-l | grep -E '^/dev/.* \* .*(FAT32|HPFS|NTFS|
Win)' | cut -f 1 -d ' '"
+' index = ""
+' FOR PART IN $PARTS; DO
+' let count1 = count1 + 1
+' LILO1_PART[$count1] = "$PART"
+' LILO1_LABEL[$count1] = "Win$index"
+' LILO1_DESC[$count1] = "Windows ($PART)"
+' IF ["$index"]; THEN
+' let index = $index + 1
+' ELSE
+' index = 1
+' fi
+' done
+'
+' ENDIF
+'
+'
+' END
Added: branches/iVL/MdlConfXorg.module
==============================================================================
--- (empty file)
+++ branches/iVL/MdlConfXorg.module Sun Jul 27 19:34:51 2008
@@ -0,0 +1,18 @@
+' Gambas module 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/>.
+
+
|