|
From: <cod...@go...> - 2008-10-06 19:18:21
|
Author: m0e.lnx
Date: Mon Oct 6 12:13:55 2008
New Revision: 213
Modified:
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/DevLog
branches/iVL/FrmLangSel.class
branches/iVL/FrmPkgsel2.class
branches/iVL/MdlInstallCustom.module
branches/iVL/MdlInstallSys.module
Log:
- Fixed progressbar values for custom installation.
Modified: branches/iVL/.lang/ClsGlobal.pot
==============================================================================
--- branches/iVL/.lang/ClsGlobal.pot (original)
+++ branches/iVL/.lang/ClsGlobal.pot Mon Oct 6 12:13:55 2008
@@ -1,4 +1,4 @@
-# /home/moe/projects/installer/ClsGlobal.class
+# /home/remote/area-51/projects/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 Mon Oct 6 12:13:55 2008
@@ -1,4 +1,4 @@
-# /home/moe/projects/installer/ClsPartSel.class
+# /home/remote/area-51/projects/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 Mon Oct 6 12:13:55 2008
@@ -1,4 +1,4 @@
-# /home/moe/projects/installer/ClsWinDrives.class
+# /home/remote/area-51/projects/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 Mon Oct 6 12:13:55 2008
@@ -1,4 +1,4 @@
-# /home/moe/projects/installer/FMain.class
+# /home/remote/area-51/projects/installer/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 Oct 6 12:13:55 2008
@@ -1,4 +1,4 @@
-# /home/moe/projects/installer/FrmDiskPart.class
+# /home/remote/area-51/projects/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 Mon Oct 6 12:13:55 2008
@@ -1,4 +1,4 @@
-# /home/moe/projects/installer/FrmLicense.class
+# /home/remote/area-51/projects/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 Mon Oct 6 12:13:55 2008
@@ -1,4 +1,4 @@
-# /home/moe/projects/installer/FrmPartScheme.class
+# /home/remote/area-51/projects/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 Mon Oct 6 12:13:55 2008
@@ -1,4 +1,4 @@
-# /home/moe/projects/installer/FrmPartSel.class
+# /home/remote/area-51/projects/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 Mon Oct 6 12:13:55 2008
@@ -1,4 +1,4 @@
-# /home/moe/projects/installer/FrmPkgSel.class
+# /home/remote/area-51/projects/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 Mon Oct 6 12:13:55 2008
@@ -1,4 +1,4 @@
-# /home/moe/projects/installer/FrmSelISO.class
+# /home/remote/area-51/projects/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 Mon Oct 6 12:13:55 2008
@@ -1,4 +1,4 @@
-# /home/moe/projects/installer/FrmSummary.class
+# /home/remote/area-51/projects/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 Mon Oct 6 12:13:55 2008
@@ -1,4 +1,4 @@
-# /home/moe/projects/installer/FrmWinDrives.class
+# /home/remote/area-51/projects/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 Mon Oct 6 12:13:55 2008
@@ -1,4 +1,4 @@
-# /home/moe/projects/installer/MdlCore.module
+# /home/remote/area-51/projects/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 Mon Oct 6 12:13:55 2008
@@ -1,4 +1,4 @@
-# /home/moe/projects/installer/MdlDiskPart.module
+# /home/remote/area-51/projects/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 Mon Oct 6 12:13:55 2008
@@ -1,4 +1,4 @@
-# /home/moe/projects/installer/MdlObjSizer.module
+# /home/remote/area-51/projects/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 Mon Oct 6 12:13:55 2008
@@ -1,4 +1,4 @@
-# /home/moe/projects/installer/MdlPartSel.module
+# /home/remote/area-51/projects/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 Mon Oct 6 12:13:55 2008
@@ -1,4 +1,4 @@
-# /home/moe/projects/installer/MdlPkgSel.module
+# /home/remote/area-51/projects/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 Mon Oct 6 12:13:55 2008
@@ -1,4 +1,4 @@
-# /home/rbistolfi/installer/MdlSetup.module
+# /home/remote/area-51/projects/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 Mon Oct 6 12:13:55 2008
@@ -1,4 +1,4 @@
-# /home/moe/projects/installer/MdlSummarize.module
+# /home/remote/area-51/projects/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 Mon Oct 6 12:13:55 2008
@@ -1,4 +1,4 @@
-# /home/moe/projects/installer/MdlWinDrives.module
+# /home/remote/area-51/projects/installer/MdlWinDrives.module
# Generated by Gambas compiler
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
Modified: branches/iVL/DevLog
==============================================================================
--- branches/iVL/DevLog (original)
+++ branches/iVL/DevLog Mon Oct 6 12:13:55 2008
@@ -1,2 +1 @@
-- Fixed problem with prograssbar while installing packages and
packages/required for full install
-- Fixed progressbar meter at installing CONF packages
+- Fixed progressbar values for custom installation.
\ No newline at end of file
Modified: branches/iVL/FrmLangSel.class
==============================================================================
--- branches/iVL/FrmLangSel.class (original)
+++ branches/iVL/FrmLangSel.class Mon Oct 6 12:13:55 2008
@@ -55,3 +55,10 @@
FMain.btnext.Enabled = TRUE
END
+
+PUBLIC SUB lbLangSel_KeyRelease()
+
+
+
+
+END
Modified: branches/iVL/FrmPkgsel2.class
==============================================================================
--- branches/iVL/FrmPkgsel2.class (original)
+++ branches/iVL/FrmPkgsel2.class Mon Oct 6 12:13:55 2008
@@ -62,6 +62,6 @@
PUBLIC SUB Form_Hide()
- FMain.tvPlan["Prep2"].Picture = MdlCore.sDonePic
+' FMain.tvPlan["Prep2"].Picture = MdlCore.sDonePic
END
Modified: branches/iVL/MdlInstallCustom.module
==============================================================================
--- branches/iVL/MdlInstallCustom.module (original)
+++ branches/iVL/MdlInstallCustom.module Mon Oct 6 12:13:55 2008
@@ -46,7 +46,7 @@
iRet = ME.INSTALL_USER_SELECTED_BULKS()
'Message("Installing user-selected bulks")
- PRINT "INSTALING USER-SELECTED BULK PACKAGES"
+ PRINT "INSTALING USER-SELECTED BULKS"
IF iRet <> 0 THEN
Message.Error(("There has been an error while installing optional
software to your system. ") & gb.newline & sErr)
RETURN
@@ -61,8 +61,12 @@
END IF
'iret = ME.INSTALL_PACKAGES_REQUIRED()
+ ' Make sure we set the right value for the progress bar here
+ MdlInstallSys.iPkgCnt = iPkgCnt
+ MdlInstallSys.iPkgNum = iPkgNum
iret = MdlInstallSys.INSTALL_REQUIRED_PACKAGES()
PRINT "INSTALLING ADDITIONAL REQUIRED SOFTWARE"
+
IF iret <> 0 THEN
Message.Error(("Error while installing required system software. ") &
gb.NewLine & sErr)
RETURN
@@ -197,150 +201,228 @@
' ' END
-PUBLIC FUNCTION INSTALL_PACKAGES_REQUIRED() AS Integer
-
- DIM i, iRet AS Integer
- DIM sPkg AS String
-
- FOR EACH sPkg IN RDir(ClsGlobal.sSourceMnt &/ "packages" &/ "required")
- SELECT CASE File.Ext(ClsGlobal.sSourceMnt &/ "packages" &/ "required"
&/ sPkg)
- CASE "tlz", "tgz"
- PRINT " + Install " & ClsGlobal.sSourceMnt &/ "packages"
&/ "required" &/ sPkg
- iret = ME.INSTALL_THIS_PACKAGE(ClsGlobal.sSourceMnt &/ "packages"
&/ "required" &/ sPkg)
- IF iret <> 0 THEN
- RETURN iret
- END IF
- PRINT " ! " & ClsGlobal.sSourceMnt &/ "packages" &/ "required" &/
sPkg & " is installed"
- END SELECT
- NEXT
-END
-
-PUBLIC FUNCTION INSTALL_USER_SELECTED_PACKAGES() AS Integer
-
- DIM i AS Integer
- DIM sFile AS String[]
- DIM sLine AS String
- DIM sRawFile AS String
- DIM sTlzPath AS String
- DIM sTlzName AS String
- DIM sTlzDesc AS String
- DIM iTlzSize AS Integer
- DIM sTlzBasePath AS String = ClsGlobal.sSourceMnt &/ "packages"
- DIM sTargetSize AS Variant
- DIM cb AS CheckBox
- DIM sName AS String
-
- sRawFile = DConv(File.Load(ClsGlobal.sSourceMnt &/ "packages"
&/ "PACKAGES.TXT"))
-
- sFile = Split(sRawFile, "\n")
-
- FOR EACH cb IN MdlPkgSel.Pkgs
- sName = Trim(cb.text)
-
-
- FOR i = 0 TO sFile.count - 1
- sLine = Trim(sFile[i])
- IF InStr(sLine, sName) THEN
- IF Left(sLine, Len("PACKAGE NAME")) = "PACKAGE NAME" THEN
- sTlzName = Trim(Right(sLine, Len(sLine) - InStr(sLine, ":")))
- sTlzPath = Trim(Right(sFile[i + 1], Len(sFile[i + 1]) -
InStr(sFile[i + 1], ":")))
- sTlzPath = Right(sTlzPath, Len(sTlzPath) - 2) ' remove
the ./ from the location line
- iTlzSize = Trim(Right(sFile[i + 3], Len(sFile[i + 3]) -
InStr(sFile[i + 3], ":")))
- 'iTlzSize = Left(iTlzSize, Len(iTlzSize) - 1)
- 'iTlzSize = Trim(iTlzSize)
- FrmInstallSys.tlCurrPkg.Text = "Installing " & sTlzName
& " ..."
- FrmInstallSys.pbInstallProg.Value = 0.0
-
- 'IF sTlzName = sName THEN
-
-
- PRINT " Install " & sTlzBasePath &/ sTlzPath &/ sTlzName
- ' install each package
- SHELL "export gsize=$(df| grep " & ClsPartSel.sRoot & " )
&& echo $gsize | cut -f3 -d \' \'" TO sTargetSize
- sTargetSize = Trim(CStr(sTargetSize))
- SHELL "echo \"\" > /tmp/installdump" WAIT
- sDump = ""
- sErr = ""
- 'hproc = SHELL "install-pkg " & sTlzBasePath &/ sTlzPath &/
sTlzName & Space(1) & ClsGlobal.sTargetMnt & " || echo \'FAILED\'" FOR READ
- hproc = SHELL "installpkg " & sTlzBasePath &/ sTlzPath &/
sTlzName & " -R " & ClsGlobal.sTargetMnt & " || echo \'FAILED\' 2>
/tmp/installdump" WAIT 'FOR READ
- WAIT 1
- IF hproc.State = Process.Running THEN
- REPEAT
- WAIT 1
- MdlInstallSys.UPDATE_STEP_PROGRESS(sTargetSize,
iTlzSize)
-
- ' figure out the progress again
-
- UNTIL
- hproc.State = Process.Stopped
- sDump = File.Load("/tmp/installdump")
-
- IF InStr(sDump, "FAILED") > 0 THEN
- ERROR
- RETURN 1
- ELSE
- IF FrmInstallSys.pbInstallProg.Value <> 1 THEN
- FrmInstallSys.pbInstallProg.Value = 1
- END IF
- END IF
- END IF
- INC iPkgNum
- FrmInstallSys.pbInstallProg2.Value =
MdlSetup.UPDATE_OVERALL_PROGRESS(iPkgCnt, iPkgNum)
- END IF
- END IF
- NEXT
- NEXT
-END
-
-
-
-
-' ' ' PUBLIC FUNCTION INSTALL_USER_SELECTED_PACKAGES_OLD() AS Integer
-' ' '
-' ' ' DIM i, iret AS Integer
+' ' ' PUBLIC FUNCTION INSTALL_PACKAGES_REQUIRED() AS Integer
+' ' '
+' ' ' DIM i, iRet AS Integer
' ' ' DIM sPkg AS String
-' ' ' DIM cb AS CheckBox
-' ' ' DIM sPkgPath AS String = ClsGlobal.sSourceMnt &/ "packages"
-' ' ' DIM sPkgLoc AS String
-' ' ' DIM sFile AS String[]
-' ' ' DIM sLine AS String
-' ' ' DIM sConfig AS String
+' ' ' DIM sDump AS String
' ' ' DIM ii AS Integer
-' ' ' ' needs to read PACKAES.TXT to get package name and location
+' ' ' FOR EACH spkg IN RDir(ClsGlobal.sSetupConfPath &/ "packages"
&/ "required", "t?z")
+' ' ' INC ii
+' ' ' NEXT
' ' '
-' ' ' 'sFile = Split(File.Load(ClsGlobal.sSourceMnt &/ "packages"
&/ "PACKAGES.TXT"), "\n")
-' ' ' ii = 0
-' ' ' sConfig = "WORKINGDIR=" & ClsGlobal.sTargetMnt &/ "home"
&/ "ftp" &/ "pub" &/ "veclinux" & "\n" &
-' ' ' "SOURCE=" & ClsGlobal.sSourceMnt &/ "packages"
+' ' ' i = 0
+' ' ' FOR EACH sPkg IN RDir(ClsGlobal.sSourceMnt &/ "packages"
&/ "required")
+' ' ' SELECT CASE File.Ext(ClsGlobal.sSourceMnt &/ "packages"
&/ "required" &/ sPkg)
+' ' ' CASE "tlz", "tgz"
+' ' ' INC i
+' ' ' PRINT " + Install " & ClsGlobal.sSourceMnt &/ "packages"
&/ "required" &/ sPkg
+' ' ' 'iret = ME.INSTALL_THIS_PACKAGE(ClsGlobal.sSourceMnt
&/ "packages" &/ "required" &/ sPkg)
+' ' ' SHELL "echo \"\" > /tmp/installdump" WAIT
' ' '
-' ' ' File.Save(Temp("sources"))
-' ' ' IF Exist(ClsGlobal.sTargetMnt &/ "home/ftp/pub/veclinux") =
FALSE THEN
-' ' ' MKDIR ClsGlobal.sTargetMnt &/ "home/ftp/pub/veclinux"
-' ' ' END IF
-' ' ' SHELL "slapt-get -u -c " & Temp("sources") WAIT
-' ' ' FOR EACH cb IN MdlPkgSel.Pkgs
-' ' ' IF cb.value = TRUE THEN
-' ' ' 'spkg = cb.Text
-' ' ' INC ii
-' ' ' NEXT
-' ' '
-' ' ' ' now to install them
-' ' '
-' ' ' FOR EACH cb IN MdlPkgSel.Pkgs
-' ' ' IF cb.Value = TRUE THEN
-' ' ' sPkg =
-' ' '
-' ' '
-' ' ' FOR i = 0 TO ClsPkgSel.arrPkgs.count - 1
-' ' ' sPkg = ClsPkgSel.arrPkgs[i]
-' ' ' PRINT " + Install " & sPkgPath &/ sPkg
-' ' ' iret = ME.INSTALL_THIS_PACKAGE(sPkgPath &/ sPkg)
-' ' ' IF iret <> 0 THEN
-' ' ' RETURN iret
-' ' ' END IF
-' ' ' PRINT " ! " & sPkgPath &/ sPkg & " is installed"
+' ' ' hproc = SHELL "installpkg " & ClsGlobal.sSourceMnt
&/ "packages" &/ "required" &/ sPkg & " -R " & ClsGlobal.sTargetMnt & " ||
echo \'FAILED\' 2> /tmp/installdump"
+' ' ' WAIT 1
+' ' ' IF hproc.State = Process.Running THEN
+' ' ' REPEAT
+' ' ' WAIT
+' ' ' UNTIL hproc.State = Process.Stopped
+' ' ' END IF
+' ' ' sDump = File.Load("/tmp/installdump")
+' ' ' IF InStr(sDump, "FAILED") THEN
+' ' ' RETURN 1
+' ' ' END IF
+' ' '
+' ' ' PRINT " ! " & ClsGlobal.sSourceMnt &/ "packages" &/ "required"
&/ sPkg & " is installed"
+' ' ' FrmInstallSys.pbInstallProg.Value = i / ii
+' ' '
+' ' ' INC iPkgNum
+' ' '
+' ' ' FrmInstallSys.pbInstallProg2.Value =
MdlSetup.UPDATE_OVERALL_PROGRESS(iPkgCnt, iPkgNum)
+' ' ' END SELECT
' ' ' NEXT
' ' ' END
+
+PUBLIC FUNCTION INSTALL_USER_SELECTED_PACKAGES() AS Integer
+ DIM cb AS CheckBox
+ DIM sBasePath AS String = ClsGlobal.sSourceMnt &/ "packages"
+ DIM iStepTotal AS Integer = 0
+ DIM i AS Integer = 0
+ DIM sDump AS String
+
+ 'Message.Info("Begin installation of user selected software")
+
+ FOR EACH cb IN MdlPkgSel.Pkgs
+ IF cb.value = TRUE THEN
+ INC iStepTotal
+ END IF
+ NEXT
+
+
+
+ FOR EACH cb IN MdlPkgSel.Pkgs
+ IF cb.Value = TRUE THEN
+ ' we will only measure #/##
+ sDump = ""
+ SHELL "echo \"\" > /tmp/installdump" WAIT
+ 'Message.Info(sBasePath &/ cb.tag)
+ FrmInstallSys.tlCurrPkg.Text = ("Installing user-selected
package") & Space(1) & File.Name(sBasePath &/ cb.Tag)
+ hproc = SHELL "installpkg " & sBasePath &/ cb.tag & Space(1)
& "-R" & Space(1) & ClsGlobal.sTargetMnt & Space(1) & "|| echo \'FAILED\'
2> /tmp/installdump" 'WAIT
+ '
+ WAIT 1
+ IF hproc.State = Process.running THEN
+ REPEAT
+ WAIT
+ UNTIL hproc.State = Process.Stopped
+ END IF
+ sDump = File.Load("/tmp/installdump")
+ ' update step progress
+ INC i
+ FrmInstallSys.pbInstallProg.Value = i / iStepTotal
+ INC iPkgNum
+ 'MdlSetup.UPDATE_OVERALL_PROGRESS(iPkgCnt, iPkgNum)
+ FrmInstallSys.pbInstallProg2.Value =
MdlSetup.UPDATE_OVERALL_PROGRESS(iPkgCnt, iPkgNum)
+ IF InStr(sDump, "FAILED") > 0 THEN
+ Message.Error("Error installing user-selected package" &
Space(1) & cb.Text)
+ RETURN 1
+ ' ELSE
+ ' RETURN 0
+ END IF
+' NEXT
+ 'Message.Warning("Package " & File.Name(sBasePath &/ cb.tag) & "
is installed")
+ END IF
+
+ NEXT
+ 'Message.Info("End installation of user selected software")
+END
+' '
+' '
+' '
+' '
+' ' DIM i AS Integer
+' ' DIM sFile AS String[]
+' ' DIM sLine AS String
+' ' DIM sRawFile AS String
+' ' DIM sTlzPath AS String
+' ' DIM sTlzName AS String
+' ' DIM sTlzDesc AS String
+' ' DIM iTlzSize AS Integer
+' ' DIM sTlzBasePath AS String = ClsGlobal.sSourceMnt &/ "packages"
+' ' DIM sTargetSize AS Variant
+' ' DIM cb AS CheckBox
+' ' DIM sName AS String
+' '
+' ' sRawFile = DConv(File.Load(ClsGlobal.sSourceMnt &/ "packages"
&/ "PACKAGES.TXT"))
+' '
+' ' sFile = Split(sRawFile, "\n")
+' '
+' ' FOR EACH cb IN MdlPkgSel.Pkgs
+' ' sName = Trim(cb.text)
+' '
+' '
+' ' FOR i = 0 TO sFile.count - 1
+' ' sLine = Trim(sFile[i])
+' ' IF InStr(sLine, sName) THEN
+' ' IF Left(sLine, Len("PACKAGE NAME")) = "PACKAGE NAME" THEN
+' ' sTlzName = Trim(Right(sLine, Len(sLine) -
InStr(sLine, ":")))
+' ' sTlzPath = Trim(Right(sFile[i + 1], Len(sFile[i + 1]) -
InStr(sFile[i + 1], ":")))
+' ' sTlzPath = Right(sTlzPath, Len(sTlzPath) - 2) ' remove
the ./ from the location line
+' ' iTlzSize = Trim(Right(sFile[i + 3], Len(sFile[i + 3]) -
InStr(sFile[i + 3], ":")))
+' ' 'iTlzSize = Left(iTlzSize, Len(iTlzSize) - 1)
+' ' 'iTlzSize = Trim(iTlzSize)
+' ' FrmInstallSys.tlCurrPkg.Text = "Installing " & sTlzName
& " ..."
+' ' FrmInstallSys.pbInstallProg.Value = 0.0
+' '
+' ' 'IF sTlzName = sName THEN
+' ' Message.Info(sTlzName)
+' ' 'RETURN
+' '
+' ' PRINT " Install " & sTlzBasePath &/ sTlzPath &/ sTlzName
+' ' ' install each package
+' ' SHELL "export gsize=$(df| grep " & ClsPartSel.sRoot & "
) && echo $gsize | cut -f3 -d \' \'" TO sTargetSize
+' ' sTargetSize = Trim(CStr(sTargetSize))
+' ' SHELL "echo \"\" > /tmp/installdump" WAIT
+' ' sDump = ""
+' ' sErr = ""
+' ' 'hproc = SHELL "install-pkg " & sTlzBasePath &/ sTlzPath
&/ sTlzName & Space(1) & ClsGlobal.sTargetMnt & " || echo \'FAILED\'" FOR
READ
+' ' hproc = SHELL "installpkg " & sTlzBasePath &/ sTlzPath
&/ sTlzName & " -R " & ClsGlobal.sTargetMnt & " || echo \'FAILED\' 2>
/tmp/installdump" WAIT 'FOR READ
+' ' WAIT 1
+' ' IF hproc.State = Process.Running THEN
+' ' REPEAT
+' ' WAIT 1
+' ' MdlInstallSys.UPDATE_STEP_PROGRESS(sTargetSize,
iTlzSize)
+' '
+' ' ' figure out the progress again
+' '
+' ' UNTIL
+' ' hproc.State = Process.Stopped
+' ' sDump = File.Load("/tmp/installdump")
+' '
+' ' IF InStr(sDump, "FAILED") > 0 THEN
+' ' ERROR
+' ' RETURN 1
+' ' ELSE
+' ' IF FrmInstallSys.pbInstallProg.Value <> 1
THEN
+' ' FrmInstallSys.pbInstallProg.Value = 1
+' ' END IF
+' ' END IF
+' ' END IF
+' ' INC iPkgNum
+' ' FrmInstallSys.pbInstallProg2.Value =
MdlSetup.UPDATE_OVERALL_PROGRESS(iPkgCnt, iPkgNum)
+' ' END IF
+' ' END IF
+' ' NEXT
+' ' NEXT
+' ' END
+' '
+' '
+' '
+' '
+' ' ' ' ' PUBLIC FUNCTION INSTALL_USER_SELECTED_PACKAGES_OLD() AS Integer
+' ' ' ' '
+' ' ' ' ' DIM i, iret AS Integer
+' ' ' ' ' DIM sPkg AS String
+' ' ' ' ' DIM cb AS CheckBox
+' ' ' ' ' DIM sPkgPath AS String = ClsGlobal.sSourceMnt &/ "packages"
+' ' ' ' ' DIM sPkgLoc AS String
+' ' ' ' ' DIM sFile AS String[]
+' ' ' ' ' DIM sLine AS String
+' ' ' ' ' DIM sConfig AS String
+' ' ' ' ' DIM ii AS Integer
+' ' ' ' ' ' needs to read PACKAES.TXT to get package name and
location
+' ' ' ' '
+' ' ' ' ' 'sFile = Split(File.Load(ClsGlobal.sSourceMnt &/ "packages"
&/ "PACKAGES.TXT"), "\n")
+' ' ' ' ' ii = 0
+' ' ' ' ' sConfig = "WORKINGDIR=" & ClsGlobal.sTargetMnt &/ "home"
&/ "ftp" &/ "pub" &/ "veclinux" & "\n" &
+' ' ' ' ' "SOURCE=" & ClsGlobal.sSourceMnt &/ "packages"
+' ' ' ' '
+' ' ' ' ' File.Save(Temp("sources"))
+' ' ' ' ' IF Exist(ClsGlobal.sTargetMnt &/ "home/ftp/pub/veclinux")
= FALSE THEN
+' ' ' ' ' MKDIR ClsGlobal.sTargetMnt &/ "home/ftp/pub/veclinux"
+' ' ' ' ' END IF
+' ' ' ' ' SHELL "slapt-get -u -c " & Temp("sources") WAIT
+' ' ' ' ' FOR EACH cb IN MdlPkgSel.Pkgs
+' ' ' ' ' IF cb.value = TRUE THEN
+' ' ' ' ' 'spkg = cb.Text
+' ' ' ' ' INC ii
+' ' ' ' ' NEXT
+' ' ' ' '
+' ' ' ' ' ' now to install them
+' ' ' ' '
+' ' ' ' ' FOR EACH cb IN MdlPkgSel.Pkgs
+' ' ' ' ' IF cb.Value = TRUE THEN
+' ' ' ' ' sPkg =
+' ' ' ' '
+' ' ' ' '
+' ' ' ' ' FOR i = 0 TO ClsPkgSel.arrPkgs.count - 1
+' ' ' ' ' sPkg = ClsPkgSel.arrPkgs[i]
+' ' ' ' ' PRINT " + Install " & sPkgPath &/ sPkg
+' ' ' ' ' iret = ME.INSTALL_THIS_PACKAGE(sPkgPath &/ sPkg)
+' ' ' ' ' IF iret <> 0 THEN
+' ' ' ' ' RETURN iret
+' ' ' ' ' END IF
+' ' ' ' ' PRINT " ! " & sPkgPath &/ sPkg & " is installed"
+' ' ' ' ' NEXT
+' ' ' ' ' END
PUBLIC FUNCTION INSTALL_USER_SELECTED_BULKS() AS Integer
Modified: branches/iVL/MdlInstallSys.module
==============================================================================
--- branches/iVL/MdlInstallSys.module (original)
+++ branches/iVL/MdlInstallSys.module Mon Oct 6 12:13:55 2008
@@ -18,8 +18,8 @@
PRIVATE hproc AS Process
PRIVATE sDump AS String
PRIVATE sErr AS String
- PRIVATE iPkgCnt AS Integer
- PRIVATE iPkgNum AS Integer = 0
+ PUBLIC iPkgCnt AS Integer
+ PUBLIC iPkgNum AS Integer = 0
@@ -789,6 +789,7 @@
INC iPkgNum
FrmInstallSys.pbInstallProg2.Value =
MdlSetup.UPDATE_OVERALL_PROGRESS(iPkgCnt, iPkgNum)
+
'Message(sTlzPath & "<br>" & sTlzName)
NEXT
|