|
From: <cod...@go...> - 2008-08-26 15:09:55
|
Author: M0E.lnx
Date: Tue Aug 26 08:09:24 2008
New Revision: 145
Modified:
branches/iVL/.lang/FrmPartSel.pot
branches/iVL/.lang/MdlWinDrives.pot
branches/iVL/FrmPartSel.class
branches/iVL/MdlWinDrives.module
Log:
- Revisited the FAT/FAT32 partition detecting/listing module
Modified: branches/iVL/.lang/FrmPartSel.pot
==============================================================================
--- branches/iVL/.lang/FrmPartSel.pot (original)
+++ branches/iVL/.lang/FrmPartSel.pot Tue Aug 26 08:09:24 2008
@@ -14,19 +14,19 @@
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: FrmPartSel.class:172
+#: FrmPartSel.class:166
msgid "Please select the partitions you wish to use and how to use them"
msgstr ""
-#: FrmPartSel.class:181
+#: FrmPartSel.class:175
msgid "Check this box if you have a Windows installation on your system or
any other windows partition (FAT, FAT32, NTFS) that you want auto-mounted
as soon as your computer starts"
msgstr ""
-#: FrmPartSel.class:182
+#: FrmPartSel.class:176
msgid "Detect and Setup Windows partitions for auto-mounting at boot"
msgstr ""
-#: FrmPartSel.class:187
+#: FrmPartSel.class:181
msgid "Help"
msgstr ""
Modified: branches/iVL/.lang/MdlWinDrives.pot
==============================================================================
--- branches/iVL/.lang/MdlWinDrives.pot (original)
+++ branches/iVL/.lang/MdlWinDrives.pot Tue Aug 26 08:09:24 2008
@@ -1,4 +1,4 @@
-# /home/vluser/area-51/projects/installer/MdlWinDrives.module
+# /home/moe/area-51/projects/installer/MdlWinDrives.module
# Generated by Gambas compiler
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
Modified: branches/iVL/FrmPartSel.class
==============================================================================
--- branches/iVL/FrmPartSel.class (original)
+++ branches/iVL/FrmPartSel.class Tue Aug 26 08:09:24 2008
@@ -41,12 +41,6 @@
.scrollPartitions.Resize(.tlBanner.Width + 4
+ .btHelp.Width, .ClientHeight - .tlBanner.Height - (cbDoWin.Height * 3))
.cbDoWin.Move(.scrollPartitions.Left, .ClientHeight - .cbDoWin.Height -
8)
.btHelp.Move(.tlBanner.Left + .tlBanner.Width + 4, .tlBanner.top) '+
(.tlBanner.Height / 3))
-' .tlPartRow.Move(4, 4)
-' .tlPartRow2.Move(.tlPartRow.Left + (.tlPartRow.Width *
1.5), .tlPartRow.top)
-' .tlPartRow3.Move(.tlPartRow2.left + (.tlPartRow3.Width *
1.9), .tlPartRow.top)
- ' .tlPartRow.Move(4, 4)
- ' .tlPartRow3.Move(ME.scrollPartitions.Left + ME.scrollPartitions.Width
- (.tlPartRow3.Width * 2), .tlpartrow.top)
- ' .tlPartRow2.Move((.tlPartRow.Width + .tlPartRow3.Left) / 3,
tlpartrow.top)
END WITH
Modified: branches/iVL/MdlWinDrives.module
==============================================================================
--- branches/iVL/MdlWinDrives.module (original)
+++ branches/iVL/MdlWinDrives.module Tue Aug 26 08:09:24 2008
@@ -24,23 +24,116 @@
DIM cb AS ComboBox
DIM y AS Integer
DIM x AS Integer
-DIM i AS Integer
-DIM sDump1 AS String
+DIM i, ii AS Integer
+DIM sDump1, sDump2 AS String
DIM sPartList AS String[]
DIM sPart AS String
DIM sSize AS String
DIM lbwidth AS Integer
DIM cbx AS Integer = FrmPartSel.scrollPartitions.Width / 2
+DIM sDisks, sResults, sLine AS String[]
+DIM sPartNo, sBlank, sPartaddr, sPartSize, sPartType, sTempLine AS String
+DIM tlwidth AS Integer
x = 4
y = 8
+ME.oWMntPoints = NEW Object[]
' now, do the WIN partitions
' MOVE THESE PARTITIONS TO A DIFFERENT WINDOW.
' THESE ARE ONLY NEEDED FOR FSTAB
+
+ SHELL "probepart | grep -i fat | cut -f 1 -d \' \'" TO sDump1
+ IF sDump1 <> "" THEN
+ sDump1 = Trim(sDump1)
+ 'y = y + tl.Height * 2 + 4
+ ' create a new text label just to label the separation between
windows and linux partitions
+ tl = NEW TextLabel(FrmWinDrives.svWinDrives) AS "Separator"
+ WITH tl
+ .Text = "<b>Windows Partitions Detected</b>"
+ .Height = 27
+ .Width = MdlObjSizer.get_object_width(.Text)
+ .x = FrmWinDrives.svWinDrives.Width / 2 - (.Width / 2)
+ .y = y
+ cbx = .x + .Width - (.Width / 2)
+
+
+ END WITH
+
+ y = y + tl.Height + 8
+
+ tl = NEW TextLabel(FrmWinDrives.svWinDrives) AS "Headers"
+ WITH tl
+ .x = x
+ .y = y
+ .text = "<B>PARTITION</B>"
+ .Width = MdlObjSizer.get_object_width(.Text) * 1.5
+ .Height = 27
+ END WITH
+ cbx = x + (tl.Width) * 2
+ tlwidth = tl.Width
+ tl = NEW TextLabel(FrmWinDrives.svWinDrives) AS "Headers"
+ WITH tl
+ .x = cbx
+ .y = y
+ .text = "<b>MOUNT TO </B>"
+ .Width = MdlObjSizer.get_object_width(.Text) * 1.5
+ .Height = 27
+ END WITH
+ y = y + tl.Height + 8
+ 'END IF
+ ' Begin listing individual partitions
+ sDisks = Split(sDump1, "\n")
+ 'Message(sDump1)
+ FOR i = 0 TO sDisks.count - 1
+ sPartNo = Right(sDisks[i], Len(sDisks[i]) - Len("/dev/hda"))
+ IF Len(sPartNo) > 1 THEN
+ sBlank = ""
+ ELSE
+ sBlank = " "
+ END IF
+ SHELL "export s=$(parted " & Left(sDisks[i], Len("/dev/hda"))
& " print | grep ^\'" & sBlank & sPartNo & "\'); echo $s | cut -f 4 -d \'
\'" TO sPartsize
+ tl = NEW TextLabel(FrmWinDrives.svWinDrives)
+ WITH tl
+ .y = y
+ .x = x
+ .text = sDisks[i] & " [ " & sPartsize & " ]"
+ .Width = 200
+ .Height = 21
+ .tag = sDisks[i]
+ .Alignment = Align.Normal
+ END WITH
+ cb = NEW ComboBox(FrmWinDrives.svWinDrives)
+ WITH cb
+ .x = cbx
+ .y = tl.top
+ .Width = tl.Width * 0.75
+ .Height = 21
+ .tag = sDisks[i]
+ .Add("/mnt" &/ Right(.tag, Len(.tag) -
RInStr(.tag, "/")))
+ .Add("Do not mount")
+
+ '.ReadOnly = TRUE
+ END WITH
+ ME.oWMntPoints.Add(cb)
+
+
+
+ y = y + tl.Height + 4
+ NEXT
+ ' now do ntfs partitions the same way
+
+
+
+ END IF
+ RETURN
+
+
+
+
sDump1 = ""
- SHELL "PATH=$PATH:/sbin && probepart | grep -e \'/dev\' | grep -v \'
Ext\' | grep -v \'raid autodetect\' | grep -v \' Linux\' | cut -f 1 -d \'
\' | sed -r \'s/Disk//g\'" TO sdump1
+ SHELL "probepart | grep -e \'/dev\' | grep -v \' Ext\' | grep -v
\'raid autodetect\' | grep -v \' Linux\' | cut -f 1 -d \' \' | sed -r
\'s/Disk//g\'" TO sdump1
File.Save(Temp("all"), Trim(sDump1))
vObj = NEW Object[]
|