From: <cod...@go...> - 2008-08-04 21:52:51
|
Author: M0...@gm... Date: Mon Aug 4 14:52:27 2008 New Revision: 99 Added: branches/iVL/FrmLiloOsList.class branches/iVL/FrmLiloOsList.form branches/iVL/MdlLiloOsList.module Modified: branches/iVL/.lang/FMain.pot branches/iVL/.lang/MdlCore.pot branches/iVL/.lang/MdlSetup.pot branches/iVL/.project branches/iVL/FMain.class branches/iVL/FrmInstallSys.class branches/iVL/FrmInstallSys.form branches/iVL/FrmLilo.class branches/iVL/FrmLilo.form branches/iVL/MdlCore.module branches/iVL/MdlSetup.module Log: - Little more work on the Lilo setup part - First attempt at a credits model Modified: branches/iVL/.lang/FMain.pot ============================================================================== --- branches/iVL/.lang/FMain.pot (original) +++ branches/iVL/.lang/FMain.pot Mon Aug 4 14:52:27 2008 @@ -1,4 +1,4 @@ -# /root/svn-installer2/FMain.class +# /home/moises/area-51/projects/installer/FMain.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. @@ -14,19 +14,19 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: FMain.class:251 +#: FMain.class:257 msgid "Process Overview" msgstr "" -#: FMain.class:274 +#: FMain.class:280 msgid "Next" msgstr "" -#: FMain.class:280 +#: FMain.class:286 msgid "Back" msgstr "" -#: FMain.class:286 +#: FMain.class:292 msgid "Exit" msgstr "" Modified: branches/iVL/.lang/MdlCore.pot ============================================================================== --- branches/iVL/.lang/MdlCore.pot (original) +++ branches/iVL/.lang/MdlCore.pot Mon Aug 4 14:52:27 2008 @@ -1,4 +1,4 @@ -# /root/svn-installer2/MdlCore.module +# /home/moises/area-51/projects/installer/MdlCore.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 Mon Aug 4 14:52:27 2008 @@ -1,4 +1,4 @@ -# /root/svn-installer2/MdlSetup.module +# /home/moises/area-51/projects/installer/MdlSetup.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.project ============================================================================== --- branches/iVL/.project (original) +++ branches/iVL/.project Mon Aug 4 14:52:27 2008 @@ -1,6 +1,6 @@ # Gambas Project File 2.0 Title=VectorLinux Installer -Startup=MdlCore +Startup=FrmInstallSys Version=0.0.30 Library=gb.gtk Library=gb.form Modified: branches/iVL/FMain.class ============================================================================== --- branches/iVL/FMain.class (original) +++ branches/iVL/FMain.class Mon Aug 4 14:52:27 2008 @@ -171,8 +171,7 @@ IF ClsPkgSel.bCustom = TRUE THEN 'get the list of selected bulks only - 'MdlPkgSel.GET_USER_BULK_SELECTION() - 'Message("Going for a custom install") + MdlPkgSel.GET_USER_BULK_SELECTION() frmNext = FrmPkgsel2 ELSE @@ -191,7 +190,14 @@ CASE "FrmSummary" ' frmNext = FrmHostPrep ' prepare host frmNext = FrmInstallSys - + + 'POST INSTALL CONFIGURATION + CASE "FrmInstallSys" + frmNext = FrmLilo + + CASE "FrmLilo" + frmNext = FrmLiloOsList + END SELECT Modified: branches/iVL/FrmInstallSys.class ============================================================================== --- branches/iVL/FrmInstallSys.class (original) +++ branches/iVL/FrmInstallSys.class Mon Aug 4 14:52:27 2008 @@ -35,15 +35,16 @@ PUBLIC SUB Form_Open() ' prepare the system - ME.HIDE_PROGRES_CONTROLS() + 'ME.HIDE_PROGRES_CONTROLS() ME.FrmProg.Text = " Preparing system for installation " ME.tlCurrStepLbl.Text = "Current Step" -ME.BEGIN_PROCESS() - +'ME.BEGIN_PROCESS() +MdlSetup.RUN_CREDITS("/mnt/loop/CREDIT", ME.tlCredits) +ME.tmCredits.Enabled = TRUE END PUBLIC SUB Form_Show() @@ -88,3 +89,14 @@ + +PUBLIC SUB tmCredits_Timer() + + DEC ME.sclCredits.x + + + IF ME.sclCredits.x < - ME.tlCredits.Width + ME.tlCredits.x THEN + ME.sclCredits.x = ME.sclCredits.Width + ENDIF + +END Modified: branches/iVL/FrmInstallSys.form ============================================================================== --- branches/iVL/FrmInstallSys.form (original) +++ branches/iVL/FrmInstallSys.form Mon Aug 4 14:52:27 2008 @@ -1,7 +1,7 @@ # Gambas Form File 2.0 { Form Form - MoveScaled(0,0,78,51) + MoveScaled(0,0,90,66) Text = ("") { tlBanner TextLabel MoveScaled(1,1,63,5) @@ -11,7 +11,7 @@ MoveScaled(1,10,76,34) Text = ("") { tlCurrPkg TextLabel - MoveScaled(2,1,73,3.375) + MoveScaled(2,1,73,3.3333) Text = ("Installing ...") } { pbInstallProg ProgressBar @@ -19,15 +19,31 @@ Label = False } { pbInstallProg2 ProgressBar - MoveScaled(1,19,44,3.375) + MoveScaled(1,19,44,3.3333) } { tlCurrPkg2 TextLabel - MoveScaled(1,15,45,3.375) + MoveScaled(1,15,45,3.3333) Text = ("Total progress") } { tlCurrStepLbl TextLabel MoveScaled(2,5,11,3) Text = ("Current Step ") } + } + { frmCredits Frame + MoveScaled(2,47,81,13) + Text = ("VectorLinux ... Brought to you by ") + { sclCredits ScrollView + MoveScaled(2,3,77,8) + { tlCredits TextLabel + MoveScaled(1,1,53,4) + Text = ("TextLabel1") + } + } + } + { tmCredits #Timer + #X = 480 + #Y = 120 + Delay = 300 } } Modified: branches/iVL/FrmLilo.class ============================================================================== --- branches/iVL/FrmLilo.class (original) +++ branches/iVL/FrmLilo.class Mon Aug 4 14:52:27 2008 @@ -18,6 +18,11 @@ PUBLIC SUB Form_Open() +' FMain.FrmCurr = ME +' FMain.tvPlan["Conf0"].Selected = TRUE +' FMain.tvPlan["Conf0"].Picture = MdlCore.sNowPic +' FMain.tvPlan["Inst2"].Picture = MdlCore.sDonePic + MdlConfLilo.DISPLAY_LILO_TARGET_OPTIONS() END @@ -55,6 +60,15 @@ .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)) + .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 + +END + +PUBLIC SUB Button1_Click() + + ME.Hide + FrmLiloOsList.Show END Modified: branches/iVL/FrmLilo.form ============================================================================== --- branches/iVL/FrmLilo.form (original) +++ branches/iVL/FrmLilo.form Mon Aug 4 14:52:27 2008 @@ -8,7 +8,7 @@ Text = ("Configure and install lilo (Linux Boot Loader)") } { LiloTarget ComboBox - MoveScaled(13,10,39,3.3333) + MoveScaled(13,10,39,3.1667) Text = ("") ReadOnly = True List = [] @@ -18,10 +18,10 @@ Text = ("Don't Install Lilo") } { FBResolution ComboBox - MoveScaled(20,15,32,3.3333) - Text = ("No installable images found.") + MoveScaled(20,15,32,3.1667) + Text = ("") ReadOnly = True - List = [("Standard"), ("Bootsplash High"), ("Bootsplash Med"), ("Bootsplash Extra high")] + List = [("Standard"), ("Bootsplash Med"), ("Bootsplash High"), ("Bootsplash Extra high")] } { LiloAppendBox TextBox MoveScaled(1,27,45,3) @@ -32,11 +32,15 @@ Text = ("Lilo optional parameters: You may add any lilo boot options here. ") } { tlTarGet TextLabel - MoveScaled(1,10,10,3.3333) + MoveScaled(1,10,10,3.1667) Text = ("Target") } { tlFbMode TextLabel - MoveScaled(1,15,18,3.3333) + MoveScaled(1,15,18,3.1667) Text = ("Video Resolution") + } + { Button1 Button + MoveScaled(47,34,7,2) + Text = ("Button1") } } Added: branches/iVL/FrmLiloOsList.class ============================================================================== --- (empty file) +++ branches/iVL/FrmLiloOsList.class Mon Aug 4 14:52:27 2008 @@ -0,0 +1,43 @@ +' 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 Button1_Click() + + ME.Hide + FrmLiloOsList.Show + +END + +PUBLIC SUB Form_Open() + + MdlLiloOsList.LIST_LILO_OS_CHOICES() + +END + +PUBLIC SUB Form_Resize() + + WITH ME + + .tlbanner.Move(4, 4, .ClientWidth - .tlbanner.x * 2) + .VPanel1.Move(4, .tlbanner.top + .tlbanner.Height + 16, .ClientWidth - .VPanel1.x * 2) + + END WITH + +END Added: branches/iVL/FrmLiloOsList.form ============================================================================== --- (empty file) +++ branches/iVL/FrmLiloOsList.form Mon Aug 4 14:52:27 2008 @@ -0,0 +1,17 @@ +# Gambas Form File 2.0 + +{ Form Form + MoveScaled(0,0,74,59) + Text = ("") + { tlbanner TextLabel + MoveScaled(1,3,64,7) + Text = ("The following operating systems have been detected on this computer. Please select the ones to be included in the boot menu.") + } + { VPanel1 VPanel + MoveScaled(1,13,71,43) + { scrlOsList ScrollView + MoveScaled(0,0,71,40) + Expand = True + } + } +} Modified: branches/iVL/MdlCore.module ============================================================================== --- branches/iVL/MdlCore.module (original) +++ branches/iVL/MdlCore.module Mon Aug 4 14:52:27 2008 @@ -481,7 +481,7 @@ .Add("Inst1", "Prepare Host", sToDopic, "Inst") .Add("Inst2", "Install Operating System", sToDopic, "Inst") .Add("Conf", "System Configuration", sCatPic) - .Add("Conf0", "Computer Name", sToDopic, "Conf") + .Add("Conf0", "Boot Menu Options", sToDopic, "Conf") .Add("Conf1", "System Administrator", sToDopic, "Conf") .Add("Conf2", "Network Configuration", sToDopic, "Conf") .Add("Conf3", "User Accounts", sToDopic, "Conf") Added: branches/iVL/MdlLiloOsList.module ============================================================================== --- (empty file) +++ branches/iVL/MdlLiloOsList.module Mon Aug 4 14:52:27 2008 @@ -0,0 +1,132 @@ +' 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/>. + +PRIVATE cbarr AS Object[] +PRIVATE sText AS String +PUBLIC SUB LIST_LILO_OS_CHOICES() + + DIM sFatList AS String + DIM arrFat AS String[] + DIM sNTFSLst AS String + DIM arrNTFS AS String[] + DIM sLinuxList AS String + DIM arrLinux AS String[] + DIM i AS Integer + DIM sLiloLabel AS String + DIM sLiloDesc AS String + DIM svmLinuz AS String + DIM cbLiloItem AS CheckBox + DIM x, y AS Integer + x = 4 + y = 4 + + 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) + + 'RETURN + IF sLinuxList <> "" THEN + arrLinux = Split(sLinuxList, "\n") + END IF + + 'FOR TESTING PURPOSES, ONLY DO THE LINUX DRIVES + 'create a temporary monunt dir + TRY MKDIR "/tmp/lilo_tmp" + FOR i = 0 TO arrLinux.Count - 1 + 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") + cbLiloItem = NEW CheckBox(FrmLiloOsList.scrlOsList) AS "OsList" + WITH cbLiloItem + .x = x + .y = y + IF sLiloDesc <> "Linux" THEN + .Text = sLiloDesc & Space(1) & "Linux" & Space(1) & "on" & Space(1) & arrLinux[i] + ELSE + .Text = sLiloDesc + END IF + .tag = arrLinux[i] + .Height = 27 + .Width = MdlObjSizer.get_object_width(.text) + 36 ' allow room for the checkbox + .Value = TRUE + + END WITH + cbarr.Add(cbLiloItem) + y = y + cbLiloItem.Height + 4 + + END IF + + SHELL "umount /tmp/lilo_tmp" WAIT + NEXT + + + + +END + +PUBLIC SUB OsList_click() + DIM iH AS Integer = 28 + DIM box AS CheckBox + + + + + + +END + + +PUBLIC FUNCTION ID_DISTRO(sWhereIsItMounted AS String) AS String + + DIM sBasePath AS String = sWhereIsItMounted &/ "etc" + DIM sDesc AS String + + IF Exist(sBasePath &/ "vector-version") THEN + sDesc = "Vector" + ELSE IF Exist(sBasePath &/ "sysconfig" &/ "vector") THEN + sDesc = "Vector" + ELSE IF Exist(sBasePath &/ "slackware-version") THEN + sDesc = "Slackware" + ELSE IF Exist(sBasePath &/ "Suse-release") OR Exist(sBasePath &/ "UnitedLinux-release") THEN + sDesc = "SuSe" + ELSE IF Exist(sBasePath &/ "gentoo-release") THEN + sDesc = "Gentoo" + ELSE IF Exist(sBasePath &/ "debian_version") THEN + sDesc = "Debian" + ELSE IF Exist(sBasePath &/ "mandrake-release") THEN + sDesc = "Makdrake" + ELSE IF Exist(sBasePath &/ "redhat-release") THEN + sDesc = "RedHat" + ELSE IF Exist(sBasePath &/ "fedora-release") THEN + sDesc = "Fedora" + ELSE + sDesc = "Linux" + END IF + RETURN sDesc + +END Modified: branches/iVL/MdlSetup.module ============================================================================== --- branches/iVL/MdlSetup.module (original) +++ branches/iVL/MdlSetup.module Mon Aug 4 14:52:27 2008 @@ -205,5 +205,20 @@ +PUBLIC SUB RUN_CREDITS(sCreditFile AS String, tlOutput AS TextLabel) + + DIM sFile AS String[] = Split(File.Load(sCreditFile), "\n") + DIM i AS Integer + + FOR i = 0 TO sFile.count - 1 + tlOutput.Text = tlOutput.Text & Space(1) & Trim(sFile[i]) + NEXT + tlOutput.Width = MdlObjSizer.get_object_width(tlOutput.Text) + 24 + tlOutput.Border = Border.Plain + + + + +END |