From: <cod...@go...> - 2008-07-31 17:31:47
|
Author: M0E.lnx Date: Thu Jul 24 20:46:36 2008 New Revision: 74 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/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/FMain.class branches/iVL/FrmHostPrep.class branches/iVL/FrmHostPrep.form branches/iVL/FrmInstallSys.class branches/iVL/FrmInstallSys.form branches/iVL/MdlCore.module branches/iVL/MdlInstallSys.module branches/iVL/MdlPartFrmt.module branches/iVL/MdlPartSel.module Log: - Implementer partition formatting per user definitions - Improved progress metering - Removed balloon message from partition selection (this was getting annoying) - Bypassed the FrmHostPrep module and Form. These functions will be done in right before the install process begins, in the install window. Modified: branches/iVL/.lang/#project.pot ============================================================================== --- branches/iVL/.lang/#project.pot (original) +++ branches/iVL/.lang/#project.pot Thu Jul 24 20:46:36 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/.project +# /root/gui-installer/.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 Jul 24 20:46:36 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/ClsGlobal.class +# /root/gui-installer/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 Jul 24 20:46:36 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/ClsPartSel.class +# /root/gui-installer/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 Jul 24 20:46:36 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/ClsWinDrives.class +# /root/gui-installer/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 Jul 24 20:46:36 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/FMain.class +# /root/gui-installer/FMain.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. @@ -14,23 +14,23 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: FMain.class:245 +#: FMain.class:247 msgid "Process Overview" msgstr "" -#: FMain.class:259 +#: FMain.class:261 msgid "VectorLinux Install" msgstr "" -#: FMain.class:270 +#: FMain.class:272 msgid "Next" msgstr "" -#: FMain.class:276 +#: FMain.class:278 msgid "Back" msgstr "" -#: FMain.class:282 +#: FMain.class:284 msgid "Exit" msgstr "" Modified: branches/iVL/.lang/FrmDiskPart.pot ============================================================================== --- branches/iVL/.lang/FrmDiskPart.pot (original) +++ branches/iVL/.lang/FrmDiskPart.pot Thu Jul 24 20:46:36 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/FrmDiskPart.class +# /root/gui-installer/FrmDiskPart.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FrmLicense.pot ============================================================================== --- branches/iVL/.lang/FrmLicense.pot (original) +++ branches/iVL/.lang/FrmLicense.pot Thu Jul 24 20:46:36 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/FrmLicense.class +# /root/gui-installer/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 Thu Jul 24 20:46:36 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/FrmPartScheme.class +# /root/gui-installer/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 Jul 24 20:46:36 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/FrmPartSel.class +# /root/gui-installer/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 Jul 24 20:46:36 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/FrmPkgSel.class +# /root/gui-installer/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 Jul 24 20:46:36 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/FrmSelISO.class +# /root/gui-installer/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 Jul 24 20:46:36 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/FrmSummary.class +# /root/gui-installer/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 Jul 24 20:46:36 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/FrmWinDrives.class +# /root/gui-installer/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 Jul 24 20:46:36 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/MdlCore.module +# /root/gui-installer/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 Jul 24 20:46:36 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/MdlDiskPart.module +# /root/gui-installer/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 Jul 24 20:46:36 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/MdlObjSizer.module +# /root/gui-installer/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 Jul 24 20:46:36 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/MdlPartSel.module +# /root/gui-installer/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 Jul 24 20:46:36 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/MdlPkgSel.module +# /root/gui-installer/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 Jul 24 20:46:36 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/MdlSetup.module +# /root/gui-installer/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 Thu Jul 24 20:46:36 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/MdlSummarize.module +# /root/gui-installer/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 Jul 24 20:46:36 2008 @@ -1,4 +1,4 @@ -# /home/vluser/area-51/projects/installer/MdlWinDrives.module +# /root/gui-installer/MdlWinDrives.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/FMain.class ============================================================================== --- branches/iVL/FMain.class (original) +++ branches/iVL/FMain.class Thu Jul 24 20:46:36 2008 @@ -28,7 +28,8 @@ PUBLIC SUB Form_Open() DIM iImg AS Image - +ME.Maximized = TRUE +MdlCore.LOCK_GUI() ClsGlobal.sBackNav = NEW Object[] ClsGlobal.sSourceMnt = "/mnt" &/ "cdrom" FrmSelISO.Reparent(ME.pnlWinHost) @@ -184,7 +185,8 @@ 'Move on to selecting packages frmNext = FrmPkgSel CASE "FrmSummary" - frmNext = FrmHostPrep ' prepare host + ' frmNext = FrmHostPrep ' prepare host + frmNext = FrmInstallSys END SELECT Modified: branches/iVL/FrmHostPrep.class ============================================================================== --- branches/iVL/FrmHostPrep.class (original) +++ branches/iVL/FrmHostPrep.class Thu Jul 24 20:46:36 2008 @@ -29,12 +29,13 @@ ' may need to move this code to another event. The FormOpen event only happens once. 'ME.PREPARE_ALL_PARTITIONS() WAIT - FrmInstallSys.Reparent(ME.Parent) - ME.Hide - FrmInstallSys.Show + ' FrmInstallSys.Reparent(ME.Parent) + ' ME.Hide + ' FrmInstallSys.Show ' ME.Hide +ME.Resize(ME.Parent.Width, ME.Parent.Height) - + ME.PREPARE_ALL_PARTITIONS() END @@ -81,6 +82,10 @@ RETURN ELSE 'move on to installing.. first, make fstab + FrmInstallSys.Reparent(ME.Parent) + ME.Hide + FrmInstallSys.Show() + END IF END Modified: branches/iVL/FrmHostPrep.form ============================================================================== --- branches/iVL/FrmHostPrep.form (original) +++ branches/iVL/FrmHostPrep.form Thu Jul 24 20:46:36 2008 @@ -4,7 +4,7 @@ MoveScaled(0,0,73,48) Text = ("") { tlbanner TextLabel - MoveScaled(1,1,59,3.375) + MoveScaled(1,1,59,6) Text = ("Vectorlinux is preparing your system for installation. Please wait.") } { frmStatus Frame Modified: branches/iVL/FrmInstallSys.class ============================================================================== --- branches/iVL/FrmInstallSys.class (original) +++ branches/iVL/FrmInstallSys.class Thu Jul 24 20:46:36 2008 @@ -17,13 +17,14 @@ ' along with vinstall-ng. If not, see <http://www.gnu.org/licenses/>. -PUBLIC SUB Form_Open() - DIM sRes AS Integer ' we will need to +PUBLIC SUB BEGIN_PROCESS() + + DIM sRes AS Integer ' we will need to FMain.FrmCurr = ME - FMain.tvPlan["Inst0"].Picture = MdlCore.sDonePic - FMain.tvPlan["Inst1"].Picture = MdlCore.sNowPic - FMain.tvPlan["Inst1"].Selected = TRUE + FMain.tvPlan["Inst1"].Picture = MdlCore.sDonePic + FMain.tvPlan["Inst2"].Picture = MdlCore.sNowPic + FMain.tvPlan["Inst2"].Selected = TRUE 'initiate install procedure ' 1: MOUNT PARTITIONS @@ -43,15 +44,47 @@ ' END IF 'sRes = 0 WAIT 3 - IF ClsPkgSel.bCustom = TRUE THEN - ' DO THE CUSTOM INSTALL - ELSE - sRes = MdlInstallSys.PERFORM_FULL_INSTALL() - END IF - IF sRes AND sRes <> 0 THEN - Message("Error installing bulk packages") - RETURN - END IF + + MdlPartFrmt.PREPARE_ALL_PARTITIONS() ' formats partitions and mounts them + +END + + +PUBLIC SUB Form_Open() + + ME.Maximized = TRUE + + ' prepare the system + ME.FrmProg.Text = " Preparing system for installation " + WITH ME + .pbInstallProg.Visible = FALSE + .pbInstallProg2.Visible = FALSE + .tlCurrPkg2.Visible = FALSE + .FrmProg.Width = .ClientWidth - .FrmProg.Left * 2 + .tlCurrPkg.Move(4, 24, .FrmProg.Width - .tlCurrPkg.Left * 2) + .pbInstallProg.Move(.tlCurrPkg.Left, .tlCurrPkg.top + .tlCurrPkg.Height + 4, .tlCurrPkg.width, 27) + .tlCurrPkg2.Move(.tlCurrPkg.Left, .pbInstallProg.top + .pbInstallProg.Height * 2, .pbInstallProg.width, 27) + .pbInstallProg2.Move(.tlCurrPkg.Left, .tlCurrPkg2.top + .tlCurrPkg2.Height + 8, .tlCurrPkg.width, 27) + END WITH + + + + + + + + + ' + ' IF ClsPkgSel.bCustom = TRUE THEN + ' ' DO THE CUSTOM INSTALL + ' ELSE + ' 'sRes = MdlInstallSys.PERFORM_FULL_INSTALL() + ' MdlInstallSys.MOUNT_DEFINED_PARTITIONS() + ' END IF + ' IF sRes AND sRes <> 0 THEN + ' Message("Error installing bulk packages") + ' RETURN + ' END IF ' sRes = 0 ' sRes = MdlInstallSys.INSTALL_PACKAGES() ' IF sRes AND sRes <> 0 THEN @@ -61,7 +94,7 @@ ' DONE WITH INSTALLATION. REBOOT THE SYSTEM. - +ME.BEGIN_PROCESS() END @@ -75,8 +108,8 @@ WITH ME .tlBanner.Move(4, 16, .ClientWidth - 16) - .FrmProg.Move(.tlBanner.Left, .tlBanner.Height * 2, .ClientWidth - 8) - .tlCurrPkg.Move(4, 4, .FrmProg.Width - 8) + .FrmProg.Move(.tlBanner.Left, .tlBanner.Height * 4, .ClientWidth - 8) + .tlCurrPkg.Move(4, 8, .FrmProg.Width - 8) .pbInstallProg.Move(.tlCurrPkg.Left, .tlCurrPkg.Height * 3, .tlCurrPkg.Width, 24) END WITH END Modified: branches/iVL/FrmInstallSys.form ============================================================================== --- branches/iVL/FrmInstallSys.form (original) +++ branches/iVL/FrmInstallSys.form Thu Jul 24 20:46:36 2008 @@ -4,11 +4,11 @@ MoveScaled(0,0,78,51) Text = ("") { tlBanner TextLabel - MoveScaled(1,1,63,3) + MoveScaled(1,1,63,8) Text = ("Vectorlinux is currently being installed to your system... Please wait") } { FrmProg Frame - MoveScaled(1,10,76,19) + MoveScaled(1,10,76,34) Text = ("") { tlCurrPkg TextLabel MoveScaled(1,1,73,3) @@ -22,7 +22,7 @@ MoveScaled(1,13,44,3) } { tlCurrPkg2 TextLabel - MoveScaled(1,9,45,3.1429) + MoveScaled(1,9,45,3) Text = ("Total progress") } } Modified: branches/iVL/MdlCore.module ============================================================================== --- branches/iVL/MdlCore.module (original) +++ branches/iVL/MdlCore.module Thu Jul 24 20:46:36 2008 @@ -187,7 +187,9 @@ - +MdlCore.unlock_gui() +fmain.btback.Enabled = FALSE +fmain.btback.ForeColor = Color.Gray END @@ -519,5 +521,31 @@ END +PUBLIC SUB LOCK_GUI() + + WITH fmain + .btback.Enabled = FALSE + .btback.ForeColor = Color.Gray + .btnext.Enabled = FALSE + .btnext.ForeColor = Color.Gray + .btQuit.Enabled = FALSE + .btQuit.ForeColor = Color.Gray + + END WITH + +END +PUBLIC SUB unlock_gui() + + WITH fmain + .btback.Enabled = TRUE + .btback.ForeColor = Color.Black + .btnext.Enabled = TRUE + .btnext.ForeColor = Color.Black + .btQuit.Enabled = TRUE + .btQuit.ForeColor = Color.Black + + END WITH + +END Modified: branches/iVL/MdlInstallSys.module ============================================================================== --- branches/iVL/MdlInstallSys.module (original) +++ branches/iVL/MdlInstallSys.module Thu Jul 24 20:46:36 2008 @@ -185,7 +185,12 @@ 'CATCH 'PRINT ERROR '.RETURN 1 - RETURN 0 + 'RETURN 0 + IF ClsPkgSel.bCustom = TRUE THEN + ' perform custom install + ELSE + ME.PERFORM_FULL_INSTALL() + END IF END PUBLIC FUNCTION fS_oPTIONS(sType AS String) AS String @@ -237,6 +242,13 @@ DIM ipct AS Float DIM iMinpct AS Float = ".01" DIM iMaxpct AS Float = ".99" + + WITH FrmInstallSys + .Resize(FMain.pnlWinHost.Width, FMain.pnlWinHost.Height) + END WITH + + + ClsGlobal.sTargetMnt = "/mnt/target" sFile = Split(File.Load(Temp$("SETUP.CONF")), "\n") FOR i = 0 TO sFile.count - 1 @@ -254,15 +266,21 @@ ' figure out the sizing and the progrss meter SHELL "export gsize=$(df| grep " & ClsPartSel.sRoot & " ) && echo $gsize | cut -f3 -d \' \'" TO sTargetSize 'Message(CStr(sTargetSize)) - iTotalSize = CInt(sTargetSize) + CInt(sPakSize) + sTargetSize = Trim(CStr(sTargetSize)) + sPakSize = Trim(CStr(sPakSize)) +' iTotalSize = CFloat(CInt(sTargetSize) + CInt(sPakSize)) 'RETURN FrmInstallSys.tlCurrPkg.Text = "Installing " & sPakDesc & " ..." FrmInstallSys.pbInstallProg.Value = 0.0 PRINT "Installing " & sPakDesc & " Total size (KB) = " & CStr(sPakSize) - hproc = SHELL "lzmadec <" & sBasePath &/ sPakPath & " | tar -xp -C " & ClsGlobal.sTargetMnt - WAIT 1 + sDump = "" + sErr = "" + MdlCore.LOCK_GUI() + hproc = SHELL "lzmadec <" & sBasePath &/ sPakPath & " | tar -xp -C " & ClsGlobal.sTargetMnt & " || echo \'FAILED\'" FOR READ + + WAIT 2 IF hproc.State = Process.Running THEN REPEAT WAIT 2 @@ -292,6 +310,13 @@ UNTIL hproc.State = Process.Stopped + ' error check + IF InStr(sDump, "FAILED") > 0 THEN + Message.Error("There has been an error extracting " & sPakDesc & gb.NewLine & + "<b>ERROR</b>" & gb.NewLine & + sErr) + RETURN 1 + END IF END IF PRINT sPak & " is installed... " 'PRINT "Needs to install " & sPak Modified: branches/iVL/MdlPartFrmt.module ============================================================================== --- branches/iVL/MdlPartFrmt.module (original) +++ branches/iVL/MdlPartFrmt.module Thu Jul 24 20:46:36 2008 @@ -18,13 +18,84 @@ PRIVATE hproc AS Process PRIVATE sDump AS String PRIVATE sErr AS String + + PUBLIC SUB PREPARE_ALL_PARTITIONS() + + DIM sList AS String[] + DIM i, iretval AS Integer + DIM sPart, sFormat AS String + + sList = NEW String[] + + IF ClsPartSel.sRoot THEN + sList.Add(ClsPartSel.sRoot & ";" & ClsPartSel.fRoot) + END IF + IF ClsPartSel.sHome THEN + sList.Add(ClsPartSel.sHome & ";" & ClsPartSel.fHome) + END IF + IF ClsPartSel.sUsr THEN + sList.Add(ClsPartSel.sUsr & ";" & ClsPartSel.fUsr) + END IF + IF ClsPartSel.sOpt THEN + sList.Add(ClsPartSel.sOpt & ";" & ClsPartSel.fOpt) + END IF + IF ClsPartSel.sTmp THEN + sList.Add(ClsPartSel.sTmp & ";" & ClsPartSel.fTmp) + END IF + IF ClsPartSel.sVar THEN + sList.Add(ClsPartSel.sVar & ";" & ClsPartSel.fVar) + END IF + + ' now that we have the list in the array, let's do each one + FOR i = 0 TO sList.Count - 1 + sPart = Left(sList[i], InStr(sList[i], ";") - 1) + sFormat = Right(sList[i], Len(sList[i]) - InStr(sList[i], ";")) + iretval = MdlPartFrmt.FORMAT_PARTITION(sPart, sFormat) ' do the formatting + IF iretval <> 0 THEN + RETURN ' stop right there there's been an error. + END IF + NEXT + + + IF iretval AND iretval <> 0 THEN + ' there has been an error. Do not move from here + 'Message("Error formatting partitions") + FrmInstallSys.tlBanner.Text = "Error formatting partitions" + FrmInstallSys.BackColor = Color.Red + RETURN + ELSE + 'move on to installing.. first, make fstab + FrmInstallSys.tlBanner.Text = "Finished formatting partitions" + PRINT "Finished formatting partitions" + WAIT 3 + WITH FrmInstallSys + .tlBanner.BackColor = Color.Default + .pbInstallProg.Visible = TRUE + .pbInstallProg2.Visible = TRUE + .tlCurrPkg2.Visible = TRUE + .FrmProg.Text = " Installing VectorLinux " + END WITH + MdlCore.LOCK_GUI() + MdlInstallSys.MOUNT_DEFINED_PARTITIONS() ' let the game begin + + END IF + +END + + + PUBLIC FUNCTION FORMAT_PARTITION(sAddr AS String, sFS AS String) AS Integer ' will return 1 for trouble, 0 for clear DIM sCommand AS String - + DIM sResult AS String 'Umount the volume first - SHELL "umount " & sAddr WAIT + SHELL "mount | grep " & sAddr TO sResult + sResult = Trim(sResult) + IF sResult <> "" THEN + + SHELL "umount " & sAddr WAIT + END IF SELECT CASE LCase(sFS) CASE "ext2" sCommand = "mke2fs -q " & sAddr @@ -37,12 +108,13 @@ CASE "jfs" sCommand = "mkfs.jfs -q " & sAddr END SELECT - - hproc = SHELL sCommand & " | echo \'FAILED\'" FOR READ + 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 + ' FrmHostPrep.tlStatus.Text = "Formatting " & sAddr & " as " & sFS + FrmInstallSys.tlCurrPkg.Text = " Formatting " & sAddr & " as " & sFS WAIT UNTIL @@ -53,9 +125,13 @@ 'error here Message.Error("There has been an error wile trying to format " & sAddr & " to " & sFS & gb.NewLine & sErr) - FrmHostPrep.tlStatus.Text = "Unable to format " & saddr + 'FrmHostPrep.tlStatus.Text = "Unable to format " & saddr + FrmInstallSys.tlCurrPkg.Text = "Unable to format " & sAddr + FrmInstallSys.tlBanner.BackColor = Color.Red RETURN 1 ELSE + 'Message(" System is ready for VectorLinux") + RETURN 0 END IF END IF Modified: branches/iVL/MdlPartSel.module ============================================================================== --- branches/iVL/MdlPartSel.module (original) +++ branches/iVL/MdlPartSel.module Thu Jul 24 20:46:36 2008 @@ -293,7 +293,7 @@ IF sdropdwn.tag = LAST.tag THEN sdropdwn.Text = "XFS" 'Balloon.Info("Select which filesystem to use with this partition", sdropdwn) - Balloon("Select which filesystem to use with this partition", sdropdwn) + ' Balloon("Select which filesystem to use with this partition", sdropdwn) END IF NEXT |