From: <cod...@go...> - 2008-11-14 00:31:35
|
Author: uelsk8s Date: Thu Nov 13 16:30:06 2008 New Revision: 293 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/FrmLilo.class branches/iVL/MdlInstallCustom.module branches/iVL/MdlInstallSys.module branches/iVL/MdlLiloOsList.module branches/iVL/MdlSetup.module branches/iVL/installer.gambas Log: fixed full install pkg count resolves div by 0 bug Modified: branches/iVL/.lang/#project.pot ============================================================================== --- branches/iVL/.lang/#project.pot (original) +++ branches/iVL/.lang/#project.pot Thu Nov 13 16:30:06 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 Thu Nov 13 16:30:06 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 Thu Nov 13 16:30:06 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 Thu Nov 13 16:30:06 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 Thu Nov 13 16:30:06 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 Thu Nov 13 16:30:06 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 Thu Nov 13 16:30:06 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 Thu Nov 13 16:30:06 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 Thu Nov 13 16:30:06 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 Thu Nov 13 16:30:06 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 Thu Nov 13 16:30:06 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 Thu Nov 13 16:30:06 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 Thu Nov 13 16:30:06 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 Thu Nov 13 16:30:06 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 Thu Nov 13 16:30:06 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 Thu Nov 13 16:30:06 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 Thu Nov 13 16:30:06 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 Thu Nov 13 16:30:06 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:198 +msgid "Calculating package count ... Please wait" +msgstr "" + +#: MdlSetup.module:254 +msgid "Total bulks to be installed = " +msgstr "" + +#: MdlSetup.module:257 +msgid "Total pkgs to be installed = " +msgstr "" + +#: MdlSetup.module:304 msgid "BROUGHT TO YOU BY" msgstr "" -#: MdlSetup.module:258 +#: MdlSetup.module:320 msgid "Activating swap space" msgstr "" -#: MdlSetup.module:260 +#: MdlSetup.module:322 msgid "Preparing filesystems" msgstr "" Modified: branches/iVL/.lang/MdlSummarize.pot ============================================================================== --- branches/iVL/.lang/MdlSummarize.pot (original) +++ branches/iVL/.lang/MdlSummarize.pot Thu Nov 13 16:30:06 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 Thu Nov 13 16:30:06 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 Thu Nov 13 16:30:06 2008 @@ -1,8 +1,8 @@ # Gambas Project File 2.0 # Compiled with Gambas 2.9.0 Title=VectorLinux Installer -Startup=FrmLiloSetup -Version=0.0.159 +Startup=MdlCore +Version=0.0.162 Library=gb.gtk Library=gb.form Library=gb.debug @@ -12,12 +12,12 @@ Library=gb.gtk.ext Description=GUI installer for Vector linux Authors=M0E-lnx -Arguments="-C" TabSize=2 Translate=1 Language=en_US ControlPublic=1 ModulePublic=1 +ExecPath=/root/gui-installer2/installer.gambas Maintainer=M0E-lnx Vendor=VectorLinux Address=M0...@gm... Modified: branches/iVL/ClsGlobal.class ============================================================================== --- branches/iVL/ClsGlobal.class (original) +++ branches/iVL/ClsGlobal.class Thu Nov 13 16:30:06 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 = 0 +STATIC PUBLIC iPkgNum AS Integer = 0 + +STATIC PUBLIC fPbInc AS Float STATIC PUBLIC sRootMnt AS String STATIC PUBLIC sHomeMnt AS String Modified: branches/iVL/FrmLilo.class ============================================================================== --- branches/iVL/FrmLilo.class (original) +++ branches/iVL/FrmLilo.class Thu Nov 13 16:30:06 2008 @@ -32,11 +32,11 @@ ME.sVidMode = "Standard" MdlConfLilo.DISPLAY_LILO_TARGET_OPTIONS() MdlLiloOsList.LIST_LILO_OS_CHOICES() -MdlLiloOsList.LIST_WIN_INSTALL_CHOICES(ME.TabStrip1.Count) +MdlLiloOsList.LIST_WIN_INSTALL_CHOICES(ME.tsOsSetup.Count) ME.tlList.text = ("The following Operating Systems have been detected on this computer. Choose your desired option") & Space(1)& ("for each one of them by clicking on each tab. To proceed with the default pre-set values, simply click") & Space(1) & "\'" & FMain.btnext.text & "\'" ME.tlList.Adjust -ME.TabStrip1.Index = MdlLiloOsList.iVltag +ME.tsOsSetup.Index = MdlLiloOsList.iVltag MdlLiloOsList.bVlCliOption = TRUE ' ' ' @@ -48,7 +48,7 @@ FBResolution.text = "Bootsplash High" FBResolution_Click() MdlLiloOsList.list_boot_options() -ME.TabStrip1.Index = 0 +ME.tsOsSetup.Index = 0 ME.cbDefBoot.Text = "Linux" END @@ -64,13 +64,13 @@ ' .LiloAppendBox.Enabled = FALSE .LiloTarget.Enabled = FALSE .FBResolution.Enabled = FALSE - .TabStrip1.Enabled = FALSE + .tsOsSetup.Enabled = FALSE .sbTimer.Enabled = FALSE .cbDefBoot.Enabled = FALSE END WITH ELSE WITH ME - .TabStrip1.Enabled = TRUE + .tsOsSetup.Enabled = TRUE '.LiloAppendBox.Enabled = TRUE .LiloTarget.Enabled = TRUE .FBResolution.Enabled = TRUE @@ -113,14 +113,14 @@ .tlList.Move(.tlTimeOUt.left, .tlTimeOUt.top + .tlTimeOUt.Height + 12, .tlBanner.Width) '.TabStrip1.Move(.tlList.Left, .tlList.top + .tlList.Height + 8, .ClientWidth - (.TabStrip1.left * 2), .ClientHeight - (.tlBanner.Height * 8)) - .TabStrip1.Move(.tlList.Left, .tlList.top + .tlList.Height + 8, .ClientWidth - (.TabStrip1.left * 2), .ClientHeight - (.TabStrip1.top) - (.YNLiloBox.Height * 10)) + .tsOsSetup.Move(.tlList.Left, .tlList.top + .tlList.Height + 8, .ClientWidth - (.tsOsSetup.left * 2), .ClientHeight - (.tsOsSetup.top) - (.YNLiloBox.Height * 10)) '.TabStrip1.Move(4, .tlList.top + .tlList.Height + 8, .ClientWidth - (.TabStrip1.Left * 2), .ClientHeight - (.TabStrip1.top + (.YNLiloBox.height * 3))) END WITH FOR EACH tb IN MdlLiloOsList.txtAppends FOR EACH tl IN MdlLiloOsList.tlappends IF tb.tag = tl.tag THEN - tb.Move(tl.left + tl.Width + 4, tl.top, ME.TabStrip1.Width - tb.left - 8) + tb.Move(tl.left + tl.Width + 4, tl.top, ME.tsOsSetup.Width - tb.left - 8) END IF NEXT NEXT Modified: branches/iVL/MdlInstallCustom.module ============================================================================== --- branches/iVL/MdlInstallCustom.module (original) +++ branches/iVL/MdlInstallCustom.module Thu Nov 13 16:30:06 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 Thu Nov 13 16:30:06 2008 @@ -18,8 +18,8 @@ PRIVATE hproc AS Process PRIVATE sDump AS String PRIVATE sErr AS String - PUBLIC iPkgCnt AS Integer - PUBLIC iPkgNum AS Integer = 0 + 'PUBLIC iPkgCnt AS Integer + 'PUBLIC iPkgNum AS Integer = 0 @@ -312,9 +312,9 @@ .tvPlan["Inst0"].Picture = MdlCore.sDonePic END WITH - iPkgCnt = MdlSetup.CALCULATE_PACKAGE_COUNT(FALSE) + ClsGlobal.iPkgTot = 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() @@ -395,7 +395,7 @@ ' now install the package SHELL "export gsize=$(df| grep " & ClsPartSel.sRoot & " ) && echo $gsize | cut -f3 -d \' \'" TO vTargetSize PRINT "installing " & ClsGlobal.sSourceMnt &/ "packages" &/ sPkgPath &/ sPkgName - INC iPkgNum + INC ClsGlobal.iPkgNum 'ME.PACKAGE_INSTALL(ClsGlobal.sSourceMnt &/ "packages" &/ sPkgPath &/ sPkgName) ' move the process here locally SHELL "echo \"\" /tmp/installdump" WAIT @@ -405,7 +405,7 @@ REPEAT WAIT 1 ' update progress here - ME.UPDATE_STEP_PROGRESS(CFloat(vTargetSize), CFloat(vPgsSize), iPkgNum) + ME.UPDATE_STEP_PROGRESS(CFloat(vTargetSize), CFloat(vPgsSize), ClsGlobal.iPkgNum) UNTIL hproc.State = Process.Stopped END IF @@ -418,9 +418,9 @@ END IF FrmInstallSys.pbInstallProg.Value = 1 WAIT - FrmInstallSys.pbInstallProg2.Value = MdlSetup.UPDATE_OVERALL_PROGRESS(iPkgCnt, iPkgNum) + FrmInstallSys.pbInstallProg2.Value = MdlSetup.UPDATE_OVERALL_PROGRESS(ClsGlobal.iPkgCnt, ClsGlobal.iPkgNum) NEXT - INC iPkgNum + INC ClsGlobal.iPkgNum 'error check IF InStr(sDump, "FAILED") > 0 THEN PRINT sPkgName & " failed to install " @@ -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") @@ -465,7 +463,7 @@ sBulkDesc = sLineArr[2] 'PRINT sBulkPath & vBulkSize & sBulkDesc FrmInstallSys.pbInstallProg.Value = 0 - INC iPkgNum + INC ClsGlobal.iPkgNum SHELL "export gsize=$(df| grep " & ClsPartSel.sRoot & " ) && echo $gsize | cut -f3 -d \' \'" TO vTargetSize PRINT "installing " & sBulkPath FrmInstallSys.tlCurrPkg.Text = ("Installing") & Space(1) & sBulkDesc & " ..." @@ -476,8 +474,8 @@ IF hproc.State = Process.Running THEN REPEAT WAIT 2 - ME.UPDATE_STEP_PROGRESS(CFloat(vTargetSize), CFloat(vBulkSize), iPkgNum) - + ME.UPDATE_STEP_PROGRESS(CFloat(vTargetSize), CFloat(vBulkSize), ClsGlobal.iPkgNum) + FrmInstallSys.pbInstallProg2.Value = (FrmInstallSys.pbInstallProg2.Value + (ClsGlobal.fPbInc - (ClsGlobal.fPbInc * FrmInstallSys.pbInstallProg.Value)) / 100) UNTIL hproc.State = Process.Stopped 'error check @@ -485,7 +483,7 @@ END IF FrmInstallSys.pbInstallProg.Value = 1 WAIT - FrmInstallSys.pbInstallProg2.Value = MdlSetup.UPDATE_OVERALL_PROGRESS(iPkgCnt, iPkgNum) + FrmInstallSys.pbInstallProg2.Value = MdlSetup.UPDATE_OVERALL_PROGRESS(ClsGlobal.iPkgCnt, ClsGlobal.iPkgNum) NEXT 'RETURN @@ -518,7 +516,7 @@ sDump = "" SHELL "echo \"\" > /tmp/installdump" WAIT sErr = "" - INC iPkgNum + INC ClsGlobal.iPkgNum 'hproc = SHELL "install-pkg " & sPath_To_Package & Space(1) & ClsGlobal.sTargetMnt & " || echo \'FAILED\'" FOR READ 'IF Right(sPath_To_Package, 3) LIKE "t?z" THEN IF File.Ext(sPath_To_Package) LIKE "t?z" THEN @@ -560,7 +558,7 @@ WITH FrmInstallSys .Resize(FMain.pnlWinHost.Width, FMain.pnlWinHost.Height) END WITH - iPkgCnt = MdlSetup.CALCULATE_PACKAGE_COUNT(FALSE) + ClsGlobal.iPkgCnt = MdlSetup.CALCULATE_PACKAGE_COUNT(FALSE) 'Message.Info("Total packages = " & iPkgCnt) 'RETURN ' make sure the progress is revealed at the main window @@ -607,7 +605,7 @@ IF hproc.State = Process.Running THEN REPEAT WAIT 2 - UPDATE_STEP_PROGRESS(sTargetSize, sPakSize, iPkgNum) + UPDATE_STEP_PROGRESS(sTargetSize, sPakSize, ClsGlobal.iPkgNum) UNTIL hproc.State = Process.Stopped ' error check @@ -621,8 +619,8 @@ FrmInstallSys.pbInstallProg.Value = 1 END IF PRINT sPak & " is installed... " - INC iPkgNum - FrmInstallSys.pbInstallProg2.Value = MdlSetup.UPDATE_OVERALL_PROGRESS(iPkgCnt, iPkgNum) + INC ClsGlobal.iPkgNum + FrmInstallSys.pbInstallProg2.Value = MdlSetup.UPDATE_OVERALL_PROGRESS(ClsGlobal.iPkgCnt, ClsGlobal.iPkgNum) END IF 'PRINT "Needs to install " & sPak END IF @@ -718,7 +716,7 @@ IF hproc.State = Process.Running THEN REPEAT WAIT 1 - UPDATE_STEP_PROGRESS(sTargetSize, iTlzSize, iPkgNum) + UPDATE_STEP_PROGRESS(sTargetSize, iTlzSize, ClsGlobal.iPkgNum) ' figure out the progress again @@ -735,8 +733,8 @@ END IF END IF END IF - INC iPkgNum - FrmInstallSys.pbInstallProg2.Value = MdlSetup.UPDATE_OVERALL_PROGRESS(iPkgCnt, iPkgNum) + INC ClsGlobal.iPkgNum + FrmInstallSys.pbInstallProg2.Value = MdlSetup.UPDATE_OVERALL_PROGRESS(ClsGlobal.iPkgCnt, ClsGlobal.iPkgNum) END IF NEXT @@ -799,8 +797,8 @@ - INC iPkgNum - FrmInstallSys.pbInstallProg2.Value = MdlSetup.UPDATE_OVERALL_PROGRESS(iPkgCnt, iPkgNum) + INC ClsGlobal.iPkgNum + FrmInstallSys.pbInstallProg2.Value = MdlSetup.UPDATE_OVERALL_PROGRESS(ClsGlobal.iPkgCnt, ClsGlobal.iPkgNum) 'Message(sTlzPath & "<br>" & sTlzName) @@ -810,56 +808,52 @@ PUBLIC FUNCTION INSTALL_CONFIG_PACKAGES() AS Integer - DIM sList AS String[] - DIM sLinarr AS String[] - DIM sRawList AS String - DIM sPkg AS String - DIM sCOnfLine AS String - DIM sPkgPath AS String - DIM i, ipkgsize AS Integer - DIM itgtsize AS Integer - SHELL "echo \"\" > /tmp/installdump" WAIT - 'PRINT "Installing final system configuration" - SHELL "cat " & ClsGlobal.sSourceMnt &/ "veclinux" &/ "SETUP.CONF" & " | grep ^CONF" TO sRawList - 'Message.Info(sRawList) - 'PRINT sRawList & " config" - - 'PRINT "Found a single CONF package... Installing it now" - sRawList = Trim(sRawList) - sList = Split(sRawList, "\n") - FOR i = 0 TO sList.count - 1 - - sLinarr = Split(Trim(sList[i]), ":") - sPkgPath = Right(sLinarr[0], Len(sLinarr[0]) - InStr(sLinarr[0], "\'")) - ' now install the package - FrmInstallSys.tlCurrPkg.Text = ("Installing Final configuration files...") & File.Name(sPkgPath) - - 'hproc = SHELL "install-pkg " & sPkgPath & Space(1) & ClsGlobal.sTargetMnt & " || echo \'FAILED\'" FOR READ - SHELL "i=$(df | grep " & ClsGlobal.sSourceMnt & ") ; echo $i | cut -f 3 -d \' \'" TO itgtsize - - - FrmInstallSys.pbInstallProg.Value = i / sList.Count - 1 - hproc = SHELL "lzmadec <" & ClsGlobal.sSourceMnt &/ "veclinux" &/ sPkgPath & " | tar -xp -C " & ClsGlobal.sTargetMnt & " || echo \'FAILED\' 2> /tmp/installdump" 'FOR READ - 'ME.BULK_INSTALL(ClsGlobal.sSourceMnt &/ "veclinux" &/ sPkgPath) - - WAIT 1 - IF hproc.State = Process.Running THEN - REPEAT - WAIT 2 - ME.UPDATE_STEP_PROGRESS(itgtsize, sLinArr[1], iPkgNum) - UNTIL - hproc.State = Process.Stopped - END IF - INC iPkgNum - FrmInstallSys.pbInstallProg2.Value = MdlSetup.UPDATE_OVERALL_PROGRESS(iPkgCnt, iPkgNum) - ' END IF + + DIM sList AS String[] + DIM sLinarr AS String[] + DIM sRawList AS String + DIM sPkg AS String + DIM sCOnfLine AS String + DIM sPkgPath AS String + DIM i, ipkgsize AS Integer + DIM itgtsize AS Integer + + SHELL "echo \"\" > /tmp/installdump" WAIT + 'PRINT "Installing final system configuration" + SHELL "cat " & ClsGlobal.sSourceMnt &/ "veclinux" &/ "SETUP.CONF" & " | grep ^CONF" TO sRawList + 'Message.Info(sRawList) + 'PRINT sRawList & " config" + 'PRINT "Found a single CONF package... Installing it now" + sRawList = Trim(sRawList) + sList = Split(sRawList, "\n") + FOR i = 0 TO sList.count - 1 + sLinarr = Split(Trim(sList[i]), ":") + sPkgPath = Right(sLinarr[0], Len(sLinarr[0]) - InStr(sLinarr[0], "\'")) + ' now install the package + FrmInstallSys.tlCurrPkg.Text = ("Installing Final configuration files...") & File.Name(sPkgPath) + 'hproc = SHELL "install-pkg " & sPkgPath & Space(1) & ClsGlobal.sTargetMnt & " || echo \'FAILED\'" FOR READ + SHELL "i=$(df | grep " & ClsGlobal.sSourceMnt & ") ; echo $i | cut -f 3 -d \' \'" TO itgtsize + FrmInstallSys.pbInstallProg.Value = i / sList.Count - 1 + hproc = SHELL "lzmadec <" & ClsGlobal.sSourceMnt &/ "veclinux" &/ sPkgPath & " | tar -xp -C " & ClsGlobal.sTargetMnt & " || echo \'FAILED\' 2> /tmp/installdump" 'FOR READ + 'ME.BULK_INSTALL(ClsGlobal.sSourceMnt &/ "veclinux" &/ sPkgPath) + WAIT 1 + IF hproc.State = Process.Running THEN + REPEAT + WAIT 2 + 'ME.UPDATE_STEP_PROGRESS(itgtsize, sLinArr[1], ClsGlobal.iPkgNum) + UNTIL + hproc.State = Process.Stopped + END IF + INC ClsGlobal.iPkgNum + FrmInstallSys.pbInstallProg2.Value = MdlSetup.UPDATE_OVERALL_PROGRESS(ClsGlobal.iPkgCnt, ClsGlobal.iPkgNum) + 'END IF sDump = File.Load("/tmp/installdump") IF InStr(sDump, "FAILED") > 0 THEN RETURN 1 ELSE RETURN 0 - END IF - NEXT + END IF + NEXT END Modified: branches/iVL/MdlLiloOsList.module ============================================================================== --- branches/iVL/MdlLiloOsList.module (original) +++ branches/iVL/MdlLiloOsList.module Thu Nov 13 16:30:06 2008 @@ -115,7 +115,7 @@ FOR i = 0 TO arrNTFS.count - 1 - idx = FrmLilo.TabStrip1.count - 1 + idx = FrmLilo.tsOsSetup.count - 1 sWinPart = arrNTFS[i] sWinAddr = Right(arrNTFS[i], Len(arrNTFS[i]) - RInStr(arrNTFS[i], "/")) 'sHELL "mkdir /mnt" &/ sWinAddr WAIT @@ -127,12 +127,12 @@ 'IF IsDir("/mnt" &/ sWinAddr &/ "windows") = TRUE THEN ' this is indeed a windows installation - WITH FrmLilo.TabStrip1 + WITH FrmLilo.tsOsSetup .count = .count + 1 .index = idx .text = "Windows-" & sWinAddr ' Populate the new windows tab with just one - tl = NEW TextLabel(FrmLilo.TabStrip1) AS "WinPartLbl" + tl = NEW TextLabel(FrmLilo.tsOsSetup) AS "WinPartLbl" WITH tl .Move(4, 24) .text = "<b>" & ("Windows installation found in") & Space(1) & sWinPart & "</b>" @@ -141,7 +141,7 @@ .BackColor = Color.Background END WITH - cb = NEW CheckBox(FrmLilo.TabStrip1) AS "bIncludeThisWin" + cb = NEW CheckBox(FrmLilo.tsOsSetup) AS "bIncludeThisWin" WITH cb .Move(4, tl.top + tl.Height + 12) .tag = sWinPart @@ -152,14 +152,14 @@ .Value = TRUE END WITH arrWinInstalls.Add(cb) ' add to the array - tl = NEW TextLabel(FrmLilo.TabStrip1) AS "WinLblLbl" + tl = NEW TextLabel(FrmLilo.tsOsSetup) AS "WinLblLbl" WITH tl .text = ("Label") .MOVE(4, cb.top + cb.Height + 4, MdlObjSizer.get_object_width(.text), 27) .BackColor = Color.Background .Alignment = Align.Normal END WITH - tb = NEW TextBox(FrmLilo.TabStrip1) AS "WinLbl" + tb = NEW TextBox(FrmLilo.tsOsSetup) AS "WinLbl" WITH tb .text = "Windows-" & sWinAddr .Move(tl.left + tl.Width + 4, tl.top, 200, 27) @@ -228,7 +228,7 @@ DIM cbInclude AS CheckBox DIM tl AS TextLabel DIM sShortAddr AS String - DIM iwidth AS Integer = FrmLilo.TabStrip1.Width + DIM iwidth AS Integer = FrmLilo.tsOsSetup.Width DIM cb AS ComboBox DIM tb AS TextBox @@ -273,18 +273,18 @@ arrDump = Split(sDump, "\n") FOR ii = 0 TO arrDump.Count - 1 - FrmLilo.TabStrip1.Count = FrmLilo.TabStrip1.count + 1 'arrLinux.Count - 1 + FrmLilo.tsOsSetup.Count = FrmLilo.tsOsSetup.count + 1 'arrLinux.Count - 1 sLiloDesc = ME.ID_DISTRO("/tmp/lilo_tmp") - WITH FrmLilo.TabStrip1 - .Index = FrmLilo.TabStrip1.count - 1 + WITH FrmLilo.tsOsSetup + .Index = FrmLilo.tsOsSetup.count - 1 IF arrLinux[i] = ClsPartSel.sRoot THEN .text = "Linux" ELSE .text = sLiloDesc & "-" & sShortAddr ENDIF - tl = NEW TextLabel(FrmLilo.TabStrip1) AS "OSIntro" + tl = NEW TextLabel(FrmLilo.tsOsSetup) AS "OSIntro" WITH tl .text = "<b>" & ("Operating system installed in") & Space(1) & arrLinux[i] & "</b> " .Move(4, 16, MdlObjSizer.get_object_width(.text) + 4, 27) @@ -296,7 +296,7 @@ - cbInclude = NEW CheckBox(FrmLilo.TabStrip1) AS "IncludeOS" + cbInclude = NEW CheckBox(FrmLilo.tsOsSetup) AS "IncludeOS" WITH cbInclude .text = ("Include this operating system in the boot menu") .Height = 27 @@ -307,7 +307,7 @@ END WITH ME.bIncluded.Add(cbInclude) - tl = NEW TextLabel(FrmLilo.TabStrip1) AS "Label" + tl = NEW TextLabel(FrmLilo.tsOsSetup) AS "Label" WITH tl .text = ("Name") .Move(cbInclude.left, cbInclude.top + cbInclude.Height + 4, MdlObjSizer.get_object_width(.text)) @@ -315,11 +315,11 @@ .Alignment = Align.Normal .Background = Color.Background END WITH - txtAppnd = NEW TextBox(FrmLilo.TabStrip1) AS "NameBox" + txtAppnd = NEW TextBox(FrmLilo.tsOsSetup) AS "NameBox" WITH txtAppnd .Width = tl.Width * 4 .Height = tl.Height - .text = FrmLilo.TabStrip1.Current.text 'sLiloDesc + .text = FrmLilo.tsOsSetup.Current.text 'sLiloDesc .x = tl.left + tl.Width + 8 .y = tl.Top .MaxLength = 15 @@ -328,7 +328,7 @@ END WITH txtNames.Add(txtAppnd) - tl = NEW TextLabel(FrmLilo.TabStrip1) AS "InitdLbl" + tl = NEW TextLabel(FrmLilo.tsOsSetup) AS "InitdLbl" WITH tl .text = ("Initial Ram Disk") .Move(txtAppnd.Left + txtAppnd.Width + 8, txtAppnd.top, MdlObjSizer.get_object_width(.text)) @@ -338,7 +338,7 @@ .Visible = FALSE END WITH - txtAppnd = NEW TextBox(FrmLilo.TabStrip1) AS "initrdBox" + txtAppnd = NEW TextBox(FrmLilo.tsOsSetup) AS "initrdBox" WITH txtAppnd .Move(tl.Left + tl.Width + 4, tl.top, 250, 27) @@ -353,7 +353,7 @@ END WITH ME.txtInitrds.Add(txtAppnd) - tl = NEW TextLabel(FrmLilo.TabStrip1) AS "AppndLbl" + tl = NEW TextLabel(FrmLilo.tsOsSetup) AS "AppndLbl" WITH tl .text = ("Kernel boot options") .Move(4, txtAppnd.top + txtAppnd.Height + 4, MdlObjSizer.get_object_width(.text)) @@ -365,7 +365,7 @@ END WITH tlappends.Add(tl) - txtAppnd = NEW TextBox(FrmLilo.TabStrip1) AS "AppendBox" + txtAppnd = NEW TextBox(FrmLilo.tsOsSetup) AS "AppendBox" WITH txtAppnd '.Move(tl.Left + tl.Width + 8, tl.top, tl.Width * 1.25) @@ -389,7 +389,7 @@ ClsLilo.sRootInstall = cb.Tag 'FrmLilo.cbDefBoot.Add("Linux-tui") 'IF arrLinux[i] = ClsPartSel.sRoot THEN - cbInclude = NEW CheckBox(FrmLilo.TabStrip1) AS "VlCliOption" + cbInclude = NEW CheckBox(FrmLilo.tsOsSetup) AS "VlCliOption" WITH cbInclude .Value = TRUE .text = ("Add option to boot this Operating system into Text mode.") @@ -413,7 +413,7 @@ ' NEXT END WITH 'FrmLilo.cbDefBoot.Add("Linux-tui") - ME.iVlTag = FrmLilo.TabStrip1.Index - 1 + ME.iVlTag = FrmLilo.tsOsSetup.Index - 1 END IF NEXT @@ -439,11 +439,11 @@ 'NEXT ' next in dump - FOR i = 0 TO FrmLilo.TabStrip1.Count - 1 - WITH FrmLilo.TabStrip1 + FOR i = 0 TO FrmLilo.tsOsSetup.Count - 1 + WITH FrmLilo.tsOsSetup .Index = i IF .Children.Count < 1 THEN - FrmLilo.TabStrip1[i].Visible = FALSE + FrmLilo.tsOsSetup[i].Visible = FALSE END IF END WITH NEXT @@ -517,9 +517,9 @@ 'ME.list_boot_options() IF LAST.value = TRUE THEN - IF FrmLilo.cbDefBoot.Find(FrmLilo.TabStrip1.text) = -1 THEN FrmLilo.cbDefBoot.Add(FrmLilo.TabStrip1.text) + IF FrmLilo.cbDefBoot.Find(FrmLilo.tsOsSetup.text) = -1 THEN FrmLilo.cbDefBoot.Add(FrmLilo.tsOsSetup.text) ELSE - IF FrmLilo.cbDefBoot.Find(FrmLilo.TabStrip1.text) <> -1 THEN FrmLilo.cbDefBoot.Remove(FrmLilo.cbDefBoot.Find(FrmLilo.TabStrip1.text)) + IF FrmLilo.cbDefBoot.Find(FrmLilo.tsOsSetup.text) <> -1 THEN FrmLilo.cbDefBoot.Remove(FrmLilo.cbDefBoot.Find(FrmLilo.tsOsSetup.text)) END IF Modified: branches/iVL/MdlSetup.module ============================================================================== --- branches/iVL/MdlSetup.module (original) +++ branches/iVL/MdlSetup.module Thu Nov 13 16:30:06 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,88 @@ 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 + PRINT ClsGlobal.iPkgTot 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 Modified: branches/iVL/installer.gambas ============================================================================== Binary files. No diff available. |