From: <cod...@go...> - 2008-08-27 21:36:14
|
Author: m0e.lnx Date: Wed Aug 27 14:35:33 2008 New Revision: 150 Modified: branches/iVL/.lang/FMain.pot branches/iVL/ClsGlobal.class branches/iVL/FMain.class branches/iVL/FMain.form branches/iVL/FrmInstallSys.class branches/iVL/FrmInstallSys.form branches/iVL/MdlCore.module branches/iVL/MdlInstallSys.module branches/iVL/MdlSetup.module branches/iVL/MdlWinDrives.module Log: - Expanded left pane to get rid of unnecessary scrollbar at the bottom of the treeview - Made corrections to fstab writter and to use ntfs-3g instead of ntfs Modified: branches/iVL/.lang/FMain.pot ============================================================================== --- branches/iVL/.lang/FMain.pot (original) +++ branches/iVL/.lang/FMain.pot Wed Aug 27 14:35:33 2008 @@ -14,19 +14,19 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: FMain.class:308 +#: FMain.class:313 msgid "Process Overview" msgstr "" -#: FMain.class:327 +#: FMain.class:333 msgid "Next" msgstr "" -#: FMain.class:333 +#: FMain.class:339 msgid "Back" msgstr "" -#: FMain.class:339 +#: FMain.class:345 msgid "Exit" msgstr "" Modified: branches/iVL/ClsGlobal.class ============================================================================== --- branches/iVL/ClsGlobal.class (original) +++ branches/iVL/ClsGlobal.class Wed Aug 27 14:35:33 2008 @@ -28,7 +28,7 @@ STATIC PUBLIC sRootMnt AS String STATIC PUBLIC sHomeMnt AS String STATIC PUBLIC sTargetMnt AS String -STATIC PUBLIC sSourceMnt AS String +STATIC PUBLIC sSourceMnt AS String = "/mnt/source" STATIC PUBLIC sMediaMnt AS String STATIC PUBLIC sBulkList AS String Modified: branches/iVL/FMain.class ============================================================================== --- branches/iVL/FMain.class (original) +++ branches/iVL/FMain.class Wed Aug 27 14:35:33 2008 @@ -33,7 +33,7 @@ MdlCore.LOCK_GUI 'MdlCore.LOCK_GUI() ClsGlobal.sBackNav = NEW Object[] -ClsGlobal.sSourceMnt = "/mnt" &/ "cdrom" 'FOR TESTING ONLY +'ClsGlobal.sSourceMnt = "/mnt" &/ "source" 'FOR TESTING ONLY '/ THE FOLLOWING LINES HAVE BEEN COMMENTED FOR TESTING ONLY FrmSelISO.Reparent(ME.pnlWinHost) @@ -70,7 +70,7 @@ END WITH 'ME.TreeView1.BackColor = Color.Transparent -ME.AUTOSIZE_LEFT_PANE +''ME.AUTOSIZE_LEFT_PANE() ' ' ' / THE FOLLOWING LINES HAVE BEEN IMPLEMENTED FOR TESTING PURPOSES ' ' ' WITH FrmLilo ' ' ' .Reparent(Fmain.pnlWinHost) @@ -79,21 +79,26 @@ ' ' ' .Show ' ' ' END WITH + + END PUBLIC SUB AUTOSIZE_LEFT_PANE() + + DIM iWidth AS Integer ' this will find widest child in treeview ME.tvPlan.MoveFirst() REPEAT IF MdlObjSizer.get_object_width(tvPlan.Item.Text) > iWidth THEN - iWidth = MdlObjSizer.get_object_width(tvPlan.item.Text) + 24 + iWidth = MdlObjSizer.get_object_width(tvPlan.item.Text) + 12 END IF UNTIL ME.tvPlan.MoveBelow() - - ME.tvPlan.Width = iWidth + (iWidth / 20) - ME.Frame1.Width = iWidth + (iWidth / 10) + 'Message(iWidth) + 'ME.tvPlan.Width = iWidth + (iWidth / 5) + ME.tvPlan.Width = iWidth + 6 + ME.Frame1.Width = iWidth + 12 END @@ -117,10 +122,10 @@ 'ME.pnlWinHost.Resize(ME.ClientWidth - ME.Frame1.Width - (ME.Frame1.left * 8), ME.ClientH - ME.tlBanner.Height - (ME.btback.Height * 8)) WITH ME .tlBanner.width = ME.width - .Frame1.Move(4, .PictureBox1.Top + .PictureBox1.Height + 4, MdlCore.iLeftWidth * 1.5, .ClientHeight - .PictureBox1.Height * 1.5) + .Frame1.Move(4, .PictureBox1.Top + .PictureBox1.Height + 4, MdlCore.iLeftWidth * 1.7, .ClientHeight - .PictureBox1.Height * 1.5) '.Frame1.Move(4, .PictureBox1.top + .PictureBox1.Height + 4, MdlCore.iLeftWidth * 1.60, .ClientHeight - tlBanner.Height - (.btback.Height * 2)) '.Frame1.Resize(MdlCore.iLeftWidth * 1.60, .ClientHeight - tlBanner.Height - (.btback.Height * 1.5)) - .tvPlan.Move(4, 24, .Frame1.Width - 8, .Frame1.Height - 28) ' THIS WILL LEAVE 16PIX ON TOP AND BOTTOM AND 2 ON LEFT AND RIGHT + .tvPlan.Move(4, 24, .Frame1.Width - 8, .Frame1.Height - 28) ' THIS WILL LEAVE 16PIX ON TOP AND BOTTOM AND 2 ON LEFT AND RIGHT '.tvPlan.Move(4, 24, .Frame1.Width - 8, Frame1.Height - (.Frame1.Height / 20)) '.pnlWinHost.Move(.Frame1.left + .Frame1.Width + 4, .Frame1.top + (.tlBanner.Height / 2), .tlBanner.Width - (.Frame1.Width + 8), .ClientHeight - (.tlbanner.height + (.btback.height * 3.5))) Modified: branches/iVL/FMain.form ============================================================================== --- branches/iVL/FMain.form (original) +++ branches/iVL/FMain.form Wed Aug 27 14:35:33 2008 @@ -8,6 +8,7 @@ Text = ("Process Overview") { tvPlan TreeView MoveScaled(1,2,22,56) + Expand = True Border = False } } Modified: branches/iVL/FrmInstallSys.class ============================================================================== --- branches/iVL/FrmInstallSys.class (original) +++ branches/iVL/FrmInstallSys.class Wed Aug 27 14:35:33 2008 @@ -41,7 +41,7 @@ FMain.FrmCurr = ME - ClsGlobal.sSourceMnt = "/mnt/cdrom" + 'ClsGlobal.sSourceMnt = "/mnt/cdrom" 'ME.FrmProg.Text = " Preparing system for installation " ME.tlCurrStepLbl.Text = "Current Step" 'ME.show_credits @@ -50,6 +50,9 @@ 'STOP EVENT +MdlSetup.RUN_CREDITS(ClsGlobal.sSourceMnt &/ "CREDIT", ME.tlCredits) +WAIT + ME.BEGIN_PROCESS() ' COMMENTED FOR TESTING PURPOSES @@ -76,8 +79,10 @@ .pbInstallProg.Move(.tlCurrStepLbl.left + (.tlCurrStepLbl.Width), .tlCurrStepLbl.top, .FrmProg.Width - (.tlCurrStepLbl.Width + (.tlcurrsteplbl.left * 2))) .tlCurrPkg2.Move(.tlCurrPkg.Left, .tlCurrPkg.top + (.tlCurrPkg.Height * 2.5), .FrmProg.Width - (.tlCurrPkg.Left * 2)) .pbInstallProg2.Move(.tlCurrPkg2.Left, .tlCurrPkg2.top + (.tlCurrPkg2.Height + 2), .tlCurrPkg2.Width, 27) - .frmCredits.Move(.FrmProg.left, .FrmProg.top + .FrmProg.Height + 16, .FrmProg.Width) - .sclCredits.Move(8, 24, .frmCredits.Width - (.sclCredits.left * 2)) +' .frmCredits.Move(.FrmProg.left, .FrmProg.top + .FrmProg.Height + 16, .FrmProg.Width) + '.scrlCredits.move(8, 24, .FrmProg.Width - (.scrlCredits.left * 2)) + .scrlCredits.Move(.FrmProg.left, .FrmProg.top + FrmProg.Height + 24, .FrmProg.Width) + .tlCredits.Move(8, 4) '.pbInstallProg.Move(.tlCurrStepLbl.Left + (.tlCurrStepLbl.Width + 2), .FrmProg.Width - (.tlCurrStepLbl.Width + (.tlCurrStepLbl.left * 2))) ' @@ -104,25 +109,25 @@ PUBLIC SUB tmCredits_Timer() - ' ' DIM i AS Integer = ME.FrmProg.left + 20 - ' ' - ' ' IF ME.tlCredits.x < (i) - (ME.tlCredits.Width) THEN ME.tlCredits.x = (frmCredits.Width - 12) - ' ' tlCredits.x = frmCredits.left + 4 + (tlCredits.x - 10) - ' ' - + ' ' ' DIM i AS Integer = ME.FrmProg.left + 20 + ' ' ' + ' ' ' IF ME.tlCredits.x < (i) - (ME.tlCredits.Width) THEN ME.tlCredits.x = (frmCredits.Width - 12) + ' ' ' tlCredits.x = frmCredits.left + 4 + (tlCredits.x - 10) + ' ' ' + ' ' ' DIM X AS Integer - X = ME.sclCredits.ScrollX - - INC ME.sclCredits.ScrollX - IF X = ME.sclCredits.Scrollx THEN - ME.sclCredits.scrollx = 0 + X = ME.scrlCredits.ScrollX + 'REPEAT + INC ME.scrlCredits.ScrollX + IF X = ME.scrlCredits.Scrollx THEN + ME.scrlCredits.scrollx = 0 ME.tmCredits.Enabled = FALSE END IF - + 'UNTIL tmCredits.Enabled = FALSE ' Modified: branches/iVL/FrmInstallSys.form ============================================================================== --- branches/iVL/FrmInstallSys.form (original) +++ branches/iVL/FrmInstallSys.form Wed Aug 27 14:35:33 2008 @@ -1,7 +1,7 @@ # Gambas Form File 2.0 { Form Form - MoveScaled(0,0,90,66) + MoveScaled(0,0,90,83.3333) Text = ("") { tlBanner TextLabel MoveScaled(1,1,63,5) @@ -11,7 +11,7 @@ MoveScaled(1,10,76,34) Text = ("") { tlCurrPkg TextLabel - MoveScaled(2,1,73,3.125) + MoveScaled(2,1,73,3) Text = ("Installing ...") } { pbInstallProg ProgressBar @@ -19,10 +19,10 @@ Label = False } { pbInstallProg2 ProgressBar - MoveScaled(1,19,44,3.125) + MoveScaled(1,19,44,3) } { tlCurrPkg2 TextLabel - MoveScaled(1,15,45,3.125) + MoveScaled(1,15,45,3) Text = ("Total progress") } { tlCurrStepLbl TextLabel @@ -30,24 +30,18 @@ Text = ("Current Step ") } } - { frmCredits Frame - MoveScaled(12,45,38,12) - Font = Font["-1"] - Text = ("") - { sclCredits ScrollView - MoveScaled(2,1,34,8) - Border = False - ScrollBar = Scroll.None - { tlCredits TextLabel - MoveScaled(2,1,30,5) - Text = ("") - Alignment = Align.Normal - } - } - } { tmCredits #Timer #X = 632 #Y = 80 Delay = 30 + } + { scrlCredits ScrollView + MoveScaled(2,48,84,5) + Border = False + ScrollBar = Scroll.None + { tlCredits TextLabel + MoveScaled(1,1,46,3.5) + Text = ("TextLabel1") + } } } Modified: branches/iVL/MdlCore.module ============================================================================== --- branches/iVL/MdlCore.module (original) +++ branches/iVL/MdlCore.module Wed Aug 27 14:35:33 2008 @@ -32,7 +32,7 @@ DIM sISOList AS String[] DIM sResults, sISO AS String DIM i AS Integer - + 'Message(ClsGlobal.sSourceMnt) SHELL "umount " & ClsGlobal.sSourceMnt WAIT SHELL "mount " & sDrive & Space(1) & ClsGlobal.sSourceMnt WAIT SHELL "ls " & ClsGlobal.sSourceMnt & " | grep -i vl* | grep -i iso" TO sResults @@ -99,11 +99,12 @@ DIM sPartition AS String 'SHELL "sudo /sbin/probepart | grep -e \"*Linux$\" | cut -f 1 -d \' \'" TO sResults - SHELL "/sbin/probepart | cut -f 1 -d \' \' | grep /dev" TO sResults - + 'SHELL "/sbin/probepart |grep -i extended | grep -i swap | cut -f 1 -d \' \' | grep /dev" TO sResults + SHELL "probepart | grep -v -i \'swap\' | grep -v -i \'ext\' |grep \'/dev\'| grep -v \'Disk\'| cut -f 1 -d \' \'" TO sResults + 'Message(sResults) sResults = Trim(sResults) 'Message.Info(sResults) - IF InStr(sResults, gb.NewLine) THEN + 'IF InStr(sResults, gb.NewLine) THEN sPartList = Split(sResults, gb.NewLine) FOR i = 0 TO sPartList.count - 1 sPartition = Trim(sPartList[i]) @@ -111,10 +112,10 @@ ME.FIND_ISO_ON_DRIVE(sPartition) NEXT - ELSE ' only one linux partition found - sPartition = Trim(sResults) - ME.FIND_ISO_ON_DRIVE(sPartition) - END IF + 'ELSE ' only one linux partition found + ' sPartition = Trim(sResults) + ' ME.FIND_ISO_ON_DRIVE(sPartition) + 'END IF END @@ -131,7 +132,7 @@ DIM i AS Integer - ClsGlobal.sSourceMnt = "/mnt" &/ "cdrom" + ClsGlobal.sSourceMnt = "/mnt/source" sMountPoint = ClsGlobal.sSourceMnt sCmd = "cat /proc/sys/dev/cdrom/info | grep \"drive name\" |cut -f 2 -d\':\'|xargs -n 2" @@ -214,7 +215,7 @@ 'RETURN FrmSelISO.tlDistroDesc.Text = "<b>Scanning system for installable media. Please wait ...</b>" - +IF Exist(ClsGlobal.sSourceMnt) = FALSE THEN TRY MKDIR ClsGlobal.sSourceMnt WAIT 1 Modified: branches/iVL/MdlInstallSys.module ============================================================================== --- branches/iVL/MdlInstallSys.module (original) +++ branches/iVL/MdlInstallSys.module Wed Aug 27 14:35:33 2008 @@ -196,9 +196,18 @@ ELSE sBlank = " " END IF - + IF cb.tag = ClsPartSel.sRoot THEN + FOR EACH mt IN MdlPartFrmt.oFsTypes + IF mt.tag = cb.tag THEN + sFstab = sFstab & "\n" & + mt.tag & Space(5) & Trim(mt.text) & Space(5) & "defaults 0 1" & "\n" + END IF + NEXT + ELSE FOR EACH mt IN MdlPartSel.oFsTypes IF mt.Tag = cb.Tag THEN + + IF mt.text = "Do not format" THEN SHELL "export sfmt=$(parted " & sDrive & " print | grep ^\'" & sBlank & sPartNo & "\'); echo $sfmt | cut -f 6 -d \' \'" TO sRes ELSE @@ -206,8 +215,9 @@ END IF END IF NEXT - + sFstab = sFstab & cb.tag & Space(5) & Trim(cb.Text) & Space(5) & Trim(sRes) & Space(5) & ME.fS_oPTIONS(sRes) & Space(5) & " 0 2 " & "\n" + END IF TRY MKDIR ClsGlobal.sTargetMnt &/ cb.Text END IF NEXT @@ -235,6 +245,8 @@ sRes = "vfat" ELSE IF sRes = "fat16" THEN sRes = "vfat" + ELSE IF sRes LIKE "ntfs" THEN + sRes = "ntfs-3g" END IF sFstab = sFstab & "\n" & cb.tag & Space(5) & Trim(cb.text) & Space(5) & Trim(sRes) & Space(5) & ME.fS_oPTIONS(sRes) & " 0 0 " @@ -307,6 +319,8 @@ sMntOpts = "fmask=111,dmask=0,gid=users,shortname=mixed,quiet,user" CASE "ntfs" sMntOpts = "umask=0,gid=users,user" + CASE "ntfs-3g" + sMntOpts = "defaults,allow_other,umask=0,users,nls=utf8,noexec" CASE "ext2", "ext3" sMntOpts = "defaults" CASE ELSE Modified: branches/iVL/MdlSetup.module ============================================================================== --- branches/iVL/MdlSetup.module (original) +++ branches/iVL/MdlSetup.module Wed Aug 27 14:35:33 2008 @@ -211,6 +211,7 @@ DIM sFile AS String[] = Split(File.Load(sCreditFile), "\n") DIM i AS Integer + tlOutput.Text = "" FOR i = 0 TO sFile.count - 1 IF Left(Trim(sFile[i]), Len("M0E-lnx")) = "M0E-lnx" THEN @@ -222,14 +223,13 @@ END IF 'tlOutput.text = tlOutput.text & "<br>" & sFile[i] 'tlOutput.Adjust - tlOutput.Text = tlOutput.Text & Space(12) & " *** " & sFile[i] + tlOutput.Text = tlOutput.Text & " ~ " & sFile[i] ' tlOutput.Text = sFile[i] - 'WAIT 20 + NEXT tlOutput.Width = MdlObjSizer.get_object_width(tlOutput.Text) + 24 - 'tlOutput.Border = Border.Plain - 'FrmInstallSys.tmCredits.Enabled = TRUE - 'FrmInstallSys.tmCredits.Start + WAIT + FrmInstallSys.tmCredits.Enabled = TRUE END Modified: branches/iVL/MdlWinDrives.module ============================================================================== --- branches/iVL/MdlWinDrives.module (original) +++ branches/iVL/MdlWinDrives.module Wed Aug 27 14:35:33 2008 @@ -31,7 +31,7 @@ DIM sSize AS String DIM lbwidth AS Integer DIM cbx AS Integer = FrmPartSel.scrollPartitions.Width / 2 -DIM sDisks, sResults, sLine AS String[] +DIM sDisks, sResults, sLine, wintfs AS String[] DIM sPartNo, sBlank, sPartaddr, sPartSize, sPartType, sTempLine AS String DIM tlwidth AS Integer @@ -124,25 +124,26 @@ NEXT ' now do ntfs partitions the same way sDump1 = "" - sDisks.Clear + 'sDisks.Clear SHELL "probepart | grep -i ntfs | cut -f 1 -d \' \'" TO sDump1 - sDisks = Split(sDump1, "\n") - FOR i = 0 TO sDisks.Count - 1 - sPartNo = Right(sDisks[i], Len(sDisks[i]) - Len("/dev/hda")) + sDump = Trim(sDump1) + wintfs = Split(sDump1, "\n") + FOR i = 0 TO wintfs.Count - 1 + sPartNo = Right(wintfs[i], Len(wintfs[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 + SHELL "export s=$(parted " & Left(wintfs[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 & " ]" + .text = wintfs[i] & " [ " & sPartsize & " ]" .Width = 200 .Height = 21 - .tag = sDisks[i] + .tag = wintfs[i] .Alignment = Align.Normal END WITH cb = NEW ComboBox(FrmWinDrives.svWinDrives) @@ -151,7 +152,7 @@ .y = tl.top .Width = tl.Width * 0.75 .Height = 21 - .tag = sDisks[i] + .tag = wintfs[i] .Add("/mnt" &/ Right(.tag, Len(.tag) - RInStr(.tag, "/"))) .Add("Do not mount") |