|
From: <cod...@go...> - 2008-07-18 01:29:42
|
Author: M0...@gm...
Date: Thu Jul 17 18:28:53 2008
New Revision: 49
Added:
branches/iVL/installer.gambas (contents, props changed)
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/FMain.class
branches/iVL/MdlCore.module
branches/iVL/MdlDiskPart.module
branches/iVL/MdlPartSel.module
branches/iVL/MdlSetup.module
branches/iVL/MdlWinDrives.module
Log:
Added binary and cleaned out the sudo stuff to get ready to test in a
real environment. The partition detection is still having problems...
need to fix now
Modified: branches/iVL/.lang/#project.pot
==============================================================================
--- branches/iVL/.lang/#project.pot (original)
+++ branches/iVL/.lang/#project.pot Thu Jul 17 18:28:53 2008
@@ -1,4 +1,4 @@
-# /home/moises/area-51/projects/installer/.project
+# /home/moises/area-51/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 18:28:53 2008
@@ -1,4 +1,4 @@
-# /home/moises/area-51/projects/installer/ClsGlobal.class
+# /home/moises/area-51/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 18:28:53 2008
@@ -1,4 +1,4 @@
-# /home/moises/area-51/projects/installer/FMain.class
+# /home/moises/area-51/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 18:28:53 2008
@@ -1,4 +1,4 @@
-# /home/moises/area-51/projects/installer/FrmDiskPart.class
+# /home/moises/area-51/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 18:28:53 2008
@@ -1,4 +1,4 @@
-# /home/moises/area-51/projects/installer/FrmLicense.class
+# /home/moises/area-51/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 18:28:53 2008
@@ -1,4 +1,4 @@
-# /home/moises/area-51/projects/installer/FrmPartScheme.class
+# /home/moises/area-51/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 18:28:53 2008
@@ -1,4 +1,4 @@
-# /home/moises/area-51/projects/installer/FrmPartSel.class
+# /home/moises/area-51/installer/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 Thu Jul 17 18:28:53 2008
@@ -1,4 +1,4 @@
-# /home/moises/area-51/projects/installer/FrmSelISO.class
+# /home/moises/area-51/installer/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 Thu Jul 17 18:28:53 2008
@@ -1,4 +1,4 @@
-# /home/moises/area-51/projects/installer/MdlCore.module
+# /home/moises/area-51/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 18:28:53 2008
@@ -1,4 +1,4 @@
-# /home/moises/area-51/projects/installer/MdlDiskPart.module
+# /home/moises/area-51/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 18:28:53 2008
@@ -1,4 +1,4 @@
-# /home/moises/area-51/projects/installer/MdlObjSizer.module
+# /home/moises/area-51/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 18:28:53 2008
@@ -1,4 +1,4 @@
-# /home/moises/area-51/projects/installer/MdlPartSel.module
+# /home/moises/area-51/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 18:28:53 2008
@@ -1,4 +1,4 @@
-# /home/moises/area-51/projects/installer/MdlSetup.module
+# /home/moises/area-51/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 18:28:53 2008
@@ -1,7 +1,7 @@
# Gambas Project File 2.0
Title=VectorLinux Installer
Startup=MdlCore
-Version=0.0.1
+Version=0.0.7
Library=gb.gtk
Library=gb.form
Library=gb.desktop
Modified: branches/iVL/FMain.class
==============================================================================
--- branches/iVL/FMain.class (original)
+++ branches/iVL/FMain.class Thu Jul 17 18:28:53 2008
@@ -27,7 +27,7 @@
END
PUBLIC SUB Form_Open()
-ClsGlobal.sSourceMnt = User.Home &/ "mnt" &/ "cdrom"
+ClsGlobal.sSourceMnt = "/mnt" &/ "cdrom"
FrmSelISO.Reparent(ME.pnlWinHost)
FrmSelISO.Width = pnlWinHost.Width
FrmSelISO.Height = pnlWinHost.Height
Modified: branches/iVL/MdlCore.module
==============================================================================
--- branches/iVL/MdlCore.module (original)
+++ branches/iVL/MdlCore.module Thu Jul 17 18:28:53 2008
@@ -32,8 +32,8 @@
DIM sResults, sISO AS String
DIM i AS Integer
- SHELL "sudo umount " & ClsGlobal.sSourceMnt WAIT
- SHELL "sudo mount " & sDrive & Space(1) & ClsGlobal.sSourceMnt WAIT
+ 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
sResults = Trim(sResults)
'Message(sResults)
@@ -43,32 +43,32 @@
sISOList = Split(sResults, gb.NewLine)
FOR i = 0 TO sISOList.count - 1
sIso = Trim(sISOList[i])
- SHELL "sudo umount /mnt/loop" WAIT
- SHELL "sudo mount -o loop " & ClsGlobal.sSourceMnt
&/ sISO & Space(1) & "/mnt/loop" WAIT
+ SHELL "umount /mnt/loop" WAIT
+ SHELL "mount -o loop " & ClsGlobal.sSourceMnt &/
sISO & Space(1) & "/mnt/loop" WAIT
File.Save(Temp(siso), File.Load("/mnt/loop/veclinux/SETUP.CONF"))
- SHELL "sudo umount /mnt/loop" WAIT
+ SHELL "umount /mnt/loop" WAIT
IF FrmSelISO.lstInstallableImg.Find(sISO & "
on " & sDrive) = -1 THEN
FrmSelISO.lstInstallableImg.Add(sISO & " on "
& sDrive)
END IF
NEXT
- SHELL "sudo umount " & ClsGlobal.sSourceMnt WAIT
+ SHELL "umount " & ClsGlobal.sSourceMnt WAIT
ELSE ' only one iso found
- SHELL "sudo umount /mnt/loop" WAIT 'clear the mount point
- SHELL "sudo mount -o loop " & ClsGlobal.sSourceMnt &/
sResults & Space(1) & " /mnt/loop" WAIT
+ SHELL "umount /mnt/loop" WAIT 'clear the mount point
+ 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 "sudo umount /mnt/loop && sudo 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
END IF
ELSE 'no ISO's found
- SHELL "sudo umount " & ClsGlobal.sSourceMnt
+ SHELL "umount " & ClsGlobal.sSourceMnt
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 && 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
sResults = Trim(sResults)
'Message.Info(sResults)
IF InStr(sResults, gb.NewLine) THEN
@@ -118,10 +118,10 @@
- ClsGlobal.sSourceMnt = User.home &/ "mnt" &/ "cdrom"
+ ClsGlobal.sSourceMnt = "/mnt/cdrom"
sMountPoint = ClsGlobal.sSourceMnt
- sCmd = "sudo 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 | sed -r \'s/ /\\n/g\'"
SHELL sCmd TO sList
sList = Trim(sList)
'PRINT sList
@@ -134,7 +134,7 @@
'first, clear the mount point (using $HOME/mnt/cdrom for now)
sDrive = Trim(sDrives[i])
- SHELL "sudo 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 +150,12 @@
END IF
- SHELL "sudo umount /dev/" & sDrive WAIT
+ SHELL " umount /dev/" & sDrive WAIT
NEXT
ELSE ' only one drive found
sDrive = Trim(sList)
- SHELL "sudo 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
@@ -172,7 +172,7 @@
END IF
'sHELL "sudo umount /dev/" & sDrive WAIT
- SHELL "sudo umount " & ClsGlobal.sSourceMnt WAIT
+ SHELL " umount " & ClsGlobal.sSourceMnt WAIT
CATCH
Message( ERROR )
@@ -430,7 +430,7 @@
ClsGlobal.iSwapMin = CInt(iswap)
ELSE 'i can't see the file
- Message.Error("Cannot find SETUP.CONF")
+ Message.Error("Cannot find SETUP.CONF in" & sFilePath)
END IF
END
Modified: branches/iVL/MdlDiskPart.module
==============================================================================
--- branches/iVL/MdlDiskPart.module (original)
+++ branches/iVL/MdlDiskPart.module Thu Jul 17 18:28:53 2008
@@ -33,7 +33,7 @@
END IF
FrmDiskPart.tlBanner.Text = "<h3>Loading gparted .... Please wait</h3>"
- SHELL "sudo /usr/sbin/gparted"
+ SHELL " /usr/sbin/gparted"
WAIT 3
sTitle = "GParted"
Modified: branches/iVL/MdlPartSel.module
==============================================================================
--- branches/iVL/MdlPartSel.module (original)
+++ branches/iVL/MdlPartSel.module Thu Jul 17 18:28:53 2008
@@ -42,7 +42,7 @@
' We will mount the partitions first, and then figure out their size
- SHELL "export PATH=$PATH:/sbin && sudo probepart | grep -e \"
Linux$\" | cut -f 1 -d \' \'" TO sDump1
+ SHELL "export PATH=$PATH:/sbin && 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 "sudo mkdir /mnt" &/ sPart WAIT
+ SHELL " mkdir /mnt" &/ sPart WAIT
END IF
' Now mount the partition
- SHELL "sudo 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 "sudo umount /mnt" &/ sPart & " && sudo 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 && sudo probepart | grep -i \"
*swap$\" | cut -f 1 -d \' \'" TO sSwapList
+ SHELL "export PATH=$PATH:/sbin && probepart | grep -i \"
*swap$\" | cut -f 1 -d \' \'" TO sSwapList
sSwapList = Trim(sSwapList)
'Message.Info(sSwapList)
IF InStr(sSwapList, gb.NewLine) THEN
@@ -148,7 +148,8 @@
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=$(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
iswapsize = CInt(vSwapSize)
iswapsize = Round(iswapsize / 1024 / 1024, -2)
Modified: branches/iVL/MdlSetup.module
==============================================================================
--- branches/iVL/MdlSetup.module (original)
+++ branches/iVL/MdlSetup.module Thu Jul 17 18:28:53 2008
@@ -25,13 +25,13 @@
'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 "sudo mkdir -p /mnt" &/ sAddy & " && sudo mount " & sDev &
Space(1) & "/mnt" &/ sAddy WAIT
- SHELL "sudo 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 "sudo mount -t iso9660 " & sDev & Space(1) &
ClsGlobal.sSourceMnt WAIT
+ SHELL " mount -t iso9660 " & sDev & Space(1) &
ClsGlobal.sSourceMnt WAIT
END IF
' display the license agreement text
@@ -54,8 +54,8 @@
DIM sFATList AS String
DIM sFAT32List AS String
- SHELL "sudo probepart | grep -e \"^/dev.*FAT32$\" | sed \'s/\\*/ /\'"
TO sFAT32List
- SHELL "sudo 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 18:28:53 2008
@@ -38,7 +38,7 @@
' MOVE THESE PARTITIONS TO A DIFFERENT WINDOW.
' THESE ARE ONLY NEEDED FOR FSTAB
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
+ 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[]
@@ -66,12 +66,12 @@
FOR i = 0 TO sPartList.Count - 1
sPart = Right(sPartList[i], Len(sPartList[i]) - RInStr(sPartList[i], "/"))
- SHELL "sudo mkdir /mnt" &/ spart & " && sudo 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 "sudo umount /mnt" &/ spart
- SHELL "sudo rm -rf /mnt" &/ spart
+ SHELL " umount /mnt" &/ spart
+ SHELL " rm -rf /mnt" &/ spart
tl = NEW TextLabel(FrmWinDrives.svWinDrives) AS "WinPartitions"
WITH tl
@@ -115,7 +115,7 @@
sPart = Right(sDump1, Len(sDump1) - RInStr(sDump1, "/"))
'Message(sPart)
- SHELL "sudo mkdir -p /mnt" &/ spart & " && sudo 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)
@@ -133,8 +133,8 @@
.y = y
END WITH
- SHELL "sudo umount /mnt" &/ spart WAIT
- SHELL "sudo rm -rf /mnt" &/ spart WAIT
+ SHELL " umount /mnt" &/ spart WAIT
+ SHELL " rm -rf /mnt" &/ spart WAIT
END IF
ELSE
' no widnows partitions found
Added: branches/iVL/installer.gambas
==============================================================================
Binary file. No diff available.
|