From: <cod...@go...> - 2008-07-30 22:01:08
|
Author: M0...@gm... Date: Wed Jul 30 15:00:17 2008 New Revision: 89 Modified: branches/iVL/FrmInstallSys.class branches/iVL/MdlCore.module branches/iVL/MdlInstallCustom.module branches/iVL/MdlInstallSys.module Log: - Modified function to search for ISO's in all partitions, not just linux. - Re-routed install procedures to make sure fstab gets written after all packages are installed - Modified BULK installation function to use a gambas routine reading SETUP.CONF to get the list of bulks to install rather than a shell output. Modified: branches/iVL/FrmInstallSys.class ============================================================================== --- branches/iVL/FrmInstallSys.class (original) +++ branches/iVL/FrmInstallSys.class Wed Jul 30 15:00:17 2008 @@ -35,12 +35,13 @@ PUBLIC SUB Form_Open() ' prepare the system + ME.HIDE_PROGRES_CONTROLS() ME.FrmProg.Text = " Preparing system for installation " ME.tlCurrStepLbl.Text = "Current Step" -ME.HIDE_PROGRES_CONTROLS() + ME.BEGIN_PROCESS() END Modified: branches/iVL/MdlCore.module ============================================================================== --- branches/iVL/MdlCore.module (original) +++ branches/iVL/MdlCore.module Wed Jul 30 15:00:17 2008 @@ -96,7 +96,7 @@ DIM sPartition AS String 'SHELL "sudo /sbin/probepart | grep -e \"*Linux$\" | cut -f 1 -d \' \'" TO sResults - SHELL "/sbin/probepart | grep -e \" Linux$\" | cut -f 1 -d \' \' | grep /dev" TO sResults + SHELL "/sbin/probepart | cut -f 1 -d \' \' | grep /dev" TO sResults sResults = Trim(sResults) 'Message.Info(sResults) Modified: branches/iVL/MdlInstallCustom.module ============================================================================== --- branches/iVL/MdlInstallCustom.module (original) +++ branches/iVL/MdlInstallCustom.module Wed Jul 30 15:00:17 2008 @@ -29,6 +29,13 @@ DIM iRet AS Integer = 0 + WITH FMain + .tvPlan["Inst2"].Selected = TRUE + .tvPlan["Inst2"].Picture = MdlCore.sNowPic + .tvPlan["Inst1"].Picture = MdlCore.sDonePic + END WITH + + ME.CALCULATE_TOTAL_PACKAGES() 'RETURN @@ -74,6 +81,8 @@ Message.Error("Unable to install kernels. " & gb.NewLine & sErr) RETURN END IF + ' write new fstab now + MdlInstallSys.WRITE_NEW_FSTAB() ' Installation complete.... Message("Vectorlinux is now installed on your system . Enjoy!") Modified: branches/iVL/MdlInstallSys.module ============================================================================== --- branches/iVL/MdlInstallSys.module (original) +++ branches/iVL/MdlInstallSys.module Wed Jul 30 15:00:17 2008 @@ -69,10 +69,16 @@ 'WRITE THE NEW FSTAB NOW, RIGHT BEFORE INSTALLING PACKAGES. - ME.WRITE_NEW_FSTAB() ' do this from the install form + 'ME.WRITE_NEW_FSTAB() ' do this from the install form 'redirect to packages install 'ME.INSTALL_PACKAGES() - + ' FROM HERE, DECIDE WHICH WAY TO GO + IF ClsPkgSel.bCustom = TRUE THEN + MdlInstallCustom.PERFORM_CUSTOM_INSTALL + ELSE + MdlInstallSys.PERFORM_FULL_INSTALL() + END IF + @@ -92,13 +98,9 @@ DIM sFstab AS String ' make the changes show up on the steps now - WITH FMain - .tvPlan["Inst2"].Selected = TRUE - .tvPlan["Inst2"].Picture = MdlCore.sNowPic - .tvPlan["Inst1"].Picture = MdlCore.sDonePic - END WITH + + - ClsGlobal.sTargetMnt = "/home/moises/mnt/target" FrmInstallSys.tlCurrPkg.Text = "Writing new /etc/fstab to system" @@ -239,8 +241,21 @@ END PUBLIC SUB PERFORM_FULL_INSTALL() + DIM iret AS Integer + + ClsGlobal.sTargetMnt = "/home/moises/mnt/target" + + WITH FMain + .tvPlan["Inst2"].Selected = TRUE + .tvPlan["Inst2"].Picture = MdlCore.sNowPic + .tvPlan["Inst1"].Picture = MdlCore.sDonePic + END WITH + + + + PRINT "Installing bulks" MdlSetup.SHOW_PROGRESS_CONTROLS() iret = ME.INSTALL_BULK_PACKAGES() @@ -276,6 +291,9 @@ PRINT "Error installing kernels ... exit " RETURN END IF + + ' WRITE THE FSTAB NOW + MdlInstallSys.WRITE_NEW_FSTAB() Message.Info("Vectorlinux is now installed in your system. REboot may be necessary") @@ -346,20 +364,27 @@ DIM sBulkDesc AS String DIM vTargetSize AS Variant DIM i AS Integer + DIM sFile AS String = File.Load(ClsGlobal.sSourceMnt &/ "veclinux" &/ "SETUP.CONF") + DIM sLine AS String + - SHELL "cat " & ClsGlobal.sSourceMnt &/ "veclinux" &/ "SETUP.CONF | grep ^BULK" TO sRawList - sList = Split(sRawList, "\n") + ' SHELL "cat " & ClsGlobal.sSourceMnt &/ "veclinux" &/ "SETUP.CONF | grep ^BULK" TO sRawList + sList = Split(sFile, "\n") FOR i = 0 TO sList.count - 1 + sLine = Trim(sList[i]) + IF Left(sLine, Len("BULKX")) = "BULK" & "*[0-9]*" THEN + sTrimmed = Right(sList[i], Len(sList[i]) - InStr(sList[i], "\'")) sTrimmed = Left(sTrimmed, InStr(sTrimmed, "\'") - 1) sLineArr = Split(sTrimmed, ":") sBulkPath = sLineArr[0] vBulkSize = sLineArr[1] sBulkDesc = sLineArr[2] + SHELL "export gsize=$(df| grep " & ClsPartSel.sRoot & " ) && echo $gsize | cut -f3 -d \' \'" TO vTargetSize - ME.BULK_INSTALL(ClsGlobal.sSourceMnt &/ "veclinux" &/ sBulkPath) + 'ME.BULK_INSTALL(ClsGlobal.sSourceMnt &/ "veclinux" &/ sBulkPath) WAIT 1 IF hproc.State = Process.Running THEN REPEAT @@ -369,9 +394,9 @@ hproc.State = Process.Stopped 'error check END IF - + END IF NEXT - +'RETURN IF InStr(sDump, "FAILED") > 0 THEN RETURN 1 ELSE |