From: <cod...@go...> - 2008-11-12 21:21:38
|
Author: uelsk8s Date: Wed Nov 12 13:19:53 2008 New Revision: 286 Modified: branches/iVL/.lang/#project.pot 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/ClsGlobal.class branches/iVL/MdlInstallCustom.module branches/iVL/MdlInstallSys.module branches/iVL/MdlSetup.module Log: combined pkg count code for custom and full install fixed division by zero bug Modified: branches/iVL/.lang/#project.pot ============================================================================== --- branches/iVL/.lang/#project.pot (original) +++ branches/iVL/.lang/#project.pot Wed Nov 12 13:19:53 2008 @@ -1,4 +1,4 @@ -# /home/vluser/devel/installer/.project +# /root/gui-installer2/.project # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/ClsGlobal.pot ============================================================================== --- branches/iVL/.lang/ClsGlobal.pot (original) +++ branches/iVL/.lang/ClsGlobal.pot Wed Nov 12 13:19:53 2008 @@ -1,4 +1,4 @@ -# /home/vluser/devel/installer/ClsGlobal.class +# /root/gui-installer2/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 Nov 12 13:19:53 2008 @@ -1,4 +1,4 @@ -# /home/vluser/devel/installer/ClsPartSel.class +# /root/gui-installer2/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 Nov 12 13:19:53 2008 @@ -1,4 +1,4 @@ -# /home/vluser/devel/installer/ClsWinDrives.class +# /root/gui-installer2/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 Nov 12 13:19:53 2008 @@ -1,4 +1,4 @@ -# /home/vluser/devel/installer/FMain.class +# /root/gui-installer2/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 Nov 12 13:19:53 2008 @@ -1,4 +1,4 @@ -# /home/vluser/devel/installer/FrmDiskPart.class +# /root/gui-installer2/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 Nov 12 13:19:53 2008 @@ -1,4 +1,4 @@ -# /home/vluser/devel/installer/FrmPartScheme.class +# /root/gui-installer2/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 Nov 12 13:19:53 2008 @@ -1,4 +1,4 @@ -# /home/vluser/devel/installer/FrmPartSel.class +# /root/gui-installer2/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 Nov 12 13:19:53 2008 @@ -1,4 +1,4 @@ -# /home/vluser/devel/installer/FrmPkgSel.class +# /root/gui-installer2/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 Nov 12 13:19:53 2008 @@ -1,4 +1,4 @@ -# /home/vluser/devel/installer/FrmSelISO.class +# /root/gui-installer2/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 Nov 12 13:19:53 2008 @@ -1,4 +1,4 @@ -# /home/vluser/devel/installer/FrmSummary.class +# /root/gui-installer2/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 Nov 12 13:19:53 2008 @@ -1,4 +1,4 @@ -# /home/vluser/devel/installer/FrmWinDrives.class +# /root/gui-installer2/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 Nov 12 13:19:53 2008 @@ -1,4 +1,4 @@ -# /home/vluser/devel/installer/MdlCore.module +# /root/gui-installer2/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 Nov 12 13:19:53 2008 @@ -1,4 +1,4 @@ -# /home/vluser/devel/installer/MdlDiskPart.module +# /root/gui-installer2/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 Nov 12 13:19:53 2008 @@ -1,4 +1,4 @@ -# /home/vluser/devel/installer/MdlObjSizer.module +# /root/gui-installer2/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 Nov 12 13:19:53 2008 @@ -1,4 +1,4 @@ -# /home/vluser/devel/installer/MdlPartSel.module +# /root/gui-installer2/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 Nov 12 13:19:53 2008 @@ -1,4 +1,4 @@ -# /home/vluser/devel/installer/MdlPkgSel.module +# /root/gui-installer2/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 Nov 12 13:19:53 2008 @@ -1,4 +1,4 @@ -# /home/vluser/devel/installer/MdlSetup.module +# /root/gui-installer2/MdlSetup.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. @@ -14,15 +14,27 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: MdlSetup.module:242 +#: MdlSetup.module:197 +msgid "Calculating package count ... Please wait" +msgstr "" + +#: MdlSetup.module:253 +msgid "Total bulks to be installed = " +msgstr "" + +#: MdlSetup.module:256 +msgid "Total pkgs to be installed = " +msgstr "" + +#: MdlSetup.module:303 msgid "BROUGHT TO YOU BY" msgstr "" -#: MdlSetup.module:258 +#: MdlSetup.module:319 msgid "Activating swap space" msgstr "" -#: MdlSetup.module:260 +#: MdlSetup.module:321 msgid "Preparing filesystems" msgstr "" Modified: branches/iVL/.lang/MdlSummarize.pot ============================================================================== --- branches/iVL/.lang/MdlSummarize.pot (original) +++ branches/iVL/.lang/MdlSummarize.pot Wed Nov 12 13:19:53 2008 @@ -1,4 +1,4 @@ -# /home/vluser/devel/installer/MdlSummarize.module +# /root/gui-installer2/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 Nov 12 13:19:53 2008 @@ -1,4 +1,4 @@ -# /home/vluser/devel/installer/MdlWinDrives.module +# /root/gui-installer2/MdlWinDrives.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.project ============================================================================== --- branches/iVL/.project (original) +++ branches/iVL/.project Wed Nov 12 13:19:53 2008 @@ -12,6 +12,7 @@ Library=gb.gtk.ext Description=GUI installer for Vector linux Authors=M0E-lnx +Arguments="-C" TabSize=2 Translate=1 Language=en_US Modified: branches/iVL/ClsGlobal.class ============================================================================== --- branches/iVL/ClsGlobal.class (original) +++ branches/iVL/ClsGlobal.class Wed Nov 12 13:19:53 2008 @@ -26,6 +26,10 @@ STATIC PUBLIC iSwapMin AS Integer = 64 STATIC PUBLIC iPkgCnt AS Integer = 0 STATIC PUBLIC iBulkCnt AS Integer = 0 +STATIC PUBLIC iPkgTot AS Integer +STATIC PUBLIC iPkgNum AS Integer + +STATIC PUBLIC fPbInc AS Float STATIC PUBLIC sRootMnt AS String STATIC PUBLIC sHomeMnt AS String Modified: branches/iVL/MdlInstallCustom.module ============================================================================== --- branches/iVL/MdlInstallCustom.module (original) +++ branches/iVL/MdlInstallCustom.module Wed Nov 12 13:19:53 2008 @@ -18,12 +18,12 @@ ' needs to read arrays from clsPkgsel and install all required packages -PUBLIC fPbInc AS Float +'PUBLIC fPbInc AS Float PRIVATE hproc AS Process PRIVATE sDump AS String PRIVATE sErr AS String -PRIVATE iPkgCnt AS Integer +'PRIVATE iPkgCnt AS Integer PRIVATE iPkgNum AS Integer @@ -36,7 +36,9 @@ .tvPlan["Inst1"].Picture = MdlCore.sNowPic .tvPlan["Inst0"].Picture = MdlCore.sDonePic END WITH - ME.CALCULATE_TOTAL_PACKAGES() + 'pass the pkg count to the function in mdlsetup + MdlSetup.CALCULATE_PACKAGE_COUNT(TRUE) + 'ME.CALCULATE_TOTAL_PACKAGES() 'RETURN WAIT 2 iRet = ME.INSTALL_REQUIRED_BULKS() @@ -66,8 +68,8 @@ 'iret = ME.INSTALL_PACKAGES_REQUIRED() ' Make sure we set the right value for the progress bar here - MdlInstallSys.iPkgCnt = iPkgCnt - MdlInstallSys.iPkgNum = iPkgNum + 'MdlInstallSys.iPkgCnt = iPkgCnt + 'MdlInstallSys.iPkgNum = iPkgNum iret = MdlInstallSys.INSTALL_REQUIRED_PACKAGES() PRINT "INSTALLING ADDITIONAL REQUIRED SOFTWARE" @@ -275,7 +277,7 @@ FrmInstallSys.tlCurrPkg.Text = ("Installing") & Space(1) & FrmUsrPkgSel.GridView1[ii, 1].Text FrmInstallSys.pbInstallProg.Value = i / iStepTotal INC iPkgNum - FrmInstallSys.pbInstallProg2.Value = MdlSetup.UPDATE_OVERALL_PROGRESS(iPkgCnt, iPkgNum) + FrmInstallSys.pbInstallProg2.Value = MdlSetup.UPDATE_OVERALL_PROGRESS(ClsGlobal.iPkgTot, iPkgNum) 'hproc = EXEC ["installpkg", sBasePath &/ sLoc &/ sPkg, " -R ", ClsGlobal.sTargetMnt, " || echo \'FAILED\' 2> /tmp/installdump"] 'hproc = EXEC ["installpkg -R " & ClsGlobal.sTargetMnt & Space(1) & sBasePath &/ sLoc &/ sPkg & " || echo \'FAILED\' 2> /tmp/installdump"] @@ -353,7 +355,7 @@ FrmInstallSys.pbInstallProg.Value = i / iStepTotal INC iPkgNum 'MdlSetup.UPDATE_OVERALL_PROGRESS(iPkgCnt, iPkgNum) - FrmInstallSys.pbInstallProg2.Value = MdlSetup.UPDATE_OVERALL_PROGRESS(iPkgCnt, iPkgNum) + FrmInstallSys.pbInstallProg2.Value = MdlSetup.UPDATE_OVERALL_PROGRESS(ClsGlobal.iPkgTot, iPkgNum) IF InStr(sDump, "FAILED") > 0 THEN Message.Error("Error installing user-selected package" & Space(1) & cb.Text) RETURN 1 @@ -535,103 +537,103 @@ END -PUBLIC SUB CALCULATE_TOTAL_PACKAGES() - - DIM i, ii AS Integer - DIM irs AS Integer - DIM sOutput AS String - DIM sOutArr AS String[] - DIM cb AS CheckBox - - - PRINT ("Calculating package count ... Please wait") - SHELL "cat " & ClsGlobal.sSourceMnt &/ "veclinux" &/ "SETUP.CONF" & " | grep ^BULK | grep required" TO sOutput - sOutput = Trim(sOutput) - IF InStr(sOutput, "\n") > 0 THEN - sOutArr = Split(sOutput, "\n") - i = i + sOutArr.Count - ELSE - i = i + 1 - END IF - 'add bulks to ClsGlobal.iBulkCnt - ClsGlobal.iBulkCnt = i - 'Message.Info(i & " from required bulks") - 'RETURN - 'count required packages in - sOutArr.Clear - sOutput = "" - SHELL "ls -m " & ClsGlobal.sSourceMnt &/ "packages" &/ "required" &/ "*.t?z" TO sOutput - sOutput = Trim(sOutput) - sOutArr = Split(sOutput, ",") - i = i + sOutArr.Count - 'add pkgs TO ClsGlobal.iPkgCnt - ClsGlobal.iPkgCnt = sOutArr.Count - 'Message(i & " from packages/required") - 'Count CONF packages in - sOutArr.Clear - sOutput = "" - SHELL "cat " & ClsGlobal.sSourceMnt &/ "veclinux" &/ "SETUP.CONF" & " | grep ^CONF" TO sOutput - sOutput = Trim(sOutput) - IF InStr(sOutput, "\n") > 0 THEN - sOutArr = Split(sOutput, "\n") - i = i + sOutArr.Count - 'add config bulks to ClsGlobal.iPkgCnt cause they are small and at the end - ClsGlobal.iPkgCnt = ClsGlobal.iPkgCnt + sOutArr.Count - ELSE - i = i + 1 - 'add config bulks to ClsGlobal.iPkgCnt cause they are small and at the end - ClsGlobal.iPkgCnt = ClsGlobal.iPkgCnt + 1 - END IF - 'Count user-selected stuff in - - REPEAT - IF FrmPkgSel.scrlInstallOpts[ii, 0].Picture = FrmPkgSel.pyes THEN INC irs - INC ii - UNTIL ii = FrmPkgSel.scrlInstallOpts.Rows.Count - i = i + irs - 'add bulks to ClsGlobal.iBulkCnt - ClsGlobal.iBulkCnt = ClsGlobal.iBulkCnt + irs - - - ' ' ' ' 'we will need to cycle through the arrays for th is for accuracy... - ' ' ' ' irs = 0 - ' ' ' ' FOR EACH cb IN MdlPkgSel.Bulks - ' ' ' ' IF cb.value = TRUE THEN INC irs - ' ' ' ' - ' ' ' ' - ' ' ' ' NEXT - ' ' ' ' i = i + irs - ' now do the optional packages - irs = 0 ' reset the count - - REPEAT - IF FrmUsrPkgSel.GridView1[ii, 0].Picture = FrmUsrPkgSel.pYes THEN - INC irs - END IF - INC ii - UNTIL ii = FrmUsrPkgSel.GridView1.Rows.Count - - - ' ' ' ' ' ' ' FOR EACH cb IN MdlPkgSel.Pkgs - ' ' ' ' ' ' ' IF cb.Value = TRUE THEN INC irs - ' ' ' ' ' ' ' -' NEXT - i = i + irs ' the count to the total - 'i = i + ClsPkgSel.arrBulks.Count + ClsPkgSel.arrPkgs.Count - 'add pkgs TO ClsGlobal.iPkgCnt - ClsGlobal.iPkgCnt = ClsGlobal.iPkgCnt + irs - iPkgCnt = i - PRINT ("Total packages to be installed = ") & i - fPbInc = 1 / iPkgCnt - PRINT "The total progrssbar will work in increments of " & fPbInc & " on every package installed" - PRINT ("Total bulks to be installed = ") & ClsGlobal.iBulkCnt - fPbInc = 0.6 / ClsGlobal.iBulkCnt - PRINT "The total progrssbar will work in increments of " & fPbInc & " on every bulk installed" - PRINT ("Total pkgs to be installed = ") & ClsGlobal.iPkgCnt - fPbInc = 0.4 / ClsGlobal.iPkgCnt - PRINT "The total progrssbar will work in increments of " & fPbInc & " on every pkg installed" - -END +' PUBLIC SUB CALCULATE_TOTAL_PACKAGES() +' +' DIM i, ii AS Integer +' DIM irs AS Integer +' DIM sOutput AS String +' DIM sOutArr AS String[] +' DIM cb AS CheckBox +' +' +' PRINT ("Calculating package count ... Please wait") +' SHELL "cat " & ClsGlobal.sSourceMnt &/ "veclinux" &/ "SETUP.CONF" & " | grep ^BULK | grep required" TO sOutput +' sOutput = Trim(sOutput) +' IF InStr(sOutput, "\n") > 0 THEN +' sOutArr = Split(sOutput, "\n") +' i = i + sOutArr.Count +' ELSE +' i = i + 1 +' END IF +' 'add bulks to ClsGlobal.iBulkCnt +' ClsGlobal.iBulkCnt = i +' 'Message.Info(i & " from required bulks") +' 'RETURN +' 'count required packages in +' sOutArr.Clear +' sOutput = "" +' SHELL "ls -m " & ClsGlobal.sSourceMnt &/ "packages" &/ "required" &/ "*.t?z" TO sOutput +' sOutput = Trim(sOutput) +' sOutArr = Split(sOutput, ",") +' i = i + sOutArr.Count +' 'add pkgs TO ClsGlobal.iPkgCnt +' ClsGlobal.iPkgCnt = sOutArr.Count +' 'Message(i & " from packages/required") +' 'Count CONF packages in +' sOutArr.Clear +' sOutput = "" +' SHELL "cat " & ClsGlobal.sSourceMnt &/ "veclinux" &/ "SETUP.CONF" & " | grep ^CONF" TO sOutput +' sOutput = Trim(sOutput) +' IF InStr(sOutput, "\n") > 0 THEN +' sOutArr = Split(sOutput, "\n") +' i = i + sOutArr.Count +' 'add config bulks to ClsGlobal.iPkgCnt cause they are small and at the end +' ClsGlobal.iPkgCnt = ClsGlobal.iPkgCnt + sOutArr.Count +' ELSE +' i = i + 1 +' 'add config bulks to ClsGlobal.iPkgCnt cause they are small and at the end +' ClsGlobal.iPkgCnt = ClsGlobal.iPkgCnt + 1 +' END IF +' 'Count user-selected stuff in +' +' REPEAT +' IF FrmPkgSel.scrlInstallOpts[ii, 0].Picture = FrmPkgSel.pyes THEN INC irs +' INC ii +' UNTIL ii = FrmPkgSel.scrlInstallOpts.Rows.Count +' i = i + irs +' 'add bulks to ClsGlobal.iBulkCnt +' ClsGlobal.iBulkCnt = ClsGlobal.iBulkCnt + irs +' +' +' ' ' ' ' 'we will need to cycle through the arrays for th is for accuracy... +' ' ' ' ' irs = 0 +' ' ' ' ' FOR EACH cb IN MdlPkgSel.Bulks +' ' ' ' ' IF cb.value = TRUE THEN INC irs +' ' ' ' ' +' ' ' ' ' +' ' ' ' ' NEXT +' ' ' ' ' i = i + irs +' ' now do the optional packages +' irs = 0 ' reset the count +' +' REPEAT +' IF FrmUsrPkgSel.GridView1[ii, 0].Picture = FrmUsrPkgSel.pYes THEN +' INC irs +' END IF +' INC ii +' UNTIL ii = FrmUsrPkgSel.GridView1.Rows.Count +' +' +' ' ' ' ' ' ' ' FOR EACH cb IN MdlPkgSel.Pkgs +' ' ' ' ' ' ' ' IF cb.Value = TRUE THEN INC irs +' ' ' ' ' ' ' ' +' ' NEXT +' i = i + irs ' the count to the total +' 'i = i + ClsPkgSel.arrBulks.Count + ClsPkgSel.arrPkgs.Count +' 'add pkgs TO ClsGlobal.iPkgCnt +' ClsGlobal.iPkgCnt = ClsGlobal.iPkgCnt + irs +' iPkgCnt = i +' PRINT ("Total packages to be installed = ") & i +' fPbInc = 1 / iPkgCnt +' PRINT "The total progrssbar will work in increments of " & fPbInc & " on every package installed" +' PRINT ("Total bulks to be installed = ") & ClsGlobal.iBulkCnt +' fPbInc = 0.6 / ClsGlobal.iBulkCnt +' PRINT "The total progrssbar will work in increments of " & fPbInc & " on every bulk installed" +' PRINT ("Total pkgs to be installed = ") & ClsGlobal.iPkgCnt +' fPbInc = 0.4 / ClsGlobal.iPkgCnt +' PRINT "The total progrssbar will work in increments of " & fPbInc & " on every pkg installed" +' +' END PUBLIC FUNCTION INSTALL_REQUIRED_BULKS() AS Integer @@ -668,7 +670,7 @@ PRINT " ! " & ClsGlobal.sSourceMnt &/ "veclinux" &/ sBulk & " is installed" NEXT ELSE ' found only one line - iPkgCnt = iPkgCnt + 1 ' add only one to the overall package count + 'iPkgCnt = iPkgCnt + 1 ' add only one to the overall package count sTrimmed = Right(sOutput, Len(sOutput) - InStr(sOutput, "\'")) sTrimmed = Left(sTrimmed, Len(sTrimmed) - RInStr(sTrimmed, "\'")) sLine = Split(sTrimmed, ":") @@ -726,7 +728,7 @@ 'MdlInstallSys.UPDATE_STEP_PROGRESS(CFloat(vTargetSize), CFloat(vSize)) MdlInstallSys.UPDATE_STEP_PROGRESS(vTargetSize, vSize, iPkgNum) - FrmInstallSys.pbInstallProg2.Value = (FrmInstallSys.pbInstallProg2.Value + (fPbInc - (fPbInc * FrmInstallSys.pbInstallProg.Value)) / 100) + FrmInstallSys.pbInstallProg2.Value = (FrmInstallSys.pbInstallProg2.Value + (ClsGlobal.fPbInc - (ClsGlobal.fPbInc * FrmInstallSys.pbInstallProg.Value)) / 100) END IF UNTIL hproc.State = Process.Stopped @@ -738,7 +740,7 @@ ' ' ' IF InStr(sDump, "FAILED") > 0 THEN ' ' ' RETURN 1 ' ' ' ELSE - FrmInstallSys.pbInstallProg2.Value = MdlSetup.UPDATE_OVERALL_PROGRESS(iPkgCnt, iPkgNum) + FrmInstallSys.pbInstallProg2.Value = MdlSetup.UPDATE_OVERALL_PROGRESS(ClsGlobal.iPkgTot, iPkgNum) RETURN 0 END IF ' END IF @@ -760,7 +762,7 @@ END IF FrmInstallSys.pbInstallProg.Value = 0 INC iPkgNum - PRINT "Package " & iPkgNum & " of " & iPkgCnt + PRINT "Package " & iPkgNum & " of " & ClsGlobal.iPkgTot MdlSetup.SHOW_PROGRESS_CONTROLS() FrmInstallSys.tlCurrPkg.Text = "Processing " & File.Name(sPackagePath) 'hproc = SHELL "install-pkg " & sPackagePath & Space(1) & ClsGlobal.sTargetMnt & " || echo \'FAILED\'" FOR READ @@ -788,7 +790,7 @@ ELSE FrmInstallSys.pbInstallProg.Value = 1 WAIT - FrmInstallSys.pbInstallProg2.Value = MdlSetup.UPDATE_OVERALL_PROGRESS(iPkgCnt, iPkgNum) + FrmInstallSys.pbInstallProg2.Value = MdlSetup.UPDATE_OVERALL_PROGRESS(ClsGlobal.iPkgTot, iPkgNum) RETURN 0 END IF END IF Modified: branches/iVL/MdlInstallSys.module ============================================================================== --- branches/iVL/MdlInstallSys.module (original) +++ branches/iVL/MdlInstallSys.module Wed Nov 12 13:19:53 2008 @@ -312,9 +312,9 @@ .tvPlan["Inst0"].Picture = MdlCore.sDonePic END WITH - iPkgCnt = MdlSetup.CALCULATE_PACKAGE_COUNT(FALSE) + 'iPkgCnt = MdlSetup.CALCULATE_PACKAGE_COUNT(FALSE) 'Message.Info("Total packages = " & iPkgCnt) - PRINT "Total packages to be installed " & iPkgCnt + PRINT "Total packages to be installed " & ClsGlobal.iPkgTot PRINT "Installing bulks" MdlSetup.SHOW_PROGRESS_CONTROLS() @@ -446,8 +446,6 @@ '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(File.Load(Temp$("SETUP.CONF")), "\n") sList = Split(sRawList, "\n") @@ -477,7 +475,7 @@ REPEAT WAIT 2 ME.UPDATE_STEP_PROGRESS(CFloat(vTargetSize), CFloat(vBulkSize), iPkgNum) - + FrmInstallSys.pbInstallProg2.Value = (FrmInstallSys.pbInstallProg2.Value + (ClsGlobal.fPbInc - (ClsGlobal.fPbInc * FrmInstallSys.pbInstallProg.Value)) / 100) UNTIL hproc.State = Process.Stopped 'error check Modified: branches/iVL/MdlSetup.module ============================================================================== --- branches/iVL/MdlSetup.module (original) +++ branches/iVL/MdlSetup.module Wed Nov 12 13:19:53 2008 @@ -167,7 +167,7 @@ iCPkg = iCurrPkg - ClsGlobal.iBulkCnt fRet = iCPkg * fcur fRet = Round(fRet, -2) - fRet = fRet + 0.6 + fRet = fRet + fbulk ENDIF RETURN fRet @@ -176,26 +176,87 @@ PUBLIC FUNCTION CALCULATE_PACKAGE_COUNT(bCustom AS Boolean) AS Integer - + + DIM sOutput AS String + DIM sOutArr AS String[] + DIM cb AS CheckBox DIM sDump AS String DIM sTotalList AS String - DIM i AS Integer + DIM i, ii AS Integer + DIM irs 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 "find " & ClsGlobal.sSourceMnt & " -name \"*.tlz\"|wc -l" TO iQTY + IF bCustom = FALSE THEN 'DOING A FULL INSTALL + 'find bulks + SHELL "find " & ClsGlobal.sSourceMnt & "/veclinux - name \"*.tlz\"|wc -l" TO ClsGlobal.iBulkCnt + 'find packages + SHELL "find " & ClsGlobal.sSourceMnt & "/packages - name \"*.tlz\"|wc -l" TO ClsGlobal.iPkgCnt + ClsGlobal.iPkgTot = ClsGlobal.iBulkCnt + ClsGlobal.iPkgCnt ELSE ' GOING FOR CUSTOM INSTALL - + PRINT ("Calculating package count ... Please wait") + SHELL "cat " & ClsGlobal.sSourceMnt &/ "veclinux" &/ "SETUP.CONF" & " | grep ^BULK | grep required" TO sOutput + sOutput = Trim(sOutput) + IF InStr(sOutput, "\n") > 0 THEN + sOutArr = Split(sOutput, "\n") + i = i + sOutArr.Count + ELSE + i = i + 1 + END IF + 'add bulks to ClsGlobal.iBulkCnt + ClsGlobal.iBulkCnt = i + 'count required packages in + sOutArr.Clear + sOutput = "" + SHELL "ls -m " & ClsGlobal.sSourceMnt &/ "packages" &/ "required" &/ "*.t?z" TO sOutput + sOutput = Trim(sOutput) + sOutArr = Split(sOutput, ",") + i = i + sOutArr.Count + 'add pkgs TO ClsGlobal.iPkgCnt + ClsGlobal.iPkgCnt = sOutArr.Count + 'Count CONF packages in + sOutArr.Clear + sOutput = "" + SHELL "cat " & ClsGlobal.sSourceMnt &/ "veclinux" &/ "SETUP.CONF" & " | grep ^CONF" TO sOutput + sOutput = Trim(sOutput) + IF InStr(sOutput, "\n") > 0 THEN + sOutArr = Split(sOutput, "\n") + i = i + sOutArr.Count + 'add config bulks to ClsGlobal.iPkgCnt cause they are small and at the end + ClsGlobal.iPkgCnt = ClsGlobal.iPkgCnt + sOutArr.Count + ELSE + i = i + 1 + 'add config bulks to ClsGlobal.iPkgCnt cause they are small and at the end + ClsGlobal.iPkgCnt = ClsGlobal.iPkgCnt + 1 + END IF + 'Count user-selected bulks + REPEAT + IF FrmPkgSel.scrlInstallOpts[ii, 0].Picture = FrmPkgSel.pyes THEN INC irs + INC ii + UNTIL ii = FrmPkgSel.scrlInstallOpts.Rows.Count + i = i + irs + 'add bulks to ClsGlobal.iBulkCnt + ClsGlobal.iBulkCnt = ClsGlobal.iBulkCnt + irs + ' now do the optional packages + irs = 0 ' reset the count + REPEAT + IF FrmUsrPkgSel.GridView1[ii, 0].Picture = FrmUsrPkgSel.pYes THEN + INC irs + END IF + INC ii + UNTIL ii = FrmUsrPkgSel.GridView1.Rows.Count + i = i + irs ' the count to the total + 'add pkgs TO ClsGlobal.iPkgCnt + ClsGlobal.iPkgCnt = ClsGlobal.iPkgCnt + irs + ClsGlobal.iPkgTot = i END IF - - - RETURN iQTY - - - + PRINT ("Total bulks to be installed = ") & ClsGlobal.iBulkCnt + ClsGlobal.fPbInc = 0.6 / ClsGlobal.iBulkCnt + PRINT "The total progrssbar will work in increments of " & ClsGlobal.fPbInc & " on every bulk installed" + PRINT ("Total pkgs to be installed = ") & ClsGlobal.iPkgCnt + ClsGlobal.fPbInc = 0.4 / ClsGlobal.iPkgCnt + PRINT "The total progrssbar will work in increments of " & ClsGlobal.fPbInc & " on every pkg installed" + RETURN ClsGlobal.iPkgTot END |