|
From: <cod...@go...> - 2009-03-02 22:40:51
|
Author: M0...@gm...
Date: Mon Mar 2 14:27:59 2009
New Revision: 507
Added:
branches/speedy/MdlAutoPartition.module
Removed:
branches/speedy/MdlObjSizer.module
Modified:
branches/speedy/.lang/.pot
branches/speedy/.lang/Step3a.pot
branches/speedy/.lang/Step3a1.pot
branches/speedy/Step3a.form
branches/speedy/Step3a1.class
branches/speedy/Step3a1.form
branches/speedy/Step3a3.class
branches/speedy/Step3a3.form
Log:
Finished free space detection and listing of partitions with free space
Modified: branches/speedy/.lang/.pot
==============================================================================
--- branches/speedy/.lang/.pot (original)
+++ branches/speedy/.lang/.pot Mon Mar 2 14:27:59 2009
@@ -10,19 +10,23 @@
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: FMain0Old.class:233 FMain0.class:246 FMain.class:245
+#: .project:1
+msgid "VectorLinux Installer"
+msgstr ""
+
+#: FMain.class:245 FMain0.class:246 FMain0Old.class:233
msgid "Process Overview"
msgstr ""
-#: FMain0Old.class:271 FMain0.class:288 FMain.class:287
+#: FMain.class:287 FMain0.class:288 FMain0Old.class:271
msgid "Back"
msgstr ""
-#: FMain0Old.class:282 FMain0.class:299 FMain.class:298
+#: FMain.class:298 FMain0.class:299 FMain0Old.class:282
msgid "Next"
msgstr ""
-#: FMain0Old.class:293 FMain0.class:310 FMain.class:309
+#: FMain.class:309 FMain0.class:310 FMain0Old.class:293
msgid "Quit"
msgstr ""
@@ -94,10 +98,6 @@
msgid "Final Configuration"
msgstr ""
-#: .project:1
-msgid "VectorLinux Installer"
-msgstr ""
-
#: Step0.class:20
msgid "Localization Settings"
msgstr ""
@@ -216,7 +216,7 @@
msgid "This feature can help you avoid an unsuccesful installation."
msgstr ""
-#: Step1.class:433 Step3a1a.class:186 Step3a1.class:22 Step7a.class:143
+#: Step1.class:433 Step3a1.class:22 Step3a1a.class:186 Step7a.class:143
msgid "WARNING:"
msgstr ""
@@ -340,6 +340,99 @@
msgid "Stop"
msgstr ""
+#: Step3.class:28
+msgid "Disc Partitioning Options"
+msgstr ""
+
+#: Step3.class:31
+msgid "Select the partitioning method you would like to use"
+msgstr ""
+
+#: Step3.class:175
+msgid "Automatic"
+msgstr ""
+
+#: Step3.class:185
+msgid ""
+"Automatically resize your partitions and / or create the correct disk
space "
+"for VectorLinux."
+msgstr ""
+
+#: Step3.class:192
+msgid "Manually resize my partitions "
+msgstr ""
+
+#: Step3.class:202
+msgid "Use the partitioning tool to prepare your system partitions."
+msgstr ""
+
+#: Step3.class:209
+msgid "My hard drive is already partitioned"
+msgstr ""
+
+#: Step3.class:219
+msgid "Install VectorLinux to existing partitions on my hard drive"
+msgstr ""
+
+#: Step3a.class:19
+msgid "Automatic Partitioning Options"
+msgstr ""
+
+#: Step3a.class:20
+msgid "Select one of the following options"
+msgstr ""
+
+#: Step3a.class:22
+msgid "Allow VectorLinux to use an entire hard disk in your system."
+msgstr ""
+
+#: Step3a.class:22
+msgid "This option will wipe out any data on the disk you select."
+msgstr ""
+
+#: Step3a.class:24
+msgid ""
+"Locate free (unpartitioned) space on hard disk and install VectorLinux
there."
+msgstr ""
+
+#: Step3a.class:24
+msgid "This option will not harm any data on your hard drive"
+msgstr ""
+
+#: Step3a.class:26
+msgid ""
+"Resize your existing partitions to make room for a VectorLinux partition "
+"scheme"
+msgstr ""
+
+#: Step3a.class:26
+msgid "This option will not harm any existing data on your hard drive"
+msgstr ""
+
+#: Step3a.class:122
+msgid "Use unpartitioned space on my hard disk (creates new partitions)"
+msgstr ""
+
+#: Step3a.class:143
+msgid "Use free space on existing partitions for VectorLinux"
+msgstr ""
+
+#: Step3a.class:164
+msgid "Use entire disk"
+msgstr ""
+
+#: Step3a1.class:20
+msgid "Use Entire Hard Disk for VectorLinux"
+msgstr ""
+
+#: Step3a1.class:22
+msgid "All existing data in the device you select here will be destroyed."
+msgstr ""
+
+#: Step3a1.class:74
+msgid "Total Disc Size"
+msgstr ""
+
#: Step3a1a.class:21
msgid "Create Linux Partition Scheme in"
msgstr ""
@@ -416,18 +509,6 @@
msgid "Operation cancelled by user. No changes have been made to the
system"
msgstr ""
-#: Step3a1.class:20
-msgid "Use Entire Hard Disk for VectorLinux"
-msgstr ""
-
-#: Step3a1.class:22
-msgid "All existing data in the device you select here will be destroyed."
-msgstr ""
-
-#: Step3a1.class:68
-msgid "Total Disc Size"
-msgstr ""
-
#: Step3a2.class:25
msgid "Install VectorLinux to free space on disk"
msgstr ""
@@ -500,87 +581,6 @@
msgid "Claim free space from existing partitions"
msgstr ""
-#: Step3a.class:19
-msgid "Automatic Partitioning Options"
-msgstr ""
-
-#: Step3a.class:20
-msgid "Select one of the following options"
-msgstr ""
-
-#: Step3a.class:22
-msgid "Allow VectorLinux to use an entire hard disk in your system."
-msgstr ""
-
-#: Step3a.class:22
-msgid "This option will wipe out any data on the disk you select."
-msgstr ""
-
-#: Step3a.class:24
-msgid ""
-"Locate free (unpartitioned) space on hard disk and install VectorLinux
there."
-msgstr ""
-
-#: Step3a.class:24
-msgid "This option will not harm any data on your hard drive"
-msgstr ""
-
-#: Step3a.class:26
-msgid ""
-"Resize your existing partitions to make room for a VectorLinux partition "
-"scheme"
-msgstr ""
-
-#: Step3a.class:26
-msgid "This option will not harm any existing data on your hard drive"
-msgstr ""
-
-#: Step3a.class:122
-msgid "Use unpartitioned space on my hard disk (creates new partitions)"
-msgstr ""
-
-#: Step3a.class:144
-msgid "Use free space on existing partitions for VectorLinux"
-msgstr ""
-
-#: Step3a.class:168
-msgid "Use entire disk"
-msgstr ""
-
-#: Step3.class:28
-msgid "Disc Partitioning Options"
-msgstr ""
-
-#: Step3.class:31
-msgid "Select the partitioning method you would like to use"
-msgstr ""
-
-#: Step3.class:175
-msgid "Automatic"
-msgstr ""
-
-#: Step3.class:185
-msgid ""
-"Automatically resize your partitions and / or create the correct disk
space "
-"for VectorLinux."
-msgstr ""
-
-#: Step3.class:192
-msgid "Manually resize my partitions "
-msgstr ""
-
-#: Step3.class:202
-msgid "Use the partitioning tool to prepare your system partitions."
-msgstr ""
-
-#: Step3.class:209
-msgid "My hard drive is already partitioned"
-msgstr ""
-
-#: Step3.class:219
-msgid "Install VectorLinux to existing partitions on my hard drive"
-msgstr ""
-
#: Step4.class:23
msgid "Automatic Disc Partitioning"
msgstr ""
@@ -731,6 +731,34 @@
msgid "Select which partitions to use for installation"
msgstr ""
+#: Step7.class:19
+msgid "Select Installation Mode"
+msgstr ""
+
+#: Step7.class:108
+msgid "Full Install"
+msgstr ""
+
+#: Step7.class:118
+msgid "Install everthing in the image (Fully Automated)"
+msgstr ""
+
+#: Step7.class:126 Step8.class:120
+msgid "Customized"
+msgstr ""
+
+#: Step7.class:136
+msgid "Select the components you wish to install (Advanced)"
+msgstr ""
+
+#: Step7.class:144 Step8.class:122
+msgid "Minimal"
+msgstr ""
+
+#: Step7.class:154
+msgid "Install the most minimal working confuguration (For older hardware)"
+msgstr ""
+
#: Step7a.class:27 Step7b.class:23
msgid "Customize Your VectorLinux Installation"
msgstr ""
@@ -785,34 +813,6 @@
msgid ""
"Additional optional software available. Select which software packages
to "
"include in your installation."
-msgstr ""
-
-#: Step7.class:19
-msgid "Select Installation Mode"
-msgstr ""
-
-#: Step7.class:108
-msgid "Full Install"
-msgstr ""
-
-#: Step7.class:118
-msgid "Install everthing in the image (Fully Automated)"
-msgstr ""
-
-#: Step7.class:126 Step8.class:120
-msgid "Customized"
-msgstr ""
-
-#: Step7.class:136
-msgid "Select the components you wish to install (Advanced)"
-msgstr ""
-
-#: Step7.class:144 Step8.class:122
-msgid "Minimal"
-msgstr ""
-
-#: Step7.class:154
-msgid "Install the most minimal working confuguration (For older hardware)"
msgstr ""
#: Step8.class:44
Modified: branches/speedy/.lang/Step3a.pot
==============================================================================
--- branches/speedy/.lang/Step3a.pot (original)
+++ branches/speedy/.lang/Step3a.pot Mon Mar 2 14:27:59 2009
@@ -50,11 +50,11 @@
msgid "Use unpartitioned space on my hard disk (creates new partitions)"
msgstr ""
-#: Step3a.class:144
+#: Step3a.class:143
msgid "Use free space on existing partitions for VectorLinux"
msgstr ""
-#: Step3a.class:168
+#: Step3a.class:164
msgid "Use entire disk"
msgstr ""
Modified: branches/speedy/.lang/Step3a1.pot
==============================================================================
--- branches/speedy/.lang/Step3a1.pot (original)
+++ branches/speedy/.lang/Step3a1.pot Mon Mar 2 14:27:59 2009
@@ -26,7 +26,7 @@
msgid "All existing data in the device you select here will be destroyed."
msgstr ""
-#: Step3a1.class:68
+#: Step3a1.class:74
msgid "Total Disc Size"
msgstr ""
Added: branches/speedy/MdlAutoPartition.module
==============================================================================
--- (empty file)
+++ branches/speedy/MdlAutoPartition.module Mon Mar 2 14:27:59 2009
@@ -0,0 +1,95 @@
+' Gambas module file
+
+' This file is part of vinstall-ng
+
+' vinstall-ng is free software: you can redistribute it and/or modify
+' it under the terms of the GNU General Public License as published by
+' the Free Software Foundation, either version 2 of the License, or
+' (at your option) any later version.
+
+' vinstall-ng is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU General Public License for more details.
+
+' You should have received a copy of the GNU General Public License
+' along with vinstall-ng. If not, see <http://www.gnu.org/licenses/>.
+PRIVATE sMountedList AS String
+PUBLIC SUB DISPLAY_PARTITIONS_WITH_FREE_SPACE(hostContainer AS Container)
+
+ DIM sDump, sPreMountList, sDfDump, sDrives, sPartition, sPartShort AS
String
+ DIM sResults, sDumparr, sLineArr AS String[]
+ DIM sPost, sFinalList AS String
+ DIM i, n AS Integer
+ DIM rb AS RadioButton
+ DIM hb AS HBox
+
+ SHELL "df -Th | grep \"^/dev/\" | cut -f 1 -d \' \'" TO sPreMountList '|
tr -s \' \',\"\"" TO sPreMountList
+ 'Message(sPreMountList)
+ sDumparr = Split(sPreMountList, "\n")
+ FOR i = 0 TO sDumparr.Max
+ IF InStr(sFinalList, Trim(sDumparr[i])) = FALSE THEN
+ SHELL "df -Tm | grep \"" & Trim(sDumparr[i]) & "\" | tr -s \'
\', \"\"" TO sDump
+ sFinalList = sFinalList & sDump
+ END IF
+ NEXT
+
+
+ SHELL "probepart | grep \"^/dev/\" | tr -s \' \',\"\" | cut -f 1 -d \'
\'" TO sDump
+ 'Message(sDump)
+ sDump = Trim(sDump)
+ sDumparr = Split(sDump, "\n")
+ FOR i = 0 TO sDumparr.Max
+ sPartition = Trim(sDumparr[i])
+ sPartShort = Right(sPartition, Len(sPartition) -
RInStr(sPartition, "/"))
+ 'Message(sPartShort)
+ 'sMountedList = sMountedList & sPartition & " "
+ 'IF InStr(sMountedList, sPartition) = FALSE THEN
+ 'IF NOT InStr(Trim(sPreMountList), Trim(sPartition)) THEN
+ 'IF InStr(Trim(sPreMountList), Trim(sPartition)) = FALSE THEN
+ IF InStr(sFinalList, Trim(sPartition)) = FALSE THEN
+ 'Message(sPartition & " is not in the pre-mounted list")
+ SHELL "mkdir -p /mnt" &/ sPartShort & " 2> /dev/null" WAIT
+ SHELL "mount -o ro " & sPartition & Space(1) & "/mnt" &/
sPartShort & " 2> /dev/null" WAIT
+ 'SHELL "df -Th | grep \"^" & sPartition & "\" | head -n 1 | tr
-s \' \',\"\"" TO sDump
+ SHELL "df -Tm /mnt" &/ sPartShort & " | grep \"^/dev/\"| tr -s
\' \',\"\"" TO sDump
+ 'Message(sDump)
+ 'sPost = sPost & sDump
+ IF InStr(sFinalList, sDump) = FALSE THEN
+ IF InStr(sDump, ClsGlobal.sSourceAddr) = FALSE THEN
+ sFinalList = sFinalList & sDump
+ END IF
+ END IF
+ SHELL "umount /mnt" & sPartShort & " 2>/dev/null" WAIT
+
+ END IF
+
+ NEXT
+
+
+ 'Message(sFinalList)
+ sFinalList = Trim(sFinalList)
+ sResults = Split(sFinalList, "\n")
+ FOR i = 0 TO sResults.Max
+ ' Message(Trim(sResults[i]))
+ sLineArr = Split(Trim(sResults[i]), " ")
+ 'Message(sLineArr[0] & Space(1) & "fREE SPACE " & sLineArr[4] & "
Mb")
+ rb = NEW RadioButton(hostContainer)
+ WITH rb
+ .Text = Trim(sLineArr[0]) & Space(1) & "-" & Trim(sLineArr[4])
+ .tag = Trim(sLineArr[0])
+ .Height = 21
+ .Expand = TRUE
+ END WITH
+ hb = NEW HBox(hostContainer)
+ WITH hb
+ .Height = 12
+ .Expand = TRUE
+ END WITH
+
+
+
+ NEXT
+
+END
+
Modified: branches/speedy/Step3a.form
==============================================================================
--- branches/speedy/Step3a.form (original)
+++ branches/speedy/Step3a.form Mon Mar 2 14:27:59 2009
@@ -48,27 +48,23 @@
}
{ rbResizeParts RadioButton
MoveScaled(1,8,56,3)
- Visible = False
Expand = True
Text = ("Use free space on existing partitions for VectorLinux")
}
{ Panel3 Panel
MoveScaled(2,11,3,3)
- Visible = False
}
{ tlFreeSpace2 TextLabel
- MoveScaled(5,11,19,4)
- Visible = False
+ MoveScaled(5,11,40,4)
Expand = True
Text = ("")
}
{ HBox3 HBox
MoveScaled(1,14,6,2)
- Visible = False
Expand = True
}
{ rbEntireDisk RadioButton
- MoveScaled(2,18,34,3)
+ MoveScaled(2,19,34,3)
Expand = True
Text = ("Use entire disk")
}
@@ -76,7 +72,7 @@
MoveScaled(2,20,3,3)
}
{ tlEntireDisc TextLabel
- MoveScaled(6,20,32,4)
+ MoveScaled(6,21,32,4)
Expand = True
Text = ("")
}
Modified: branches/speedy/Step3a1.class
==============================================================================
--- branches/speedy/Step3a1.class (original)
+++ branches/speedy/Step3a1.class Mon Mar 2 14:27:59 2009
@@ -20,10 +20,9 @@
ME.tlbanner.Text = "<h2>" & ("Use Entire Hard Disk for VectorLinux")
& "</H2>"
ME.TLwARNING.Text = "<b><u>" & ("WARNING:") & "</u></b><br>" &
"<i>" & ("All existing data in the device you select here will be
destroyed.") & "</i>"
-
- objPosTargets = NEW Object[]
-
- ME.DISPLAY_POSSIBLE_DISK_TARGETS
+
+ME.objPosTargets = NEW Object[]
+ ME.DISPLAY_POSSIBLE_DISK_TARGETS()
END
PUBLIC SUB DISPLAY_POSSIBLE_DISK_TARGETS()
@@ -62,6 +61,13 @@
.Expand = FALSE
.Width = 30
.Height = 30
+ END WITH
+ pb = NEW PictureBox(pn)
+ WITH pb
+ .Picture = Picture.Load("images/hdd.png")
+ .Expand = TRUE
+ .Height = 22
+ .Width = 22
END WITH
tl = NEW TextLabel(hpanel2) ' Hard disk information
WITH tl
Modified: branches/speedy/Step3a1.form
==============================================================================
--- branches/speedy/Step3a1.form (original)
+++ branches/speedy/Step3a1.form Mon Mar 2 14:27:59 2009
@@ -49,8 +49,11 @@
Visible = False
}
{ pn Panel
- MoveScaled(28,41,5,2)
+ MoveScaled(28,40,5,3)
Visible = False
+ { pb PictureBox
+ MoveScaled(1,0,3,3)
+ }
}
{ tl TextLabel
MoveScaled(38,41,9,2)
Modified: branches/speedy/Step3a3.class
==============================================================================
--- branches/speedy/Step3a3.class (original)
+++ branches/speedy/Step3a3.class Mon Mar 2 14:27:59 2009
@@ -20,47 +20,47 @@
PUBLIC SUB Form_Open()
ME.tlbanner.Text = "<h2>" & ("Claim free space from existing
partitions") & "</h2>"
- ME.DISPLAY_RESIZABLE_PARTITIONS()
+ 'ME.DISPLAY_RESIZABLE_PARTITIONS()
END
PUBLIC SUB DISPLAY_RESIZABLE_PARTITIONS()
-
- DIM sDump, sPreMountList, sDfDump, sDrives, sPartition, sPartShort AS
String
- DIM sResults, sDumparr AS String[]
- DIM i, n AS Integer
-
- SHELL "df -Th | grep \"/dev\" | tr -s \' \',\"\"" TO sPreMountList
- 'Message(sPreMountList)
- SHELL "probepart | grep \"^/dev\" | tr -s \' \',\"\" | cut -f 1 -d \'
\'" TO sDump
- sDump = Trim(sDump)
- sDumparr = Split(sDump, "\n")
- FOR i = 0 TO sDumparr.Max
- sPartition = Trim(sDumparr[i])
- sPartShort = Right(sPartition, Len(sPartition) -
RInStr(sPartition, "/"))
- 'Message(sPartShort)
- sMountedList = sMountedList & sPartition & " "
- IF InStr(sMountedList, sPartition) = FALSE THEN
- SHELL "mkdir -p /mnt" &/ sPartShort & " 2> /dev/null" WAIT
- SHELL "mount -o ro " & sPartition & Space(1) & "/mnt" &/
sPartShort & " 2> /dev/null" WAIT
- END IF
-
- NEXT
-
- ' now that they're all mounted, get the free space on each one of
them
- SHELL "df -Th | grep \"^/dev\" | tr -s \' \',\"\"" TO sDfDump
- 'Message(sMountedList)
- sDfDump = Trim(sDfDump)
- Message(sDfDump)
-
- FOR i = 0 TO sDumparr.Max
- sPartition = Trim(sDumparr[i])
- sPartShort = Right(sPartition, Len(sPartition) -
RInStr(sPartition, "/"))
- IF sPartition <> ClsGlobal.sSourceAddr THEN
- SHELL "umount -f /mnt" &/ sPartShort & " 2> /dev/null" WAIT
- END IF
- NEXT
-
+ ' '
+ ' ' DIM sDump, sPreMountList, sDfDump, sDrives, sPartition, sPartShort
AS String
+ ' ' DIM sResults, sDumparr AS String[]
+ ' ' DIM i, n AS Integer
+ ' '
+ ' ' SHELL "df -Th | grep \"/dev\" | tr -s \' \',\"\"" TO sPreMountList
+ ' ' 'Message(sPreMountList)
+ ' ' SHELL "probepart | grep \"^/dev\" | tr -s \' \',\"\" | cut -f 1 -d
\' \'" TO sDump
+ ' ' sDump = Trim(sDump)
+ ' ' sDumparr = Split(sDump, "\n")
+ ' ' FOR i = 0 TO sDumparr.Max
+ ' ' sPartition = Trim(sDumparr[i])
+ ' ' sPartShort = Right(sPartition, Len(sPartition) -
RInStr(sPartition, "/"))
+ ' ' 'Message(sPartShort)
+ ' ' sMountedList = sMountedList & sPartition & " "
+ ' ' IF InStr(sMountedList, sPartition) = FALSE THEN
+ ' ' SHELL "mkdir -p /mnt" &/ sPartShort & " 2> /dev/null" WAIT
+ ' ' SHELL "mount -o ro " & sPartition & Space(1) & "/mnt" &/
sPartShort & " 2> /dev/null" WAIT
+ ' ' END IF
+ ' '
+ ' ' NEXT
+ ' '
+ ' ' ' now that they're all mounted, get the free space on each one
of them
+ ' ' SHELL "df -Th | grep \"^/dev\" | tr -s \' \',\"\"" TO sDfDump
+ ' ' 'Message(sMountedList)
+ ' ' sDfDump = Trim(sDfDump)
+ ' ' Message(sDfDump)
+ ' '
+ ' ' FOR i = 0 TO sDumparr.Max
+ ' ' sPartition = Trim(sDumparr[i])
+ ' ' sPartShort = Right(sPartition, Len(sPartition) -
RInStr(sPartition, "/"))
+ ' ' IF sPartition <> ClsGlobal.sSourceAddr THEN
+ ' ' SHELL "umount -f /mnt" &/ sPartShort & " 2> /dev/null" WAIT
+ ' ' END IF
+ ' ' NEXT
+ ' '
@@ -83,7 +83,7 @@
END
PUBLIC SUB StartUp()
-
+ MdlAutoPartition.DISPLAY_PARTITIONS_WITH_FREE_SPACE(ME.HpnlChoices)
END
PUBLIC SUB OnExit()
Modified: branches/speedy/Step3a3.form
==============================================================================
--- branches/speedy/Step3a3.form (original)
+++ branches/speedy/Step3a3.form Mon Mar 2 14:27:59 2009
@@ -8,13 +8,21 @@
MoveScaled(0,0,60,5)
Expand = True
{ tlbanner TextLabel
- MoveScaled(12,0,19,3)
+ MoveScaled(12,0,45,3)
Expand = True
- Text = ("")
+ Text = ("Claim free space from existing partitions")
}
{ Separator1 Separator
MoveScaled(13,4,25,1)
Expand = True
}
+ }
+ { HBox1 HBox
+ MoveScaled(0,5,10,3)
+ Expand = True
+ }
+ { HpnlChoices HPanel
+ MoveScaled(0,8,72,25)
+ Expand = True
}
}
|