From: <cod...@go...> - 2008-07-17 04:18:35
|
Author: M0E.lnx Date: Wed Jul 16 21:17:36 2008 New Revision: 46 Added: branches/iVL/ClsWinDrives.class Modified: branches/iVL/.lang/FMain.pot branches/iVL/.lang/FrmPartSel.pot branches/iVL/.lang/FrmSelISO.pot branches/iVL/.lang/MdlCore.pot branches/iVL/.lang/MdlSetup.pot branches/iVL/MdlSetup.module branches/iVL/MdlWinDrives.module Log: Fixed bug in win partition listing. Also, began working on the windows partition mount point definition for fstab. Modified: branches/iVL/.lang/FMain.pot ============================================================================== --- branches/iVL/.lang/FMain.pot (original) +++ branches/iVL/.lang/FMain.pot Wed Jul 16 21:17:36 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/FrmPartSel.pot ============================================================================== --- branches/iVL/.lang/FrmPartSel.pot (original) +++ branches/iVL/.lang/FrmPartSel.pot Wed Jul 16 21:17:36 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 Wed Jul 16 21:17:36 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 Wed Jul 16 21:17:36 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/MdlSetup.pot ============================================================================== --- branches/iVL/.lang/MdlSetup.pot (original) +++ branches/iVL/.lang/MdlSetup.pot Wed Jul 16 21:17:36 2008 @@ -1,4 +1,4 @@ -# /home/moises/area-51/projects/installer/MdlSetup.module +# /home/vluser/area-51/projects/new-inst/MdlSetup.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Added: branches/iVL/ClsWinDrives.class ============================================================================== --- (empty file) +++ branches/iVL/ClsWinDrives.class Wed Jul 16 21:17:36 2008 @@ -0,0 +1,19 @@ +' Gambas class 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/>. + +STATIC PUBLIC sWinDrives AS String[] \ No newline at end of file Modified: branches/iVL/MdlSetup.module ============================================================================== --- branches/iVL/MdlSetup.module (original) +++ branches/iVL/MdlSetup.module Wed Jul 16 21:17:36 2008 @@ -34,7 +34,7 @@ END IF ' display the license agreement text - FrmLicense.taLicense.Text = SConv(File.Load(sPathToLic)) +' FrmLicense.taLicense.Text = SConv(File.Load(sPathToLic)) ' This will also set the default variables for distro name and version to clsglobal MdlCore.SET_DECISSION(ClsGlobal.sSourceMnt) Modified: branches/iVL/MdlWinDrives.module ============================================================================== --- branches/iVL/MdlWinDrives.module (original) +++ branches/iVL/MdlWinDrives.module Wed Jul 16 21:17:36 2008 @@ -38,27 +38,9 @@ ' MOVE THESE PARTITIONS TO A DIFFERENT WINDOW. ' 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 2>/dev/null | grep -e \"^/dev\" | grep -v \" Ext\" |grep -v \"raid autodetect\"|grep -v Linux \"" TO sDump1 - 'SHELL "export PATH=$PATH:/sbin && sudo probepart | grep -e \"^/dev\" | grep -v \" Ext\" | grep -v \"raid autodetect\" | trep -v Linux | cut -f 1 -d \' \'" TO sDump1 - SHELL "export PATH=$PATH:/sbin && sudo probepart | grep -e \'/dev\' | grep -v \' Ext\' | grep -v \'raid autodetect\' | grep -v \' Linux\' | cut -f 1 -d \' \' | sed -s'/Disk//'" TO sDump1 - File.Save(Temp("all"), Trim(sDump1)) - ' ' ' SHELL "export PATH=$PATH:/sbin && sudo probepart | grep -e \" *FAT32\" | cut -f 1 -d \' \'" TO sDump1 - ' ' ' File.Save(Temp("fat32"), Trim(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 = "" - ' ' ' SHELL "export PATH=$PATH:/sbin && sudo probepart | grep -e \" *NTFS$\" | cut -f 1 -d \' \'" TO sDump1 - ' ' ' File.Save(Temp("ntfs"), Trim(sDump1)) - ' ' ' sDump1 = "" - - ' ' ' sDump1 = File.Load(Temp("fat32")) & gb.NewLine & - ' ' ' File.Load(Temp("fat")) & gb.NewLine & - ' ' ' File.Load(Temp("ntfs")) & gb.NewLine - ' ' ' sDump1 = Trim(sDump1) - - 'Message.Info(sDump1) + SHELL "PATH=$PATH:/sbin && sudo 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[] sDump1 = File.Load(Temp("all")) sDump1 = Trim(sDump1) @@ -78,7 +60,9 @@ y = y + tl.Height * 2 'END IF IF InStr(sDump1, gb.NewLine) THEN ' more than one partition found - sPartList = Split(sDump1, gb.NewLine) + sPartList = Split(sDump1, gb.NewLine) ' multiple partitions found + 'initiate the array + ClsWinDrives.sWinDrives = NEW String[] FOR i = 0 TO sPartList.Count - 1 sPart = Right(sPartList[i], Len(sPartList[i]) - RInStr(sPartList[i], "/")) @@ -92,7 +76,7 @@ tl = NEW TextLabel(FrmWinDrives.svWinDrives) AS "WinPartitions" WITH tl - .Text = sPart & " ( " & sSize & " )" + .Text = sPartList[i] & " ( " & sSize & " )" .Width = MdlObjSizer.get_object_width(.Text) * 1.5 .Tag = sPartList[i] .Height = 27 @@ -104,9 +88,9 @@ .Width = lbwidth 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) + cb = NEW ComboBox(FrmWinDrives.svWinDrives) AS "WinMntPoints" WITH cb .Width = tl.Width .Tag = sPartList[i] @@ -164,6 +148,38 @@ END WITH END IF END - + +PUBLIC SUB WinMntPoints_keyrelease() + + ME.UPDATE_WIN_ARRAY(LAST.tag, Trim(LAST.text)) + +END +PUBLIC SUB WinMntPoints_Select() + + ME.UPDATE_WIN_ARRAY(LAST.tag, Trim(LAST.text)) + +END + + + +PUBLIC SUB UPDATE_WIN_ARRAY(sTag AS String, sMntPoint AS String) + +DIM i AS Integer +DIM sLine AS String + FOR i = 0 TO ClsWinDrives.sWinDrives.Count - 1 + sLine = ClsWinDrives.sWinDrives[i] + IF Left(sLine, InStr(sLine, "|") - 1) = sTag THEN + sLine = sTag & "|" & sMntPoint + PRINT sLine + ELSE + sLine = sLine + END IF + NEXT + + ' WARNING: ALTHOUGH THIS WORKS, IT MAY STILL NOT BE SAVING THE DATA TO THE ARRAY.... MAKE SURE THE NEW VALUES ARE + ' SAVED. ALSO, MAKE IT WORK WITH A SINGLE PARTITION AS WELL. + +END + |