From: <cod...@go...> - 2008-08-24 18:00:00
|
Author: uelsk8s Date: Sun Aug 24 10:59:38 2008 New Revision: 139 Modified: branches/iVL/ClsPartSel.class branches/iVL/FrmInstallSys.class branches/iVL/FrmLilo.class branches/iVL/MdlConfLilo.module branches/iVL/MdlDiskPart.module branches/iVL/MdlInstallCustom.module branches/iVL/MdlInstallSys.module branches/iVL/MdlLiloOsList.module branches/iVL/MdlPartSel.module branches/iVL/installer.gambas Log: small changes to make lilo work. Modified: branches/iVL/ClsPartSel.class ============================================================================== --- branches/iVL/ClsPartSel.class (original) +++ branches/iVL/ClsPartSel.class Sun Aug 24 10:59:38 2008 @@ -29,6 +29,8 @@ STATIC PUBLIC fVar AS String STATIC PUBLIC sTmp AS String STATIC PUBLIC fTmp AS String +STATIC PUBLIC sLinuxPart AS String[] +STATIC PUBLIC fLinuxPart AS String[] STATIC PUBLIC sSwap AS String Modified: branches/iVL/FrmInstallSys.class ============================================================================== --- branches/iVL/FrmInstallSys.class (original) +++ branches/iVL/FrmInstallSys.class Sun Aug 24 10:59:38 2008 @@ -21,6 +21,7 @@ DIM sRes AS Integer ' we will need to + MdlCore.lock_gui() FMain.FrmCurr = ME FMain.tvPlan["Inst1"].Picture = MdlCore.sDonePic FMain.tvPlan["Inst2"].Picture = MdlCore.sNowPic Modified: branches/iVL/FrmLilo.class ============================================================================== --- branches/iVL/FrmLilo.class (original) +++ branches/iVL/FrmLilo.class Sun Aug 24 10:59:38 2008 @@ -37,11 +37,15 @@ MdlLiloOsList.bVlCliOption = FALSE -ME.TabStrip1.Index = 0 + 'ME.Maximized = TRUE FBResolution_Click() -FBResolution.text = "Standard" +FBResolution.text = "Bootsplash High" +FBResolution_Click() MdlLiloOsList.list_boot_options() +ME.TabStrip1.Index = 0 +ME.TabStrip1.Linux.Click() +ME.cbDefBoot.Text = "Linux" END Modified: branches/iVL/MdlConfLilo.module ============================================================================== --- branches/iVL/MdlConfLilo.module (original) +++ branches/iVL/MdlConfLilo.module Sun Aug 24 10:59:38 2008 @@ -54,8 +54,8 @@ "# Override dangerous defaults that rewrite the partition table: \n" & "change-rules \n" & "reset \n" - 'IF Exist(ClsGlobal.sTargetMnt &/ "boot" &/ "bitmap" &/ "boot.bmp") THEN - IF Exist("/boot/bitmap/boot.bmp") THEN + IF Exist(ClsGlobal.sTargetMnt &/ "boot" &/ "bitmap" &/ "boot.bmp") THEN + 'IF Exist("/boot/bitmap/boot.bmp") THEN sOut = sOut & "\n" & "bitmap = /boot/bitmap/boot.bmp \n" END IF @@ -86,24 +86,32 @@ PUBLIC SUB EXECUTE_LILO() + DIM sOut AS String DIM sDump AS String SHELL "mount -o bind /dev " & ClsGlobal.sTargetMnt &/ "dev" WAIT SHELL "mount -o bind /proc " & ClsGlobal.sTargetMnt &/ "proc" WAIT - SHELL "chroot " & ClsGlobal.sTargetMnt & "; /sbin/lilo || echo \'FAILED\'" TO sDump + SHELL "chroot " & ClsGlobal.sTargetMnt & " /sbin/lilo || echo \'FAILED\'" TO sDump IF InStr(sDump, "FAILED") > 0 THEN Message.Error("Lilo returned an error. Please see below" & gb.NewLine & sDump) ELSE Message("Boot loader has been setup successfully") END IF - - + SHELL "umount " & ClsGlobal.sTargetMnt &/ "dev" WAIT + SHELL "umount " & ClsGlobal.sTargetMnt &/ "proc" WAIT + SHELL "mkdir -p " & ClsGlobal.sTargetMnt &/ "var/log/setup/init" WAIT + SHELL "chmod 700 " & ClsGlobal.sTargetMnt &/ "var/log/setup/init" WAIT + 'SHELL "touch " & ClsGlobal.sTargetMnt &/ "var/log/setup/init/config-stage2" + sOut = "#!/bin/bash \n" & + "/sbin/config-stage1 vector-virgin-light" + File.Save(ClsGlobal.sTargetMnt &/ "var/log/setup/init/config-stage2", sOut) + 'SHELL "echo \"" & sOut & "\" >" & ClsGlobal.sTargetMnt &/ "var/log/setup/init/config-stage2" + SHELL "chmod +x " & ClsGlobal.sTargetMnt &/ "var/log/setup/init/config-stage2" + Message("Vectorlinux has been installed click OK to reboot") + SHELL "reboot" END - - - PUBLIC SUB DISPLAY_LILO_TARGET_OPTIONS() DIM sList AS String @@ -143,13 +151,14 @@ DIM sDump AS String sInitrd0 = "initrd" sInitrd1 = "initrd.gz" - ClsPartSel.sRoot = "/dev/hda1" ' just for testing + 'ClsPartSel.sRoot = "/dev/hda1" ' just for testing FOR EACH cb IN MdlLiloOsList.bIncluded IF cb.Value = TRUE THEN sShortAddr = Right(cb.tag, Len(cb.tag) - RInStr(cb.tag, "/")) IF cb.tag <> ClsPartSel.sRoot THEN + SHELL "mkdir -p " & ClsGlobal.sTargetMnt &/ "boot" &/ "tamu" WAIT FOR EACH tb IN MdlLiloOsList.txtInitrds - 'IF cb.tag <> ClsPartSel.sRoot THEN + IF cb.tag <> ClsPartSel.sRoot THEN IF tb.tag = cb.tag THEN 'mount it and find the initrd SHELL "mkdir /mnt" &/ sShortAddr WAIT @@ -158,9 +167,8 @@ 'message(sDump) IF Exist("/mnt/" & sShortAddr &/ "boot" &/ sInitrd0) THEN - - PRINT "cp /mnt" &/ sShortAddr &/ "boot" &/ sInitrd0 & " to " & ClsGlobal.sTargetMnt &/ "boot" &/ "tamu" &/ tb.text - SHELL "cp /mnt" &/ sShortAddr &/ sInitrd0 & Space(1) & ClsGlobal.sTargetMnt &/ "boot" &/ "tamu" &/ tb.text + PRINT "cp /mnt" &/ sShortAddr &/ "boot" &/ sInitrd0 & " to " & ClsGlobal.sTargetMnt &/ "boot" &/ "tamu" &/ tb.text + SHELL "cp /mnt" &/ sShortAddr &/ "boot" &/ sInitrd0 & Space(1) & ClsGlobal.sTargetMnt &/ "boot" &/ "tamu" &/ tb.text ELSE IF Exist("/mnt" &/ sShortAddr &/ "boot" &/ sInitrd1) THEN PRINT "cp /mnt" &/ sShortAddr &/ "boot" &/ sInitrd1 & " to " & ClsGlobal.sTargetMnt &/ "boot" &/ "tamu" &/ tb.text SHELL "cp /mnt" &/ sShortAddr &/ sInitrd1 & Space(1) & ClsGlobal.sTargetMnt &/ "boot" &/ "tamu" &/ tb.text @@ -175,22 +183,15 @@ SHELL "umount /mnt" &/ sShortAddr WAIT END IF + ENDIF NEXT END IF END IF NEXT - - END - - - - - - PUBLIC SUB GENERATE_LILO_DOT_CONF() DIM sFile AS String @@ -236,13 +237,21 @@ END IF NEXT ' now put it in a section - - sSection = "image = " & sBootAddr &/ "vmlinuz-" & sShortAddr & gb.NewLine & + IF bInc.tag = ClsPartSel.sRoot THEN + sSection = "image = " & sBootAddr &/ "vmlinuz" & gb.NewLine & + "root = " & bInc.tag & gb.NewLine & + "label = " & sEntryLbl & gb.NewLine & + "append = \"" & sEntryApnd & "\"" & gb.NewLine & + "initrd = /boot/initrd" & gb.NewLine & + "read-only" & " \n \n" + ELSE + sSection = "image = " & sBootAddr &/ "vmlinuz-" & sShortAddr & gb.NewLine & "root = " & bInc.tag & gb.NewLine & "label = " & sEntryLbl & gb.NewLine & "append = \"" & sEntryApnd & "\"" & gb.NewLine & "initrd = " & sEntryInitrd & gb.NewLine & "read-only" & " \n \n" + ENDIF IF bInc.tag = ClsPartSel.sRoot AND MdlLiloOsList.bVlCliOption = TRUE THEN @@ -269,7 +278,7 @@ NEXT sWinSection = "other = " & tb.Tag & gb.NewLine & "label = " & tb.Text & gb.NewLine & - "table = " & tb.Tag & "\n" & gb.NewLine + "table = " & Left(tb.Tag, 8) & "\n" & gb.NewLine ELSE sWinSection = "" END IF Modified: branches/iVL/MdlDiskPart.module ============================================================================== --- branches/iVL/MdlDiskPart.module (original) +++ branches/iVL/MdlDiskPart.module Sun Aug 24 10:59:38 2008 @@ -56,11 +56,19 @@ FrmDiskPart.tlBanner.Text = "<h3>Loading gparted ... Please wait</h3>" SHELL "/usr/sbin/gparted" WAIT 1 - + aHandle = Desktop.Find("", "*partedbi*", "") + i = 0 + IF aHandle.Count = 0 THEN 'lets give it a chance to start + REPEAT + WAIT 2 + aHandle = Desktop.Find("", "*partedbi*", "") + INC i + UNTIL + aHandle.Count > 0 OR i > 5 + END IF 'Message(aHandle.count) 'RETURN - ' ' ' ' ' ' ' ' ' aHandle = Desktop.Find("GParted") @@ -90,7 +98,6 @@ ' aHandle.Count > 0 OR i = sWons.count - 1 ' 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.") Modified: branches/iVL/MdlInstallCustom.module ============================================================================== --- branches/iVL/MdlInstallCustom.module (original) +++ branches/iVL/MdlInstallCustom.module Sun Aug 24 10:59:38 2008 @@ -85,10 +85,14 @@ ' Installation complete.... FrmInstallSys.pbInstallProg.Value = 1 FrmInstallSys.pbInstallProg2.Value = 1 - Message("Vectorlinux is now installed on your system . Enjoy!") + 'Message.Info("packages have been installed in your system. Please click next to configure it.") + FrmInstallSys.tlBanner.Text = "Vectorlinux is now installed in your system. Please click next to configure it." + FrmInstallSys.tlCurrPkg.Text = "packages have been installed in your system. Please click next to configure it." WITH FMain .btQuit.Enabled = TRUE .btQuit.ForeColor = Color.Black + .btnext.Enabled = TRUE + .btnext.ForeColor = Color.Black END WITH 'MdlCore.unlock_gui() END @@ -401,7 +405,10 @@ PRINT "Package " & iPkgNum & " of " & iPkgCnt MdlSetup.SHOW_PROGRESS_CONTROLS() FrmInstallSys.tlCurrPkg.Text = "Processing " & File.Name(sPackagePath) - hproc = SHELL "install-pkg " & sPackagePath & Space(1) & ClsGlobal.sTargetMnt & " || echo \'FAILED\'" FOR READ + 'hproc = SHELL "install-pkg " & sPackagePath & Space(1) & ClsGlobal.sTargetMnt & " || echo \'FAILED\'" FOR READ + IF Right(sPackagePath, 3) LIKE "t?z" THEN + hproc = SHELL "installpkg " & sPackagePath & " -R " & ClsGlobal.sTargetMnt & " || echo \'FAILED\'" FOR READ + ENDIF WAIT 1 IF hproc.State = Process.Running THEN REPEAT Modified: branches/iVL/MdlInstallSys.module ============================================================================== --- branches/iVL/MdlInstallSys.module (original) +++ branches/iVL/MdlInstallSys.module Sun Aug 24 10:59:38 2008 @@ -27,7 +27,7 @@ ' this is where we need to set the mount target - 'ClsGlobal.sTargetMnt = "/mnt/target" + ClsGlobal.sTargetMnt = "/mnt/target" IF Exist(ClsGlobal.sTargetMnt) = FALSE THEN @@ -58,21 +58,16 @@ SHELL "mkdir -p " & ClsGlobal.sTargetMnt &/ "tmp" WAIT SHELL "mount " & ClsPartSel.sTmp & Space(1) & ClsGlobal.sTargetMnt &/ "tmp -t " & ClsPartSel.fTmp WAIT END IF - - - + 'WRITE THE NEW FSTAB NOW, RIGHT BEFORE INSTALLING PACKAGES. 'ME.WRITE_NEW_FSTAB() ' do this from the install form 'redirect to packages install 'ME.INSTALL_PACKAGES() ' FROM HERE, DECIDE WHICH WAY TO GO - + 'ClsGlobal.sTargetMnt = "/home/moises/mnt/target" ' for testing only - - - IF ClsPkgSel.bCustom = TRUE THEN MdlInstallCustom.PERFORM_CUSTOM_INSTALL ELSE @@ -88,6 +83,8 @@ DIM sMountPoint AS String DIM sMntOpts AS String DIM i, ii AS Integer + DIM sLinPart AS String + DIM sLinMntPnt AS String DIM sWinPart AS String DIM sWinMntPnt AS String DIM sFstab AS String @@ -96,7 +93,7 @@ 'FOR testing purposes - ClsPartSel.sRoot = "/home/moises/mnt/target" + 'ClsPartSel.sRoot = "/mnt/target" @@ -177,7 +174,12 @@ IF ClsPartSel.sTmp THEN sFstab = sFstab & gb.NewLine & ClsPartSel.sTmp & " /tmp " & LCase(ClsPartSel.fTmp) & " " & ME.fS_oPTIONS(LCase(ClsPartSel.fTmp)) & " 0 2 " END IF - +IF ClsPartSel.sLinuxPart THEN + FOR i = 0 TO ClsPartSel.sLinuxPart.Count - 1 + sLinPart = ClsPartSel.sLinuxPart[i] + sLinMntPnt = ClsPartSel.sLinuxPart[i] + NEXT +ENDIF sFstab = sFstab & "\n\n" & "# Shared Windows/Linux partition" & "#/dev/hda1 /mnt/dos msdos umask=0 0 0 \n" & @@ -295,7 +297,7 @@ END WITH iPkgCnt = MdlSetup.CALCULATE_PACKAGE_COUNT(FALSE) - Message.Info("Total packages = " & iPkgCnt) + 'Message.Info("Total packages = " & iPkgCnt) PRINT "Installing bulks" MdlSetup.SHOW_PROGRESS_CONTROLS() iret = ME.INSTALL_BULK_PACKAGES() @@ -336,10 +338,14 @@ MdlInstallSys.WRITE_NEW_FSTAB() FrmInstallSys.pbInstallProg.Value = 1 FrmInstallSys.pbInstallProg2.Value = 1 - Message.Info("Vectorlinux is now installed in your system. Please Exit the installer") + 'Message.Info("Vectorlinux is now installed in your system. Please click next to configure it.") + FrmInstallSys.tlBanner.Text = "Vectorlinux is now installed in your system. Please click next to configure it." + FrmInstallSys.tlCurrPkg.Text = "packages have been installed in your system. Please click next to configure it." WITH FMain .btQuit.Enabled = TRUE .btQuit.ForeColor = Color.Black + .btnext.Enabled = TRUE + .btnext.ForeColor = Color.Black END WITH 'MdlCore.unlock_gui() END @@ -468,7 +474,10 @@ sDump = "" sErr = "" - hproc = SHELL "install-pkg " & sPath_To_Package & Space(1) & ClsGlobal.sTargetMnt & " || echo \'FAILED\'" FOR READ + 'hproc = SHELL "install-pkg " & sPath_To_Package & Space(1) & ClsGlobal.sTargetMnt & " || echo \'FAILED\'" FOR READ + IF Right(sPath_To_Package, 3) LIKE "t?z" THEN + hproc = SHELL "installpkg " & sPath_To_Package & " -R " & ClsGlobal.sTargetMnt & " || echo \'FAILED\'" FOR READ + ENDIF END @@ -641,7 +650,8 @@ sDump = "" sErr = "" - hproc = SHELL "install-pkg " & sTlzBasePath &/ sTlzPath &/ sTlzName & Space(1) & ClsGlobal.sTargetMnt & " || echo \'FAILED\'" FOR READ + 'hproc = SHELL "install-pkg " & sTlzBasePath &/ sTlzPath &/ sTlzName & Space(1) & ClsGlobal.sTargetMnt & " || echo \'FAILED\'" FOR READ + hproc = SHELL "installpkg " & sTlzBasePath &/ sTlzPath &/ sTlzName & " -R " & ClsGlobal.sTargetMnt & " || echo \'FAILED\'" FOR READ WAIT 1 IF hproc.State = Process.Running THEN REPEAT @@ -699,7 +709,8 @@ PRINT sTlzName & sTlzPath 'sDump = "" 'sErr = "" - FrmInstallSys.tlCurrPkg.Text = "Installing " & File.Name(sTlzPath) & " ..." + 'FrmInstallSys.tlCurrPkg.Text = "Installing " & File.Name(sTlzPath) & " ..." + FrmInstallSys.tlCurrPkg.Text = "Installing Required Packages ..." 'FrmInstallSys.pbInstallProg.Value = 0.0 'figure out the progress again Modified: branches/iVL/MdlLiloOsList.module ============================================================================== --- branches/iVL/MdlLiloOsList.module (original) +++ branches/iVL/MdlLiloOsList.module Sun Aug 24 10:59:38 2008 @@ -251,10 +251,14 @@ FrmLilo.TabStrip1.Count = FrmLilo.TabStrip1.count + 1 'arrLinux.Count - 1 sLiloDesc = ME.ID_DISTRO("/tmp/lilo_tmp") - + WITH FrmLilo.TabStrip1 .Index = FrmLilo.TabStrip1.count - 1 + IF arrLinux[i] = ClsPartSel.sRoot THEN + .text = "Linux" + ELSE .text = sLiloDesc & "-" & sShortAddr + ENDIF tl = NEW TextLabel(FrmLilo.TabStrip1) AS "OSIntro" WITH tl .text = "<b>Operating system installed in " & arrLinux[i] & "</b>" Modified: branches/iVL/MdlPartSel.module ============================================================================== --- branches/iVL/MdlPartSel.module (original) +++ branches/iVL/MdlPartSel.module Sun Aug 24 10:59:38 2008 @@ -194,7 +194,7 @@ END IF - + 'SHELL " probepart | grep -i \" *swap$\" | cut -f 1 -d \' \' | grep -e /dev" TO sSwapList SHELL "probepart | grep -i \"swap\" | cut -f 1 -d \' \' | grep -e \"/dev\"" TO sSwapList @@ -219,8 +219,7 @@ .Height = 27 .Alignment = Align.Normal .tag = sSwaps[ii] - END WITH - + END WITH cb = NEW ComboBox(FrmPartSel.scrollPartitions) AS "swapsel" WITH cb .y = y @@ -230,12 +229,13 @@ .Add("Swap") .tag = sPart END WITH + y = y + cb.height + 4 ME.oSwaps.Add(cb) y = y + cb.Height + 4 NEXT END IF - + FOR EACH cb IN MdlPartSel.oMountPoints IF cb.width > iWidth THEN iWidth = cb.Width @@ -358,7 +358,8 @@ END PUBLIC SUB SET_SELECTED_PARTITION(SPartition AS String, sMountPoint AS String) - + DIM i AS Integer + i = 0 SELECT CASE sMountPoint CASE "/" FrmPartSel.sRootAddr = SPartition @@ -378,6 +379,9 @@ CASE "/tmp" FrmPartSel.sTmpAddr = SPartition ClsPartSel.sTmp = SPartition + 'CASE LIKE "/mnt/" + ' ClsPartSel.sLinuxPart[i] = SPartition + 'INC i END SELECT END Modified: branches/iVL/installer.gambas ============================================================================== Binary files. No diff available. |