From: <cod...@go...> - 2008-08-07 20:33:50
|
Author: M0...@gm... Date: Thu Aug 7 13:33:24 2008 New Revision: 108 Modified: branches/iVL/MdlCore.module branches/iVL/MdlDiskPart.module Log: Squashed bug in gparted embedder Modified: branches/iVL/MdlCore.module ============================================================================== --- branches/iVL/MdlCore.module (original) +++ branches/iVL/MdlCore.module Thu Aug 7 13:33:24 2008 @@ -51,8 +51,11 @@ SHELL "mount -o loop " & ClsGlobal.sSourceMnt &/ sISO & Space(1) & "/mnt/loop" WAIT IF Exist("/mnt/loop/veclinux/SETUP.CONF") = TRUE THEN IF FrmSelISO.lstInstallableImg.Find(sISO & " on " & sDrive) = -1 THEN + File.Save(Temp(siso), File.Load("/mnt/loop/veclinux/SETUP.CONF")) + FrmSelISO.lstInstallableImg.Add(sISO & " on " & sDrive) + END IF END IF SHELL "umount /mnt/loop" WAIT Modified: branches/iVL/MdlDiskPart.module ============================================================================== --- branches/iVL/MdlDiskPart.module (original) +++ branches/iVL/MdlDiskPart.module Thu Aug 7 13:33:24 2008 @@ -25,61 +25,53 @@ DIM iHandle AS Integer DIM i AS Integer = 0 DIM sDump AS String + DIM sWins AS String = "GParted,/dev/sda - GParted,/dev/hda - GParted" + DIM sWons AS String[] = Split(sWins, ",") 'Desktop.Find("", "GParted") - IF Exist("/usr/bin/gparted") = FALSE THEN + 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 "/usr/bin/gparted" - WAIT 3 + SHELL "/usr/sbin/gparted" + WAIT - sTitle = "/dev/hda - GParted" - sTitle1 = "/dev/sda - GParted" - sTitle2 = "GParted" - 'aHandle = Desktop.Find(sTitle) - aHandle = Desktop.Find(sTitle) - ' ' ' IF aHandle = "" THEN - ' ' ' aHandle = Desktop.Find(sTitle1) - ' ' ' END IF - ' ' ' - ' ' ' IF Left(sTitle, 2) = "0x" THEN - ' ' ' iHandle = Val("&" & Mid$(sTitle, 3)) - ' ' ' ELSE IF Left(sTitle) = "&" THEN - ' ' ' iHandle = Val(sTitle) - ' ' ' ELSE - - 'Message.Info(aHandle[0]) - + i = 0 + aHandle = Desktop.Find(sWons[i]) IF aHandle.Count = 0 THEN - aHandle = Desktop.Find(sTitle1) + REPEAT + WAIT 2 + INC i + aHandle = Desktop.Find(sWons[i]) + UNTIL + aHandle.Count > 0 OR i = sWons.count - 1 END IF - IF aHandle.Count = 0 THEN - aHandle = Desktop.Find(sTitle2) ' gparted cannot find drives, but it loaded ;) - 'END IF + IF aHandle.Count = 0 THEN Message("Setup is unable to successfully run gparted on this system. This may be a sign of \n" & "a bad install media. Setup cannot continue.") RETURN - END IF + 'END IF ELSE IF aHandle.Count >= 2 THEN Message("Several windows found. I take the first one!") ENDIF + 'ELSE iHandle = aHandle[0] 'ENDIF 'TRY embEmbedder.Embed(iHandle) - IF iHandle <> "" + TRY FrmDiskPart.EmbGPARTED.Embed(iHandle) - IF ERROR THEN Message.Warning(Error.Text) - END IF + CATCH + Message.Error(Error.Text & gb.NewLine & Error.Where) + END PUBLIC FUNCTION FIND_DOS_PARTITIONS(sDev AS String) AS Boolean |