From: <cod...@go...> - 2007-08-19 15:34:50
|
Author: easuter Date: Sun Aug 19 08:34:11 2007 New Revision: 23 Modified: trunk/.lang/#project.pot trunk/.lang/.pot trunk/.lang/Functions.pot trunk/.lang/Global.pot trunk/.lang/InputBox.pot trunk/.lang/Main.pot trunk/.lang/Utils.pot trunk/.lang/cDiskInfo.pot trunk/.lang/cPartInfo.pot trunk/.lang/cPartInstall.pot trunk/.lang/frmChoice.pot trunk/.lang/frmConfig.pot trunk/.lang/frmDriveSelect.pot trunk/.lang/frmGO.pot trunk/.lang/frmMain.pot trunk/.lang/frmPackages.pot trunk/.lang/frmPartSelect.pot trunk/.lang/frmPartitioner.pot trunk/.lang/frmPartitions.pot trunk/.lang/frmTools.pot trunk/.lang/frmWelcome.pot trunk/.settings trunk/Utils.module trunk/cPartInfo.class trunk/cPartInstall.class trunk/frmPartSelect.class Log: Changes: - cPartInfo.class: Added public string "FormatWithFS". The "FileSystem" string is now used to store the partitions' current filesystem, not the user selected partition. - cPartInstall.class: Changed "FileSystem" string to "FormatWithFS". - Utils.module: Created the getFileSystems subroutine. When called, it will use gnu parted to gather data about the filesystems present in the Global.PartInfo array. It is called after Parse_fdisk in the DrivePartInfo subroutine. No simulation mode exists in this subroutine, due to limitations in parted. - frmPartSelect.class: Changed the partition grid titles "Type" and "Filesystem" to "Type & FileSystem" and "Format with", respectively. Column #4 now displays both the partition type and its filesystem. Modified: trunk/.lang/#project.pot ============================================================================== --- trunk/.lang/#project.pot (original) +++ trunk/.lang/#project.pot Sun Aug 19 08:34:11 2007 @@ -1,4 +1,4 @@ -# /home/moe/projects/vl-installer/.project +# /home/easuter/programming/vinstall-ng/.project # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: trunk/.lang/.pot ============================================================================== --- trunk/.lang/.pot (original) +++ trunk/.lang/.pot Sun Aug 19 08:34:11 2007 @@ -27,7 +27,7 @@ msgid "Cancel" msgstr "" -#: frmChoice.class:95 +#: frmChoice.class:94 msgid "" "<center><h3><b>You have 3 choices:</b></h3></center>\n" "\n" @@ -48,23 +48,23 @@ "</ul>\n" msgstr "" -#: frmChoice.class:106 +#: frmChoice.class:105 msgid "Choose install type" msgstr "" -#: frmChoice.class:121 +#: frmChoice.class:120 msgid "Install types" msgstr "" -#: frmChoice.class:126 +#: frmChoice.class:125 msgid "Full-automatic" msgstr "" -#: frmChoice.class:132 +#: frmChoice.class:131 msgid "Semi-automatic" msgstr "" -#: frmChoice.class:138 +#: frmChoice.class:137 msgid "Advanced" msgstr "" Modified: trunk/.lang/Functions.pot ============================================================================== --- trunk/.lang/Functions.pot (original) +++ trunk/.lang/Functions.pot Sun Aug 19 08:34:11 2007 @@ -1,4 +1,4 @@ -# /home/easuter/vinstall-ng/Functions.module +# /mnt/shared/programming/vinstall-ng/Functions.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: trunk/.lang/Global.pot ============================================================================== --- trunk/.lang/Global.pot (original) +++ trunk/.lang/Global.pot Sun Aug 19 08:34:11 2007 @@ -1,4 +1,4 @@ -# /home/easuter/vinstall-ng/Global.class +# /mnt/shared/programming/vinstall-ng/Global.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: trunk/.lang/InputBox.pot ============================================================================== --- trunk/.lang/InputBox.pot (original) +++ trunk/.lang/InputBox.pot Sun Aug 19 08:34:11 2007 @@ -1,4 +1,4 @@ -# /home/easuter/vinstall-ng/InputBox.class +# /mnt/shared/programming/vinstall-ng/InputBox.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: trunk/.lang/Main.pot ============================================================================== --- trunk/.lang/Main.pot (original) +++ trunk/.lang/Main.pot Sun Aug 19 08:34:11 2007 @@ -1,4 +1,4 @@ -# /home/easuter/vinstall-ng/Main.module +# /mnt/shared/programming/vinstall-ng/Main.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: trunk/.lang/Utils.pot ============================================================================== --- trunk/.lang/Utils.pot (original) +++ trunk/.lang/Utils.pot Sun Aug 19 08:34:11 2007 @@ -1,4 +1,4 @@ -# /home/easuter/vinstall-ng/Utils.module +# /mnt/shared/programming/vinstall-ng/Utils.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: trunk/.lang/cDiskInfo.pot ============================================================================== --- trunk/.lang/cDiskInfo.pot (original) +++ trunk/.lang/cDiskInfo.pot Sun Aug 19 08:34:11 2007 @@ -1,4 +1,4 @@ -# /home/easuter/vinstall-ng/cDiskInfo.class +# /mnt/shared/programming/vinstall-ng/cDiskInfo.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: trunk/.lang/cPartInfo.pot ============================================================================== --- trunk/.lang/cPartInfo.pot (original) +++ trunk/.lang/cPartInfo.pot Sun Aug 19 08:34:11 2007 @@ -1,4 +1,4 @@ -# /home/easuter/vinstall-ng/cPartInfo.class +# /mnt/shared/programming/vinstall-ng/cPartInfo.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: trunk/.lang/cPartInstall.pot ============================================================================== --- trunk/.lang/cPartInstall.pot (original) +++ trunk/.lang/cPartInstall.pot Sun Aug 19 08:34:11 2007 @@ -1,4 +1,4 @@ -# /home/easuter/vinstall-ng/cPartInstall.class +# /mnt/shared/programming/vinstall-ng/cPartInstall.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: trunk/.lang/frmChoice.pot ============================================================================== --- trunk/.lang/frmChoice.pot (original) +++ trunk/.lang/frmChoice.pot Sun Aug 19 08:34:11 2007 @@ -1,4 +1,4 @@ -# /home/easuter/vinstall-ng/frmChoice.class +# /mnt/shared/programming/vinstall-ng/frmChoice.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. @@ -14,27 +14,27 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: frmChoice.class:95 +#: frmChoice.class:94 msgid "<center><h3><b>You have 3 choices:</b></h3></center>\n\n<ul>\n<li><b><u>Full-automatic install:</u></b> Our easiest install yet; choose this option if you want to use your entire hard disk for VL. Your system will be automatically set up, partitions and all. <font color=\"#FF0000\">WARNING: this option will DELETE everything on your hard disk, or offer a choice if there are multiple disks.</font> There will of course be a confirmation dialog in case you selected this option by mistake.</li>\n<li><b><u>Semi-automatic install:</u></b> With this option, you manually partition your drives with gparted, but the rest of the setup will be pretty automatic.</li>\n<li><b><u>Advanced install:</u></b> For the technically savvy user that must do everything by hand. You can control most aspects of the install. However, there will be assisted options available all the way through, so this is a very flexible install.</li>\n</ul>\n" msgstr "" -#: frmChoice.class:106 +#: frmChoice.class:105 msgid "Choose install type" msgstr "" -#: frmChoice.class:121 +#: frmChoice.class:120 msgid "Install types" msgstr "" -#: frmChoice.class:126 +#: frmChoice.class:125 msgid "Full-automatic" msgstr "" -#: frmChoice.class:132 +#: frmChoice.class:131 msgid "Semi-automatic" msgstr "" -#: frmChoice.class:138 +#: frmChoice.class:137 msgid "Advanced" msgstr "" Modified: trunk/.lang/frmConfig.pot ============================================================================== --- trunk/.lang/frmConfig.pot (original) +++ trunk/.lang/frmConfig.pot Sun Aug 19 08:34:11 2007 @@ -1,4 +1,4 @@ -# /home/easuter/vinstall-ng/frmConfig.class +# /mnt/shared/programming/vinstall-ng/frmConfig.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: trunk/.lang/frmDriveSelect.pot ============================================================================== --- trunk/.lang/frmDriveSelect.pot (original) +++ trunk/.lang/frmDriveSelect.pot Sun Aug 19 08:34:11 2007 @@ -1,4 +1,4 @@ -# /home/easuter/vinstall-ng/frmDriveSelect.class +# /mnt/shared/programming/vinstall-ng/frmDriveSelect.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: trunk/.lang/frmGO.pot ============================================================================== --- trunk/.lang/frmGO.pot (original) +++ trunk/.lang/frmGO.pot Sun Aug 19 08:34:11 2007 @@ -1,4 +1,4 @@ -# /home/easuter/vinstall-ng/frmGO.class +# /mnt/shared/programming/vinstall-ng/frmGO.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: trunk/.lang/frmMain.pot ============================================================================== --- trunk/.lang/frmMain.pot (original) +++ trunk/.lang/frmMain.pot Sun Aug 19 08:34:11 2007 @@ -1,4 +1,4 @@ -# /home/easuter/vinstall-ng/frmMain.class +# /mnt/shared/programming/vinstall-ng/frmMain.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: trunk/.lang/frmPackages.pot ============================================================================== --- trunk/.lang/frmPackages.pot (original) +++ trunk/.lang/frmPackages.pot Sun Aug 19 08:34:11 2007 @@ -1,4 +1,4 @@ -# /home/easuter/vinstall-ng/frmPackages.class +# /mnt/shared/programming/vinstall-ng/frmPackages.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: trunk/.lang/frmPartSelect.pot ============================================================================== --- trunk/.lang/frmPartSelect.pot (original) +++ trunk/.lang/frmPartSelect.pot Sun Aug 19 08:34:11 2007 @@ -1,4 +1,4 @@ -# /home/easuter/vinstall-ng/frmPartSelect.class +# /mnt/shared/programming/vinstall-ng/frmPartSelect.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: trunk/.lang/frmPartitioner.pot ============================================================================== --- trunk/.lang/frmPartitioner.pot (original) +++ trunk/.lang/frmPartitioner.pot Sun Aug 19 08:34:11 2007 @@ -1,4 +1,4 @@ -# /home/easuter/vinstall-ng/frmPartitioner.class +# /mnt/shared/programming/vinstall-ng/frmPartitioner.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: trunk/.lang/frmPartitions.pot ============================================================================== --- trunk/.lang/frmPartitions.pot (original) +++ trunk/.lang/frmPartitions.pot Sun Aug 19 08:34:11 2007 @@ -1,4 +1,4 @@ -# /home/easuter/vinstall-ng/frmPartitions.class +# /mnt/shared/programming/vinstall-ng/frmPartitions.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: trunk/.lang/frmTools.pot ============================================================================== --- trunk/.lang/frmTools.pot (original) +++ trunk/.lang/frmTools.pot Sun Aug 19 08:34:11 2007 @@ -1,4 +1,4 @@ -# /home/easuter/vinstall-ng/frmTools.class +# /mnt/shared/programming/vinstall-ng/frmTools.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: trunk/.lang/frmWelcome.pot ============================================================================== --- trunk/.lang/frmWelcome.pot (original) +++ trunk/.lang/frmWelcome.pot Sun Aug 19 08:34:11 2007 @@ -1,4 +1,4 @@ -# /home/easuter/vinstall-ng/frmWelcome.class +# /mnt/shared/programming/vinstall-ng/frmWelcome.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: trunk/.settings ============================================================================== --- trunk/.settings (original) +++ trunk/.settings Sun Aug 19 08:34:11 2007 @@ -2,8 +2,8 @@ Count=0 [FFind] -SearchIn="Project" -CaseSensitive=False +SearchIn="Sub" +CaseSensitive=True SearchWord=False SearchComment=False SearchString=True Modified: trunk/Utils.module ============================================================================== --- trunk/Utils.module (original) +++ trunk/Utils.module Sun Aug 19 08:34:11 2007 @@ -57,6 +57,8 @@ ' Parse what fdisk has to say: Parse_fdisk(sTemp) +'Get filesystem data +getFileSystems() END @@ -69,6 +71,7 @@ DIM pos AS Long DIM n AS Long, m AS Long DIM pcounter AS Long +DIM item AS Integer ' 4 debug: IF Global.DebugMode = TRUE THEN @@ -79,6 +82,7 @@ arrTemp1 = Split(sTemp, Chr$(10)) FOR n = 0 TO arrTemp1.Max pos = InStr(arrTemp1[n], "/dev/") + IF pos = 1 ' Parse a partition. vPI = NEW cPartInfo arrTemp2 = Split(arrTemp1[n], Space$(1), "", TRUE) @@ -137,6 +141,45 @@ ENDIF END + +PUBLIC SUB getFileSystems() +'Assign a filesystem to each partition. This will be useful for chosing a method to calculate free space +DIM arsTemp AS NEW String[] +DIM arsTemp2 AS NEW String[] +DIM sTemp AS String +DIM sTemp2 AS String +DIM sItem AS String +DIM idisk AS Long +DIM ipart AS Long + +'To undestand how the arrays see how parted prints drive data ("parted /dev/hda print" to test it). +FOR idisk = 0 TO Global.DiskInfo.Max + sTemp = "" + sTemp2 = "" + SHELL "parted " & Global.DiskInfo[idisk].Device & " print" TO sTemp + arsTemp = Split(sTemp, Chr$(10)) + FOR EACH sItem IN arsTemp + IF InStr(sItem, "Disk ") = 0 AND InStr(sItem, "Information:") = 0 AND InStr(sItem, "Number ") = 0 THEN 'Ignore items with no useful information + sTemp2 = Mid$(Left$(sItem, 54), 42) 'The 42nd character is where the filesystem information starts and ends at the 54th character + IF sTemp2 <> "" THEN + arsTemp2.Add(Trim$(sTemp2)) + ENDIF + ENDIF + NEXT +NEXT + +FOR ipart = 0 TO arsTemp2.Max + IF arsTemp2[ipart] = "" THEN 'A null string means an extended partition was found + Global.PartInfo[ipart].Filesystem = "no filesystem" + ELSE IF arsTemp2[ipart] = "linux-swap" THEN + Global.PartInfo[ipart].Filesystem = "swap" + ELSE + Global.PartInfo[ipart].Filesystem = arsTemp2[ipart] + ENDIF +NEXT + +END + PUBLIC SUB GetSysMemory() 'Find system memory by reading the first line of /proc/meminfo Modified: trunk/cPartInfo.class ============================================================================== --- trunk/cPartInfo.class (original) +++ trunk/cPartInfo.class Sun Aug 19 08:34:11 2007 @@ -9,3 +9,4 @@ PUBLIC ID AS String PUBLIC Mountpoint AS String PUBLIC FileSystem AS String +PUBLIC FormatWithFS AS String Modified: trunk/cPartInstall.class ============================================================================== --- trunk/cPartInstall.class (original) +++ trunk/cPartInstall.class Sun Aug 19 08:34:11 2007 @@ -3,4 +3,4 @@ ' Structure for installation partitions information array: PUBLIC Device AS String PUBLIC Mountpoint AS String -PUBLIC FileSystem AS String +PUBLIC FormatWithFS AS String Modified: trunk/frmPartSelect.class ============================================================================== --- trunk/frmPartSelect.class (original) +++ trunk/frmPartSelect.class Sun Aug 19 08:34:11 2007 @@ -76,9 +76,9 @@ gridPart[0, 1].Text = "Size" gridPart[0, 2].Text = "Units" gridPart[0, 3].Text = "Boot" -gridPart[0, 4].Text = "Type" +gridPart[0, 4].Text = "Type & FileSystem" gridPart[0, 5].Text = "Mount" -gridPart[0, 6].Text = "Filesystem" +gridPart[0, 6].Text = "Format with" 'Set gridPart cell alignment; left for text, right for numbers: FOR m = 1 TO gridPart.Rows.Count - 1 @@ -123,13 +123,13 @@ gridPart[m, 1].Text = arrTemp[0] gridPart[m, 2].Text = arrTemp[1] gridPart[m, 3].Text = IIf(Global.PartInfo[n - 1].Bootable, "B", "") - gridPart[m, 4].Text = Functions.getPartType(Global.PartInfo[n - 1].ID) - IF gridPart[m, 4].Text = "Linux swap" THEN + gridPart[m, 4].Text = Functions.getPartType(Global.PartInfo[n - 1].ID) & " - " & Global.PartInfo[n - 1].FileSystem + IF InStr(gridPart[m, 4].Text, "Linux swap") > 0 THEN gridPart[m, 5].Text = "swap" gridPart[m, 6].Text = "swap" - ELSE IF gridPart[m, 4].Text = "Linux" THEN + ELSE IF InStr(gridPart[m, 4].Text, "Linux") > 0 THEN gridPart[m, 6].Text = "reiserfs" - Global.PartInfo[n - 1].FileSystem = "reiserfs" + Global.PartInfo[n - 1].FormatWithFS = "reiserfs" ELSE gridPart[m, 5].Text = Mid$(gridPart[m, 0].Text, 6) gridPart[m, 6].Text = "--------------------" @@ -152,7 +152,7 @@ vPI = NEW cPartInstall vPI.Device = gridPart[n, 0].Text vPI.Mountpoint = gridPart[n, 5].Text - vPI.FileSystem = gridPart[n, 6].Text + vPI. = gridPart[n, 6].Text Global.PARTinst.Push(vPI) ENDIF NEXT @@ -198,7 +198,7 @@ FOR n = 0 TO Global.PartInfo.Max IF Global.PartInfo[n].Device = gridPart[gridPart.Row, 0].Text THEN gridPart[gridPart.Row, 6].Text = LAST.Tag - Global.PartInfo[n].FileSystem = gridPart[gridPart.Row, 6].Text + Global.PartInfo[n].FormatWithFS = gridPart[gridPart.Row, 6].Text BREAK ENDIF NEXT |