From: <cod...@go...> - 2008-07-18 06:36:10
|
Author: M0...@gm... Date: Thu Jul 17 23:34:49 2008 New Revision: 50 Modified: branches/iVL/.lang/#project.pot branches/iVL/.lang/ClsGlobal.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/MdlObjSizer.pot branches/iVL/.lang/MdlPartSel.pot branches/iVL/.lang/MdlSetup.pot branches/iVL/.project branches/iVL/FrmPartScheme.class branches/iVL/FrmPartSel.class branches/iVL/FrmSelISO.class branches/iVL/FrmWinDrives.class branches/iVL/FrmWinDrives.form branches/iVL/MdlCore.module branches/iVL/MdlDiskPart.module branches/iVL/MdlPartSel.module branches/iVL/MdlSetup.module branches/iVL/MdlWinDrives.module branches/iVL/installer.gambas Log: Re-arranged position and sizing of virtual objects Made some adjustments to make sure the objects look ok on the real installer Modified: branches/iVL/.lang/#project.pot ============================================================================== --- branches/iVL/.lang/#project.pot (original) +++ branches/iVL/.lang/#project.pot Thu Jul 17 23:34:49 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/installer/.project +# /home/vluser/area-51/projects/installer/.project # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/ClsGlobal.pot ============================================================================== --- branches/iVL/.lang/ClsGlobal.pot (original) +++ branches/iVL/.lang/ClsGlobal.pot Thu Jul 17 23:34:49 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/installer/ClsGlobal.class +# /home/vluser/area-51/projects/installer/ClsGlobal.class # 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 Thu Jul 17 23:34:49 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/installer/FMain.class +# /home/vluser/area-51/projects/installer/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 Thu Jul 17 23:34:49 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/installer/FrmDiskPart.class +# /home/vluser/area-51/projects/installer/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 Thu Jul 17 23:34:49 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/installer/FrmLicense.class +# /home/vluser/area-51/projects/installer/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 Thu Jul 17 23:34:49 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/installer/FrmPartScheme.class +# /home/vluser/area-51/projects/installer/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 Thu Jul 17 23:34:49 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/installer/FrmPartSel.class +# /home/vluser/area-51/projects/installer/FrmPartSel.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" -#: FrmPartSel.class:140 +#: FrmPartSel.class:143 msgid "Define where the operating system will be installed\n<br>\nLinux is a modular operating system. This means that it has the ability to keep system and user data separately.<br> A recommended setup would included a / (root), a /home, and a swap partitions.\n<br>\nPlease select which partitions you would like to use for your install" msgstr "" -#: FrmPartSel.class:148 +#: FrmPartSel.class:151 msgid "<b>Partition</b>" msgstr "" -#: FrmPartSel.class:154 +#: FrmPartSel.class:157 msgid "<b>Mount Point</b>" msgstr "" -#: FrmPartSel.class:160 +#: FrmPartSel.class:163 msgid "<b>File System</b>" msgstr "" -#: FrmPartSel.class:167 +#: FrmPartSel.class:170 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:168 +#: FrmPartSel.class:171 msgid "Detect and Setup Windows partitions for auto-mounting at boot" msgstr "" Modified: branches/iVL/.lang/FrmSelISO.pot ============================================================================== --- branches/iVL/.lang/FrmSelISO.pot (original) +++ branches/iVL/.lang/FrmSelISO.pot Thu Jul 17 23:34:49 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/installer/FrmSelISO.class +# /home/vluser/area-51/projects/installer/FrmSelISO.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" -#: FrmSelISO.class:211 +#: FrmSelISO.class:215 msgid "No installable images found." msgstr "" -#: FrmSelISO.class:217 +#: FrmSelISO.class:221 msgid "Select which distribution to install from the list below" msgstr "" -#: FrmSelISO.class:222 +#: FrmSelISO.class:226 msgid "TextLabel1" msgstr "" -#: FrmSelISO.class:227 +#: FrmSelISO.class:231 msgid "Search Again" msgstr "" Modified: branches/iVL/.lang/MdlCore.pot ============================================================================== --- branches/iVL/.lang/MdlCore.pot (original) +++ branches/iVL/.lang/MdlCore.pot Thu Jul 17 23:34:49 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/installer/MdlCore.module +# /home/vluser/area-51/projects/installer/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 Thu Jul 17 23:34:49 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/installer/MdlDiskPart.module +# /home/vluser/area-51/projects/installer/MdlDiskPart.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlObjSizer.pot ============================================================================== --- branches/iVL/.lang/MdlObjSizer.pot (original) +++ branches/iVL/.lang/MdlObjSizer.pot Thu Jul 17 23:34:49 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/installer/MdlObjSizer.module +# /home/vluser/area-51/projects/installer/MdlObjSizer.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 Thu Jul 17 23:34:49 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/installer/MdlPartSel.module +# /home/vluser/area-51/projects/installer/MdlPartSel.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlSetup.pot ============================================================================== --- branches/iVL/.lang/MdlSetup.pot (original) +++ branches/iVL/.lang/MdlSetup.pot Thu Jul 17 23:34:49 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/installer/MdlSetup.module +# /home/vluser/area-51/projects/installer/MdlSetup.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.project ============================================================================== --- branches/iVL/.project (original) +++ branches/iVL/.project Thu Jul 17 23:34:49 2008 @@ -1,7 +1,7 @@ # Gambas Project File 2.0 Title=VectorLinux Installer Startup=MdlCore -Version=0.0.7 +Version=0.0.2 Library=gb.gtk Library=gb.form Library=gb.desktop Modified: branches/iVL/FrmPartScheme.class ============================================================================== --- branches/iVL/FrmPartScheme.class (original) +++ branches/iVL/FrmPartScheme.class Thu Jul 17 23:34:49 2008 @@ -41,7 +41,7 @@ .rbEditPartitions.Width = MdlObjSizer.get_object_width(.rbEditPartitions.Text) + 24 .rbUseExisting.Width = MdlObjSizer.get_object_width(.rbUseExisting.Text) + 24 END WITH - ME.rbEditPartitions.Value = TRUE +ME.rbUseExisting_Click() END Modified: branches/iVL/FrmPartSel.class ============================================================================== --- branches/iVL/FrmPartSel.class (original) +++ branches/iVL/FrmPartSel.class Thu Jul 17 23:34:49 2008 @@ -33,12 +33,15 @@ PUBLIC SUB Form_Resize() - + DIM cb AS ComboBox + DIM iWidth AS Integer = 0 WITH ME .tlBanner.Width = .ClientWidth - 16 - .scrollPartitions.Width = .tlBanner.Width - .scrollPartitions.Height = .ClientHeight - (.tlBanner.Height + .cbDoWin.Height + 32) - .cbDoWin.Move(.scrollPartitions.Left, .ClientHeight - .cbDoWin.Height - 8) + .scrollPartitions.Resize(.ClientWidth - 12, .ClientHeight - .tlBanner.Height - (cbDoWin.Height * 2)) + .cbDoWin.Move(.scrollPartitions.Left, .ClientHeight - .cbDoWin.Height - 8) + .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 @@ -49,7 +52,7 @@ FMain.FrmCurr = ME - + ME.Resize(ME.Parent.Width, ME.Parent.Height - (ME.cbDoWin.height * 3)) ME.tlBanner.Adjust ME.cbDoWin.Width = MdlObjSizer.get_object_width(cbDoWin.text) + 24 MdlPartSel.DISPLAY_PARTITION_OPTIONS Modified: branches/iVL/FrmSelISO.class ============================================================================== --- branches/iVL/FrmSelISO.class (original) +++ branches/iVL/FrmSelISO.class Thu Jul 17 23:34:49 2008 @@ -47,6 +47,10 @@ ME.Width = ME.Parent.Width ME.Height = ME.Parent.Height + ME.btResCan.Height = ME.lstInstallableImg.Height + FMain.btback.Height = ME.btResCan.Height + FMain.btQuit.Height = FMain.btback.Height + FMain.btnext.Height = FMain.btback.Height FMain.sNextKey = "Prep0" FMain.FrmCurr = ME FMain.frmNext = FrmPartScheme Modified: branches/iVL/FrmWinDrives.class ============================================================================== --- branches/iVL/FrmWinDrives.class (original) +++ branches/iVL/FrmWinDrives.class Thu Jul 17 23:34:49 2008 @@ -18,6 +18,26 @@ PUBLIC SUB Form_Open() +ME.Resize(ME.ClientWidth - 12, ME.ClientH - 12) MdlWinDrives.LIST_WIN_PARTITIONS + 'ME.Resize(ME.Parent.Width - 12, ME.Parent.Height - 12) + + +END + +PUBLIC SUB Form_Resize() + + WITH ME + .tlBanner.Width = .ClientW - 4 + '.svWinDrives.Resize(.ClientWidth - 4, .ClientHeight - (.tlBanner.Width * 1.5)) + .svWinDrives.Move(.tlBanner.Left, .tlBanner.top + (.tlBanner.Height + 4), .tlBanner.Width - 8, .ClientH - (.tlbanner.height * 2)) + + END WITH + +END + +PUBLIC SUB VPanel1_MouseDown() + + END Modified: branches/iVL/FrmWinDrives.form ============================================================================== --- branches/iVL/FrmWinDrives.form (original) +++ branches/iVL/FrmWinDrives.form Thu Jul 17 23:34:49 2008 @@ -3,11 +3,12 @@ { Form Form MoveScaled(0,0,67,56) Text = ("") + { svWinDrives ScrollView + MoveScaled(1,8,64,43) + Expand = True + } { tlBanner TextLabel MoveScaled(1,2,65,5) Text = ("Select the windows partitions you would like to mount during boot") - } - { svWinDrives ScrollView - MoveScaled(1,8,64,39) } } Modified: branches/iVL/MdlCore.module ============================================================================== --- branches/iVL/MdlCore.module (original) +++ branches/iVL/MdlCore.module Thu Jul 17 23:34:49 2008 @@ -61,7 +61,7 @@ SHELL "mount -o loop " & ClsGlobal.sSourceMnt &/ sResults & Space(1) & " /mnt/loop" WAIT File.Save(Temp(sResults), File.Load("/mnt/loop/veclinux/SETUP.CONF")) 'Message(File.Load(Temp(sResults))) - SHELL "umount /mnt/loop && umount " & ClsGlobal.sSourceMnt WAIT + SHELL "umount /mnt/loop && umount " & ClsGlobal.sSourceMnt WAIT IF FrmSelISO.lstInstallableImg.Find(sResults & " on " & sDrive) = -1 THEN FrmSelISO.lstInstallableImg.Add(sResults & " on " & sDrive) END IF @@ -86,7 +86,7 @@ DIM sPartition AS String 'SHELL "sudo /sbin/probepart | grep -e \"*Linux$\" | cut -f 1 -d \' \'" TO sResults - SHELL "export PATH=$PATH:/sbin && /sbin/probepart | grep -e \" *Linux$\" | cut -f 1 -d \' \'" TO sResults + SHELL " /sbin/probepart | grep -e \" *Linux$\" | cut -f 1 -d \' \'" TO sResults sResults = Trim(sResults) 'Message.Info(sResults) IF InStr(sResults, gb.NewLine) THEN @@ -118,23 +118,22 @@ - ClsGlobal.sSourceMnt = "/mnt/cdrom" + ClsGlobal.sSourceMnt = "/mnt" &/ "cdrom" sMountPoint = ClsGlobal.sSourceMnt - sCmd = " cat /proc/sys/dev/cdrom/info | grep \"drive name\" |cut -f 2 -d\':\'|xargs -n 2 | sed -r \'s/ /\\n/g\'" + sCmd = "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 - 'IF InStr(sList, Space(1)) > 0 THEN 'there is more than one drive - IF InStr(sList, gb.newline) THEN ' More than one cd drive found - sDrives = Split(sList, gb.NewLine) + IF InStr(sList, Space(1)) > 0 THEN 'there is more than one drive + sDrives = Split(sList, Space(1)) FOR i = 0 TO sDrives.count - 1 ' this is where we loop to find SETUP.CONF in the cd 'first, clear the mount point (using $HOME/mnt/cdrom for now) sDrive = Trim(sDrives[i]) - SHELL " mount /dev/" & sDrive & Space(1) & sMountPoint WAIT + SHELL "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 @@ -150,12 +149,12 @@ END IF - SHELL " umount /dev/" & sDrive WAIT + SHELL "umount /dev/" & sDrive WAIT NEXT ELSE ' only one drive found sDrive = Trim(sList) - SHELL " mount /dev/" & sDrive & Space(1) & sMountPoint WAIT + SHELL "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 @@ -171,10 +170,7 @@ END IF - 'sHELL "sudo umount /dev/" & sDrive WAIT - SHELL " umount " & ClsGlobal.sSourceMnt WAIT - CATCH - Message( ERROR ) + SHELL "umount /dev/" & clsglobal.sSourceMnt WAIT @@ -430,7 +426,7 @@ ClsGlobal.iSwapMin = CInt(iswap) ELSE 'i can't see the file - Message.Error("Cannot find SETUP.CONF in" & sFilePath) + Message.Error("Cannot find SETUP.CONF") END IF END Modified: branches/iVL/MdlDiskPart.module ============================================================================== --- branches/iVL/MdlDiskPart.module (original) +++ branches/iVL/MdlDiskPart.module Thu Jul 17 23:34:49 2008 @@ -33,7 +33,7 @@ END IF FrmDiskPart.tlBanner.Text = "<h3>Loading gparted .... Please wait</h3>" - SHELL " /usr/sbin/gparted" + SHELL "/usr/bin/gparted" WAIT 3 sTitle = "GParted" @@ -51,10 +51,9 @@ aHandle = Desktop.Find(sTitle) INC i UNTIL - aHandle.Count > 0 OR i = 10 - 'i = 10 OR aHandle.Count > 0 + i = 10 OR aHandle.Count > 0 IF aHandle.Count = 0 THEN - Message("Setup is unable to successfully run gparted on this system. This may be a sign of \n" & + Message("Setup is unable to successfully run gslapt on this system. This may be a sign of \n" & "a bad install media. Setup cannot continue.") RETURN END IF @@ -68,9 +67,8 @@ 'TRY embEmbedder.Embed(iHandle) TRY FrmDiskPart.EmbGPARTED.Embed(iHandle) - CATCH - Message.Error(Error.text) - 'IF ERROR THEN Message.Warning(Error.Text) + + IF ERROR THEN Message.Warning(Error.Text) END Modified: branches/iVL/MdlPartSel.module ============================================================================== --- branches/iVL/MdlPartSel.module (original) +++ branches/iVL/MdlPartSel.module Thu Jul 17 23:34:49 2008 @@ -35,14 +35,14 @@ DIM iswapsize AS Float DIM i3drdrowX AS Integer DIM iX AS Integer - + DIM iWidth AS Integer ' fire up the arrays oFsTypes = NEW Object[] oMountPoints = NEW Object[] ' We will mount the partitions first, and then figure out their size - SHELL "export PATH=$PATH:/sbin && probepart | grep -e \" Linux$\" | cut -f 1 -d \' \'" TO sDump1 + SHELL " probepart | grep -e \" Linux$\" | cut -f 1 -d \' \'" TO sDump1 sDump1 = Trim(sDump1) @@ -56,10 +56,10 @@ 'make sure the mount point exists IF IsDir("/mnt" &/ sPart) = FALSE THEN - SHELL " mkdir /mnt" &/ sPart WAIT + SHELL "mkdir /mnt" &/ sPart WAIT END IF ' Now mount the partition - SHELL " mount " & Trim(sPartList[i]) & Space(1) & "/mnt" &/ sPart WAIT + SHELL "mount " & Trim(sPartList[i]) & Space(1) & "/mnt" &/ sPart WAIT ' get the size using df -h | grep sPart and some sed ' will embed some bash, but should probabbly be fixed SHELL "export " & sPart & "=$(df -h | grep " & sPart & ") && echo $" & sPart & " | cut -f 2 -d \' \'" TO sSize @@ -125,7 +125,7 @@ ' now umount the partition and delete the mount point - SHELL " umount /mnt" &/ sPart & " && rm -r /mnt" &/ sPart WAIT + SHELL "umount /mnt" &/ sPart & " && rm -r /mnt" &/ sPart WAIT ' increase the value of y for the next label y = y + tl.Height + 4 @@ -139,7 +139,7 @@ END IF - SHELL "export PATH=$PATH:/sbin && probepart | grep -i \" *swap$\" | cut -f 1 -d \' \'" TO sSwapList + SHELL " probepart | grep -i \" *swap$\" | cut -f 1 -d \' \'" TO sSwapList sSwapList = Trim(sSwapList) 'Message.Info(sSwapList) IF InStr(sSwapList, gb.NewLine) THEN @@ -148,8 +148,7 @@ ELSE spart = Trim(sSwapList) 'SHELL "export " & sSwapList & "=$(df -h | grep -i swap) | cut -f 2 -d \' \'" TO vSwapSize - 'SHELL "export PATH=$PATH:/sbin && export sw=$(sudo probepart | grep -i \" *swap$\") && echo $sw | cut -f 4 -d \' \'" TO vSwapSize - SHELL "export PATH=$PATH:/sbin && export sw=$( probepart | grep -i \" *swap$\") && echo $sw | cut -f 4 -d \' \'| sed -e \'s/\\([[:digit:]]\\)+/\\1/\'" TO vSwapSize + SHELL " export sw=$(probepart | grep -i \" *swap$\") && echo $sw | cut -f 4 -d \' \'" TO vSwapSize iswapsize = CInt(vSwapSize) iswapsize = Round(iswapsize / 1024 / 1024, -2) @@ -185,6 +184,21 @@ 'Message.Info("Swap total = " & iswapsize) END IF + + FOR EACH cb IN MdlPartSel.oMountPoints + IF cb.width > iWidth THEN + iWidth = cb.Width + END IF + NEXT + FOR EACH cb IN MdlPartSel.oMountPoints + cb.Width = iWidth + NEXT + FOR EACH cb IN MdlPartSel.oFsTypes + cb.Width = iWidth + NEXT + + + END Modified: branches/iVL/MdlSetup.module ============================================================================== --- branches/iVL/MdlSetup.module (original) +++ branches/iVL/MdlSetup.module Thu Jul 17 23:34:49 2008 @@ -22,16 +22,15 @@ DIM sAddy AS String = Right(sDev, Len(sDev) - RInStr(sDev, "/")) - 'message.info(sDev) IF sISONAME OR sISONAME <> "" THEN 'SHELL "sudo mount " & sDev & " /mnt/loop" WAIT ' will switch places here .. the device will mount to loop and the iso will mount to the mount point - SHELL " mkdir -p /mnt" &/ sAddy & " && mount " & sDev & Space(1) & "/mnt" &/ sAddy WAIT - SHELL " mount -o loop /mnt" &/ sAddy &/ sISONAME & Space(1) & ClsGlobal.sSourceMnt WAIT + SHELL "mkdir -p /mnt" &/ sAddy & " && mount " & sDev & Space(1) & "/mnt" &/ sAddy WAIT + SHELL "mount -o loop /mnt" &/ sAddy &/ sISONAME & Space(1) & ClsGlobal.sSourceMnt WAIT 'SHELL "sudo umount /mnt/loop" WAIT ELSE - - SHELL " mount -t iso9660 " & sDev & Space(1) & ClsGlobal.sSourceMnt WAIT + + SHELL "mount " & sDev & Space(1) & ClsGlobal.sSourceMnt & " 2>/root/err" & " >/root/log" WAIT END IF ' display the license agreement text @@ -54,8 +53,8 @@ DIM sFATList AS String DIM sFAT32List AS String - SHELL " probepart | grep -e \"^/dev.*FAT32$\" | sed \'s/\\*/ /\'" TO sFAT32List - SHELL " probepart | grep -e \"^/dev.*FAT$\" | sed \'s/\\*/ /\'" TO sFATList + SHELL "probepart | grep -e \"^/dev.*FAT32$\" | sed \'s/\\*/ /\'" TO sFAT32List + SHELL "probepart | grep -e \"^/dev.*FAT$\" | sed \'s/\\*/ /\'" TO sFATList sFAT32List = Trim(sFAT32List) sFATList = Trim(sFATList) Modified: branches/iVL/MdlWinDrives.module ============================================================================== --- branches/iVL/MdlWinDrives.module (original) +++ branches/iVL/MdlWinDrives.module Thu Jul 17 23:34:49 2008 @@ -18,6 +18,7 @@ PUBLIC vObj AS Object[] +PUBLIC oWMntPoints AS Object[] PUBLIC SUB LIST_WIN_PARTITIONS() DIM tl AS TextLabel DIM cb AS ComboBox @@ -29,6 +30,7 @@ DIM sPart AS String DIM sSize AS String DIM lbwidth AS Integer +DIM cbx AS Integer = FrmPartSel.scrollPartitions.Width / 2 x = 4 y = 8 @@ -38,7 +40,7 @@ ' MOVE THESE PARTITIONS TO A DIFFERENT WINDOW. ' THESE ARE ONLY NEEDED FOR FSTAB 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 "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 File.Save(Temp("all"), Trim(sDump1)) vObj = NEW Object[] @@ -55,9 +57,12 @@ .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 * 2 + 'END IF IF InStr(sDump1, gb.NewLine) THEN ' more than one partition found sPartList = Split(sDump1, gb.NewLine) ' multiple partitions found @@ -66,56 +71,65 @@ FOR i = 0 TO sPartList.Count - 1 sPart = Right(sPartList[i], Len(sPartList[i]) - RInStr(sPartList[i], "/")) - SHELL " mkdir /mnt" &/ spart & " && mount " & Trim(sPartList[i]) & Space(1) & "/mnt" &/ sPart WAIT + SHELL "mkdir /mnt" &/ spart & " && mount " & Trim(sPartList[i]) & Space(1) & "/mnt" &/ sPart WAIT ' get the size using df -h | grep sPart and some sed ' will embed some bash, but should probabbly be fixed SHELL "export " & sPart & "=$(df -h | grep " & sPart & ") && echo $" & sPart & " | cut -f 2 -d \' \'" TO sSize - SHELL " umount /mnt" &/ spart - SHELL " rm -rf /mnt" &/ spart + SHELL "umount /mnt" &/ spart WAIT + 'SHELL "rm -rf /mnt" &/ spart WAIT + TRY RMDIR "/mnt" &/ sPart + tl = NEW TextLabel(FrmWinDrives.svWinDrives) AS "WinPartitions" WITH tl .Text = sPartList[i] & " ( " & sSize & " )" - .Width = MdlObjSizer.get_object_width(.Text) * 1.5 + .Width = MdlObjSizer.get_object_width(.Text) ' * 1.5 .Tag = sPartList[i] .Height = 27 .x = FrmPartSel.tlPartRow.Left .y = y - IF .Width > lbwidth THEN + cbx = .x + tl.Width * 1.5 + IF .Width > lbwidth THEN lbwidth = .Width - END IF - .Width = lbwidth + ELSE + .Width = lbwidth + END IF + ME.vObj.Add(tl) END WITH - ME.vObj.Add(tl) + + ClsWinDrives.sWinDrives.Add(tl.Tag & "|" & "/mnt/" & sPart) ' now create the combobox to select the mount point cb = NEW ComboBox(FrmWinDrives.svWinDrives) AS "WinMntPoints" + oWMntPoints = NEW Object[] WITH cb - .Width = tl.Width .Tag = sPartList[i] .Height = 27 - .x = tl.Left + tl.Width + 8 + '.x = FrmPartSel.scrollPartitions.Width / 2 'lbwidth + 12 + .x = FrmPartSel.tlPartRow2.Left .y = tl.Top - .Width = lbwidth .Add("/mnt" &/ sPart) + .Width = MdlObjSizer.get_object_width("/mnt" &/ sPart) * 2 .ReadOnly = FALSE +' .border = border.Plain + ME.oWMntPoints.Add(cb) END WITH - + y = y + tl.Height + 4 - + NEXT - ELSE ' only one win partition found + sPart = Right(sDump1, Len(sDump1) - RInStr(sDump1, "/")) 'Message(sPart) - SHELL " mkdir -p /mnt" &/ spart & " && mount " & Trim(sDump1) & Space(1) & "/mnt" &/ sPart WAIT + SHELL "mkdir -p /mnt" &/ spart & " && 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) @@ -131,10 +145,10 @@ .Width = MdlObjSizer.get_object_width(.Text) * 1.5 .x = FrmPartSel.tlPartRow.Left .y = y - + END WITH - SHELL " umount /mnt" &/ spart WAIT - SHELL " rm -rf /mnt" &/ spart WAIT + SHELL "umount /mnt" &/ spart WAIT + SHELL "rm -rf /mnt" &/ spart WAIT END IF ELSE ' no widnows partitions found @@ -145,8 +159,17 @@ .Height = 27 .x = y .y = y + END WITH + + END IF + + + + + + END PUBLIC SUB WinMntPoints_keyrelease() Modified: branches/iVL/installer.gambas ============================================================================== Binary files. No diff available. |