[Vectorlinux-devel] [vinstall-ng commit] r547 - - Added code to
install the REQUIRED definition bulk
From: <cod...@go...> - 2009-05-12 23:21:36
|
Author: M0...@gm... Date: Tue May 12 14:22:17 2009 New Revision: 547 Modified: branches/speedy/.lang/.pot branches/speedy/.lang/MdlMain.pot branches/speedy/.lang/Step7.pot branches/speedy/ClsGlobal.class branches/speedy/Conf0.class branches/speedy/MdlMain.module branches/speedy/Step7.class branches/speedy/Step7.form branches/speedy/Step9.class branches/speedy/Step9.form Log: - Added code to install the REQUIRED definition bulk - Added code to perform a minimal installation. - Added extra options to minimal install profile. - Fine tuned installation Modified: branches/speedy/.lang/.pot ============================================================================== --- branches/speedy/.lang/.pot (original) +++ branches/speedy/.lang/.pot Tue May 12 14:22:17 2009 @@ -244,7 +244,7 @@ msgid "When finished, Click" msgstr "" -#: Conf3.class:47 MdlMain.module:405 Step3a1a.class:177 Step3a2.class:359 +#: Conf3.class:47 MdlMain.module:496 Step3a1a.class:177 Step3a2.class:359 #: Step3a3a.class:72 Step5.class:177 msgid "to continue" msgstr "" @@ -658,22 +658,65 @@ msgid "with" msgstr "" -#: MdlMain.module:318 +#: MdlMain.module:331 +msgid "Installing required package" +msgstr "" + +#: MdlMain.module:334 +msgid "Problem while installing" +msgstr "" + +#: MdlMain.module:346 +msgid "Extracting basic system structure." +msgstr "" + +#: MdlMain.module:394 msgid "Preparing system partitions" msgstr "" -#: MdlMain.module:405 +#: MdlMain.module:396 +msgid "An error occurred while preparing partitions. Unable to continue" +msgstr "" + +#: MdlMain.module:404 +msgid "Error during installation of required software. Unable to continue" +msgstr "" + +#: MdlMain.module:496 msgid "Installation is complete. Click" msgstr "" -#: MdlMain.module:407 +#: MdlMain.module:498 msgid "Installation complete... Click" msgstr "" -#: MdlMain.module:407 +#: MdlMain.module:498 msgid "to continue." msgstr "" +#: MdlMain.module:509 +msgid "" +"Unable to install the software in the development group. Cannot continue." +msgstr "" + +#: MdlMain.module:515 +msgid "" +"Unable to install the software in the Graphical Interface group. Cannot " +"continue" +msgstr "" + +#: MdlMain.module:535 +msgid "Installing" +msgstr "" + +#: MdlMain.module:535 +msgid "Part of" +msgstr "" + +#: MdlMain.module:537 +msgid "Error installing" +msgstr "" + #: MdlStartUp.module:42 msgid "Preparation" msgstr "" @@ -1418,30 +1461,38 @@ msgid "Select Installation Mode" msgstr "" -#: Step7.class:113 +#: Step7.class:156 msgid "Full Install" msgstr "" -#: Step7.class:123 +#: Step7.class:166 msgid "Install everthing in the image (Fully Automated)" msgstr "" -#: Step7.class:131 Step8.class:137 +#: Step7.class:174 Step8.class:137 msgid "Customized" msgstr "" -#: Step7.class:141 +#: Step7.class:184 msgid "Select the components you wish to install (Advanced)" msgstr "" -#: Step7.class:149 Step8.class:139 +#: Step7.class:192 Step8.class:139 msgid "Minimal" msgstr "" -#: Step7.class:159 +#: Step7.class:202 msgid "Install the most minimal working confuguration (For older hardware)" msgstr "" +#: Step7.class:215 +msgid "Include Development Tools" +msgstr "" + +#: Step7.class:228 +msgid "Include Light-weight graphical environment" +msgstr "" + #: Step7a.class:27 Step7b.class:23 msgid "Customize Your VectorLinux Installation" msgstr "" @@ -1552,10 +1603,30 @@ "need to make any changes, this is your last chance." msgstr "" -#: Step9.class:22 +#: Step9.class:24 msgid "is being installed to your computer. Please wait." msgstr "" -#: Step9.class:81 +#: Step9.class:62 +msgid "Prepare Partitions" +msgstr "" + +#: Step9.class:62 +msgid "Install Base System (required)" +msgstr "" + +#: Step9.class:62 +msgid "Install User-Selected Software" +msgstr "" + +#: Step9.class:145 msgid "Installation in progress" +msgstr "" + +#: Step9.class:224 +msgid "Install Process" +msgstr "" + +#: Step9.class:239 +msgid "The development Crew" msgstr "" Modified: branches/speedy/.lang/MdlMain.pot ============================================================================== --- branches/speedy/.lang/MdlMain.pot (original) +++ branches/speedy/.lang/MdlMain.pot Tue May 12 14:22:17 2009 @@ -34,23 +34,63 @@ msgid "with" msgstr "" -#: MdlMain.module:318 +#: MdlMain.module:331 +msgid "Installing required package" +msgstr "" + +#: MdlMain.module:334 +msgid "Problem while installing" +msgstr "" + +#: MdlMain.module:346 +msgid "Extracting basic system structure." +msgstr "" + +#: MdlMain.module:394 msgid "Preparing system partitions" msgstr "" -#: MdlMain.module:405 +#: MdlMain.module:396 +msgid "An error occurred while preparing partitions. Unable to continue" +msgstr "" + +#: MdlMain.module:404 +msgid "Error during installation of required software. Unable to continue" +msgstr "" + +#: MdlMain.module:496 msgid "Installation is complete. Click" msgstr "" -#: MdlMain.module:405 +#: MdlMain.module:496 msgid "to continue" msgstr "" -#: MdlMain.module:407 +#: MdlMain.module:498 msgid "Installation complete... Click" msgstr "" -#: MdlMain.module:407 +#: MdlMain.module:498 msgid "to continue." +msgstr "" + +#: MdlMain.module:509 +msgid "Unable to install the software in the development group. Cannot continue." +msgstr "" + +#: MdlMain.module:515 +msgid "Unable to install the software in the Graphical Interface group. Cannot continue" +msgstr "" + +#: MdlMain.module:535 +msgid "Installing" +msgstr "" + +#: MdlMain.module:535 +msgid "Part of" +msgstr "" + +#: MdlMain.module:537 +msgid "Error installing" msgstr "" Modified: branches/speedy/.lang/Step7.pot ============================================================================== --- branches/speedy/.lang/Step7.pot (original) +++ branches/speedy/.lang/Step7.pot Tue May 12 14:22:17 2009 @@ -18,27 +18,35 @@ msgid "Select Installation Mode" msgstr "" -#: Step7.class:113 +#: Step7.class:156 msgid "Full Install" msgstr "" -#: Step7.class:123 +#: Step7.class:166 msgid "Install everthing in the image (Fully Automated)" msgstr "" -#: Step7.class:131 +#: Step7.class:174 msgid "Customized" msgstr "" -#: Step7.class:141 +#: Step7.class:184 msgid "Select the components you wish to install (Advanced)" msgstr "" -#: Step7.class:149 +#: Step7.class:192 msgid "Minimal" msgstr "" -#: Step7.class:159 +#: Step7.class:202 msgid "Install the most minimal working confuguration (For older hardware)" +msgstr "" + +#: Step7.class:215 +msgid "Include Development Tools" +msgstr "" + +#: Step7.class:228 +msgid "Include Light-weight graphical environment" msgstr "" Modified: branches/speedy/ClsGlobal.class ============================================================================== --- branches/speedy/ClsGlobal.class (original) +++ branches/speedy/ClsGlobal.class Tue May 12 14:22:17 2009 @@ -74,4 +74,6 @@ STATIC PUBLIC sDefBoot AS String STATIC PUBLIC sInstallType AS String ' type of installation to be done (Full, Custom, Minimal) +STATIC PUBLIC bInstallX11 AS Boolean +STATIC PUBLIC bInstallDev AS Boolean Modified: branches/speedy/Conf0.class ============================================================================== --- branches/speedy/Conf0.class (original) +++ branches/speedy/Conf0.class Tue May 12 14:22:17 2009 @@ -234,7 +234,7 @@ ME.Timer1.Enabled = TRUE ' Update status tree - MdlMain.ADVANCE_STATUS_TREE("Step4", "Step5") + 'MdlMain.ADVANCE_STATUS_TREE("Step4", "Step5") MdlMain.ADVANCE_STATUS_TREE("Step5", "Step6") 'ClsGlobal.fRunningMainForm.listview1["Step4"].picture = MdlStartUp.pDone 'ClsGlobal.fRunningMainForm.listview1["Step5"].picture = MdlStartUp.pDone Modified: branches/speedy/MdlMain.module ============================================================================== --- branches/speedy/MdlMain.module (original) +++ branches/speedy/MdlMain.module Tue May 12 14:22:17 2009 @@ -14,7 +14,7 @@ ' You should have received a copy of the GNU General Public License ' along with vinstall-ng. If not, see <http://www.gnu.org/licenses/>. - +PUBLIC $objPboxes AS NEW Object[] PUBLIC $objUsrGroups AS NEW Object[] PRIVATE iUID AS Integer @@ -302,6 +302,82 @@ RETURN iretval END +PUBLIC FUNCTION INSTALL_INITIAL_PACKAGES(tlStatus AS TextLabel, pbProg AS ProgressBar) AS Integer + + ' This function will install the initial packages necessary for installation before anything else. + DIM sList AS String[] = ["/x/fontconfig-*.tlz"] + DIM sRes, sLine, $listarr AS String[] + DIM i, ii, iret, ires AS Integer + DIM hproc AS Process + DIM sDump, $path, $line, sPkg, MajorDesc, sFileList AS String + + + ' this part will isntall the bulks defined as REQUIRED + SHELL "cat /mnt/source/veclinux/VINSTALL.CONF | grep REQ:" TO sdump + sDump = Trim(sdump) + sRes = Split(sDump, gb.NewLine) + FOR i = 0 TO sRes.Max + $line = Right(sRes[i], Len(sRes[i]) - InStr(sRes[i], "-")) + $line = Replace($line, "\'", "") + sLine = Split($line, ":") + MajorDesc = sLine[3] + sPkg = sLine[1] + sFileList = Trim(File.Load("/mnt/source/veclinux" &/ Trim(sPKG))) + $listarr = Split(Trim(sFileList), gb.NewLine) + FOR ii = 0 TO $listarr.Max + $path = ME.GET_PACKAGE_FULL_PATH(Trim($listarr[ii])) + IF $path THEN + WAIT 0.5 + tlStatus.Text = ("Installing required package") & Space(1) & $path + ires = ME.INSTALL_THIS_PACKAGE("/mnt/source/packages" &/ Trim($path)) + IF ires > 0 THEN + Message.Error(("Problem while installing") & Space(1) & File.Name($path)) + RETURN ires + END IF + pbProg.Value = (ii + 1) / $listarr.Count + END IF + NEXT + + NEXT + + + + + tlStatus.Text = ("Extracting basic system structure.") + FOR i = 0 TO sList.Max + iret = ME.INSTALL_THIS_PACKAGE("/mnt/source/packages" &/ Trim(sList[i])) + IF iret > 0 THEN RETURN iret + pbProg.Value = (i + 1) / sList.Count + WAIT 0.5 + NEXT + RETURN 0 + + + +END + + +PUBLIC SUB ADVANCE_INSTALL_PROGRESS(iStep AS Integer) + + DIM pb AS PictureBox + DIM pb1 AS PictureBox + + + FOR EACH pb IN $objPboxes + IF pb.Tag = iStep THEN pb.Picture = Picture.Load("images/16px-check.png") + FOR EACH pb1 IN $objPboxes + IF pb1.Tag = (iStep + 1) THEN + pb1.Picture = picture.Load("images/category.png") + END IF + NEXT + 'WAIT 5 + NEXT + + + +END + + PUBLIC FUNCTION INSTALL_PACKAGES(tlStatus AS TextLabel, pbProg AS ProgressBar, iInstallType AS Integer) AS Integer @@ -316,8 +392,22 @@ ClsGlobal.fRunningMainForm.btNext.enabled = FALSE ' perform partitioning as requested. tlStatus.Text = ("Preparing system partitions") - IF ME.PERFORM_PARTITIONING() > 0 THEN RETURN - + IF ME.PERFORM_PARTITIONING() > 0 THEN + Message.Error(("An error occurred while preparing partitions. Unable to continue")) + RETURN 1 + ELSE + ' Update Status and continue to next step + ME.ADVANCE_INSTALL_PROGRESS(0) + END IF + ' Install initial directory structure for the target / + IF ME.INSTALL_INITIAL_PACKAGES(tlStatus, pbProg) > 0 THEN + Message.Error(("Error during installation of required software. Unable to continue")) + RETURN 1 + ELSE + 'uPDATE STATUS AND CONTINUE TO NEXT STEP + ME.ADVANCE_INSTALL_PROGRESS(1) + END IF + SELECT CASE iInstallType CASE 0 GOTO FULL_INSTALL @@ -402,19 +492,62 @@ 'WAIT 1 NEXT + ME.ADVANCE_INSTALL_PROGRESS(2) Message.Info(("Installation is complete. Click") & Space(1) & ClsGlobal.fRunningMainForm.btNext.text & Space(1) & ("to continue")) ClsGlobal.fRunningMainForm.btNext.enabled = TRUE tlStatus.Text = ("Installation complete... Click") & Space(1) & ClsGlobal.fRunningMainForm.btNext.text & Space(1) & ("to continue.") + RETURN FULL_INSTALL: Message("Full install not programmed yet") RETURN MINIMAL_INSTALL: - Message("Minimal install not yet programmed") - RETURN + 'Message("Minimal install not yet programmed") + IF ClsGlobal.bInstallDev = TRUE THEN + IF ME.INSTALL_THIS_BULK(tlStatus, pbProg, "DEV") > 0 THEN + Message.Error(("Unable to install the software in the development group. Cannot continue.")) + RETURN 1 + END IF + END IF + IF ClsGlobal.bInstallX11 = TRUE THEN + IF ME.INSTALL_THIS_BULK(tlStatus, pbProg, "X11") > 0 THEN + Message.Error(("Unable to install the software in the Graphical Interface group. Cannot continue")) + RETURN 1 + END IF + END IF + RETURN 0 + + RETURN 0 + +END + +PUBLIC FUNCTION INSTALL_THIS_BULK(tlStatus AS TextLabel, pbProg AS ProgressBar, sBulkName AS String) AS Integer + + DIM $list AS String[] = Split(Trim(File.Load("/mnt/source/veclinux" &/ sBulkName)), gb.NewLine) + DIM $pkg, $path AS String + DIM i AS Integer + + FOR i = 0 TO $list.Max + $path = ME.GET_PACKAGE_FULL_PATH($list[i]) + IF $path THEN + WAIT 0.5 + tlStatus.Text = ("Installing") & Space(1) & $path & Space(1) & "(" & ("Part of") & sBulkName & ")" + IF ME.INSTALL_THIS_PACKAGE("/mnt/source/packages" &/ $path) > 0 THEN + Message.Error(("Error installing") & Space(1) & $path) + RETURN 1 + ELSE + pbProg.Value = (i + 1) / $list.Max + END IF + END IF + NEXT + + + + END + PUBLIC FUNCTION INSTALL_THIS_PACKAGE(sFullPkgPath AS String) AS Integer Modified: branches/speedy/Step7.class ============================================================================== --- branches/speedy/Step7.class (original) +++ branches/speedy/Step7.class Tue May 12 14:22:17 2009 @@ -54,3 +54,42 @@ END + +PUBLIC SUB Panel4_MouseDown() + + + +END + +PUBLIC SUB rbMinimal_Click() + +ME.rbCliMin.Visible = TRUE +ME.rbMinDev.Visible = TRUE + +END + +PUBLIC SUB rbCustomInstall_Click() + + ME.rbCliMin.Visible = FALSE +ME.rbMinDev.Visible = FALSE + +END + +PUBLIC SUB rbFullInstall_Click() + + ME.rbCliMin.Visible = FALSE +ME.rbMinDev.Visible = FALSE + +END + +PUBLIC SUB rbCliMin_Click() + + ClsGlobal.bInstallX11 = LAST.Value + +END + +PUBLIC SUB rbMinDev_Click() + + ClsGlobal.bInstallDev = LAST.Value + +END Modified: branches/speedy/Step7.form ============================================================================== --- branches/speedy/Step7.form (original) +++ branches/speedy/Step7.form Tue May 12 14:22:17 2009 @@ -22,7 +22,7 @@ Expand = True } { HPanel2 HPanel - MoveScaled(2,8,69,27) + MoveScaled(2,8,69,35) Expand = True { rbFullInstall RadioButton MoveScaled(1,2,17,3) @@ -68,6 +68,27 @@ Expand = True Text = ("Install the most minimal working confuguration (For older hardware)") Alignment = Align.TopLeft + } + { Panel4 Panel + MoveScaled(1,22,9,3.5) + } + { rbCliMin CheckBox + MoveScaled(12,22,50,3) + Visible = False + Tag = "DEV" + Expand = True + Text = ("Include Development Tools") + } + { Panel5 Panel GrpMinOpts + Name = "Panel5" + MoveScaled(1,25,9,3.5) + } + { rbMinDev CheckBox + MoveScaled(12,25,48,3) + Visible = False + Tag = "X11" + Expand = True + Text = ("Include Light-weight graphical environment") } } } Modified: branches/speedy/Step9.class ============================================================================== --- branches/speedy/Step9.class (original) +++ branches/speedy/Step9.class Tue May 12 14:22:17 2009 @@ -15,20 +15,24 @@ ' along with vinstall-ng. If not, see <http://www.gnu.org/licenses/>. + PUBLIC SUB Form_Open() + ME.tlbanner.Text = "<h2>" & tlbanner.Text & "</h2>" ME.tlInstallWarn.Text = ClsGlobal.sDistroName & Space(1) & ClsGlobal.sDistroVer & Space(1)& ("is being installed to your computer. Please wait.") WAIT 1 ME.Refresh - WAIT 0.1 - MdlMain.INSTALL_PACKAGES(tlcurrpkg, pbinstall, ClsGlobal.iInstallMethod) + WAIT 1 + ME.create_installation_process_layout() + END PUBLIC FUNCTION GetNExt() AS String + RETURN "Conf0" END @@ -37,12 +41,66 @@ + END PUBLIC SUB StartUp() + MdlMain.ADVANCE_STATUS_TREE("Step4", "Step5") + ME.Resize(ME.Parent.Width, ME.Parent.Height) + ME.Refresh() + +END + + + + +PUBLIC SUB create_installation_process_layout() + + DIM tl AS TextLabel + DIM pb AS PictureBox + DIM i AS Integer + DIM sStages AS String[] = [("Prepare Partitions"), ("Install Base System (required)"), ("Install User-Selected Software")] + + MdlMain.ADVANCE_STATUS_TREE("Step4", "Step5") + ClsGlobal.fRunningMainForm.Refresh() + FOR i = 0 TO sStages.Max + pb = NEW PictureBox(ME.svInstallProc) + WITH pb + .Expand = FALSE + .Resize(28, 28) + .Picture = Picture.Load("images/square.png") + .Tag = i + '.Stretch = TRUE + END WITH + MdlMain.$objPboxes.Add(pb) + tl = NEW TextLabel(ME.svInstallProc) + WITH tl + .Text = sStages[i] + .Height = 28 + '.Width = .Parent.Width - (.X * 2) + .Alignment = Align.TopLeft + .Expand = TRUE + .Visible = TRUE + END WITH + NEXT + ' Now start the installation process + MdlMain.INSTALL_PACKAGES(tlcurrpkg, pbinstall, ClsGlobal.iInstallMethod) END +PUBLIC SUB Form_Resize() + + ME.hbBottomPanel.Height = ME.ClientH - (ME.hbBottomPanel.top + 24) + ME.svInstallProc.Width = svinstallproc.Parent.Width - (svinstallproc.left * 2) + ME.svInstallProc.Height = svinstallproc.Parent.Height - (svinstallproc.top * 1.25) + +END + +PUBLIC SUB Frame2_MouseDown() + + ME.fake_progress() + +END Modified: branches/speedy/Step9.form ============================================================================== --- branches/speedy/Step9.form (original) +++ branches/speedy/Step9.form Tue May 12 14:22:17 2009 @@ -1,7 +1,7 @@ # Gambas Form File 2.0 { Form Form - MoveScaled(0,0,73,48) + MoveScaled(0,0,78,60) Text = ("") Arrangement = Arrange.Row { HPanel1 HPanel @@ -18,26 +18,26 @@ } } { HBox1 HBox - MoveScaled(0,5,12,2) + MoveScaled(0,5,12,1) Expand = True } { HBox2 HBox - MoveScaled(0,8,65,6) + MoveScaled(0,8,65,3.5) Expand = True Padding = 2 { tlInstallWarn TextLabel - MoveScaled(0,0,20,5) + MoveScaled(0,0,20,3.5) Expand = True Text = ("") Alignment = Align.Left } } { HBox3 HBox - MoveScaled(0,14,15,2) + MoveScaled(0,12,15,1) Expand = True } { HBox4 HBox - MoveScaled(0,17,72,3.5) + MoveScaled(-1,14,72,3.5) Expand = True Padding = 2 { tlCurrPkg TextLabel @@ -47,16 +47,48 @@ } } { HBox5 HBox - MoveScaled(0,21,7,2) + MoveScaled(0,18,7,1) Expand = True } { HPanel2 HPanel - MoveScaled(0,23,73,3.25) + MoveScaled(0,19,73,4) Expand = True Padding = 2 { pbInstall ProgressBar MoveScaled(0,0,21,3) Expand = True + } + { HBox6 HBox + MoveScaled(0,3,7,1) + Expand = True + } + } + { Separator2 Separator + MoveScaled(19,24,27,2) + Expand = True + } + { hbBottomPanel HBox + MoveScaled(0,26,72,31) + Expand = True + Spacing = 4 + Padding = 4 + { Frame1 Frame + MoveScaled(1,1,33,29) + Expand = True + Text = ("Install Process") + { svInstallProc ScrollView + MoveScaled(1,3,31,24) + Expand = True + Arrangement = Arrange.Row + Spacing = 2 + Padding = 2 + Border = False + } + } + { Frame2 Frame + MoveScaled(37,1,33,28) + Expand = True + Text = ("The development Crew") } } } |