From: <cod...@go...> - 2008-07-25 21:06:40
|
Author: M0E.lnx Date: Fri Jul 25 14:05:23 2008 New Revision: 81 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/FrmLicense.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/FrmDiskPart.form branches/iVL/MdlCore.module branches/iVL/MdlInstallSys.module branches/iVL/MdlPartFrmt.module branches/iVL/MdlPartSel.module branches/iVL/MdlSetup.module Log: More cosmetic fixes. Implemented the overall install progress meter. Modified: branches/iVL/.lang/ClsGlobal.pot ============================================================================== --- branches/iVL/.lang/ClsGlobal.pot (original) +++ branches/iVL/.lang/ClsGlobal.pot Fri Jul 25 14:05:23 2008 @@ -1,4 +1,4 @@ -# /root/new-install/ClsGlobal.class +# /root/iVL/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 Fri Jul 25 14:05:23 2008 @@ -1,4 +1,4 @@ -# /root/new-install/ClsPartSel.class +# /root/iVL/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 Fri Jul 25 14:05:23 2008 @@ -1,4 +1,4 @@ -# /root/new-install/ClsWinDrives.class +# /root/iVL/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 Fri Jul 25 14:05:23 2008 @@ -1,4 +1,4 @@ -# /root/new-install/FMain.class +# /root/iVL/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 Fri Jul 25 14:05:23 2008 @@ -1,4 +1,4 @@ -# /root/new-install/FrmDiskPart.class +# /root/iVL/FrmDiskPart.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. @@ -14,7 +14,7 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: FrmDiskPart.class:100 +#: FrmDiskPart.class:102 msgid "Disk Partitioning:" msgstr "" Modified: branches/iVL/.lang/FrmLicense.pot ============================================================================== --- branches/iVL/.lang/FrmLicense.pot (original) +++ branches/iVL/.lang/FrmLicense.pot Fri Jul 25 14:05:23 2008 @@ -1,4 +1,4 @@ -# /root/new-install/FrmLicense.class +# /root/iVL/FrmLicense.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 Fri Jul 25 14:05:23 2008 @@ -1,4 +1,4 @@ -# /root/new-install/FrmPartScheme.class +# /root/iVL/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 Fri Jul 25 14:05:23 2008 @@ -1,4 +1,4 @@ -# /root/new-install/FrmPartSel.class +# /root/iVL/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 Fri Jul 25 14:05:23 2008 @@ -1,4 +1,4 @@ -# /root/new-install/FrmPkgSel.class +# /root/iVL/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 Fri Jul 25 14:05:23 2008 @@ -1,4 +1,4 @@ -# /root/new-install/FrmSelISO.class +# /root/iVL/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 Fri Jul 25 14:05:23 2008 @@ -1,4 +1,4 @@ -# /root/new-install/FrmSummary.class +# /root/iVL/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 Fri Jul 25 14:05:23 2008 @@ -1,4 +1,4 @@ -# /root/new-install/FrmWinDrives.class +# /root/iVL/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 Fri Jul 25 14:05:23 2008 @@ -1,4 +1,4 @@ -# /root/new-install/MdlCore.module +# /root/iVL/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 Fri Jul 25 14:05:23 2008 @@ -1,4 +1,4 @@ -# /root/new-install/MdlDiskPart.module +# /root/iVL/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 Fri Jul 25 14:05:23 2008 @@ -1,4 +1,4 @@ -# /root/new-install/MdlObjSizer.module +# /root/iVL/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 Fri Jul 25 14:05:23 2008 @@ -1,4 +1,4 @@ -# /root/new-install/MdlPartSel.module +# /root/iVL/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 Fri Jul 25 14:05:23 2008 @@ -1,4 +1,4 @@ -# /root/new-install/MdlPkgSel.module +# /root/iVL/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 Fri Jul 25 14:05:23 2008 @@ -1,4 +1,4 @@ -# /root/new-install/MdlSetup.module +# /root/iVL/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 Fri Jul 25 14:05:23 2008 @@ -1,4 +1,4 @@ -# /root/new-install/MdlSummarize.module +# /root/iVL/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 Fri Jul 25 14:05:23 2008 @@ -1,4 +1,4 @@ -# /root/new-install/MdlWinDrives.module +# /root/iVL/MdlWinDrives.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/FrmDiskPart.form ============================================================================== --- branches/iVL/FrmDiskPart.form (original) +++ branches/iVL/FrmDiskPart.form Fri Jul 25 14:05:23 2008 @@ -3,11 +3,17 @@ { Form Form MoveScaled(0,0,84,55) Text = ("") + Arrangement = Arrange.Vertical { tlBanner TextLabel MoveScaled(1,2,81,9) Text = ("Disk Partitioning:") } - { EmbGPARTED Embedder - MoveScaled(1,13,82,39) + { VPanel1 VPanel + MoveScaled(1,12,74,48) + Expand = True + { EmbGPARTED Embedder + MoveScaled(6,7,76,32) + Expand = True + } } } Modified: branches/iVL/MdlCore.module ============================================================================== --- branches/iVL/MdlCore.module (original) +++ branches/iVL/MdlCore.module Fri Jul 25 14:05:23 2008 @@ -45,6 +45,9 @@ FOR i = 0 TO sISOList.count - 1 sIso = Trim(sISOList[i]) SHELL "umount /mnt/loop" WAIT + IF Exist("/mnt/loop") = FALSE THEN + MKDIR "/mnt/loop" + END IF SHELL "mount -o loop " & ClsGlobal.sSourceMnt &/ sISO & Space(1) & "/mnt/loop" WAIT IF Exist("/mnt/loop/veclinux/SETUP.CONF") = TRUE THEN IF FrmSelISO.lstInstallableImg.Find(sISO & " on " & sDrive) = -1 THEN Modified: branches/iVL/MdlInstallSys.module ============================================================================== --- branches/iVL/MdlInstallSys.module (original) +++ branches/iVL/MdlInstallSys.module Fri Jul 25 14:05:23 2008 @@ -18,6 +18,10 @@ PRIVATE hproc AS Process PRIVATE sDump AS String PRIVATE sErr AS String + +PRIVATE iPkgCnt AS Integer +PRIVATE iPkgNum AS Integer = 0 + PUBLIC FUNCTION MOUNT_DEFINED_PARTITIONS() AS Integer @@ -30,7 +34,7 @@ TRY MKDIR ClsGlobal.sTargetMnt END IF - FrmInstallSys.tlCurrPkg.Text = "Mounting target partitions" + ' FrmInstallSys.tlCurrPkg.Text = "Mounting target partitions" SHELL "umount " & ClsGlobal.sTargetMnt WAIT 'clear the mount point @@ -191,8 +195,10 @@ IF ClsPkgSel.bCustom = TRUE THEN ' perform custom install ELSE + FrmInstallSys.tlCurrPkg.Text = "Vectorlinux is now installing ... Please wait" ME.PERFORM_FULL_INSTALL() 're-direct to packages for now + FrmInstallSys.tlCurrPkg.Text = "Installing Additional software... Please wait" ME.INSTALL_PACKAGES() END IF @@ -242,14 +248,25 @@ DIM sConfPath AS String DIM sOptPkgPath AS String DIM iVal AS Float + DIM sBasePath AS String = ClsGlobal.sSourceMnt &/ "veclinux" WITH FrmInstallSys .Resize(FMain.pnlWinHost.Width, FMain.pnlWinHost.Height) END WITH + iPkgCnt = MdlSetup.CALCULATE_PACKAGE_COUNT(FALSE) + Message.Info("Total packages = " & iPkgCnt) + RETURN + ' make sure the progress is revealed at the main window + WITH FMain + .tvPlan["Inst1"].Picture = MdlCore.sDonePic + .tvPlan["Inst2"].Selected = TRUE + .tvPlan["Inst2"].Picture = MdlCore.sNowPic + END WITH - MdlSetup.SHOW_PROGRESS_CONTROLS() + MdlSetup.SHOW_PROGRESS_CONTROLS() + FrmInstallSys.tlBanner.Text = "Vectorlinux is now being installed. Please wait..." ClsGlobal.sTargetMnt = "/mnt/target" sFile = Split(File.Load(Temp$("SETUP.CONF")), "\n") FOR i = 0 TO sFile.count - 1 @@ -287,8 +304,7 @@ REPEAT WAIT 2 UPDATE_STEP_PROGRESS(sTargetSize, sPakSize) - - + UNTIL hproc.State = Process.Stopped @@ -298,9 +314,14 @@ "<b>ERROR</b>" & gb.NewLine & sErr) RETURN 1 - END IF + ELSE + FrmInstallSys.pbInstallProg.Value = 1 + END IF PRINT sPak & " is installed... " + INC iPkgNum + FrmInstallSys.pbInstallProg2.Value = MdlSetup.UPDATE_OVERALL_PROGRESS(iPkgCnt, iPkgNum) + END IF 'PRINT "Needs to install " & sPak END IF NEXT @@ -391,13 +412,28 @@ WAIT 1 UPDATE_STEP_PROGRESS(sTargetSize, iTlzSize) ' figure out the progress again + UNTIL hproc.State = Process.Stopped + IF InStr(sDump, "FAILED") > 0 THEN + ERROR + RETURN 1 + ELSE + IF FrmInstallSys.pbInstallProg.Value <> 1 THEN + FrmInstallSys.pbInstallProg.Value = 1 + END IF + END IF END IF + INC iPkgNum + FrmInstallSys.pbInstallProg2.Value = MdlSetup.UPDATE_OVERALL_PROGRESS(iPkgCnt, iPkgNum) END IF NEXT - + ' DONE INSTALLING SOFTWARE. + 'Message.Info("Installation complete. Ready for configuration" + FrmInstallSys.tlBanner.Text = "Installation phase complete. Ready for configuration" + FrmInstallSys.pbInstallProg.Value = 1 + MdlCore.unlock_gui() END Modified: branches/iVL/MdlPartFrmt.module ============================================================================== --- branches/iVL/MdlPartFrmt.module (original) +++ branches/iVL/MdlPartFrmt.module Fri Jul 25 14:05:23 2008 @@ -75,6 +75,7 @@ .tlCurrPkg2.Visible = TRUE .FrmProg.Text = " Installing VectorLinux " END WITH + frminstallsys.tlBanner.Text = "Vectorlinux is now installing ... Please wait." MdlCore.LOCK_GUI() MdlInstallSys.MOUNT_DEFINED_PARTITIONS() ' let the game begin @@ -89,6 +90,11 @@ DIM sCommand AS String DIM sResult AS String + DIM iMinFrameH AS Integer + + FMain.tvPlan["Inst1"].Selected = TRUE + FMain.tvPlan["Inst1"].Picture = MdlCore.sNowPic + 'Umount the volume first SHELL "mount | grep " & sAddr TO sResult @@ -108,13 +114,37 @@ sCommand = "mkfs.xfs -f " & sAddr CASE "jfs" sCommand = "mkfs.jfs -q " & sAddr + CASE "swap" + sCommand = "mkswap " & sAddr END SELECT + + ' fix the form + + iMinFrameH = FrmInstallSys.tlCurrPkg.Height + FrmInstallSys.tlCurrPkg2.Height + frminstallsys.tlCurrStepLbl.Height + FrmInstallSys.pbInstallProg2.Height + FrmInstallSys.tlCurrStepLbl.Height + 36 + WITH FrmInstallSys + .FrmProg.Move(4, .tlBanner.top + .tlBanner.Height + 8, .ClientWidth - (.FrmProg.Left * 2), iMinFrameH) + .tlBanner.Move(4, 16, .ClientWidth - (.tlBanner.Left * 2)) + '.tlBanner.Border = Border.Plain + .FrmProg.Move(4, .tlBanner.top + (.tlBanner.Height + 8), .ClientWidth - (.FrmProg.Left * 2)) + .tlCurrPkg.move(8, 32, .FrmProg.Width - (.tlCurrPkg.Left * 2)) + .tlCurrStepLbl.Move(.tlCurrPkg.Left, .tlCurrPkg.top + (.tlCurrPkg.Height + 4), MdlObjSizer.get_object_width(.tlCurrStepLbl.Text) + 8, 27) + .pbInstallProg.Move(.tlCurrStepLbl.left + (.tlCurrStepLbl.Width), .tlCurrStepLbl.top, .FrmProg.Width - (.tlCurrStepLbl.Width + (.tlcurrsteplbl.left * 2))) + .tlCurrPkg2.Move(.tlCurrPkg.Left, .tlCurrPkg.top + (.tlCurrPkg.Height * 2.5), .FrmProg.Width - (.tlCurrPkg.Left * 2)) + .pbInstallProg2.Move(.tlCurrPkg2.Left, .tlCurrPkg2.top + (.tlCurrPkg2.Height + 2), .tlCurrPkg2.Width, 27) + + '.pbInstallProg.Move(.tlCurrStepLbl.Left + (.tlCurrStepLbl.Width + 2), .FrmProg.Width - (.tlCurrStepLbl.Width + (.tlCurrStepLbl.left * 2))) ' + '.pbInstallProg.Move(.tlCurrPkg.Left, .tlCurrPkg.top + (.tlCurrPkg.Height + 2), .tlCurrPkg.Width) + + END WITH + + PRINT "Formatting " & sAddr & " to " & sFS hproc = SHELL sCommand & " || echo \'FAILED\'" WAIT 'for read WAIT IF hproc.State = Process.Running THEN REPEAT ' FrmHostPrep.tlStatus.Text = "Formatting " & sAddr & " as " & sFS + FrmInstallSys.tlCurrPkg.Text = " Formatting " & sAddr & " as " & sFS WAIT @@ -132,6 +162,10 @@ RETURN 1 ELSE 'Message(" System is ready for VectorLinux") + ' ready to install packages + WITH FMain + .tvPlan["Inst1"].Picture = MdlCore.sDonePic + END WITH RETURN 0 END IF Modified: branches/iVL/MdlPartSel.module ============================================================================== --- branches/iVL/MdlPartSel.module (original) +++ branches/iVL/MdlPartSel.module Fri Jul 25 14:05:23 2008 @@ -61,7 +61,7 @@ .Height = 27 .x = x .y = y - .Width = MdlObjSizer.get_object_width(.text) * 2.5 + .Width = MdlObjSizer.get_object_width(.text) * 2.2 END WITH icol1 = x icol2 = x + tl.Width + 4 @@ -71,7 +71,7 @@ .Height = 27 .x = icol2 .y = y - .Width = MdlObjSizer.get_object_width(.text) * 2.5 + .Width = MdlObjSizer.get_object_width(.text) * 2.2 END WITH icol3 = tl.x + tl.Width + 4 tl = NEW TextLabel(FrmPartSel.scrollPartitions) AS "HEADERS" @@ -80,7 +80,7 @@ .Height = 27 .x = icol3 .y = y - .Width = MdlObjSizer.get_object_width(.text) * 2.5 + .Width = MdlObjSizer.get_object_width(.text) * 2.2 END WITH y = y + 20 @@ -136,6 +136,7 @@ .Add("/usr") .Add("/var") .Add("/tmp") + .Add("Swap") IF InStr(FrmSelISO.lstInstallableImg.Text, .tag) THEN .Enabled = FALSE ELSE @@ -159,7 +160,17 @@ .Add("Ext2") .Add("Ext3") .Add("JFS") - + IF InStr(Trim(FrmSelISO.lstInstallableImg.Text), .Tag) THEN + .Enabled = FALSE + ELSE + .Enabled = TRUE + END IF + FOR EACH cb IN oFsTypes + IF cb.Tag = .Tag THEN + cb.Enabled = FALSE + END IF + NEXT + END WITH oFsTypes.Add(cb) @@ -273,19 +284,30 @@ ClsPartSel.sTmp = LCase(LAST.tag) CASE "/var" ClsPartSel.sVar = LCase(LAST.tag) + CASE "Swap" + END SELECT IF sText = "Not Used" THEN FOR EACH sdropdwn IN oFsTypes - IF sdropdwn.Tag = sTag THEN - sdropdwn.Text = "Do not format" + IF sdropdwn.Tag LIKE sTag THEN sdropdwn.Enabled = FALSE + sdropdwn.Text = "Do not format" + + + ELSE IF sText = "Swap" THEN + IF sdropdwn.Tag = sTag THEN + sdropdwn.Enabled = FALSE + sdropdwn.Text = "Swap" + END IF ELSE sdropdwn.Enabled = TRUE END IF NEXT + 'ELSE + ELSE FOR EACH sdropdwn IN oFsTypes IF sdropdwn.Tag = sTag THEN @@ -293,7 +315,7 @@ END IF NEXT END IF - IF LAST.text <> "Not Used" THEN + IF LAST.text <> "Not Used" AND LAST.text <> "Swap" THEN FOR EACH sdropdwn IN oFsTypes IF sdropdwn.tag = LAST.tag THEN sdropdwn.Text = "XFS" @@ -302,8 +324,15 @@ END IF NEXT + ELSE IF LAST.text = "Swap" THEN + FOR EACH sdropdwn IN oFsTypes + IF sdropdwn.tag = LAST.tag THEN + sdropdwn.Enabled = FALSE + sdropdwn.Text = "Swap" + END IF + NEXT END IF - + 'send the value to the form public value ME.SET_SELECTED_PARTITION(LAST.tag, LAST.text) @@ -331,6 +360,7 @@ ClsPartSel.fUsr = LAST.text END SELECT END IF + NEXT Modified: branches/iVL/MdlSetup.module ============================================================================== --- branches/iVL/MdlSetup.module (original) +++ branches/iVL/MdlSetup.module Fri Jul 25 14:05:23 2008 @@ -145,6 +145,59 @@ END +PUBLIC FUNCTION UPDATE_OVERALL_PROGRESS(iTotalPkgs AS Integer, iCurrPkg AS Integer) AS Float + + DIM fRet AS Float + fRet = iCurrPkg / iTotalPkgs + fRet = Round(fRet, -2) + RETURN fRet + +END + + + +PUBLIC FUNCTION CALCULATE_PACKAGE_COUNT(bCustom AS Boolean) AS Integer + + DIM sDump AS String + DIM sTotalList AS String + DIM i AS Integer + DIM sList AS String[] + DIM iQTY AS Integer + + ' let's get a package count + IF bCustom = FALSE THEN ' DOING A FULL INSTALL + SHELL "cat " & ClsGlobal.sSourceMnt &/ "veclinux" &/ "SETUP.CONF | grep ^BULK" TO sDump + sDump = Trim(sDump) + sTotalList = sTotalList & sDump + sTotalList = Trim(sTotalList) + sDump = "" + SHELL "cat " & ClsGlobal.sSourceMnt &/ "veclinux" &/ "SETUP.CONF | grep ^CONF" TO sDump + sTotalList = sTotalList & gb.NewLine & Trim(sDump) + sDump = "" + SHELL "cat " & ClsGlobal.sSourceMnt &/ "packages" &/ "PACKAGES.TXT | grep ^\"PACKAGE NAME\"" TO sDump + sTotalList = sTotalList & gb.NewLine & Trim(sDump) + sDump = "" + ' split the array + sList = Split(sTotalList, "\n") + FOR i = 0 TO sList.Count - 1 + IF sList[i] = "" THEN + sList.Delete(i) + END IF + NEXT + iQTY = sList.Count + + ELSE ' GOING FOR CUSTOM INSTALL + + END IF + + + RETURN iQTY + + + +END + + |