From: <cod...@go...> - 2008-07-16 03:06:28
|
Author: M0E.lnx Date: Tue Jul 15 20:05:37 2008 New Revision: 43 Modified: branches/iVL/.lang/#project.pot branches/iVL/.lang/FMain.pot branches/iVL/.lang/FrmDiskPart.pot branches/iVL/.lang/FrmLicense.pot branches/iVL/.lang/FrmPartScheme.pot branches/iVL/.lang/FrmPartSel.pot branches/iVL/.lang/FrmSelISO.pot branches/iVL/.lang/MdlCore.pot branches/iVL/.lang/MdlDiskPart.pot branches/iVL/.lang/MdlPartSel.pot branches/iVL/FMain.class branches/iVL/MdlCore.module branches/iVL/MdlDiskPart.module branches/iVL/MdlPartSel.module branches/iVL/MdlWinDrives.module Log: Corrected problem for systems with only one cdrom device. This was a left-over from a previous revision. improved partition selection algorithm, and modified win partition detection (this still needs work) Modified: branches/iVL/.lang/#project.pot ============================================================================== --- branches/iVL/.lang/#project.pot (original) +++ branches/iVL/.lang/#project.pot Tue Jul 15 20:05:37 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/projects/installer/.project +# /home/vluser/area-51/projects/new-inst/.project # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FMain.pot ============================================================================== --- branches/iVL/.lang/FMain.pot (original) +++ branches/iVL/.lang/FMain.pot Tue Jul 15 20:05:37 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/projects/installer/FMain.class +# /home/vluser/area-51/projects/new-inst/FMain.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FrmDiskPart.pot ============================================================================== --- branches/iVL/.lang/FrmDiskPart.pot (original) +++ branches/iVL/.lang/FrmDiskPart.pot Tue Jul 15 20:05:37 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/projects/installer/FrmDiskPart.class +# /home/vluser/area-51/projects/new-inst/FrmDiskPart.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FrmLicense.pot ============================================================================== --- branches/iVL/.lang/FrmLicense.pot (original) +++ branches/iVL/.lang/FrmLicense.pot Tue Jul 15 20:05:37 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/projects/installer/FrmLicense.class +# /home/vluser/area-51/projects/new-inst/FrmLicense.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FrmPartScheme.pot ============================================================================== --- branches/iVL/.lang/FrmPartScheme.pot (original) +++ branches/iVL/.lang/FrmPartScheme.pot Tue Jul 15 20:05:37 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/projects/installer/FrmPartScheme.class +# /home/vluser/area-51/projects/new-inst/FrmPartScheme.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FrmPartSel.pot ============================================================================== --- branches/iVL/.lang/FrmPartSel.pot (original) +++ branches/iVL/.lang/FrmPartSel.pot Tue Jul 15 20:05:37 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/projects/installer/FrmPartSel.class +# /home/vluser/area-51/projects/new-inst/FrmPartSel.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FrmSelISO.pot ============================================================================== --- branches/iVL/.lang/FrmSelISO.pot (original) +++ branches/iVL/.lang/FrmSelISO.pot Tue Jul 15 20:05:37 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/projects/installer/FrmSelISO.class +# /home/vluser/area-51/projects/new-inst/FrmSelISO.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlCore.pot ============================================================================== --- branches/iVL/.lang/MdlCore.pot (original) +++ branches/iVL/.lang/MdlCore.pot Tue Jul 15 20:05:37 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/projects/installer/MdlCore.module +# /home/vluser/area-51/projects/new-inst/MdlCore.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlDiskPart.pot ============================================================================== --- branches/iVL/.lang/MdlDiskPart.pot (original) +++ branches/iVL/.lang/MdlDiskPart.pot Tue Jul 15 20:05:37 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/projects/installer/MdlDiskPart.module +# /home/vluser/area-51/projects/new-inst/MdlDiskPart.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlPartSel.pot ============================================================================== --- branches/iVL/.lang/MdlPartSel.pot (original) +++ branches/iVL/.lang/MdlPartSel.pot Tue Jul 15 20:05:37 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/projects/installer/MdlPartSel.module +# /home/vluser/area-51/projects/new-inst/MdlPartSel.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/FMain.class ============================================================================== --- branches/iVL/FMain.class (original) +++ branches/iVL/FMain.class Tue Jul 15 20:05:37 2008 @@ -62,7 +62,7 @@ WITH ME .tlBanner.width = ME.width .Frame1.Move(.tlBanner.left + 4, .tlBanner.Top + .tlBanner.Height + 4, .tlBanner.Width - ((.tlBanner.Width / 10) * 7), .Height - (.tlbanner.height + (.tlbanner.height / 2))) - .tvPlan.Resize(.Frame1.Width - 20, .Frame1.Height - 30) + .tvPlan.Resize(.Frame1.Width - 20, .Frame1.Height - 36) .pnlWinHost.Move(.Frame1.left + .Frame1.Width + 4, .Frame1.top, .tlBanner.Width - (.Frame1.Width + 8), .Frame1.Height) .btback.Move(.pnlWinHost.Left, .pnlWinHost.Top + .pnlWinHost.Height - (.btback.Height), MdlObjSizer.get_object_width(.btback.text) + 36) .btnext.Move(.pnlWinHost.Left + .pnlWinHost.Width - (.btnext.Width + 4), .btback.Top, MdlObjSizer.get_object_width(.btnext.text) + 36) Modified: branches/iVL/MdlCore.module ============================================================================== --- branches/iVL/MdlCore.module (original) +++ branches/iVL/MdlCore.module Tue Jul 15 20:05:37 2008 @@ -111,7 +111,7 @@ ClsGlobal.sSourceMnt = User.home &/ "mnt" &/ "cdrom" sMountPoint = ClsGlobal.sSourceMnt - sCmd = "cat /proc/sys/dev/cdrom/info | grep \"drive name\" |cut -f2 -d\':\'|xargs -n 2" + sCmd = "sudo cat /proc/sys/dev/cdrom/info | grep \"drive name\" |cut -f 2 -d\':\'|xargs -n 2" SHELL sCmd TO sList sList = Trim(sList) 'PRINT sList @@ -143,6 +143,28 @@ NEXT ELSE ' only one drive found + sDrive = Trim(sList) + SHELL "sudo mount /dev/" & sDrive & Space(1) & sMountPoint WAIT + IF Exist(sMountPoint &/ "veclinux" &/ "SETUP.CONF") = TRUE THEN + sDump = ME.ID_DISTRO(sMountPoint &/ "veclinux" &/ "SETUP.CONF") + 'save a copy of SETUP.CONF in a temp disposable file + ' this temp file will be named as the last characters of the drive that contains the distro (ie, hda, sg0, sda) + ' this information will be used FOR reading the file later + + File.Save(Temp$(sDrive), DConv(File.Load(sMountPoint &/ "veclinux" &/ "SETUP.CONF"))) + 'Message.Info(File.Load(Temp$(sDrive))) + + IF FrmSelISO.lstInstallableImg.Find(sDump & " on " & "/dev/" & sDrive) = -1 THEN 'only add the entry if not found + FrmSelISO.lstInstallableImg.Add(sDump & " on " & "/dev/" & sDrive) + END IF + + + END IF + SHELL "sudo umount /dev/" & sDrive WAIT + + + + END IF Modified: branches/iVL/MdlDiskPart.module ============================================================================== --- branches/iVL/MdlDiskPart.module (original) +++ branches/iVL/MdlDiskPart.module Tue Jul 15 20:05:37 2008 @@ -23,8 +23,15 @@ DIM aHandle AS NEW Pointer[] DIM iHandle AS Integer DIM i AS Integer = 0 - + DIM sDump AS String 'Desktop.Find("", "GParted") + + + IF Exist("/usr/sbin/gparted") = FALSE THEN + Message.Error("Gparted was not found on this system. Please install gparted and try again") + RETURN + END IF + FrmDiskPart.tlBanner.Text = "<h3>Loading gparted .... Please wait</h3>" SHELL "sudo /usr/sbin/gparted" WAIT 3 Modified: branches/iVL/MdlPartSel.module ============================================================================== --- branches/iVL/MdlPartSel.module (original) +++ branches/iVL/MdlPartSel.module Tue Jul 15 20:05:37 2008 @@ -202,7 +202,23 @@ END IF STOP EVENT NEXT - + + ' set the variable to the global class + SELECT CASE LCase(LAST.text) + CASE "/" + ClsPartSel.sRoot = LCase(LAST.tag) + CASE "/home" + ClsPartSel.sHome = LCase(LAST.tag) + CASE "/usr" + ClsPartSel.sUsr = LCase(LAST.tag) + CASE "/opt" + ClsPartSel.sOpt = LCase(LAST.tag) + CASE "/tmp" + ClsPartSel.sTmp = LCase(LAST.tag) + CASE "/var" + ClsPartSel.sVar = LCase(LAST.tag) + END SELECT + IF sText = "Not Used" THEN Modified: branches/iVL/MdlWinDrives.module ============================================================================== --- branches/iVL/MdlWinDrives.module (original) +++ branches/iVL/MdlWinDrives.module Tue Jul 15 20:05:37 2008 @@ -30,8 +30,8 @@ DIM sSize AS String DIM lbwidth AS Integer -x = FrmWinDrives.svWinDrives.Left + 4 -y = FrmWinDrives.svWinDrives.Top + 8 +x = 4 +y = 8 ' now, do the WIN partitions @@ -39,9 +39,9 @@ ' THESE ARE ONLY NEEDED FOR FSTAB sDump1 = "" 'FIX THIS COMMAND.... MAY NOT WORK OR NEED MORE ACCURATE DETECTION - SHELL "export PATH=$PATH:/sbin && sudo probepart | grep -e \" *FAT32$\" | cut -f 1 -d \' \'" TO sDump1 + SHELL "export PATH=$PATH:/sbin && sudo probepart | grep -e \" *FAT32\" | cut -f 1 -d \' \'" TO sDump1 File.Save(Temp("fat32"), Trim(sDump1)) - sDump1 = "" + sDump1 = "" SHELL "export PATH=$PATH:/sbin && sudo probepart | grep -e \" *FAT$\" | cut -f 1 -d \' \'" TO sDump1 File.Save(Temp("fat"), Trim(sDump1)) sDump1 = "" @@ -53,6 +53,7 @@ File.Load(Temp("ntfs")) & gb.NewLine sDump1 = Trim(sDump1) + 'Message.Info(sDump1) IF sDump1 <> "" THEN sDump1 = Trim(sDump1) @@ -60,10 +61,10 @@ ' 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</b>" + .Text = "<b>Windows Partitions Detected</b>" .Height = 27 .Width = MdlObjSizer.get_object_width(.Text) - .x = x + .x = FrmWinDrives.svWinDrives.Width / 2 - (.Width / 2) .y = y END WITH @@ -119,18 +120,21 @@ ELSE ' only one win partition found sPart = Right(sDump1, Len(sDump1) - RInStr(sDump1, "/")) - SHELL "sudo mkdir /mnt" &/ spart & " && sudo mount " & Trim(sDump1) & Space(1) & "/mnt" &/ sPart WAIT + 'Message(sPart) + SHELL "sudo mkdir -p /mnt" &/ spart & " && sudo mount " & Trim(sDump1) & Space(1) & "/mnt" &/ sPart WAIT SHELL "export " & sPart & "=$(df -h | grep " & sPart & ") && echo $" & sPart & " | cut -f 2 -d \' \'" TO sSize + sSize = Trim(sSize) + 'Message(sSize) - 'y = y + tl.Height + 4 + y = y + tl.Height + 4 tl = NEW TextLabel(FrmWinDrives.svWinDrives) AS "WinPartitions" WITH tl - .Width = lbwidth .Text = sDump1 & " ( " & sSize & " )" .tag = sDump1 .Height = 27 + .Width = MdlObjSizer.get_object_width(.Text) * 1.5 .x = FrmPartSel.tlPartRow.Left .y = y |