From: <cod...@go...> - 2008-11-10 21:21:35
|
Author: uelsk8s Date: Mon Nov 10 13:19:57 2008 New Revision: 277 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: reworked progress bars Modified: branches/iVL/.lang/#project.pot ============================================================================== --- branches/iVL/.lang/#project.pot (original) +++ branches/iVL/.lang/#project.pot Mon Nov 10 13:19:57 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 Mon Nov 10 13:19:57 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 Mon Nov 10 13:19:57 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 Mon Nov 10 13:19:57 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 Mon Nov 10 13:19:57 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 Mon Nov 10 13:19:57 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 Mon Nov 10 13:19:57 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 Mon Nov 10 13:19:57 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 Mon Nov 10 13:19:57 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 Mon Nov 10 13:19:57 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 Mon Nov 10 13:19:57 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 Mon Nov 10 13:19:57 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 Mon Nov 10 13:19:57 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 Mon Nov 10 13:19:57 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 Mon Nov 10 13:19:57 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 Mon Nov 10 13:19:57 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 Mon Nov 10 13:19:57 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 Mon Nov 10 13:19:57 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. Modified: branches/iVL/.lang/MdlSummarize.pot ============================================================================== --- branches/iVL/.lang/MdlSummarize.pot (original) +++ branches/iVL/.lang/MdlSummarize.pot Mon Nov 10 13:19:57 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 Mon Nov 10 13:19:57 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 Mon Nov 10 13:19:57 2008 @@ -2,7 +2,7 @@ # Compiled with Gambas 2.9.0 Title=VectorLinux Installer Startup=MdlCore -Version=0.0.154 +Version=0.0.155 Library=gb.gtk Library=gb.form Library=gb.debug Modified: branches/iVL/ClsGlobal.class ============================================================================== --- branches/iVL/ClsGlobal.class (original) +++ branches/iVL/ClsGlobal.class Mon Nov 10 13:19:57 2008 @@ -24,6 +24,8 @@ STATIC PUBLIC iRootMax AS Integer = 40000 STATIC PUBLIC iHomeMin AS Integer = 500 STATIC PUBLIC iSwapMin AS Integer = 64 +STATIC PUBLIC iPkgCnt AS Integer = 0 +STATIC PUBLIC iBulkCnt AS Integer = 0 STATIC PUBLIC sRootMnt AS String STATIC PUBLIC sHomeMnt AS String Modified: branches/iVL/MdlInstallCustom.module ============================================================================== --- branches/iVL/MdlInstallCustom.module (original) +++ branches/iVL/MdlInstallCustom.module Mon Nov 10 13:19:57 2008 @@ -553,6 +553,8 @@ 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 @@ -562,6 +564,8 @@ 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 @@ -571,8 +575,12 @@ 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 + 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 @@ -581,6 +589,8 @@ 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... @@ -607,11 +617,19 @@ ' ' ' ' ' ' ' ' NEXT i = i + irs ' the count to the total - 'i = i + ClsPkgSel.arrBulks.Count + ClsPkgSel.arrPkgs.Count + '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 @@ -706,7 +724,7 @@ FrmInstallSys.tlCurrPkg.Text = Trim(sDesc) IF vSize <> "" THEN 'MdlInstallSys.UPDATE_STEP_PROGRESS(CFloat(vTargetSize), CFloat(vSize)) - MdlInstallSys.UPDATE_STEP_PROGRESS(vTargetSize, vSize) + MdlInstallSys.UPDATE_STEP_PROGRESS(vTargetSize, vSize, iPkgNum) FrmInstallSys.pbInstallProg2.Value = (FrmInstallSys.pbInstallProg2.Value + (fPbInc - (fPbInc * FrmInstallSys.pbInstallProg.Value)) / 100) END IF @@ -756,7 +774,7 @@ ' do the progress bar updating here IF vSize <> "" THEN 'MdlInstallSys.UPDATE_STEP_PROGRESS(CFloat(vTargetSize), CFloat(vSize)) - MdlInstallSys.UPDATE_STEP_PROGRESS(vTargetSize, CInt(vSize)) + MdlInstallSys.UPDATE_STEP_PROGRESS(vTargetSize, CInt(vSize), iPkgNum) END IF UNTIL Modified: branches/iVL/MdlInstallSys.module ============================================================================== --- branches/iVL/MdlInstallSys.module (original) +++ branches/iVL/MdlInstallSys.module Mon Nov 10 13:19:57 2008 @@ -405,7 +405,7 @@ REPEAT WAIT 1 ' update progress here - ME.UPDATE_STEP_PROGRESS(CFloat(vTargetSize), CFloat(vPgsSize)) + ME.UPDATE_STEP_PROGRESS(CFloat(vTargetSize), CFloat(vPgsSize), iPkgNum) UNTIL hproc.State = Process.Stopped END IF @@ -476,7 +476,7 @@ IF hproc.State = Process.Running THEN REPEAT WAIT 2 - ME.UPDATE_STEP_PROGRESS(CFloat(vTargetSize), CFloat(vBulkSize)) + ME.UPDATE_STEP_PROGRESS(CFloat(vTargetSize), CFloat(vBulkSize), iPkgNum) UNTIL hproc.State = Process.Stopped @@ -607,7 +607,7 @@ IF hproc.State = Process.Running THEN REPEAT WAIT 2 - UPDATE_STEP_PROGRESS(sTargetSize, sPakSize) + UPDATE_STEP_PROGRESS(sTargetSize, sPakSize, iPkgNum) UNTIL hproc.State = Process.Stopped ' error check @@ -635,7 +635,7 @@ END -PUBLIC SUB UPDATE_STEP_PROGRESS(sTargetSize AS Float, sPakSize AS Float) +PUBLIC SUB UPDATE_STEP_PROGRESS(sTargetSize AS Float, sPakSize AS Float, iCurrPkg AS Integer) DIM iMBProgress AS Float DIM ipct AS Float @@ -644,7 +644,9 @@ DIM iVal AS Float DIM iProgress AS Float DIM iCurrSize AS Variant - + DIM fcur, fRet AS Float + DIM fbulk AS Float = 0.6 + SHELL "export gsize=$(df| grep " & ClsPartSel.sRoot & " ) && echo $gsize | cut -f3 -d \' \'" TO iCurrSize iCurrSize = Trim(CStr(iCurrSize)) iProgress = CInt(iCurrSize - sTargetSize) @@ -663,6 +665,12 @@ ENDIF IF iVal > FrmInstallSys.pbInstallProg.Value THEN FrmInstallSys.pbInstallProg.Value = iVal + IF iCurrPkg <= ClsGlobal.iBulkCnt THEN + fcur = fbulk / ClsGlobal.iBulkCnt + fRet = (iCurrPkg - 1) * fcur + fRet = Round(fRet, -2) + FrmInstallSys.pbInstallProg2.Value = ((iVal * fcur) + fRet) + ENDIF END IF 'PRINT CStr(iCurrSize) & "/" & CStr(sTargetSize + sPakSize) & " = " & iVal & "%" @@ -710,7 +718,7 @@ IF hproc.State = Process.Running THEN REPEAT WAIT 1 - UPDATE_STEP_PROGRESS(sTargetSize, iTlzSize) + UPDATE_STEP_PROGRESS(sTargetSize, iTlzSize, iPkgNum) ' figure out the progress again @@ -838,7 +846,7 @@ IF hproc.State = Process.Running THEN REPEAT WAIT 2 - ME.UPDATE_STEP_PROGRESS(itgtsize, sLinArr[1]) + ME.UPDATE_STEP_PROGRESS(itgtsize, sLinArr[1], iPkgNum) UNTIL hproc.State = Process.Stopped END IF Modified: branches/iVL/MdlSetup.module ============================================================================== --- branches/iVL/MdlSetup.module (original) +++ branches/iVL/MdlSetup.module Mon Nov 10 13:19:57 2008 @@ -148,12 +148,27 @@ PUBLIC FUNCTION UPDATE_OVERALL_PROGRESS(iTotalPkgs AS Integer, iCurrPkg AS Integer) AS Float DIM fRet AS Float + DIM fcur AS Float + DIM fpkg AS Float = 0.4 + DIM fbulk AS Float = 0.6 + DIM iCPkg AS Integer IF iTotalPkgs = 0 THEN iTotalPkgs = 30 ENDIF - fRet = iCurrPkg / iTotalPkgs - fRet = Round(fRet, -2) + 'fRet = iCurrPkg / iTotalPkgs + 'fRet = Round(fRet, -2) + IF iCurrPkg <= ClsGlobal.iBulkCnt THEN + fcur = fbulk / ClsGlobal.iBulkCnt + fRet = iCurrPkg * fcur + fRet = Round(fRet, -2) + ELSE + fcur = fpkg / ClsGlobal.iPkgCnt + iCPkg = iCurrPkg - ClsGlobal.iBulkCnt + fRet = iCPkg * fcur + fRet = Round(fRet, -2) + fRet = fRet + 0.6 + ENDIF RETURN fRet END |