You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(40) |
Apr
(76) |
May
(31) |
Jun
(39) |
Jul
(44) |
Aug
(87) |
Sep
(32) |
Oct
(23) |
Nov
(36) |
Dec
(10) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(49) |
Sep
(14) |
Oct
|
Nov
|
Dec
(1) |
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(63) |
Aug
(95) |
Sep
(39) |
Oct
(61) |
Nov
(75) |
Dec
(118) |
2009 |
Jan
(25) |
Feb
(37) |
Mar
(20) |
Apr
(15) |
May
(14) |
Jun
(48) |
Jul
(82) |
Aug
(160) |
Sep
(94) |
Oct
(55) |
Nov
(59) |
Dec
(4) |
2010 |
Jan
(5) |
Feb
(17) |
Mar
(6) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
|
2011 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
(1) |
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
(1) |
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: <cod...@go...> - 2007-12-09 02:43:28
|
Author: easuter Date: Sat Dec 8 18:42:49 2007 New Revision: 28 Modified: trunk/.lang/.pot trunk/.lang/frmPartitions.pot trunk/.project trunk/.settings trunk/Functions.module trunk/Main.module trunk/Utils.module trunk/frmChoice.class trunk/frmPartitions.class Log: Changes: - Funtions.module: Fixed bug in getFreePartSpace's dosfsck parser - Main.class: The installer now runs Utils.DrivePartInfo at startup. This keeps hard-drive data loaded in memory and increases the speed a which the frmPartSelect abd frmDriveSelect forms open. Modified: trunk/.lang/.pot ============================================================================== --- trunk/.lang/.pot (original) +++ trunk/.lang/.pot Sat Dec 8 18:42:49 2007 @@ -292,7 +292,7 @@ msgid "Advanced selection" msgstr "" -#: frmPackages.class:147 frmPartitions.class:265 +#: frmPackages.class:147 frmPartitions.class:264 msgid "Manual" msgstr "" @@ -373,7 +373,7 @@ "</ul>\n" msgstr "" -#: frmPartitions.class:216 +#: frmPartitions.class:215 msgid "" "<center><h3><b>Available partitioning modes:</b></h3></center>\n" "\n" @@ -402,39 +402,39 @@ "</ul>\n" msgstr "" -#: frmPartitions.class:228 +#: frmPartitions.class:227 msgid "Partitioning mode" msgstr "" -#: frmPartitions.class:243 +#: frmPartitions.class:242 msgid "Automatic" msgstr "" -#: frmPartitions.class:250 +#: frmPartitions.class:249 msgid "Full disk" msgstr "" -#: frmPartitions.class:258 +#: frmPartitions.class:257 msgid "Unpartitioned space" msgstr "" -#: frmPartitions.class:272 +#: frmPartitions.class:271 msgid "GParted" msgstr "" -#: frmPartitions.class:280 +#: frmPartitions.class:279 msgid "cfdisk" msgstr "" -#: frmPartitions.class:287 +#: frmPartitions.class:286 msgid "Others" msgstr "" -#: frmPartitions.class:294 +#: frmPartitions.class:293 msgid "Preset strategies" msgstr "" -#: frmPartitions.class:302 +#: frmPartitions.class:301 msgid "No partitioning" msgstr "" Modified: trunk/.lang/frmPartitions.pot ============================================================================== --- trunk/.lang/frmPartitions.pot (original) +++ trunk/.lang/frmPartitions.pot Sat Dec 8 18:42:49 2007 @@ -14,47 +14,47 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: frmPartitions.class:216 +#: frmPartitions.class:215 msgid "<center><h3><b>Available partitioning modes:</b></h3></center>\n\n<b><u>Automatic partitioning:</u></b> The installer will handle all partition related decisions for you:\n<ul>\n<li><b>Full disk:</b> Choose this option if you want to use your entire hard disk for VL. <font color=\"#FF0000\">WARNING: this option will DELETE everything on your hard disk, or offer a choice if there are multiple disks. You have been WARNED.</font></li>\n<li><b>Unpartitioned space:</b> using available free (unpartitioned) disk space.</li>\n</ul>\n<b><u>Manual partitioning:</u></b> You have full control of partitioning.\n<ul>\n<li><b>Using gparted</b> (the advanced graphical partitioner).</li>\n<li><b>Using cfdisk</b> (the traditional partition tool).</li>\n</ul>\n<b><u>Other partitioning:</u></b>\n<ul>\n<li><b>Preset strategies:</b> auto allocates partitions according to most common usage strategy intended for this computer.</li>\n<li><b>No partitioning:</b> If you wish to use existing Linux and swap partitions. <font color=\"#FF0000\">WARNING: The existing Linux partitions will be OVERWRITTEN. You have been WARNED.</font></li>\n</ul>\n" msgstr "" -#: frmPartitions.class:228 +#: frmPartitions.class:227 msgid "Partitioning mode" msgstr "" -#: frmPartitions.class:243 +#: frmPartitions.class:242 msgid "Automatic" msgstr "" -#: frmPartitions.class:250 +#: frmPartitions.class:249 msgid "Full disk" msgstr "" -#: frmPartitions.class:258 +#: frmPartitions.class:257 msgid "Unpartitioned space" msgstr "" -#: frmPartitions.class:265 +#: frmPartitions.class:264 msgid "Manual" msgstr "" -#: frmPartitions.class:272 +#: frmPartitions.class:271 msgid "GParted" msgstr "" -#: frmPartitions.class:280 +#: frmPartitions.class:279 msgid "cfdisk" msgstr "" -#: frmPartitions.class:287 +#: frmPartitions.class:286 msgid "Others" msgstr "" -#: frmPartitions.class:294 +#: frmPartitions.class:293 msgid "Preset strategies" msgstr "" -#: frmPartitions.class:302 +#: frmPartitions.class:301 msgid "No partitioning" msgstr "" Modified: trunk/.project ============================================================================== --- trunk/.project (original) +++ trunk/.project Sat Dec 8 18:42:49 2007 @@ -2,7 +2,7 @@ Title=VL-gui-installer Startup=Main Icon=vl_logo_icon2.png -Version=0.0.254 +Version=0.0.260 Library=gb.qt Library=gb.qt.ext TabSize=3 Modified: trunk/.settings ============================================================================== --- trunk/.settings (original) +++ trunk/.settings Sat Dec 8 18:42:49 2007 @@ -1,9 +1,12 @@ [Breakpoints] Count=0 +[DebugWindow] +Count=0 + [FFind] -SearchIn="Sub" -CaseSensitive=True +SearchIn="Project" +CaseSensitive=False SearchWord=False SearchComment=False SearchString=True Modified: trunk/Functions.module ============================================================================== --- trunk/Functions.module (original) +++ trunk/Functions.module Sat Dec 8 18:42:49 2007 @@ -235,6 +235,7 @@ DIM sUsedBlocks AS String DIM arrTemp AS NEW String[] DIM iFreeBytes AS Long +DIM i AS Integer sDevice = Trim$(sDevice) sFilesystem = Trim$(sFilesystem) @@ -269,13 +270,19 @@ sBlockSize = Trim$(Mid$(arrTemp[2], RInStr(arrTemp[2], Space$(1)))) iFreeBytes = HexToLong(sFreeBlocks) * CLng(sBlockSize) ELSE IF sFilesystem = "FAT12" OR sFilesystem = "FAT16" OR sFilesystem = "FAT32" THEN 'Who even uses FAT12 on today's hard-drives anyway?! - SHELL "dosfsck -v " & sDevice TO sTemp 'The "-a" switch sould also be used to automaticaly repair a FAT partition, but that can take ages...lets see how well it works without it. + SHELL "dosfsck -v " & sDevice TO sTemp 'The "-a" switch should also be used to automaticaly repair a FAT partition, but that can take ages...lets see how well it works without it. sTemp = Trim$(sTemp) arrTemp = Split(sTemp, Chr$(10)) + 'Debug + ' FOR i = 0 TO arrTemp.Length - 1 + ' PRINT arrTemp[i] + ' NEXT 'Reuse sTemp, can't get sFreeBlocks in one go - sTemp = Trim$(Mid$(Left$(arrTemp[20], RInStr(arrTemp[20], "/") - 1), InStr(arrTemp[20], ",") + 1)) - sTemp2 = Trim$(Mid$(Left$(arrTemp[20], RInStr(arrTemp[20], Space$(1))), RInStr(arrTemp[20], "/") + 1)) - sFreeBlocks = Str(CLng(Val(sTemp2) - Val(sTemp))) + sTemp = Trim$(Mid$(Left$(arrTemp[arrTemp.Length - 1], RInStr(arrTemp[arrTemp.Length - 1], "/") - 1), InStr(arrTemp[arrTemp.Length - 1], ",") + 1)) + 'PRINT sTemp + sTemp2 = Trim$(Mid$(Left$(arrTemp[arrTemp.Length - 1], RInStr(arrTemp[arrTemp.Length - 1], Space$(1))), RInStr(arrTemp[arrTemp.Length - 1], "/") + 1)) + 'PRINT sTemp2 + sFreeBlocks = Str(CLng(Val(sTemp2) - CLng(Val(sTemp)))) sBlockSize = Trim$(Left$(Trim$(arrTemp[7]), InStr(Trim$(arrTemp[7]), Space$(1)))) iFreeBytes = CLng(sFreeBlocks) * CLng(sBlockSize) ELSE IF sFilesystem = "NTFS" THEN @@ -284,6 +291,7 @@ arrTemp = Split(sTemp, Chr$(10)) 'It would be a lot easier to use an expression in the output of ntfsresize to identify the number of free bytes, but that is not i18n ready! 'So "chomp" away portions of the string until the first integer is found (this will be the free space value) + 'PRINT arrTemp[10] sTemp = arrTemp[10] WHILE Len(sTemp) > 0 sTemp2 = Trim$(Left$(sTemp, InStr(sTemp, Space$(1)))) @@ -406,79 +414,79 @@ END -PUBLIC SUB BootMngrSet() -' This must determine: -' * Where the root partition is -' * Where the kernel is installed -' * where to install lilo (from global.enumLILOMODE ?? ) -' * Which OS's to display in the boot menu (From user input) -' * To use bootsplash or to use framebuffer -' We'll use message.info to display the values for now, we can move those values somewhere else, or dome something more useful with them later - DIM sRoot_Part AS String - DIM sKernel_Loc AS String - DIM ROOT_DIR AS String = "/" - DIM Boot_DIR AS String = Root_DIR & "boot" - ' Locate the root Partition - IF global.enumLILOMODE = 0 THEN - locate_mbr() - SHELL "cat /etc/fstab | awk '{if ($2 == \"/\") {print $1}}'" TO sRoot_Part - IF NOT sRoot_Part OR sRoot_Part <> "" THEN - SHELL "mount | awk '{if ($3 == \"/\") {print $1}}'" TO sRoot_Part - END IF - 'message.Info("I've identified your root partition as " & gb.newline & sRoot_Part) - Global.RootPart = sRoot_Part ' Store the location of the root partition to the global module - END IF -' Figure out where the kernel is - IF Exist(Boot_DIR & "/vmlinuz") THEN - sKernel_Loc = Boot_DIR & "/vmlinuz" - ELSE IF Exist(ROOT_DIR & "/vmlinuz") THEN - sKernel_Loc = Root_DIR & "/vmlinuz" - ELSE - Message.Info("I can't find a kernel !!! ") - END IF - IF sKernel_Loc OR sKernel_Loc <> "" THEN - 'message.Info("I've located the kernel in " & gb.NewLine & sKernel_Loc) - Global.KernelLoc = sKernel_Loc ' Store the location of the kernel to the global module - END IF - -END - -PUBLIC SUB locate_mbr() - - ' If the user chooses to install bootmanager to MBR - ' This routine will analyze whether there are more than 1 MBR available - ' and which one to use if true, else, use the one available automatically - 'SHELL "/sbin/vliloconf" - -DIM disks AS String ' list of the mbrs as string -DIM MBRs AS String[] ' split the many MBR's -DIM MBR AS String ' Hold a temporary MBR -DIM MBRTotal AS Integer ' Total MBRS -DIM MBRIndex AS Integer ' Current MBR (index) -DIM UseMBR AS String ' MBR to use.... A better place for this is probabbly somewhere in Global -DIM findcmd AS String = "fdisk -l | grep Disk | cut -d \" \" -f 2 | cut -c 1-8" +' PUBLIC SUB BootMngrSet() +' ' This must determine: +' ' * Where the root partition is +' ' * Where the kernel is installed +' ' * where to install lilo (from global.enumLILOMODE ?? ) +' ' * Which OS's to display in the boot menu (From user input) +' ' * To use bootsplash or to use framebuffer +' ' We'll use message.info to display the values for now, we can move those values somewhere else, or dome something more useful with them later +' DIM sRoot_Part AS String +' DIM sKernel_Loc AS String +' DIM ROOT_DIR AS String = "/" +' DIM Boot_DIR AS String = Root_DIR & "boot" +' ' Locate the root Partition +' IF global.enumLILOMODE = 0 THEN +' locate_mbr() +' SHELL "cat /etc/fstab | awk '{if ($2 == \"/\") {print $1}}'" TO sRoot_Part +' IF NOT sRoot_Part OR sRoot_Part <> "" THEN +' SHELL "mount | awk '{if ($3 == \"/\") {print $1}}'" TO sRoot_Part +' END IF +' 'message.Info("I've identified your root partition as " & gb.newline & sRoot_Part) +' Global.RootPart = sRoot_Part ' Store the location of the root partition to the global module +' END IF +' ' Figure out where the kernel is +' IF Exist(Boot_DIR & "/vmlinuz") THEN +' sKernel_Loc = Boot_DIR & "/vmlinuz" +' ELSE IF Exist(ROOT_DIR & "/vmlinuz") THEN +' sKernel_Loc = Root_DIR & "/vmlinuz" +' ELSE +' Message.Info("I can't find a kernel !!! ") +' END IF +' IF sKernel_Loc OR sKernel_Loc <> "" THEN +' 'message.Info("I've located the kernel in " & gb.NewLine & sKernel_Loc) +' Global.KernelLoc = sKernel_Loc ' Store the location of the kernel to the global module +' END IF +' +' END ' -'SHELL "fdisk -l | grep Disk | cut -d " " - f 2 | cut -c 1-8" TO disks -SHELL findcmd TO disks -'message.Info(disks) -MBRs = Split(disks, " ") ' Maybe use a blank space (ie " " ) instead ?? -MbrTotal = MBRs.Count -IF MBRTotal = 0 THEN ' This should never happen. -'message.Info(disks) - message.Error("Cannot find an MBR on this box... You must be on some kind of alien box... ;) ") -'ELSE IF MBRTotal = 1 ' Located only one MBR -' UseMBR = disks ' Obviously, use the one available MBR -' Message.Info("The boot manager will be installed to: " & disks) -'ELSE IF MBRTotal >= 2 THEN ' We found several MBR's here... Your box is loaded with drives out the whazoo! -ELSE -'message.Info(disks) -FOR MBRIndex = 0 TO MBRs.count - 1 - MBR = MBRs[MBRIndex] - frmChooseMBR.MbrList.Add(MBR) ' populate the list in the form - frmChooseMBR.Show ' This form will shoot out a value to Global -NEXT -END IF - -END +' PUBLIC SUB locate_mbr() +' +' ' If the user chooses to install bootmanager to MBR +' ' This routine will analyze whether there are more than 1 MBR available +' ' and which one to use if true, else, use the one available automatically +' 'SHELL "/sbin/vliloconf" +' +' DIM disks AS String ' list of the mbrs as string +' DIM MBRs AS String[] ' split the many MBR's +' DIM MBR AS String ' Hold a temporary MBR +' DIM MBRTotal AS Integer ' Total MBRS +' DIM MBRIndex AS Integer ' Current MBR (index) +' DIM UseMBR AS String ' MBR to use.... A better place for this is probabbly somewhere in Global +' DIM findcmd AS String = "fdisk -l | grep Disk | cut -d \" \" -f 2 | cut -c 1-8" +' ' +' 'SHELL "fdisk -l | grep Disk | cut -d " " - f 2 | cut -c 1-8" TO disks +' SHELL findcmd TO disks +' 'message.Info(disks) +' MBRs = Split(disks, " ") ' Maybe use a blank space (ie " " ) instead ?? +' MbrTotal = MBRs.Count +' IF MBRTotal = 0 THEN ' This should never happen. +' 'message.Info(disks) +' message.Error("Cannot find an MBR on this box... You must be on some kind of alien box... ;) ") +' 'ELSE IF MBRTotal = 1 ' Located only one MBR +' ' UseMBR = disks ' Obviously, use the one available MBR +' ' Message.Info("The boot manager will be installed to: " & disks) +' 'ELSE IF MBRTotal >= 2 THEN ' We found several MBR's here... Your box is loaded with drives out the whazoo! +' ELSE +' 'message.Info(disks) +' FOR MBRIndex = 0 TO MBRs.count - 1 +' MBR = MBRs[MBRIndex] +' frmChooseMBR.MbrList.Add(MBR) ' populate the list in the form +' frmChooseMBR.Show ' This form will shoot out a value to Global +' NEXT +' END IF +' +' END Modified: trunk/Main.module ============================================================================== --- trunk/Main.module (original) +++ trunk/Main.module Sat Dec 8 18:42:49 2007 @@ -25,6 +25,8 @@ ' Load the Main window: frmMain.Load + + ' Make always on top: 'frmMain.TopOnly = TRUE @@ -65,6 +67,9 @@ ' Start off with button 1 on Main window: Global.prevForm = 1 + +'Gather hard-drive data before showing the interface +Utils.DrivePartInfo() ' And get the show on the road....: frmMain.Show Modified: trunk/Utils.module ============================================================================== --- trunk/Utils.module (original) +++ trunk/Utils.module Sat Dec 8 18:42:49 2007 @@ -159,7 +159,7 @@ ENDIF NEXT Global.DiskInfo[iDisk].UnallocatedBytes = Global.DiskInfo[iDisk].Bytes - iDiskUsedBytes - PRINT global.DiskInfo[iDisk].UnallocatedBytes + 'PRINT global.DiskInfo[iDisk].UnallocatedBytes 'for debug NEXT Modified: trunk/frmChoice.class ============================================================================== --- trunk/frmChoice.class (original) +++ trunk/frmChoice.class Sat Dec 8 18:42:49 2007 @@ -29,7 +29,7 @@ Global.enumPACKS = 0 'All packages selected Global.enumLILOMODE = 0 'Install lilo to MBR -Utils.DrivePartInfo + IF Global.DiskInfo.Count >= 1 THEN frmDriveSelect.ShowModal frmMain.btnChoice.Enabled = FALSE ' Disable Choices. Modified: trunk/frmPartitions.class ============================================================================== --- trunk/frmPartitions.class (original) +++ trunk/frmPartitions.class Sat Dec 8 18:42:49 2007 @@ -166,7 +166,6 @@ Global.flagBUTTExec = TRUE ' Mountpoint selection: -Utils.DrivePartInfo frmPartSelect.ShowModal ' Unflag button execution: |
From: <cod...@go...> - 2007-09-12 17:57:48
|
Author: easuter Date: Wed Sep 12 10:57:26 2007 New Revision: 27 Modified: trunk/.lang/.pot trunk/.lang/frmPartitions.pot trunk/.project trunk/.settings trunk/Functions.module trunk/Global.class trunk/Utils.module trunk/cDiskInfo.class trunk/frmPartSelect.class trunk/frmPartitions.class trunk/frmPartitions.form Log: Changes: =09 - Functions.module: Corrected bug in getFreePartSpace's NTFS implementation (used bytes where being identified as unused bytes). - Utils.module: Subroutine Parse_fdisk renamed to ProcessDiskInfo since fdisk parsing is now only one of many things done in this sub. --- Added code to ProcessDiskInfo to gather information about unallocated bytes on each disk drive. - frmPartSelect.class: The "Units" column in gridDisk replaced with "Unallocated". This column now displays the unallocated (unpartitioned) space of each disk drive. Modified: trunk/.lang/.pot =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- trunk/.lang/.pot (original) +++ trunk/.lang/.pot Wed Sep 12 10:57:26 2007 @@ -292,7 +292,7 @@ msgid "Advanced selection" msgstr "" =20 -#: frmPackages.class:147 frmPartitions.class:266 +#: frmPackages.class:147 frmPartitions.class:265 msgid "Manual" msgstr "" =20 @@ -373,7 +373,7 @@ "</ul>\n" msgstr "" =20 -#: frmPartitions.class:217 +#: frmPartitions.class:216 msgid "" "<center><h3><b>Available partitioning modes:</b></h3></center>\n" "\n" @@ -384,8 +384,8 @@ "disk for VL. <font color=3D\"#FF0000\">WARNING: this option will DELETE " "everything on your hard disk, or offer a choice if there are multiple disk= s. " "You have been WARNED.</font></li>\n" -"<li><b>Free space:</b> using available free (unpartitioned) disk space.</" -"li>\n" +"<li><b>Unpartitioned space:</b> using available free (unpartitioned) disk = " +"space.</li>\n" "</ul>\n" "<b><u>Manual partitioning:</u></b> You have full control of partitioning.\= n" "<ul>\n" @@ -402,39 +402,39 @@ "</ul>\n" msgstr "" =20 -#: frmPartitions.class:229 +#: frmPartitions.class:228 msgid "Partitioning mode" msgstr "" =20 -#: frmPartitions.class:244 +#: frmPartitions.class:243 msgid "Automatic" msgstr "" =20 -#: frmPartitions.class:251 +#: frmPartitions.class:250 msgid "Full disk" msgstr "" =20 -#: frmPartitions.class:259 -msgid "Free space" +#: frmPartitions.class:258 +msgid "Unpartitioned space" msgstr "" =20 -#: frmPartitions.class:273 +#: frmPartitions.class:272 msgid "GParted" msgstr "" =20 -#: frmPartitions.class:281 +#: frmPartitions.class:280 msgid "cfdisk" msgstr "" =20 -#: frmPartitions.class:288 +#: frmPartitions.class:287 msgid "Others" msgstr "" =20 -#: frmPartitions.class:295 +#: frmPartitions.class:294 msgid "Preset strategies" msgstr "" =20 -#: frmPartitions.class:303 +#: frmPartitions.class:302 msgid "No partitioning" msgstr "" =20 Modified: trunk/.lang/frmPartitions.pot =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- trunk/.lang/frmPartitions.pot (original) +++ trunk/.lang/frmPartitions.pot Wed Sep 12 10:57:26 2007 @@ -14,47 +14,47 @@ "Content-Type: text/plain; charset=3DUTF-8\n" "Content-Transfer-Encoding: 8bit\n" =20 -#: frmPartitions.class:217 -msgid "<center><h3><b>Available partitioning modes:</b></h3></center>\n\n<b= ><u>Automatic partitioning:</u></b> The installer will handle all partition = related decisions for you:\n<ul>\n<li><b>Full disk:</b> Choose this option i= f you want to use your entire hard disk for VL. <font color=3D\"#FF0000\">WA= RNING: this option will DELETE everything on your hard disk, or offer a choi= ce if there are multiple disks. You have been WARNED.</font></li>\n<li><b>Fr= ee space:</b> using available free (unpartitioned) disk space.</li>\n</ul>\n= <b><u>Manual partitioning:</u></b> You have full control of partitioning.\n<= ul>\n<li><b>Using gparted</b> (the advanced graphical partitioner).</li>\n<l= i><b>Using cfdisk</b> (the traditional partition tool).</li>\n</ul>\n<b><u>O= ther partitioning:</u></b>\n<ul>\n<li><b>Preset strategies:</b> auto allocat= es partitions according to most common usage strategy intended for this comp= uter.</li>\n<li><b>No partitioning:</b> If you wish to use existing Linux an= d swap partitions. <font color=3D\"#FF0000\">WARNING: The existing Linux par= titions will be OVERWRITTEN. You have been WARNED.</font></li>\n</ul>\n" +#: frmPartitions.class:216 +msgid "<center><h3><b>Available partitioning modes:</b></h3></center>\n\n<b= ><u>Automatic partitioning:</u></b> The installer will handle all partition = related decisions for you:\n<ul>\n<li><b>Full disk:</b> Choose this option i= f you want to use your entire hard disk for VL. <font color=3D\"#FF0000\">WA= RNING: this option will DELETE everything on your hard disk, or offer a choi= ce if there are multiple disks. You have been WARNED.</font></li>\n<li><b>Un= partitioned space:</b> using available free (unpartitioned) disk space.</li>= \n</ul>\n<b><u>Manual partitioning:</u></b> You have full control of partiti= oning.\n<ul>\n<li><b>Using gparted</b> (the advanced graphical partitioner).= </li>\n<li><b>Using cfdisk</b> (the traditional partition tool).</li>\n</ul>= \n<b><u>Other partitioning:</u></b>\n<ul>\n<li><b>Preset strategies:</b> aut= o allocates partitions according to most common usage strategy intended for = this computer.</li>\n<li><b>No partitioning:</b> If you wish to use existing= Linux and swap partitions. <font color=3D\"#FF0000\">WARNING: The existing = Linux partitions will be OVERWRITTEN. You have been WARNED.</font></li>\n</u= l>\n" msgstr "" =20 -#: frmPartitions.class:229 +#: frmPartitions.class:228 msgid "Partitioning mode" msgstr "" =20 -#: frmPartitions.class:244 +#: frmPartitions.class:243 msgid "Automatic" msgstr "" =20 -#: frmPartitions.class:251 +#: frmPartitions.class:250 msgid "Full disk" msgstr "" =20 -#: frmPartitions.class:259 -msgid "Free space" +#: frmPartitions.class:258 +msgid "Unpartitioned space" msgstr "" =20 -#: frmPartitions.class:266 +#: frmPartitions.class:265 msgid "Manual" msgstr "" =20 -#: frmPartitions.class:273 +#: frmPartitions.class:272 msgid "GParted" msgstr "" =20 -#: frmPartitions.class:281 +#: frmPartitions.class:280 msgid "cfdisk" msgstr "" =20 -#: frmPartitions.class:288 +#: frmPartitions.class:287 msgid "Others" msgstr "" =20 -#: frmPartitions.class:295 +#: frmPartitions.class:294 msgid "Preset strategies" msgstr "" =20 -#: frmPartitions.class:303 +#: frmPartitions.class:302 msgid "No partitioning" msgstr "" =20 Modified: trunk/.project =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- trunk/.project (original) +++ trunk/.project Wed Sep 12 10:57:26 2007 @@ -2,7 +2,7 @@ Title=3DVL-gui-installer Startup=3DMain Icon=3Dvl_logo_icon2.png -Version=3D0.0.238 +Version=3D0.0.254 Library=3Dgb.qt Library=3Dgb.qt.ext TabSize=3D3 Modified: trunk/.settings =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- trunk/.settings (original) +++ trunk/.settings Wed Sep 12 10:57:26 2007 @@ -2,7 +2,7 @@ Count=3D0 =20 [FFind] -SearchIn=3D"Module" +SearchIn=3D"Sub" CaseSensitive=3DTrue SearchWord=3DFalse SearchComment=3DFalse Modified: trunk/Functions.module =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- trunk/Functions.module (original) +++ trunk/Functions.module Wed Sep 12 10:57:26 2007 @@ -232,6 +232,7 @@ DIM sTemp2 AS String DIM sFreeBlocks AS String DIM sBlockSize AS String +DIM sUsedBlocks AS String DIM arrTemp AS NEW String[] DIM iFreeBytes AS Long =20 @@ -281,21 +282,22 @@ SHELL "ntfsresize --info --force --no-progress-bar " & sDevice TO sTemp sTemp =3D Trim$(sTemp) arrTemp =3D Split(sTemp, Chr$(10)) - PRINT arrTemp[10] 'It would be a lot easier to use an expression in the output of ntfsresi= ze to identify the number of free bytes, but that is not i18n ready! 'So "chomp" away portions of the string until the first integer is found= (this will be the free space value) sTemp =3D arrTemp[10] WHILE Len(sTemp) > 0 sTemp2 =3D Trim$(Left$(sTemp, InStr(sTemp, Space$(1)))) IF IsInteger(Val(sTemp2)) OR IsLong(Val(sTemp2)) THEN=20 - sFreeBlocks =3D CLng(Val(sTemp2)) + sUsedBlocks =3D CLng(Val(sTemp2)) BREAK ELSE=20 sTemp =3D Trim$(Mid$(sTemp, InStr(sTemp, Space$(1)))) ENDIF WEND =20 - sBlockSize =3D Trim$(Mid$(Left$(arrTemp[3], RInStr(arrTemp[3], Space$(1)= )), InStr(arrTemp[3], ":") + 1)) - iFreeBytes =3D CLng(sFreeBlocks) * CLng(sBlockSize) + 'sBlockSize =3D Trim$(Mid$(Left$(arrTemp[3], RInStr(arrTemp[3], Space$(1= ))), InStr(arrTemp[3], ":") + 1)) + sTemp =3D Trim$(Mid$(arrTemp[5], InStr(arrTemp[5], ":") + 1)) 'Get total= partition size + sTemp2 =3D Trim$(Left(sTemp, InStr(sTemp, Space$(1)))) + iFreeBytes =3D CLng(sTemp2) - CLng(sUsedBlocks) ELSE=20 iFreeBytes =3D 0 ENDIF=20 Modified: trunk/Global.class =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- trunk/Global.class (original) +++ trunk/Global.class Wed Sep 12 10:57:26 2007 @@ -31,7 +31,7 @@ ' 3 =3D No extras STATIC PUBLIC enumPARTMODE AS Long 'Partitioning mode. ' 0 =3D Full disk -' 1 =3D Free space +' 1 =3D Unpartitioned space ' 2 =3D GParted ' 3 =3D cfdisk ' 4 =3D Preset strategies Modified: trunk/Utils.module =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- trunk/Utils.module (original) +++ trunk/Utils.module Wed Sep 12 10:57:26 2007 @@ -56,20 +56,22 @@ ENDIF =20 ' Parse what fdisk has to say: -Parse_fdisk(sTemp) -'Get filesystem data -'getFileSystems() +ProcessDiskInfo(sTemp) + =20 END =20 -PUBLIC SUB Parse_fdisk(sTemp AS String) -' Parse what fdisk has to say: +PUBLIC SUB ProcessDiskInfo(sTemp AS String) +' Parse what fdisk has to say, including other commands for useful hard-dri= ve/partition information DIM vDI AS NEW cDiskInfo DIM vPI AS NEW cPartInfo DIM arrTemp1 AS NEW String[] DIM arrTemp2 AS NEW String[] DIM arrTemp3 AS NEW String[] DIM sTemp2 AS String +DIM iDisk AS Long +DIM iPart AS Long +DIM iDiskUsedBytes AS Long DIM pos AS Long DIM n AS Long, m AS Long DIM pcounter AS Long @@ -79,7 +81,7 @@ message.Info("Working in Simulation Mode..." & gb.NewLine & sTemp) ENDIF =20 -' Parse it: +' Parse fdisk arrTemp1 =3D Split(sTemp, Chr$(10)) FOR n =3D 0 TO arrTemp1.Max pos =3D InStr(arrTemp1[n], "/dev/") @@ -110,6 +112,7 @@ vPI.ID =3D arrTemp2[4] ENDIF =20 + 'Get filesystem information from "disktype" IF Functions.getPartType(vPI.ID) =3D "Extended" THEN=20 vPI.FileSystem =3D "Extended" ELSE IF Functions.getPartType(vPI.ID) =3D "HPFS/NTFS" THEN=20 @@ -121,7 +124,12 @@ vPI.FileSystem =3D Trim$(Left$(arrTemp3[2], InStr(arrTemp3[2], Spa= ce$(1)))) ENDIF =20 - vPI.FreeBytes =3D Functions.getFreePartSpace(vPI.Device, vPI.FileSyst= em) + 'Get free space information for each partition based on the filesyste= m + IF vPI.FileSystem =3D "Blank" THEN=20 + vPI.FreeBytes =3D vPI.Bytes + ELSE=20 + vPI.FreeBytes =3D Functions.getFreePartSpace(vPI.Device, vPI.FileS= ystem) + ENDIF =20 Global.PartInfo.Push(vPI) ELSE IF pos > 1 ' Parse a disk drive. @@ -133,10 +141,28 @@ ELSE vDI.Bytes =3D Val(arrTemp2[3]) ENDIF + Global.DiskInfo.Push(vDI) ELSE ' Nothing. END IF NEXT + +'Get unallocated space on the hard-drives (it would be cool to have this in= the main FOR loop... +'but its only possible after knowing each partiton's size) +FOR iDisk =3D 0 TO Global.DiskInfo.Max + iDiskUsedBytes =3D 0 'Reset the used-bytes counter + FOR iPart =3D 0 TO Global.PartInfo.Max + IF InStr(Global.PartInfo[iPart].Device, Global.DiskInfo[iDisk].Device= ) THEN + IF Global.PartInfo[iPart].FileSystem <> "Extended" THEN 'Ignore ex= tended partitions, only account for primary and logical ones + iDiskUsedBytes =3D iDiskUsedBytes + Global.PartInfo[iPart].Byte= s + ENDIF + ENDIF=20 + NEXT=20 + Global.DiskInfo[iDisk].UnallocatedBytes =3D Global.DiskInfo[iDisk].Bytes= - iDiskUsedBytes + PRINT global.DiskInfo[iDisk].UnallocatedBytes +NEXT=20 + + =20 ' 4 debug: IF Global.DebugMode =3D TRUE THEN Modified: trunk/cDiskInfo.class =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- trunk/cDiskInfo.class (original) +++ trunk/cDiskInfo.class Wed Sep 12 10:57:26 2007 @@ -3,3 +3,4 @@ ' Structure for drive information array: PUBLIC Device AS String PUBLIC Bytes AS Long +PUBLIC UnallocatedBytes AS Long Modified: trunk/frmPartSelect.class =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- trunk/frmPartSelect.class (original) +++ trunk/frmPartSelect.class Wed Sep 12 10:57:26 2007 @@ -24,9 +24,9 @@ gridDisk.Columns.Count =3D 4 'gridDisk.Rows.Count =3D MaxDisks gridDisk.Rows.Count =3D 32 -gridDisk.Columns[0].Width =3D 0.4 * gridDisk.ClientWidth +gridDisk.Columns[0].Width =3D 0.35 * gridDisk.ClientWidth gridDisk.Columns[1].Width =3D 0.25 * gridDisk.ClientWidth -gridDisk.Columns[2].Width =3D 0.2 * gridDisk.ClientWidth +gridDisk.Columns[2].Width =3D 0.25 * gridDisk.ClientWidth gridDisk.Columns[3].Width =3D 0.15 * gridDisk.ClientWidth =20 'Center gridDisk titles alignment: @@ -37,7 +37,7 @@ 'Setup gridDisk titles: gridDisk[0, 0].Text =3D "Drive" gridDisk[0, 1].Text =3D "Size" -gridDisk[0, 2].Text =3D "Units" +gridDisk[0, 2].Text =3D "Unallocated" gridDisk[0, 3].Text =3D "Sel." =20 'Set gridDisk cell alignment; left for text, right for numbers, fill in gri= dDisk data: @@ -46,11 +46,11 @@ gridDisk.Rows[m].Height =3D 20 gridDisk[m, 0].Text =3D Global.DiskInfo[m - 1].Device gridDisk[m, 1].Alignment =3D Align.Right - gridDisk[m, 1].Text =3D Global.DiskInfo[m - 1].Bytes - arrTemp =3D Split(Functions.AutoUnits(Global.DiskInfo[m - 1].Bytes), " "= , "", TRUE) - gridDisk[m, 1].Text =3D arrTemp[0] - gridDisk[m, 2].Alignment =3D Align.Left - gridDisk[m, 2].Text =3D arrTemp[1] + gridDisk[m, 1].Text =3D Functions.AutoUnits(Global.DiskInfo[m - 1].Bytes= ) + 'arrTemp =3D Split(Functions.AutoUnits(Global.DiskInfo[m - 1].Bytes), " = ", "", TRUE) + 'gridDisk[m, 1].Text =3D arrTemp[0] + gridDisk[m, 2].Alignment =3D Align.Right + gridDisk[m, 2].Text =3D Functions.AutoUnits(Global.DiskInfo[m - 1].Unall= ocatedBytes) gridDisk[m, 3].Alignment =3D Align.Center NEXT =20 Modified: trunk/frmPartitions.class =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- trunk/frmPartitions.class (original) +++ trunk/frmPartitions.class Wed Sep 12 10:57:26 2007 @@ -173,4 +173,3 @@ Global.flagBUTTExec =3D FALSE =20 END - Modified: trunk/frmPartitions.form =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- trunk/frmPartitions.form (original) +++ trunk/frmPartitions.form Wed Sep 12 10:57:26 2007 @@ -1,7 +1,7 @@ # Gambas Form File 2.0 =20 { Form Form - MoveScaled(4,6,90.5714,78.2857) + MoveScaled(4,6,90.5,78.25) Font =3D Font["Luxi Sans"] Background =3D &HFFFFFF& Text =3D ("") @@ -18,7 +18,7 @@ Background =3D &HDFFFFF& Padding =3D 10 AutoResize =3D True - Text =3D ("<center><h3><b>Available partitioning modes:</b></h3></cen= ter>\n\n<b><u>Automatic partitioning:</u></b> The installer will handle all = partition related decisions for you:\n<ul>\n<li><b>Full disk:</b> Choose thi= s option if you want to use your entire hard disk for VL. <font color=3D\"#F= F0000\">WARNING: this option will DELETE everything on your hard disk, or of= fer a choice if there are multiple disks. You have been WARNED.</font></li>\= n<li><b>Free space:</b> using available free (unpartitioned) disk space.</li= >\n</ul>\n<b><u>Manual partitioning:</u></b> You have full control of partit= ioning.\n<ul>\n<li><b>Using gparted</b> (the advanced graphical partitioner)= .</li>\n<li><b>Using cfdisk</b> (the traditional partition tool).</li>\n</ul= >\n<b><u>Other partitioning:</u></b>\n<ul>\n<li><b>Preset strategies:</b> au= to allocates partitions according to most common usage strategy intended for= this computer.</li>\n<li><b>No partitioning:</b> If you wish to use existin= g Linux and swap partitions. <font color=3D\"#FF0000\">WARNING: The existing= Linux partitions will be OVERWRITTEN. You have been WARNED.</font></li>\n</= ul>\n") + Text =3D ("<center><h3><b>Available partitioning modes:</b></h3></cen= ter>\n\n<b><u>Automatic partitioning:</u></b> The installer will handle all = partition related decisions for you:\n<ul>\n<li><b>Full disk:</b> Choose thi= s option if you want to use your entire hard disk for VL. <font color=3D\"#F= F0000\">WARNING: this option will DELETE everything on your hard disk, or of= fer a choice if there are multiple disks. You have been WARNED.</font></li>\= n<li><b>Unpartitioned space:</b> using available free (unpartitioned) disk s= pace.</li>\n</ul>\n<b><u>Manual partitioning:</u></b> You have full control = of partitioning.\n<ul>\n<li><b>Using gparted</b> (the advanced graphical par= titioner).</li>\n<li><b>Using cfdisk</b> (the traditional partition tool).</= li>\n</ul>\n<b><u>Other partitioning:</u></b>\n<ul>\n<li><b>Preset strategie= s:</b> auto allocates partitions according to most common usage strategy int= ended for this computer.</li>\n<li><b>No partitioning:</b> If you wish to us= e existing Linux and swap partitions. <font color=3D\"#FF0000\">WARNING: The= existing Linux partitions will be OVERWRITTEN. You have been WARNED.</font>= </li>\n</ul>\n") } } { VBox1 VBox @@ -49,12 +49,12 @@ Foreground =3D Color.ButtonForeground Text =3D ("Full disk") } - { btnFreeSpace Button + { btnUnpartSpace Button MoveScaled(1,9,23,5) Font =3D Font["Luxi Sans,14"] Background =3D Color.ButtonBackground Foreground =3D Color.ButtonForeground - Text =3D ("Free space") + Text =3D ("Unpartitioned space") } } { Frame2 Frame |
From: Jose J. R. <jo...@gm...> - 2007-09-12 02:37:30
|
On 9/11/07, Eug=E9ne Suter <ea...@gm...> wrote: > Hi again, > > I have a question I probably should have asked a lot earlier.... > So far I've been working on getting filesystem types and free spaces > assuming that the "Free Space" installation option is for using the free > space on a selected partition...is it (eg: user selects a big windows > partition with plenty of space on it, the installer will resize that > partition automatically to make space)? Nope. That's an advanced installer function, I figured we could leave that as a manual pass of gparted for now. > Or was it supposed to be something else, like unpartitioned disk space? That's exactly it. As I was saying the other day, prioritizing full disk and empty (unpartitioned) space is the easier way to go to actually get a working installer in smaller time frame. Then we add the frills. > Even if what I was doing is "wrong" I guess its not worth scrapping this = far > along... :( > Of course not, we'll need it later on anyway. Regards, Joe1962 |
From: <ea...@gm...> - 2007-09-12 01:55:57
|
Hi again, I have a question I probably should have asked a lot earlier.... So far I've been working on getting filesystem types and free spaces assuming that the "Free Space" installation option is for using the free space on a selected partition...is it (eg: user selects a big windows partition with plenty of space on it, the installer will resize that partition automatically to make space)? Or was it supposed to be something else, like unpartitioned disk space? Even if what I was doing is "wrong" I guess its not worth scrapping this fa= r along... :( Eug=E9ne |
From: <cod...@go...> - 2007-09-12 01:42:09
|
Author: easuter Date: Tue Sep 11 18:41:54 2007 New Revision: 26 Modified: trunk/.project trunk/Functions.module Log: Changes: - Functions.module: Created the HexToLong function, to convet hexadecimal numbers to long integers. --- Implemented JFS, FAT12, FAT16, FAT32 and NTFS support in the getFreePartSpace function. Modified: trunk/.project ============================================================================== --- trunk/.project (original) +++ trunk/.project Tue Sep 11 18:41:54 2007 @@ -2,7 +2,7 @@ Title=VL-gui-installer Startup=Main Icon=vl_logo_icon2.png -Version=0.0.227 +Version=0.0.238 Library=gb.qt Library=gb.qt.ext TabSize=3 Modified: trunk/Functions.module ============================================================================== --- trunk/Functions.module (original) +++ trunk/Functions.module Tue Sep 11 18:41:54 2007 @@ -20,6 +20,18 @@ END +PUBLIC FUNCTION HexToLong(sHexval AS String) AS Long +'Turn a hexadecimal number into a long integer (thanks to help from Timothy Marshal-Nichols) +DIM iHexVal AS Long + +sHexval = "&H" & Right$(sHexval, 10) +iHexVal = CLng(Val(sHexval)) + +RETURN iHexVal + +END + + PUBLIC FUNCTION getPartType(t AS String) AS String ' Return partition type (t) string from partition type code: @@ -213,8 +225,8 @@ END -PUBLIC FUNCTION getFreePartSpace(device AS String, filesystem AS String) AS Long -'Calculate the free space on a partition based on its filesystem, and then return the value +PUBLIC FUNCTION getFreePartSpace(sDevice AS String, sFilesystem AS String) AS Long +'Calculate the free space on a partition based on its filesystem, and then return the value as a long integer 'This is basicaly a Gambas implementation of what GParted does for detecting free space on partitions in C++ DIM sTemp AS String DIM sTemp2 AS String @@ -223,33 +235,67 @@ DIM arrTemp AS NEW String[] DIM iFreeBytes AS Long -device = Trim$(device) -filesystem = Trim$(filesystem) +sDevice = Trim$(sDevice) +sFilesystem = Trim$(sFilesystem) 'The array's index used ([x]) to get the free blocks and the block size was obtained by studying the ouput of the commands used below -IF filesystem = "Ext3" OR filesystem = "Ext2" THEN - SHELL "dumpe2fs -h " & device TO sTemp +IF sFilesystem = "Ext2" OR sFilesystem = "Ext3" THEN + SHELL "dumpe2fs -h " & sDevice TO sTemp sTemp = Trim$(sTemp) arrTemp = Split(sTemp, Chr$(10)) sFreeBlocks = Trim$(Mid$(arrTemp[13], RInStr(arrTemp[13], Space$(1)))) sBlockSize = Trim$(Mid$(arrTemp[16], RInStr(arrTemp[16], Space$(1)))) iFreeBytes = CLng(sFreeBlocks) * CLng(sBlockSize) -ELSE IF filesystem = "XFS" THEN - SHELL "xfs_db -c 'sb 0' -c 'print blocksize' -c 'print fdblocks' -r " & device TO sTemp +ELSE IF sFilesystem = "XFS" THEN + SHELL "xfs_db -c 'sb 0' -c 'print blocksize' -c 'print fdblocks' -r " & sDevice TO sTemp sTemp = Trim$(sTemp) arrTemp = Split(sTemp, Chr$(10)) sFreeBlocks = Trim$(Mid$(arrTemp[1], RInStr(arrTemp[1], Space$(1)))) sBlockSize = Trim$(Mid$(arrTemp[0], RInStr(arrTemp[0], Space$(1)))) iFreeBytes = CLng(sFreeBlocks) * CLng(sBlockSize) -ELSE IF filesystem = "ReiserFS" THEN - SHELL "debugreiserfs " & device TO sTemp +ELSE IF sFilesystem = "ReiserFS" THEN + SHELL "debugreiserfs " & sDevice TO sTemp sTemp = Trim$(sTemp) arrTemp = Split(sTemp, Chr$(10)) sFreeBlocks = Trim$(Mid$(arrTemp[6], RInStr(arrTemp[6], Space$(1)))) sBlockSize = Trim$(Mid$(arrTemp[5], RInStr(arrTemp[5], Space$(1)))) iFreeBytes = CLng(sFreeBlocks) * CLng(sBlockSize) -ELSE IF filesystem = "JFS" THEN - iFreeBytes = 0 +ELSE IF sFilesystem = "JFS" THEN + SHELL "echo dm | jfs_debugfs " & sDevice TO sTemp + sTemp = Trim$(sTemp) + arrTemp = Split(sTemp, Chr$(10)) + sFreeBlocks = Trim$(Mid$(Left$(arrTemp[8], RInStr(arrTemp[8], "[") - 1), InStr(arrTemp[8], ":") + 1)) + sBlockSize = Trim$(Mid$(arrTemp[2], RInStr(arrTemp[2], Space$(1)))) + iFreeBytes = HexToLong(sFreeBlocks) * CLng(sBlockSize) +ELSE IF sFilesystem = "FAT12" OR sFilesystem = "FAT16" OR sFilesystem = "FAT32" THEN 'Who even uses FAT12 on today's hard-drives anyway?! + SHELL "dosfsck -v " & sDevice TO sTemp 'The "-a" switch sould also be used to automaticaly repair a FAT partition, but that can take ages...lets see how well it works without it. + sTemp = Trim$(sTemp) + arrTemp = Split(sTemp, Chr$(10)) + 'Reuse sTemp, can't get sFreeBlocks in one go + sTemp = Trim$(Mid$(Left$(arrTemp[20], RInStr(arrTemp[20], "/") - 1), InStr(arrTemp[20], ",") + 1)) + sTemp2 = Trim$(Mid$(Left$(arrTemp[20], RInStr(arrTemp[20], Space$(1))), RInStr(arrTemp[20], "/") + 1)) + sFreeBlocks = Str(CLng(Val(sTemp2) - Val(sTemp))) + sBlockSize = Trim$(Left$(Trim$(arrTemp[7]), InStr(Trim$(arrTemp[7]), Space$(1)))) + iFreeBytes = CLng(sFreeBlocks) * CLng(sBlockSize) +ELSE IF sFilesystem = "NTFS" THEN + SHELL "ntfsresize --info --force --no-progress-bar " & sDevice TO sTemp + sTemp = Trim$(sTemp) + arrTemp = Split(sTemp, Chr$(10)) + PRINT arrTemp[10] + 'It would be a lot easier to use an expression in the output of ntfsresize to identify the number of free bytes, but that is not i18n ready! + 'So "chomp" away portions of the string until the first integer is found (this will be the free space value) + sTemp = arrTemp[10] + WHILE Len(sTemp) > 0 + sTemp2 = Trim$(Left$(sTemp, InStr(sTemp, Space$(1)))) + IF IsInteger(Val(sTemp2)) OR IsLong(Val(sTemp2)) THEN + sFreeBlocks = CLng(Val(sTemp2)) + BREAK + ELSE + sTemp = Trim$(Mid$(sTemp, InStr(sTemp, Space$(1)))) + ENDIF + WEND + sBlockSize = Trim$(Mid$(Left$(arrTemp[3], RInStr(arrTemp[3], Space$(1))), InStr(arrTemp[3], ":") + 1)) + iFreeBytes = CLng(sFreeBlocks) * CLng(sBlockSize) ELSE iFreeBytes = 0 ENDIF |
From: <ea...@gm...> - 2007-09-10 08:12:21
|
On 10/09/2007, uel archuletta <ue...@gm...> wrote: > how often would you create a non-linux filesystem in linux anyway? Well, while using GParted, the user may create any partition he/she wants, maybe a FAT partiton that will later be used as a shared drive?... Anyway, force a reboot it is then. |
From: uel a. <ue...@gm...> - 2007-09-10 01:02:23
|
I would say if they create a non-linuxfilesystem then force a reboot. the current installer ask you to reboot after fdisk how often would you create a non-linux filesystem in linux anyway? ---------- Forwarded message ---------- From: Eug=E9ne Suter <ea...@gm...> Date: Sep 9, 2007 6:35 PM Subject: Re: [Vectorlinux-devel] The installer To: Vector Linux developer's list < vec...@li...= > Today I've been working on some of the filesystem identification and updating the frmPartSelect class to display filesystem information I've encountered a problem though: if I create a non-linux filesystem where a linux filesystem used to be, fdisk does not update this information until the computer is rebooted. So frmPartSelect will display something like this= : | Filesystem | | Linux - NTFS | when it should display | HPFS/NTFS - NTFS | I'm guessing that after a user has used GParted of cfdisk from the installer's embedder we will have to force them to reboot so that fdisk can refresh its data, instead sending them right along to the frmPartSelect for= m to setup mountpoints/filesystem :( Is there any way to force fdisk to update its information without rebooting= ? It would probably be a lot better to let the user proceed right away after setting up partitions than having to reboot. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Vectorlinux-devel mailing list Vec...@li... https://lists.sourceforge.net/lists/listinfo/vectorlinux-devel |
From: <ea...@gm...> - 2007-09-10 00:35:56
|
Today I've been working on some of the filesystem identification and updating the frmPartSelect class to display filesystem information I've encountered a problem though: if I create a non-linux filesystem where a linux filesystem used to be, fdisk does not update this information until the computer is rebooted. So frmPartSelect will display something like this: | Filesystem | | Linux - NTFS | when it should display | HPFS/NTFS - NTFS | I'm guessing that after a user has used GParted of cfdisk from the installer's embedder we will have to force them to reboot so that fdisk can refresh its data, instead sending them right along to the frmPartSelect form to setup mountpoints/filesystem :( Is there any way to force fdisk to update its information without rebooting? It would probably be a lot better to let the user proceed right away after setting up partitions than having to reboot. |
From: <cod...@go...> - 2007-09-10 00:13:51
|
Author: easuter Date: Sun Sep 9 17:13:11 2007 New Revision: 25 Modified: trunk/.lang/.pot trunk/.lang/frmPartSelect.pot trunk/.project trunk/.settings trunk/Functions.module trunk/Utils.module trunk/cPartInfo.class trunk/frmDriveSelect.class trunk/frmPartSelect.class Log: Changes: - Utils.module: Added an exception to the filesystem identification code, since disktype's output changes slightly when used against an ntfs partiton. Parse_fdisk sub also adds free space values for each filesystem. Maybe its time to call the Parse_fdisk sub something else ;) - frmPartSelect.class: "Units" column replaced with the "Free Space" column. The "Size" and "Free Space" columns both display the units in the same cell as the value. Other small ajustments made due to changes in Functions.AutoUnits() - Functions.module: The AutoUnits() function has been tuned to round sizes to two decimal units (x.xx), so as to be a bit more accurate with large disk sizes. -- Created new function getFreePartSpace() that will return the free space of a partition, based on the filesystem. This was possible by looking at the gparted source code to see which commands and options are best for each filesystem. So far these filesystems have been implemented: Ext2, Ext3, XFS and ReiserFS. TODO: JFS, FAT16, FAT32, NTFS, Minix(?). Modified: trunk/.lang/.pot ============================================================================== --- trunk/.lang/.pot (original) +++ trunk/.lang/.pot Sun Sep 9 17:13:11 2007 @@ -18,12 +18,12 @@ msgid "Enter a value:" msgstr "" -#: InputBox.class:205 frmDriveSelect.class:129 frmPartSelect.class:372 +#: InputBox.class:205 frmDriveSelect.class:129 frmPartSelect.class:378 msgid "OK" msgstr "" #: InputBox.class:212 frmChooseFB.class:91 frmDriveSelect.class:136 -#: frmPartSelect.class:379 +#: frmPartSelect.class:385 msgid "Cancel" msgstr "" @@ -206,7 +206,7 @@ msgid "Config 2" msgstr "" -#: frmDriveSelect.class:110 frmPartSelect.class:347 +#: frmDriveSelect.class:110 frmPartSelect.class:353 msgid "Drives" msgstr "" @@ -226,7 +226,7 @@ msgid "The choice" msgstr "" -#: frmMain.class:225 frmPartSelect.class:387 +#: frmMain.class:225 frmPartSelect.class:393 msgid "Partitions" msgstr "" @@ -300,71 +300,71 @@ msgid "No extras" msgstr "" -#: frmPartSelect.class:261 +#: frmPartSelect.class:267 msgid "Mountpoints" msgstr "" -#: frmPartSelect.class:267 +#: frmPartSelect.class:273 msgid "/" msgstr "" -#: frmPartSelect.class:273 +#: frmPartSelect.class:279 msgid "/home" msgstr "" -#: frmPartSelect.class:279 +#: frmPartSelect.class:285 msgid "/var" msgstr "" -#: frmPartSelect.class:285 +#: frmPartSelect.class:291 msgid "/opt" msgstr "" -#: frmPartSelect.class:291 +#: frmPartSelect.class:297 msgid "/tmp" msgstr "" -#: frmPartSelect.class:297 +#: frmPartSelect.class:303 msgid "/boot" msgstr "" -#: frmPartSelect.class:303 +#: frmPartSelect.class:309 msgid "/usr" msgstr "" -#: frmPartSelect.class:309 +#: frmPartSelect.class:315 msgid "/share" msgstr "" -#: frmPartSelect.class:315 +#: frmPartSelect.class:321 msgid "FileSystem" msgstr "" -#: frmPartSelect.class:321 +#: frmPartSelect.class:327 msgid "xfs" msgstr "" -#: frmPartSelect.class:327 +#: frmPartSelect.class:333 msgid "reiserfs" msgstr "" -#: frmPartSelect.class:333 +#: frmPartSelect.class:339 msgid "ext3" msgstr "" -#: frmPartSelect.class:339 +#: frmPartSelect.class:345 msgid "ext2" msgstr "" -#: frmPartSelect.class:355 +#: frmPartSelect.class:361 msgid "Click on select install drive" msgstr "" -#: frmPartSelect.class:361 +#: frmPartSelect.class:367 msgid "Right-click in Mount or FileSystem to set" msgstr "" -#: frmPartSelect.class:395 +#: frmPartSelect.class:401 msgid "" "<ul>\n" "<li>Left-click to (un)select drive(s) to install Vector Linux.</li>\n" Modified: trunk/.lang/frmPartSelect.pot ============================================================================== --- trunk/.lang/frmPartSelect.pot (original) +++ trunk/.lang/frmPartSelect.pot Sun Sep 9 17:13:11 2007 @@ -14,87 +14,87 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: frmPartSelect.class:261 +#: frmPartSelect.class:267 msgid "Mountpoints" msgstr "" -#: frmPartSelect.class:267 +#: frmPartSelect.class:273 msgid "/" msgstr "" -#: frmPartSelect.class:273 +#: frmPartSelect.class:279 msgid "/home" msgstr "" -#: frmPartSelect.class:279 +#: frmPartSelect.class:285 msgid "/var" msgstr "" -#: frmPartSelect.class:285 +#: frmPartSelect.class:291 msgid "/opt" msgstr "" -#: frmPartSelect.class:291 +#: frmPartSelect.class:297 msgid "/tmp" msgstr "" -#: frmPartSelect.class:297 +#: frmPartSelect.class:303 msgid "/boot" msgstr "" -#: frmPartSelect.class:303 +#: frmPartSelect.class:309 msgid "/usr" msgstr "" -#: frmPartSelect.class:309 +#: frmPartSelect.class:315 msgid "/share" msgstr "" -#: frmPartSelect.class:315 +#: frmPartSelect.class:321 msgid "FileSystem" msgstr "" -#: frmPartSelect.class:321 +#: frmPartSelect.class:327 msgid "xfs" msgstr "" -#: frmPartSelect.class:327 +#: frmPartSelect.class:333 msgid "reiserfs" msgstr "" -#: frmPartSelect.class:333 +#: frmPartSelect.class:339 msgid "ext3" msgstr "" -#: frmPartSelect.class:339 +#: frmPartSelect.class:345 msgid "ext2" msgstr "" -#: frmPartSelect.class:347 +#: frmPartSelect.class:353 msgid "Drives" msgstr "" -#: frmPartSelect.class:355 +#: frmPartSelect.class:361 msgid "Click on select install drive" msgstr "" -#: frmPartSelect.class:361 +#: frmPartSelect.class:367 msgid "Right-click in Mount or FileSystem to set" msgstr "" -#: frmPartSelect.class:372 +#: frmPartSelect.class:378 msgid "OK" msgstr "" -#: frmPartSelect.class:379 +#: frmPartSelect.class:385 msgid "Cancel" msgstr "" -#: frmPartSelect.class:387 +#: frmPartSelect.class:393 msgid "Partitions" msgstr "" -#: frmPartSelect.class:395 +#: frmPartSelect.class:401 msgid "<ul>\n<li>Left-click to (un)select drive(s) to install Vector Linux.</li>\n<li>Right-click on Linux partitions to pick mountpoint</li>\n<li>Left-click on other partitions to edit mountpoint</li>\n</ul>\n" msgstr "" Modified: trunk/.project ============================================================================== --- trunk/.project (original) +++ trunk/.project Sun Sep 9 17:13:11 2007 @@ -2,10 +2,10 @@ Title=VL-gui-installer Startup=Main Icon=vl_logo_icon2.png -Version=0.0.197 +Version=0.0.227 Library=gb.qt Library=gb.qt.ext TabSize=3 Translate=1 ControlPublic=1 -ExecPath=/home/moe/Desktop/vl-installer.gambas +ExecPath=/home/easuter/vinstall-ng.gambas Modified: trunk/.settings ============================================================================== --- trunk/.settings (original) +++ trunk/.settings Sun Sep 9 17:13:11 2007 @@ -2,7 +2,7 @@ Count=0 [FFind] -SearchIn="Sub" +SearchIn="Module" CaseSensitive=True SearchWord=False SearchComment=False Modified: trunk/Functions.module ============================================================================== --- trunk/Functions.module (original) +++ trunk/Functions.module Sun Sep 9 17:13:11 2007 @@ -2,22 +2,20 @@ ' ### SYSTEMWIDE FUNCTIONS ### -PUBLIC FUNCTION AutoUnits(capacity AS Long) AS String -' Return drive/partition size in nicer units as "value;unit" string: +PUBLIC FUNCTION AutoUnits(value AS Float) AS String +'Function that will automatically turn a generic size value into something human-readable (in multiples of bytes): DIM temp AS Long -IF capacity < 1000 THEN ' Bytes: - RETURN Format$(capacity, "###,###,###,###") & ";B" -ELSE IF capacity < 1000000 THEN ' Kilobytes: - RETURN Format$(capacity / 1024, "###,###,###,###") & ";KB" - 'gridDisk[m + 1,units].Text = "KB" -ELSE IF capacity < 1000000000 THEN ' Megabytes: - RETURN Format$(capacity / 1048576, "###,###,###,###") & ";MB" - 'gridDisk[m + 1,units].Text = "MB" -ELSE IF capacity < 1000000000000 ' Gigabytes: - RETURN Format$(capacity / 1073741824, "####,###,###,###") & ";GB" +IF value < 1000 THEN ' Bytes: + RETURN value & " B" +ELSE IF value < 1000000 THEN ' Kilobytes: + RETURN Round(value / 1024, -2) & " KB" +ELSE IF value < 1000000000 THEN ' Megabytes: + RETURN Round(value / 1048576, -2) & " MB" +ELSE IF value < 1000000000000 ' Gigabytes: + RETURN Round(value / 1073741824, -2) & " GB" ELSE 'Terabytes - RETURN Format$(capacity / 1099511627776, "####,###,###,###") & ";TB" + RETURN Round(value / 1099511627776, -2) & " TB" END IF END @@ -215,6 +213,51 @@ END +PUBLIC FUNCTION getFreePartSpace(device AS String, filesystem AS String) AS Long +'Calculate the free space on a partition based on its filesystem, and then return the value +'This is basicaly a Gambas implementation of what GParted does for detecting free space on partitions in C++ +DIM sTemp AS String +DIM sTemp2 AS String +DIM sFreeBlocks AS String +DIM sBlockSize AS String +DIM arrTemp AS NEW String[] +DIM iFreeBytes AS Long + +device = Trim$(device) +filesystem = Trim$(filesystem) + +'The array's index used ([x]) to get the free blocks and the block size was obtained by studying the ouput of the commands used below +IF filesystem = "Ext3" OR filesystem = "Ext2" THEN + SHELL "dumpe2fs -h " & device TO sTemp + sTemp = Trim$(sTemp) + arrTemp = Split(sTemp, Chr$(10)) + sFreeBlocks = Trim$(Mid$(arrTemp[13], RInStr(arrTemp[13], Space$(1)))) + sBlockSize = Trim$(Mid$(arrTemp[16], RInStr(arrTemp[16], Space$(1)))) + iFreeBytes = CLng(sFreeBlocks) * CLng(sBlockSize) +ELSE IF filesystem = "XFS" THEN + SHELL "xfs_db -c 'sb 0' -c 'print blocksize' -c 'print fdblocks' -r " & device TO sTemp + sTemp = Trim$(sTemp) + arrTemp = Split(sTemp, Chr$(10)) + sFreeBlocks = Trim$(Mid$(arrTemp[1], RInStr(arrTemp[1], Space$(1)))) + sBlockSize = Trim$(Mid$(arrTemp[0], RInStr(arrTemp[0], Space$(1)))) + iFreeBytes = CLng(sFreeBlocks) * CLng(sBlockSize) +ELSE IF filesystem = "ReiserFS" THEN + SHELL "debugreiserfs " & device TO sTemp + sTemp = Trim$(sTemp) + arrTemp = Split(sTemp, Chr$(10)) + sFreeBlocks = Trim$(Mid$(arrTemp[6], RInStr(arrTemp[6], Space$(1)))) + sBlockSize = Trim$(Mid$(arrTemp[5], RInStr(arrTemp[5], Space$(1)))) + iFreeBytes = CLng(sFreeBlocks) * CLng(sBlockSize) +ELSE IF filesystem = "JFS" THEN + iFreeBytes = 0 +ELSE + iFreeBytes = 0 +ENDIF + +RETURN iFreeBytes + + +END PUBLIC FUNCTION CalcSwap(sysmem AS Long) AS Long Modified: trunk/Utils.module ============================================================================== --- trunk/Utils.module (original) +++ trunk/Utils.module Sun Sep 9 17:13:11 2007 @@ -73,7 +73,6 @@ 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 @@ -94,9 +93,9 @@ vPI.StartBlock = arrTemp2[2] vPI.EndBlock = arrTemp2[3] IF Right$(arrTemp2[4]) = "+" THEN - vPI.Blocks = Val(Left$(arrTemp2[4], Len(arrTemp2[4]) - 1)) + vPI.Bytes = CLng(Val(Left$(arrTemp2[4], Len(arrTemp2[4]) - 1))) * 1024 ELSE - vPI.Blocks = Val(arrTemp2[4]) + vPI.Bytes = CLng(Val(arrTemp2[4])) * 1024 ENDIF vPI.ID = arrTemp2[5] ELSE @@ -104,23 +103,25 @@ vPI.StartBlock = arrTemp2[1] vPI.EndBlock = arrTemp2[2] IF Right$(arrTemp2[3]) = "+" THEN - vPI.Blocks = Val(Left$(arrTemp2[3], Len(arrTemp2[3]) - 1)) + vPI.Bytes = CLng(Val(Left$(arrTemp2[3], Len(arrTemp2[3]) - 1))) * 1024 ELSE - vPI.Blocks = Val(arrTemp2[3]) + vPI.Bytes = CLng(Val(arrTemp2[3])) * 1024 ENDIF vPI.ID = arrTemp2[4] ENDIF - IF Functions.getPartType(vPI.ID) = "Linux swap" THEN - vPI.FileSystem = "Swap" - ELSE IF Functions.getPartType(vPI.ID) = "Extended" THEN + IF Functions.getPartType(vPI.ID) = "Extended" THEN vPI.FileSystem = "Extended" - ELSE + ELSE IF Functions.getPartType(vPI.ID) = "HPFS/NTFS" THEN + vPI.FileSystem = "NTFS" + ELSE SHELL "disktype " & vPI.Device TO sTemp2 sTemp2 = Trim$(sTemp2) arrTemp3 = Split(sTemp2, Chr$(10)) - vPI.FileSystem = Trim$(Left$(arrTemp3[2], InStr(arrTemp3[2], Space$(1)))) 'after being trimmed, the filesystem data will be on line 3 of the buffer (index 2 of the array) + vPI.FileSystem = Trim$(Left$(arrTemp3[2], InStr(arrTemp3[2], Space$(1)))) ENDIF + + vPI.FreeBytes = Functions.getFreePartSpace(vPI.Device, vPI.FileSystem) Global.PartInfo.Push(vPI) ELSE IF pos > 1 ' Parse a disk drive. Modified: trunk/cPartInfo.class ============================================================================== --- trunk/cPartInfo.class (original) +++ trunk/cPartInfo.class Sun Sep 9 17:13:11 2007 @@ -5,7 +5,8 @@ PUBLIC Bootable AS Boolean PUBLIC StartBlock AS Long PUBLIC EndBlock AS Long -PUBLIC Blocks AS Long +PUBLIC Bytes AS Long +PUBLIC FreeBytes AS Long PUBLIC ID AS String PUBLIC Mountpoint AS String PUBLIC FileSystem AS String Modified: trunk/frmDriveSelect.class ============================================================================== --- trunk/frmDriveSelect.class (original) +++ trunk/frmDriveSelect.class Sun Sep 9 17:13:11 2007 @@ -44,7 +44,7 @@ gridDisk[m, 0].Text = Global.DiskInfo[m - 1].Device gridDisk[m, 1].Alignment = Align.Right gridDisk[m, 1].Text = Global.DiskInfo[m - 1].Bytes - arrTemp = Split(Functions.AutoUnits(Global.DiskInfo[m - 1].Bytes), ";", "", TRUE) + arrTemp = Split(Functions.AutoUnits(Global.DiskInfo[m - 1].Bytes), " ", "", TRUE) gridDisk[m, 1].Text = arrTemp[0] gridDisk[m, 2].Alignment = Align.Left gridDisk[m, 2].Text = arrTemp[1] Modified: trunk/frmPartSelect.class ============================================================================== --- trunk/frmPartSelect.class (original) +++ trunk/frmPartSelect.class Sun Sep 9 17:13:11 2007 @@ -47,7 +47,7 @@ gridDisk[m, 0].Text = Global.DiskInfo[m - 1].Device gridDisk[m, 1].Alignment = Align.Right gridDisk[m, 1].Text = Global.DiskInfo[m - 1].Bytes - arrTemp = Split(Functions.AutoUnits(Global.DiskInfo[m - 1].Bytes), ";", "", TRUE) + arrTemp = Split(Functions.AutoUnits(Global.DiskInfo[m - 1].Bytes), " ", "", TRUE) gridDisk[m, 1].Text = arrTemp[0] gridDisk[m, 2].Alignment = Align.Left gridDisk[m, 2].Text = arrTemp[1] @@ -59,11 +59,11 @@ 'gridPart.Rows.Count = MaxPartions gridPart.Rows.Count = 256 gridPart.Columns[0].Width = 0.15 * gridPart.ClientWidth -gridPart.Columns[1].Width = 0.1 * gridPart.ClientWidth -gridPart.Columns[2].Width = 0.075 * gridPart.ClientWidth +gridPart.Columns[1].Width = 0.125 * gridPart.ClientWidth +gridPart.Columns[2].Width = 0.1 * gridPart.ClientWidth gridPart.Columns[3].Width = 0.055 * gridPart.ClientWidth -gridPart.Columns[4].Width = 0.3 * gridPart.ClientWidth -gridPart.Columns[5].Width = 0.195 * gridPart.ClientWidth +gridPart.Columns[4].Width = 0.275 * gridPart.ClientWidth +gridPart.Columns[5].Width = 0.17 * gridPart.ClientWidth gridPart.Columns[6].Width = 0.125 * gridPart.ClientWidth 'Center gridPart titles alignment: @@ -74,9 +74,9 @@ 'Setup gridPart titles: gridPart[0, 0].Text = "Partition" gridPart[0, 1].Text = "Size" -gridPart[0, 2].Text = "Units" +gridPart[0, 2].Text = "Free Space" gridPart[0, 3].Text = "Boot" -gridPart[0, 4].Text = "Type & FileSystem" +gridPart[0, 4].Text = "FileSystem" gridPart[0, 5].Text = "Mount" gridPart[0, 6].Text = "Format with" @@ -85,7 +85,7 @@ gridPart.Rows[m].Height = 20 gridPart[m, 0].Alignment = Align.Left gridPart[m, 1].Alignment = Align.Right - gridPart[m, 2].Alignment = Align.Left + gridPart[m, 2].Alignment = Align.Right gridPart[m, 3].Alignment = Align.Center gridPart[m, 4].Alignment = Align.Left gridPart[m, 5].Alignment = Align.Left @@ -119,15 +119,21 @@ IF InStr(Global.PartInfo[n - 1].Device, selectedDisk) THEN m = m + 1 gridPart[m, 0].Text = Global.PartInfo[n - 1].Device - arrTemp = Split(Functions.AutoUnits(Global.PartInfo[n - 1].Blocks * 1024), ";", "", TRUE) - gridPart[m, 1].Text = arrTemp[0] - gridPart[m, 2].Text = arrTemp[1] + gridPart[m, 1].Text = Functions.AutoUnits(Global.PartInfo[n - 1].Bytes) + gridPart[m, 2].Text = Functions.AutoUnits(Global.PartInfo[n - 1].FreeBytes) gridPart[m, 3].Text = IIf(Global.PartInfo[n - 1].Bootable, "B", "") - 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 + IF Functions.getPartType(Global.PartInfo[n - 1].ID) = "Extended" THEN + gridPart[m, 4].Text = "----Extended----" + ELSE IF Functions.getPartType(Global.PartInfo[n - 1].ID) = "Linux swap" THEN + gridPart[m, 4].Text = "Linux - Swap" + ELSE + gridPart[m, 4].Text = Functions.getPartType(Global.PartInfo[n - 1].ID) & " - " & Global.PartInfo[n - 1].FileSystem + ENDIF + + IF InStr(gridPart[m, 4].Text, "Linux swap") THEN gridPart[m, 5].Text = "swap" gridPart[m, 6].Text = "swap" - ELSE IF InStr(gridPart[m, 4].Text, "Linux") > 0 THEN + ELSE IF InStr(gridPart[m, 4].Text, "Linux") THEN gridPart[m, 6].Text = "reiserfs" Global.PartInfo[n - 1].FormatWithFS = "reiserfs" ELSE |
From: <cod...@go...> - 2007-09-08 23:21:40
|
Author: easuter Date: Sat Sep 8 16:21:19 2007 New Revision: 24 Modified: trunk/Functions.module trunk/Utils.module trunk/frmPartSelect.class Log: Changes: - Utils.module: getFileSystems subroutine eliminated. Instead, the filesystem information is obtained directly in the Parse_fdisk() subroutine by running "disktype /dev/ice". (get disktype at disktype.sf.net) - frmPartSelect.class: gridPart_Menu() sub altered to recognize when a Linux filsystem is present (necessary because of the changes in the Utils module). Modified: trunk/Functions.module ============================================================================== --- trunk/Functions.module (original) +++ trunk/Functions.module Sat Sep 8 16:21:19 2007 @@ -215,6 +215,8 @@ END + + PUBLIC FUNCTION CalcSwap(sysmem AS Long) AS Long 'Calculate the theoretical swap partition size based on system memory, in bytes Modified: trunk/Utils.module ============================================================================== --- trunk/Utils.module (original) +++ trunk/Utils.module Sat Sep 8 16:21:19 2007 @@ -58,7 +58,7 @@ ' Parse what fdisk has to say: Parse_fdisk(sTemp) 'Get filesystem data -getFileSystems() +'getFileSystems() END @@ -68,6 +68,8 @@ DIM vPI AS NEW cPartInfo DIM arrTemp1 AS NEW String[] DIM arrTemp2 AS NEW String[] +DIM arrTemp3 AS NEW String[] +DIM sTemp2 AS String DIM pos AS Long DIM n AS Long, m AS Long DIM pcounter AS Long @@ -108,6 +110,18 @@ ENDIF vPI.ID = arrTemp2[4] ENDIF + + IF Functions.getPartType(vPI.ID) = "Linux swap" THEN + vPI.FileSystem = "Swap" + ELSE IF Functions.getPartType(vPI.ID) = "Extended" THEN + vPI.FileSystem = "Extended" + ELSE + SHELL "disktype " & vPI.Device TO sTemp2 + sTemp2 = Trim$(sTemp2) + arrTemp3 = Split(sTemp2, Chr$(10)) + vPI.FileSystem = Trim$(Left$(arrTemp3[2], InStr(arrTemp3[2], Space$(1)))) 'after being trimmed, the filesystem data will be on line 3 of the buffer (index 2 of the array) + ENDIF + Global.PartInfo.Push(vPI) ELSE IF pos > 1 ' Parse a disk drive. vDI = NEW cDiskInfo @@ -139,44 +153,6 @@ frmGo.TextLabel1.Text &= "<br>" NEXT 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 Modified: trunk/frmPartSelect.class ============================================================================== --- trunk/frmPartSelect.class (original) +++ trunk/frmPartSelect.class Sat Sep 8 16:21:19 2007 @@ -169,7 +169,7 @@ PUBLIC SUB gridPart_Menu() -IF gridPart[gridPart.Row, 4].Text = "Linux" THEN +IF InStr(gridPart[gridPart.Row, 4].Text, "Linux") THEN IF gridPart.Column = 5 THEN mountpoints.Popup ELSE IF gridPart.Column = 6 THEN |
From: <ea...@gm...> - 2007-09-05 01:39:45
|
On 05/09/07, Jose J. Rodriguez <jo...@gm...> wrote: > Dang, I put a lot of work into that international-ready fdisk > parser... :( It probably works at least for all languages that use > our number characters, since I tested a lot of them, some of which I > couldn't even read what I was doing, lol. > > Regards, > Joe1962 Well I haven't actually removed anything so far, and probably wont work on it until the end of the week ("real-life" taking over). It would be a shame= , its the neatest code in the installer :) Anyway, it does look like disktype can be processed at the same time as the fdisk output (and in the same sub) so it doesn't necessarily have to be removed ;). One of my objectives was to get all the data necessary processe= d at once, not in bit-and pieces like the current getFileSystems() sub does..= . Eug=E9ne |
From: Jose J. R. <jo...@gm...> - 2007-09-05 01:18:05
|
On 9/4/07, Eug=E9ne Suter <ea...@gm...> wrote: > On 05/09/07, Jose J. Rodriguez <jo...@gm...> wrote: > > I've been following that thread and even had a quick look at the > > libparted manual, but it's too damned obscure for a simple quick > > look... What I propose is that we concentrate first on installing to a > > full drive and to empty space. An old teacher of mine taught me as a > > kid that you should always answer the easier questions on a test > > first, to put them behind you... :) > > Indeed, I just hate being defeated by a computer... :\ > I always had this unwritten TODO item, which I discussed with Uel at one point, to use libparted and build-in our own dedicated partitioner with only the stuff needed for an installer. However, I figured we should not reinvent the wheel till we actually had a working installer. After that, the sky's the limit... ;) > > > I believe a first version of the installer would be functional enough > > with a simple note that you should use a liveCD if you need to resize > > partitions. Let's get something working first, then build from there. > > > > Regards, > > Joe1962 > > Meanwhile, uelsk8s has brought a couple of useful commands to my attentio= n, > probedisk and disktype (actually probepart as well, but its a script that > uses probedisk and disktype). > At least from a first look, it seems like probedisk and disktype combined > can give all the info that fdisk + parted could. So it looks like its > possible after all :) > Dang, I put a lot of work into that international-ready fdisk parser... :( It probably works at least for all languages that use our number characters, since I tested a lot of them, some of which I couldn't even read what I was doing, lol. Regards, Joe1962 |
From: <ea...@gm...> - 2007-09-05 01:09:56
|
On 05/09/07, Jose J. Rodriguez <jo...@gm...> wrote: > I've been following that thread and even had a quick look at the > libparted manual, but it's too damned obscure for a simple quick > look... What I propose is that we concentrate first on installing to a > full drive and to empty space. An old teacher of mine taught me as a > kid that you should always answer the easier questions on a test > first, to put them behind you... :) Indeed, I just hate being defeated by a computer... :\ I believe a first version of the installer would be functional enough > with a simple note that you should use a liveCD if you need to resize > partitions. Let's get something working first, then build from there. > > Regards, > Joe1962 Meanwhile, uelsk8s has brought a couple of useful commands to my attention, probedisk and disktype (actually probepart as well, but its a script that uses probedisk and disktype). At least from a first look, it seems like probedisk and disktype combined can give all the info that fdisk + parted could. So it looks like its possible after all :) Cheers, Eug=E9ne |
From: Jose J. R. <jo...@gm...> - 2007-09-05 00:58:14
|
On 9/4/07, Eug=E9ne Suter <ea...@gm...> wrote: > Well, here is just an update on the installer's "progress": for about nea= rly > 2 weeks I've been trying to use Gambas to call functions in libparted > directly for access to a partition's filesystem name and to the free/unus= ed > space available. > I've been following that thread and even had a quick look at the libparted manual, but it's too damned obscure for a simple quick look... What I propose is that we concentrate first on installing to a full drive and to empty space. An old teacher of mine taught me as a kid that you should always answer the easier questions on a test first, to put them behind you... :) I believe a first version of the installer would be functional enough with a simple note that you should use a liveCD if you need to resize partitions. Let's get something working first, then build from there. Regards, Joe1962 |
From: <ea...@gm...> - 2007-09-04 23:29:05
|
Well, here is just an update on the installer's "progress": for about nearl= y 2 weeks I've been trying to use Gambas to call functions in libparted directly for access to a partition's filesystem name and to the free/unused space available. Parsing parted's (libparted's frontend) output on the command line is very slow, so thats basically set aside. It would be really cool to implement libparted's functions in the installer= , but so far I haven't been able to declare the functions in a way that they can be used in Gambas. Here is the thread that has been going on in the gambas-usel mailing list about this issue: http://www.nabble.com/Calling-library-functions-in-Gambas2-tf4295859.html Right now the most appealing approach other than direct use of libparted is the df command. So thats what I'll be using so that work on the installer can continue. But I'm posting this so that if anyone has any idea on how to declare the libparted functions in a usable manner in Gambas, then that can be implemented instead of parsing df... Cheers, Eug=E9ne |
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 |
From: <ea...@gm...> - 2007-08-18 21:57:12
|
Joe, is the frmPartSelect form supposed to show the filesystems of existing partitions (by parsing parted as well, for example), or is the "Filesystems" column there only for the user to specify what filesystem is to be used for formatting the selected partition (with reiserfs being the default choice)? |
From: <ea...@gm...> - 2007-08-17 21:16:39
|
Looks like there is a solution for the ext2/ext3 partition free space without using parted :) Parsing the output of dumpe2fs (with the -h flag) will give the number of free blocks and the block size. Got this by looking through the GParted source code, so its probably a good idea to give a mention in the installer's comments... Now to add this to the PartInfo array! :) |
From: <cod...@go...> - 2007-08-17 00:13:03
|
Author: easuter Date: Thu Aug 16 13:16:38 2007 New Revision: 22 Modified: 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/Functions.module trunk/Global.class trunk/frmDriveSelect.class Log: Changes: -Global module: instDriveIndex long integer variable added to hold the index corresponding to the installDrive string variable -frmDriveSelect.class: code added to assign the selected drive index in the gridDisk_Click() event -Functions: AutoRootSize function now uses the hard-drive data stored in the Global.DiskInfo array and no longer repeats the use of the fdisk command Modified: trunk/.lang/.pot ============================================================================== --- trunk/.lang/.pot (original) +++ trunk/.lang/.pot Thu Aug 16 13:16:38 2007 @@ -18,16 +18,16 @@ msgid "Enter a value:" msgstr "" -#: InputBox.class:205 frmDriveSelect.class:126 frmPartSelect.class:372 +#: InputBox.class:205 frmDriveSelect.class:129 frmPartSelect.class:372 msgid "OK" msgstr "" -#: InputBox.class:212 frmChooseFB.class:91 frmDriveSelect.class:133 +#: InputBox.class:212 frmChooseFB.class:91 frmDriveSelect.class:136 #: frmPartSelect.class:379 msgid "Cancel" msgstr "" -#: frmChoice.class:94 +#: frmChoice.class:95 msgid "" "<center><h3><b>You have 3 choices:</b></h3></center>\n" "\n" @@ -48,23 +48,23 @@ "</ul>\n" msgstr "" -#: frmChoice.class:105 +#: frmChoice.class:106 msgid "Choose install type" msgstr "" -#: frmChoice.class:120 +#: frmChoice.class:121 msgid "Install types" msgstr "" -#: frmChoice.class:125 +#: frmChoice.class:126 msgid "Full-automatic" msgstr "" -#: frmChoice.class:131 +#: frmChoice.class:132 msgid "Semi-automatic" msgstr "" -#: frmChoice.class:137 +#: frmChoice.class:138 msgid "Advanced" msgstr "" @@ -206,11 +206,11 @@ msgid "Config 2" msgstr "" -#: frmDriveSelect.class:107 frmPartSelect.class:347 +#: frmDriveSelect.class:110 frmPartSelect.class:347 msgid "Drives" msgstr "" -#: frmDriveSelect.class:115 +#: frmDriveSelect.class:118 msgid "Click on a row to select..." msgstr "" Modified: trunk/.lang/Functions.pot ============================================================================== --- trunk/.lang/Functions.pot (original) +++ trunk/.lang/Functions.pot Thu Aug 16 13:16:38 2007 @@ -1,4 +1,4 @@ -# /home/moe/projects/vl-installer/Functions.module +# /home/easuter/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 Thu Aug 16 13:16:38 2007 @@ -1,4 +1,4 @@ -# /home/moe/projects/vl-installer/Global.class +# /home/easuter/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 Thu Aug 16 13:16:38 2007 @@ -1,4 +1,4 @@ -# /home/moe/projects/vl-installer/InputBox.class +# /home/easuter/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 Thu Aug 16 13:16:38 2007 @@ -1,4 +1,4 @@ -# /home/moe/projects/vl-installer/Main.module +# /home/easuter/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 Thu Aug 16 13:16:38 2007 @@ -1,4 +1,4 @@ -# /home/moe/projects/vl-installer/Utils.module +# /home/easuter/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 Thu Aug 16 13:16:38 2007 @@ -1,4 +1,4 @@ -# /home/moe/projects/vl-installer/cDiskInfo.class +# /home/easuter/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 Thu Aug 16 13:16:38 2007 @@ -1,4 +1,4 @@ -# /home/moe/projects/vl-installer/cPartInfo.class +# /home/easuter/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 Thu Aug 16 13:16:38 2007 @@ -1,4 +1,4 @@ -# /home/moe/projects/vl-installer/cPartInstall.class +# /home/easuter/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 Thu Aug 16 13:16:38 2007 @@ -1,4 +1,4 @@ -# /home/moe/projects/vl-installer/frmChoice.class +# /home/easuter/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:94 +#: frmChoice.class:95 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:105 +#: frmChoice.class:106 msgid "Choose install type" msgstr "" -#: frmChoice.class:120 +#: frmChoice.class:121 msgid "Install types" msgstr "" -#: frmChoice.class:125 +#: frmChoice.class:126 msgid "Full-automatic" msgstr "" -#: frmChoice.class:131 +#: frmChoice.class:132 msgid "Semi-automatic" msgstr "" -#: frmChoice.class:137 +#: frmChoice.class:138 msgid "Advanced" msgstr "" Modified: trunk/.lang/frmConfig.pot ============================================================================== --- trunk/.lang/frmConfig.pot (original) +++ trunk/.lang/frmConfig.pot Thu Aug 16 13:16:38 2007 @@ -1,4 +1,4 @@ -# /home/moe/projects/vl-installer/frmConfig.class +# /home/easuter/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 Thu Aug 16 13:16:38 2007 @@ -1,4 +1,4 @@ -# /home/moe/projects/vl-installer/frmDriveSelect.class +# /home/easuter/vinstall-ng/frmDriveSelect.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. @@ -14,19 +14,19 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: frmDriveSelect.class:107 +#: frmDriveSelect.class:110 msgid "Drives" msgstr "" -#: frmDriveSelect.class:115 +#: frmDriveSelect.class:118 msgid "Click on a row to select..." msgstr "" -#: frmDriveSelect.class:126 +#: frmDriveSelect.class:129 msgid "OK" msgstr "" -#: frmDriveSelect.class:133 +#: frmDriveSelect.class:136 msgid "Cancel" msgstr "" Modified: trunk/.lang/frmGO.pot ============================================================================== --- trunk/.lang/frmGO.pot (original) +++ trunk/.lang/frmGO.pot Thu Aug 16 13:16:38 2007 @@ -1,4 +1,4 @@ -# /home/moe/projects/vl-installer/frmGO.class +# /home/easuter/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 Thu Aug 16 13:16:38 2007 @@ -1,4 +1,4 @@ -# /home/moe/projects/vl-installer/frmMain.class +# /home/easuter/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 Thu Aug 16 13:16:38 2007 @@ -1,4 +1,4 @@ -# /home/moe/projects/vl-installer/frmPackages.class +# /home/easuter/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 Thu Aug 16 13:16:38 2007 @@ -1,4 +1,4 @@ -# /home/moe/projects/vl-installer/frmPartSelect.class +# /home/easuter/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 Thu Aug 16 13:16:38 2007 @@ -1,4 +1,4 @@ -# /home/moe/projects/vl-installer/frmPartitioner.class +# /home/easuter/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 Thu Aug 16 13:16:38 2007 @@ -1,4 +1,4 @@ -# /home/moe/projects/vl-installer/frmPartitions.class +# /home/easuter/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 Thu Aug 16 13:16:38 2007 @@ -1,4 +1,4 @@ -# /home/moe/projects/vl-installer/frmTools.class +# /home/easuter/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 Thu Aug 16 13:16:38 2007 @@ -1,4 +1,4 @@ -# /home/moe/projects/vl-installer/frmWelcome.class +# /home/easuter/vinstall-ng/frmWelcome.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: trunk/Functions.module ============================================================================== --- trunk/Functions.module (original) +++ trunk/Functions.module Thu Aug 16 13:16:38 2007 @@ -277,24 +277,13 @@ DIM iTotalSize AS Long DIM sTemp AS String -IF Global.enumPARTMODE = 0 THEN 'Use entire drive - IF Global.SimulationMode = TRUE THEN - sTemp = "3800000" - ELSE 'Get real value from fdisk - SHELL "fdisk -s " & Global.installDrive TO sTemp - ENDIF - - iTotalSize = CLng(Val(Trim$(sTemp))) * 1024 'Convert to long integer and turn value into bytes +IF partmode = 0 THEN 'Use entire drive + iTotalSize = Global.DiskInfo[Global.instDriveIndex - 1].Bytes iRootSize = iTotalSize - CalcSwap(Global.SysMemory) - -ELSE IF Global.enumPARTMODE = 1 'Use only free space - IF Global.SimulationMode = TRUE THEN - sTemp = "3800000" - ELSE - 'Do whatever needs to be done to get free space values from available partitions - ENDIF +ELSE IF partmode = 1 'Use only free space on partition + 'Do whatever needs to be done to get free space values from available partitions ELSE - Message.Error("Unacceptable partition mode (" & Global.enumPARTMODE & ") for AutoRootSize function.") + Message.Error("Unacceptable partition mode (" & partmode & ") for AutoRootSize function.") ENDIF RETURN iRootSize Modified: trunk/Global.class ============================================================================== --- trunk/Global.class (original) +++ trunk/Global.class Thu Aug 16 13:16:38 2007 @@ -64,6 +64,7 @@ 'temp stuff 2 check out: STATIC PUBLIC installDrive AS String +STATIC PUBLIC instDriveIndex AS Long ' Boot Manager variables STATIC PUBLIC MBRSel AS String ' MBR to use in case there is more than 1 Modified: trunk/frmDriveSelect.class ============================================================================== --- trunk/frmDriveSelect.class (original) +++ trunk/frmDriveSelect.class Thu Aug 16 13:16:38 2007 @@ -4,6 +4,7 @@ PRIVATE MaxDisks AS Long PRIVATE selectedDisk AS String +PRIVATE selectedDiskIndex AS Long PUBLIC SUB Form_Open() DIM arrTemp AS NEW String[] @@ -64,6 +65,7 @@ NEXT gridDisk[gridDisk.Row, 3].Text = "+++" selectedDisk = gridDisk[gridDisk.Row, 0].Text + selectedDiskIndex = gridDisk.Row ENDIF END @@ -72,6 +74,7 @@ IF selectedDisk = "" THEN selectedDisk = gridDisk[1, 0].Text Global.installDrive = selectedDisk +Global.instDriveIndex = selectedDiskIndex IF Global.DebugMode = TRUE THEN message.Info(Global.installDrive) ME.Close(TRUE) |
From: <ea...@gm...> - 2007-08-15 21:11:22
|
On 15/08/07, M0E Lnx <m0...@gm...> wrote: > > I wonder if I doubled anything up ? No, its me: in the functions for acquiring partition size with fdisk, this Joe has already done and saved the data in an array...all I have to do is use it... :\ |
From: M0E L. <m0...@gm...> - 2007-08-15 20:27:40
|
I wonder if I doubled anything up ? On 8/15/07, Eug=E9ne Suter <ea...@gm...> wrote: > Indeed, there is some duplication going on...but that can be cleaned up ;= ) > I guess it wouldn't be a problem to add the free space info to the arrays > you originally created for the hard-drive information...just trying to fi= nd > out why exactly ext2/ext3 partitions give those errors in parted first... > > > On 15/08/07, Jose J. Rodriguez <jo...@gm...> wrote: > > There is UI and code in place that will allow selecting multiple HDDs > > and partitions. > > > > Now, regarding the current discussion and commits, I am sorry I don't > > have a working VL since last week and cannot yet review the code (so > > going by my bad memory here), because I have been migrating to another > > laptop as the previous one was giving loads of weird issues. However, > > I have been reading the commits on this list and it seems to me > > (though I might be wrong for the reasons stated) that there is some > > duplication going on. There is already infrastructure in place to hold > > all the HDDs and partitions in global array structures. IIRC, this > > also includes the HDD and partition sizes. The thing that was missing, > > I think, was a similar way to hold the free space. > > > > Regards, > > Joe1962 > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > _______________________________________________ > > Vectorlinux-devel mailing list > > Vec...@li... > > > https://lists.sourceforge.net/lists/listinfo/vectorlinux-devel > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Vectorlinux-devel mailing list > Vec...@li... > https://lists.sourceforge.net/lists/listinfo/vectorlinux-devel > > |
From: <ea...@gm...> - 2007-08-15 19:29:35
|
Indeed, there is some duplication going on...but that can be cleaned up ;) I guess it wouldn't be a problem to add the free space info to the arrays you originally created for the hard-drive information...just trying to find out why exactly ext2/ext3 partitions give those errors in parted first... On 15/08/07, Jose J. Rodriguez <jo...@gm...> wrote: > There is UI and code in place that will allow selecting multiple HDDs > and partitions. > > Now, regarding the current discussion and commits, I am sorry I don't > have a working VL since last week and cannot yet review the code (so > going by my bad memory here), because I have been migrating to another > laptop as the previous one was giving loads of weird issues. However, > I have been reading the commits on this list and it seems to me > (though I might be wrong for the reasons stated) that there is some > duplication going on. There is already infrastructure in place to hold > all the HDDs and partitions in global array structures. IIRC, this > also includes the HDD and partition sizes. The thing that was missing, > I think, was a similar way to hold the free space. > > Regards, > Joe1962 > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Vectorlinux-devel mailing list > Vec...@li... > https://lists.sourceforge.net/lists/listinfo/vectorlinux-devel > |
From: M0E L. <m0...@gm...> - 2007-08-15 18:21:47
|
I hope we're not going around in circles.... Quick... get your laptop..... On 8/15/07, Jose J. Rodriguez <jo...@gm...> wrote: > On 8/15/07, Sriram Durbha <sri...@gm...> wrote: > > Is it part of your plan to allow multiple partitions to be marked for using > > free space from? > > There is UI and code in place that will allow selecting multiple HDDs > and partitions. > > Now, regarding the current discussion and commits, I am sorry I don't > have a working VL since last week and cannot yet review the code (so > going by my bad memory here), because I have been migrating to another > laptop as the previous one was giving loads of weird issues. However, > I have been reading the commits on this list and it seems to me > (though I might be wrong for the reasons stated) that there is some > duplication going on. There is already infrastructure in place to hold > all the HDDs and partitions in global array structures. IIRC, this > also includes the HDD and partition sizes. The thing that was missing, > I think, was a similar way to hold the free space. > > Regards, > Joe1962 > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Vectorlinux-devel mailing list > Vec...@li... > https://lists.sourceforge.net/lists/listinfo/vectorlinux-devel > |
From: Jose J. R. <jo...@gm...> - 2007-08-15 17:55:42
|
On 8/15/07, Sriram Durbha <sri...@gm...> wrote: > Is it part of your plan to allow multiple partitions to be marked for using > free space from? There is UI and code in place that will allow selecting multiple HDDs and partitions. Now, regarding the current discussion and commits, I am sorry I don't have a working VL since last week and cannot yet review the code (so going by my bad memory here), because I have been migrating to another laptop as the previous one was giving loads of weird issues. However, I have been reading the commits on this list and it seems to me (though I might be wrong for the reasons stated) that there is some duplication going on. There is already infrastructure in place to hold all the HDDs and partitions in global array structures. IIRC, this also includes the HDD and partition sizes. The thing that was missing, I think, was a similar way to hold the free space. Regards, Joe1962 |
From: Sriram D. <sri...@gm...> - 2007-08-15 17:39:22
|
Is it part of your plan to allow multiple partitions to be marked for using free space from? if so then going with your mount approach may not be that bad. show a lis tof all partitions + free space on partition. let the user make a decision on which partitions should be resized. the installer can provide a basic visual check that the required free space has been achieved. and then un mount every thing and go on with your usual algorithm of resizing the selected partitions and using the resulting free space. This approach makes good use of mounting all partitions and hopefully will handle ext partitions also. cheers ram On 8/14/07, M0E Lnx <m0...@gm...> wrote: > > So then, you do need to know the ammount of free space left on the > device so you can then resize which ever partition is the largest and > steal space to make your Linux friendly partition. > This involves > * an analysis of the drive to determine what partitions are present. > * If in Wind OS, most likely one hughe partition for the system and > mayne a backup / restore partition > * Maybe analyze the size of each partition to determine which one is > the largest and also to get a correct label for your new partitons > (/dev/hdxx) > > > > On 8/14/07, uel archuletta <ue...@gm...> wrote: > > Sorry I didnt think about wanting to resize. > > i dont have any ext3 partitions but I do get this error with ext2 > > root:# parted /dev/hdb print 5 > > Error: File system was not cleanly unmounted! You should run e2fsck. > > Modifying > > an unclean file system could cause severe corruption. > > Ignore/Cancel? i > > > > Minor: 5 > > Flags: > > File System: ext2 > > Size: 10.5GB (4.20%) > > Minimum size: 9001MB (3.60%) > > Maximum size: 250GB (100%) > > > > and it seems the version of parted i have doesnt support ntfs > > root:# parted /dev/hda print 1 > > No Implementation: Support for opening ntfs file systems is not > implemented > > yet. > > but works well with fat32 > > root:# parted /dev/hdb print 1 > > > > Minor: 1 > > Flags: boot, lba > > File System: fat32 > > Size: 105GB (41.9%) > > Minimum size: 97.5GB (39.0%) > > Maximum size: 250GB (100%) > > > > uel > > > > On 8/14/07, Eug=E9ne Suter <ea...@gm...> wrote: > > > > > > Seems that parted can be used for this after all (according to the > post in > > the gparted forum): > > > > > > > > > > > > > Lets say the partition you want to check is a fat32 partition on > > /dev/hda1. > > > > > > > > >parted /dev/hda1 > > > > > > > > bla bla bla > > > > > > > > >print 1 > > > > > > > > Minor: 1 > > > > Flags: > > > > File System: fat32 > > > > Size: 10.0GB (100%) > > > > Minimum size: 8369MB (83.7%) <------- RIGHT HERE > > > > Maximum size: 10.0GB (100%) > > > > > > > > 100% - 83.7% =3D 16.3% free > > > > > > > > That's how GParted does it. Hope this helps. > > > > > > > > Patrick Verner > > > > www.partedmagic.com > > > > > > > > > > > > Problem is, this only works for me on non ext* filesystems. > > > Running parted against one of my ext3 backup partitions gives this > error: > > > > > > > > > > > > > root:# parted /dev/hda print 5 > > > > Error: File system has an incompatible feature enabled. > > > > > > Anyone else get this problem on ext3 partitions as well? > > > > > > > > > > > > ------------------------------------------------------------------------- > > > This SF.net email is sponsored by: Splunk Inc. > > > Still grepping through log files to find problems? Stop. > > > Now Search log events and configuration files using AJAX and a > browser. > > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > > _______________________________________________ > > > Vectorlinux-devel mailing list > > > Vec...@li... > > > > > https://lists.sourceforge.net/lists/listinfo/vectorlinux-devel > > > > > > > > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > _______________________________________________ > > Vectorlinux-devel mailing list > > Vec...@li... > > https://lists.sourceforge.net/lists/listinfo/vectorlinux-devel > > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Vectorlinux-devel mailing list > Vec...@li... > https://lists.sourceforge.net/lists/listinfo/vectorlinux-devel > |