|
From: <cod...@go...> - 2008-11-05 22:32:58
|
Author: M0E.lnx
Date: Wed Nov 5 14:31:19 2008
New Revision: 263
Added:
branches/iVL/FrmUsrPkgSel.class
branches/iVL/FrmUsrPkgSel.form
branches/iVL/MdlPkgSelNew.module
branches/iVL/images/16px-Nocheck.png (contents, props changed)
branches/iVL/images/16px-check.png (contents, props changed)
Modified:
branches/iVL/.lang/ClsGlobal.pot
branches/iVL/.lang/ClsPartSel.pot
branches/iVL/.lang/ClsWinDrives.pot
branches/iVL/.lang/FMain.pot
branches/iVL/.lang/FrmDiskPart.pot
branches/iVL/.lang/FrmPartScheme.pot
branches/iVL/.lang/FrmPartSel.pot
branches/iVL/.lang/FrmPkgSel.pot
branches/iVL/.lang/FrmSelISO.pot
branches/iVL/.lang/FrmSummary.pot
branches/iVL/.lang/FrmWinDrives.pot
branches/iVL/.lang/MdlCore.pot
branches/iVL/.lang/MdlDiskPart.pot
branches/iVL/.lang/MdlObjSizer.pot
branches/iVL/.lang/MdlPartSel.pot
branches/iVL/.lang/MdlPkgSel.pot
branches/iVL/.lang/MdlSetup.pot
branches/iVL/.lang/MdlSummarize.pot
branches/iVL/.lang/MdlWinDrives.pot
branches/iVL/DevLog
branches/iVL/FMain.class
branches/iVL/FrmNetConf.class
branches/iVL/FrmNetConf.form
branches/iVL/FrmSummary.class
branches/iVL/MdlInstallCustom.module
branches/iVL/MdlNetConf.module
Log:
- Fixed bug with hostname/domain name
- Began implementing new package selection window
This will eliminate the lag and memmory useage
required to display full package descriptions on
the software selection phase
Modified: branches/iVL/.lang/ClsGlobal.pot
==============================================================================
--- branches/iVL/.lang/ClsGlobal.pot (original)
+++ branches/iVL/.lang/ClsGlobal.pot Wed Nov 5 14:31:19 2008
@@ -1,4 +1,4 @@
-# /home/rbistolfi/vinstall-ng/ClsGlobal.class
+# /home/vluser/devel/installer/ClsGlobal.class
# Generated by Gambas compiler
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
Modified: branches/iVL/.lang/ClsPartSel.pot
==============================================================================
--- branches/iVL/.lang/ClsPartSel.pot (original)
+++ branches/iVL/.lang/ClsPartSel.pot Wed Nov 5 14:31:19 2008
@@ -1,4 +1,4 @@
-# /home/rbistolfi/vinstall-ng/ClsPartSel.class
+# /home/vluser/devel/installer/ClsPartSel.class
# Generated by Gambas compiler
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
Modified: branches/iVL/.lang/ClsWinDrives.pot
==============================================================================
--- branches/iVL/.lang/ClsWinDrives.pot (original)
+++ branches/iVL/.lang/ClsWinDrives.pot Wed Nov 5 14:31:19 2008
@@ -1,4 +1,4 @@
-# /home/rbistolfi/vinstall-ng/ClsWinDrives.class
+# /home/vluser/devel/installer/ClsWinDrives.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 Wed Nov 5 14:31:19 2008
@@ -1,4 +1,4 @@
-# /home/rbistolfi/vinstall-ng/FMain.class
+# /home/vluser/devel/installer/FMain.class
# Generated by Gambas compiler
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
@@ -18,83 +18,91 @@
msgid "Restart"
msgstr ""
-#: FMain.class:211
+#: FMain.class:212
msgid "Please wait while setup attampts to run the partitioning utility"
msgstr ""
-#: FMain.class:213
+#: FMain.class:214
msgid "Please wait while setup analyses your current partition setup."
msgstr ""
-#: FMain.class:213
+#: FMain.class:214
msgid "This may take a while ..."
msgstr ""
-#: FMain.class:227
+#: FMain.class:228
msgid "You must select a \"/\" partition. This is the target where the
system will install to"
msgstr ""
-#: FMain.class:279
+#: FMain.class:283
msgid "Please select a default operating system to boot before proceeding"
msgstr ""
-#: FMain.class:280
+#: FMain.class:284
msgid "Select an entry from this list"
msgstr ""
-#: FMain.class:291
+#: FMain.class:295
msgid "Skipping lilo setup"
msgstr ""
-#: FMain.class:305
+#: FMain.class:309
msgid "Passwords do not match. Please enter the same password twice"
msgstr ""
-#: FMain.class:320
+#: FMain.class:324
msgid "You have not created any user accounts for this system yet. There
is not enough information"
msgstr ""
-#: FMain.class:320
+#: FMain.class:324
msgid "to create an account here. It is recommended that you create at
least one."
msgstr ""
-#: FMain.class:320
+#: FMain.class:324
msgid "Would you like to continue anyway?"
msgstr ""
-#: FMain.class:320
+#: FMain.class:324
msgid "Yes"
msgstr ""
-#: FMain.class:320
+#: FMain.class:324
msgid "No"
msgstr ""
-#: FMain.class:343
+#: FMain.class:341
+msgid "Please specify a hostname for this computer"
+msgstr ""
+
+#: FMain.class:345
+msgid "Please specify the domain this computer belongs to"
+msgstr ""
+
+#: FMain.class:358
msgid "VectorLinux will now try to detect and configure your graphics
hardware."
msgstr ""
-#: FMain.class:343
-msgid "Your screen may flicker or go blank during this process for a few
seconds during this process."
+#: FMain.class:358
+msgid "Your screen may flicker or go blank for a few seconds during this
process."
msgstr ""
-#: FMain.class:494
+#: FMain.class:509
msgid "Process Overview"
msgstr ""
-#: FMain.class:514
+#: FMain.class:529
msgid "Next"
msgstr ""
-#: FMain.class:520
+#: FMain.class:535
msgid "Back"
msgstr ""
-#: FMain.class:526
+#: FMain.class:541
msgid "Exit Installation"
msgstr ""
-#: FMain.class:542
+#: FMain.class:557
msgid "Button1"
msgstr ""
Modified: branches/iVL/.lang/FrmDiskPart.pot
==============================================================================
--- branches/iVL/.lang/FrmDiskPart.pot (original)
+++ branches/iVL/.lang/FrmDiskPart.pot Wed Nov 5 14:31:19 2008
@@ -1,4 +1,4 @@
-# /home/rbistolfi/vinstall-ng/FrmDiskPart.class
+# /home/vluser/devel/installer/FrmDiskPart.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 Wed Nov 5 14:31:19 2008
@@ -1,4 +1,4 @@
-# /home/rbistolfi/vinstall-ng/FrmPartScheme.class
+# /home/vluser/devel/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 Wed Nov 5 14:31:19 2008
@@ -1,4 +1,4 @@
-# /home/rbistolfi/vinstall-ng/FrmPartSel.class
+# /home/vluser/devel/installer/FrmPartSel.class
# Generated by Gambas compiler
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
Modified: branches/iVL/.lang/FrmPkgSel.pot
==============================================================================
--- branches/iVL/.lang/FrmPkgSel.pot (original)
+++ branches/iVL/.lang/FrmPkgSel.pot Wed Nov 5 14:31:19 2008
@@ -1,4 +1,4 @@
-# /home/rbistolfi/vinstall-ng/FrmPkgSel.class
+# /home/vluser/devel/installer/FrmPkgSel.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 Nov 5 14:31:19 2008
@@ -1,4 +1,4 @@
-# /home/rbistolfi/vinstall-ng/FrmSelISO.class
+# /home/vluser/devel/installer/FrmSelISO.class
# Generated by Gambas compiler
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
Modified: branches/iVL/.lang/FrmSummary.pot
==============================================================================
--- branches/iVL/.lang/FrmSummary.pot (original)
+++ branches/iVL/.lang/FrmSummary.pot Wed Nov 5 14:31:19 2008
@@ -1,4 +1,4 @@
-# /home/rbistolfi/vinstall-ng/FrmSummary.class
+# /home/vluser/devel/installer/FrmSummary.class
# Generated by Gambas compiler
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
@@ -66,15 +66,15 @@
msgid "USER-SELECTED PACKAGES"
msgstr ""
-#: FrmSummary.class:243
+#: FrmSummary.class:257
msgid "Installation Type"
msgstr ""
-#: FrmSummary.class:253
+#: FrmSummary.class:267
msgid "Partition Selection Scheme"
msgstr ""
-#: FrmSummary.class:263
+#: FrmSummary.class:277
msgid "Software Selection"
msgstr ""
Modified: branches/iVL/.lang/FrmWinDrives.pot
==============================================================================
--- branches/iVL/.lang/FrmWinDrives.pot (original)
+++ branches/iVL/.lang/FrmWinDrives.pot Wed Nov 5 14:31:19 2008
@@ -1,4 +1,4 @@
-# /home/rbistolfi/vinstall-ng/FrmWinDrives.class
+# /home/vluser/devel/installer/FrmWinDrives.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 Nov 5 14:31:19 2008
@@ -1,4 +1,4 @@
-# /home/rbistolfi/vinstall-ng/MdlCore.module
+# /home/vluser/devel/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 Wed Nov 5 14:31:19 2008
@@ -1,4 +1,4 @@
-# /home/rbistolfi/vinstall-ng/MdlDiskPart.module
+# /home/vluser/devel/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 Wed Nov 5 14:31:19 2008
@@ -1,4 +1,4 @@
-# /home/rbistolfi/vinstall-ng/MdlObjSizer.module
+# /home/vluser/devel/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 Wed Nov 5 14:31:19 2008
@@ -1,4 +1,4 @@
-# /home/rbistolfi/vinstall-ng/MdlPartSel.module
+# /home/vluser/devel/installer/MdlPartSel.module
# Generated by Gambas compiler
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
Modified: branches/iVL/.lang/MdlPkgSel.pot
==============================================================================
--- branches/iVL/.lang/MdlPkgSel.pot (original)
+++ branches/iVL/.lang/MdlPkgSel.pot Wed Nov 5 14:31:19 2008
@@ -1,4 +1,4 @@
-# /home/rbistolfi/vinstall-ng/MdlPkgSel.module
+# /home/vluser/devel/installer/MdlPkgSel.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 Nov 5 14:31:19 2008
@@ -1,4 +1,4 @@
-# /home/rbistolfi/vinstall-ng/MdlSetup.module
+# /home/vluser/devel/installer/MdlSetup.module
# Generated by Gambas compiler
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
Modified: branches/iVL/.lang/MdlSummarize.pot
==============================================================================
--- branches/iVL/.lang/MdlSummarize.pot (original)
+++ branches/iVL/.lang/MdlSummarize.pot Wed Nov 5 14:31:19 2008
@@ -1,4 +1,4 @@
-# /home/rbistolfi/vinstall-ng/MdlSummarize.module
+# /home/vluser/devel/installer/MdlSummarize.module
# Generated by Gambas compiler
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
Modified: branches/iVL/.lang/MdlWinDrives.pot
==============================================================================
--- branches/iVL/.lang/MdlWinDrives.pot (original)
+++ branches/iVL/.lang/MdlWinDrives.pot Wed Nov 5 14:31:19 2008
@@ -1,4 +1,4 @@
-# /home/rbistolfi/vinstall-ng/MdlWinDrives.module
+# /home/vluser/devel/installer/MdlWinDrives.module
# Generated by Gambas compiler
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
Modified: branches/iVL/DevLog
==============================================================================
--- branches/iVL/DevLog (original)
+++ branches/iVL/DevLog Wed Nov 5 14:31:19 2008
@@ -1,4 +1,2 @@
-- Restored code to automatically list the translations provided by looking
in .lang
-- Modified the way the installer ends. Added final message window instead
of a message.warning
-- Added warning right before quietly configuring X letting the user know
that the screen may flicker.
-- Updated binary
+- Fixed EXEC line that triggers when installer is done
+- Fixed duplicate "During this process" in message.wrarning before setting
up X
Modified: branches/iVL/FMain.class
==============================================================================
--- branches/iVL/FMain.class (original)
+++ branches/iVL/FMain.class Wed Nov 5 14:31:19 2008
@@ -175,7 +175,8 @@
tvPlan.Refresh()
IF LAST.TEXT = ("Restart") THEN
- EXEC "shutdown -r now"
+ 'EXEC "shutdown", "-r", " now"
+ EXEC ["shutdown", "-r", "now"]
ELSE
IF FrmLangSel.Visible = TRUE THEN
@@ -246,13 +247,16 @@
'get the list of selected bulks only
MdlPkgSel.GET_USER_BULK_SELECTION()
- frmNext = FrmPkgsel2
+ 'frmNext = FrmPkgsel2
+ frmNext = FrmUsrPkgSel
ELSE
' Going for simple install. Now we are ready to summarize
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
MdlSummarize.SUMMARIZE_INSTALL
frmNext = FrmSummary
END IF
- CASE "FrmPkgsel2"
+
+
+ CASE "FrmPkgsel2", "FrmUsrPkgSel"
' summarize the build
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
MdlSummarize.SUMMARIZE_INSTALL
frmNext = FrmSummary
@@ -333,14 +337,25 @@
CASE "FrmNetConf"
- MdlNetConf.SET_HOSTNAME(FrmNetConf.txtHostName.text)
+ IF Trim(FrmNetConf.txtHostName.Text) = "" THEN
+ Balloon.Error(("Please specify a hostname for this computer"),
FrmNetConf.txtHostName)
+ RETURN
+ END IF
+ IF Trim(FrmNetConf.tbDomain.Text) = "" THEN
+ Balloon.Error(("Please specify the domain this computer belongs
to"), FrmNetConf.tbDomain)
+ RETURN
+ END IF
+
+
+
+ MdlNetConf.SET_HOSTNAME(FrmNetConf.txtHostName.text,
FrmNetConf.tbDomain.Text)
MdlNetConf.SET_DNS_ADDRESSES()
MdlNetConf.WRITE_INET()
' CONFIGURE X QUIETLY HERE
Message.Warning(("VectorLinux will now try to detect and
configure your graphics hardware.") & "<br>" &
- ("Your screen may flicker or go blank during this process for a
few seconds during this process."))
+ ("Your screen may flicker or go blank for a few seconds during
this process."))
MdlXconf.QUIET_XORG_CONFIGURATION()
Modified: branches/iVL/FrmNetConf.class
==============================================================================
--- branches/iVL/FrmNetConf.class (original)
+++ branches/iVL/FrmNetConf.class Wed Nov 5 14:31:19 2008
@@ -17,15 +17,27 @@
PUBLIC FUNCTION GET_CURRENT_HOST_NAME() AS String
DIM sRes AS String
+ DIM sDomain AS String
+ DIM sHost AS String
- SHELL "chroot " & ClsGlobal.sTargetMnt & " hostname" TO sRes
-
- sRes = Trim(sRes)
- IF sRes = "" THEN
+ 'SHELL "chroot " & ClsGlobal.sTargetMnt & " hostname" TO sRes
+ EXEC ["chroot " & ClsGlobal.sTargetMnt, "hostname"] TO sRes
+
+ IF sRes = "" THEN
sRes = "Vector.Linux.net"
END IF
- RETURN Trim(sRes)
+
+ sRes = Trim(sRes)
+ IF InStr(sRes, ".") THEN
+ sHost = Left(sRes, InStr(sRes, ".") - 1)
+ sDomain = Right(sRes, Len(sRes) - InStr(sRes, "."))
+ ' set the default domain name
+ FrmNetConf.tbDomain.Text = sDomain
+ END IF
+
+
+ RETURN Trim(sHost)
END
@@ -33,13 +45,13 @@
PUBLIC SUB Form_Open()
DIM cb AS ComboBox
FMain.FrmCurr = ME
+ ME.tlHostNameLbl.Alignment = Align.Normal
-
- WITH FMain
- .tvPlan["Conf3"].Picture = MdlCore.sDonePic
- .tvPlan["Conf4"].Picture = MdlCore.sNowPic
- .tvPlan["Conf4"].Selected = TRUE
- END WITH
+ ' ' WITH FMain
+ ' ' .tvPlan["Conf3"].Picture = MdlCore.sDonePic
+ ' ' .tvPlan["Conf4"].Picture = MdlCore.sNowPic
+ ' ' .tvPlan["Conf4"].Selected = TRUE
+ ' ' END WITH
ME.txtHostName.text = ME.GET_CURRENT_HOST_NAME()
@@ -64,6 +76,7 @@
'MdlNetConf.WRITE_INET() ' only enabled for testing. THis will get
triggered on the "next" button's click event
'MdlNetConf.SET_DNS_ADDRESSES
+ 'MdlNetConf.UPDATE_HOSTS_FILE(Trim(txtHostName.Text),
Trim(tbDomain.Text))
END
@@ -75,6 +88,8 @@
.hrSep.Move(4, .tlBanner.top + .tlBanner.Height - 4, .tlBanner.Width)
.tlHostNameLbl.Move(.tlBanner.Left, .tlBanner.top + .tlBanner.Height
+ 8, MdlObjSizer.get_object_width(.tlHostNameLbl.text), 21)
.txtHostName.Move(.tlHostNameLbl.left + .tlHostNameLbl.Width +
4, .tlHostNameLbl.top)
+ .tlDomainName.Move(.txtHostName.Left + .txtHostName.Width +
24, .txtHostName.top, MdlObjSizer.get_object_width(.tlDomainName.Text))
+ .tbDomain.Move(.tlDomainName.left + .tlDomainName.Width +
4, .tlDomainName.top, .txtHostName.Width)
.cbUseManDNS.Move(.tlHostNameLbl.Left, .tlHostNameLbl.top
+ .tlHostNameLbl.Height + 10,
MdlObjSizer.get_object_width(.cbUseManDNS.text) + 24)
.tlPrimaryDNS.Move(.cbUseManDNS.left, .cbUseManDNS.top
+ .cbUseManDNS.Height + 4, MdlObjSizer.get_object_width(.tlPrimaryDNS.text))
itxtboxleft = .tlPrimaryDNS.Left + .tlPrimaryDNS.Width + 24
@@ -95,5 +110,34 @@
ME.txtPrimaryDNS.Enabled = cbUseManDNS.Value
ME.txtSecDNS.Enabled = cbUseManDNS.Value
+
+END
+
+PUBLIC SUB txtHostName_KeyRelease()
+IF Key.Text THEN
+ IF Key.text LIKE "*[a-z]*" OR Key.text LIKE "*[A-Z]*" OR Key.text = "-"
OR Key.Text = "." OR Key.Text LIKE "*[0-9]*" THEN
+ 'Message("good")
+ ELSE
+ IF Key.text <> "-" OR Key.Text <> "." THEN
+ txtHostName.Text = Left(txtHostName.Text, Len(txtHostName.Text) - 1)
+ END IF
+ 'Message("Bad")
+ END IF
+END IF
+
+END
+
+PUBLIC SUB tbDomain_KeyRelease()
+
+ IF Key.Text THEN
+ IF Key.text LIKE "*[a-z]*" OR Key.text LIKE "*[A-Z]*" OR Key.text = "-"
OR Key.Text = "." OR Key.Text LIKE "*[0-9]*" THEN
+ 'Message("good")
+ ELSE
+ IF Key.text <> "-" OR Key.Text <> "." THEN
+ txtHostName.Text = Left(txtHostName.Text, Len(txtHostName.Text) - 1)
+ END IF
+ 'Message("Bad")
+ END IF
+END IF
END
Modified: branches/iVL/FrmNetConf.form
==============================================================================
--- branches/iVL/FrmNetConf.form (original)
+++ branches/iVL/FrmNetConf.form Wed Nov 5 14:31:19 2008
@@ -3,14 +3,20 @@
{ Form Form
MoveScaled(0,0,114,74)
Text = ("")
- { tlHostNameLbl TextLabel
- MoveScaled(1,8,16,3)
- Text = ("Computer Name")
+ { tlDomainName TextLabel
+ MoveScaled(47,8,9,3)
+ Text = ("Domain")
Alignment = Align.Normal
}
{ txtHostName TextBox
MoveScaled(18,8,28,3)
Text = ("")
+ MaxLength = 24
+ }
+ { tbDomain TextBox
+ MoveScaled(58,8,29,3)
+ Text = ("")
+ MaxLength = 24
}
{ frmNetDevices Frame
MoveScaled(1,20,85,49)
@@ -33,7 +39,7 @@
}
{ txtPrimaryDNS TextBox txtManDNSBoxes
Name = "txtPrimaryDNS"
- MoveScaled(24,16,18.3333,3)
+ MoveScaled(24,16,18.2857,3)
Enabled = False
Text = ("192.168.1.254")
}
@@ -44,7 +50,7 @@
}
{ txtSecDNS TextBox txtManDNSBoxes
Name = "txtSecDNS"
- MoveScaled(68,15,18.3333,3)
+ MoveScaled(68,15,18.2857,3)
Enabled = False
Text = ("")
}
@@ -55,5 +61,10 @@
}
{ hrSep Separator
MoveScaled(13,6,33,1)
+ }
+ { tlHostNameLbl TextLabel
+ MoveScaled(2,8,15,3)
+ Text = ("Computer Name")
+ Alignment = Align.Normal
}
}
Modified: branches/iVL/FrmSummary.class
==============================================================================
--- branches/iVL/FrmSummary.class (original)
+++ branches/iVL/FrmSummary.class Wed Nov 5 14:31:19 2008
@@ -154,7 +154,7 @@
PUBLIC SUB prepare_packages_summary()
- DIM irow AS Integer = 0
+ DIM irow, i AS Integer = 0
DIM sPkg, sSize AS String
DIM cb AS CheckBox
DIM sDesc AS String
@@ -190,15 +190,30 @@
GridView2[irow, 0].text = ("USER-SELECTED PACKAGES")
INC irow
- FOR EACH cb IN MdlPkgSel.Pkgs
- IF cb.Value = TRUE THEN
- INC GridView2.Rows.Count
- GridView2[irow, 0].text = File.BaseName(cb.tag)
- 'shell "
+ 'OLD CODE BASED ON THE CHECKBOX OBJECTS
+ i = 0
+ irow = 0
+ 'INC GridView2.Rows.Count
+ REPEAT
+ IF FrmUsrPkgSel.GridView1[i, 0].Picture =
FrmUsrPkgSel.pYes THEN
+ INC GridView2.Rows.Count
+ GridView2[irow, 0].Text = FrmUsrPkgSel.GridView1[i,
1].Text
+ END IF
+ INC i
INC irow
- END IF
-
- NEXT
+ UNTIL i = FrmUsrPkgSel.GridView1.Rows.count - 1
+
+ ' ' '
+ ' ' '
+ ' ' ' FOR EACH cb IN MdlPkgSel.Pkgs
+ ' ' ' IF cb.Value = TRUE THEN
+ ' ' ' INC GridView2.Rows.Count
+ ' ' ' GridView2[irow, 0].text = File.BaseName(cb.tag)
+ ' ' ' 'shell "
+ ' ' ' INC irow
+ ' ' ' END IF
+ ' ' '
+ ' ' ' NEXT
END
Added: branches/iVL/FrmUsrPkgSel.class
==============================================================================
--- (empty file)
+++ branches/iVL/FrmUsrPkgSel.class Wed Nov 5 14:31:19 2008
@@ -0,0 +1,108 @@
+' Gambas class file
+
+
+PUBLIC pYes AS Picture = Picture.Load("images/16px-check.png")
+PUBLIC pNo AS Picture = Picture.Load("images/16px-Nocheck.png")
+
+
+PUBLIC SUB Form_Open()
+
+FMain.FrmCurr = ME
+
+ WITH ME.GridView1
+ .Columns.count = 6
+ '.Rows.count = 2
+ .Columns[0].Width = 24
+ .Columns[1].Text = ("Package Name")
+ .Columns[2].text = ("Description")
+ .Columns[2].Width = 420
+ .Columns[3].text = ("Size")
+ .Columns[3].Width = 120
+ .Columns[4].Width = 0
+ .Columns[5].Width = 0
+
+ END WITH
+ME.LIST_PACKAGES
+END
+
+PUBLIC SUB LIST_PACKAGES()
+
+ 'DIM sFile AS String = File.Load("/tmp/PACKAGES.TXT")
+ DIM sFile AS String = File.Load(ClsGlobal.sSourceMnt &/ "packages"
&/ "PACKAGES.TXT")
+ DIM sPACKAGES AS String[]
+ DIM i, ii AS Integer
+ DIM sLine, sPkg, sDesc, sSize, sLoc AS String
+
+ sPACKAGES = Split(sFile, "\n")
+ FOR i = 0 TO sPACKAGES.count - 1
+
+ sLine = Trim(sPACKAGES[i])
+ IF Left(sLine, Len("PACKAGE NAME:")) = "PACKAGE NAME:" THEN
+ INC GridView1.Rows.Count
+
+ sPkg = Trim(Right(sLine, Len(sLine) - InStr(sLine, ":")))
+ sSize = sPACKAGES[i + 3]
+ sLoc = sPACKAGES[i + 1]
+ sSize = Right(sSize, Len(sSize) - InStr(sSize, ":"))
+ sSize = Replace(sSize, "*[A-Z]", "")
+ sLoc = Right(sLoc, Len(sLoc) - InStr(sLoc, "/"))
+
+ ' Add to the list
+ 'ME.GridView1[ii, 1].text = sPkg
+ ME.GridView1[ii, 0].Picture = pYes
+ EXEC ["pkgname", sPkg] TO ME.GridView1[ii, 1].Text
+ ME.GridView1[ii, 3].Text = sSize
+ ME.GridView1[ii, 4].Text = sLoc
+ ME.GridView1[ii, 5].Text = sPkg
+ ELSE IF Left(sLine, Len("PACKAGE DESCRIPTION:")) = "PACKAGE
DESCRIPTION:" THEN
+ sDesc = sPACKAGES[i + 1]
+ sDesc = Right(sDesc, Len(sDesc) - InStr(sDesc, ":"))
+ sDesc = Trim(sDesc)
+ IF InStr(sDesc, "(") THEN
+ sDesc = Right(sDesc, Len(sDesc) -
InStr(sDesc, "("))
+ sDesc = Replace(sDesc, ")", "")
+ END IF
+
+ ' Add description
+ ME.GridView1[ii, 2].text = sDesc
+
+
+
+ INC ii
+ 'INC GridView1.Rows.Count
+ END IF
+
+
+ NEXT
+
+
+
+
+
+
+END
+
+
+PUBLIC SUB GridView1_Click()
+
+'Message(GridView1.Current.text)
+IF LAST.column = 0 THEN
+ IF GridView1[LAST.row, LAST.column].Picture = pyes THEN
+ GridView1[LAST.row, LAST.column].Picture = pNo
+ ELSE IF GridView1[LAST.row, LAST.column].Picture = pNo THEN
+ GridView1[LAST.row, LAST.column].Picture = pyes
+ END IF
+'GridView1[LAST.row, LAST.column].Refresh()
+END IF
+
+'Message(GridView1[LAST.row, 4].Text)
+GridView1.Refresh()
+
+
+END
+
+PUBLIC SUB Form_Menu()
+
+ MdlPkgSelNew.GET_LIST_OF_SELECTED_PACKAGES()
+
+END
Added: branches/iVL/FrmUsrPkgSel.form
==============================================================================
--- (empty file)
+++ branches/iVL/FrmUsrPkgSel.form Wed Nov 5 14:31:19 2008
@@ -0,0 +1,31 @@
+# Gambas Form File 2.0
+
+{ Form Form
+ MoveScaled(0,0,72,47)
+ Text = ("")
+ Arrangement = Arrange.Vertical
+ { Panel1 Panel
+ MoveScaled(1,1,68,4)
+ Arrangement = Arrange.Horizontal
+ AutoResize = True
+ { tlBanner TextLabel
+ MoveScaled(1,0,20,3)
+ Expand = True
+ AutoResize = True
+ Text = ("Software Selection")
+ Alignment = Align.Normal
+ Border = Border.Plain
+ }
+ }
+ { Panel2 Panel
+ MoveScaled(1,6,70,28)
+ Expand = True
+ Arrangement = Arrange.Vertical
+ { GridView1 GridView
+ MoveScaled(0,1,64,25)
+ Expand = True
+ Mode = Select.Single
+ Header = GridView.Horizontal
+ }
+ }
+}
Modified: branches/iVL/MdlInstallCustom.module
==============================================================================
--- branches/iVL/MdlInstallCustom.module (original)
+++ branches/iVL/MdlInstallCustom.module Wed Nov 5 14:31:19 2008
@@ -53,7 +53,8 @@
RETURN
END IF
- iret = ME.INSTALL_USER_SELECTED_PACKAGES()
+ 'iret = ME.INSTALL_USER_SELECTED_PACKAGES()
+ iret = ME.INSTALL_USER_PACKAGES() ' new code based on the gridview
'Message("Installing user-selected packages")
PRINT "INSTALLING OPTIONAL SOFTWARE SELECTED BY USER"
IF iRet <> 0 THEN
@@ -243,7 +244,62 @@
' ' ' NEXT
' ' ' END
+
+PUBLIC FUNCTION INSTALL_USER_PACKAGES() AS Integer
+
+ DIM ii, i, iStepTotal AS Integer
+ DIM sBasePath AS String = ClsGlobal.sTargetMnt &/ "packages"
+ DIM sLoc, spkg, sDump AS String
+
+ ' get the step total by running though the list and comparing pictures
+ ii = 0
+ REPEAT
+ IF FrmUsrPkgSel.GridView1[ii, 0].Picture = FrmUsrPkgSel.pYes THEN
+ INC iStepTotal
+ END IF
+ INC ii
+ UNTIL ii = FrmUsrPkgSel.GridView1.Rows.Count - 1
+
+ ii = 0
+
+
+ REPEAT
+ IF FrmUsrPkgSel.GridView1[ii, 0].Picture = FrmUsrPkgSel.pYes THEN
+ sLoc = FrmUsrPkgSel.GridView1[ii, 4].Text
+ sPkg = FrmUsrPkgSel.GridView1[ii, 5].Text
+ INC i
+ ' install this package
+ EXEC ["echo", " ", " > /tmp/installdump"] WAIT
+ FrmInstallSys.tlCurrPkg.Text = ("Installing") & Space(1) &
FrmUsrPkgSel.GridView1[ii, 1].Text
+ hproc = EXEC ["installpkg", sBasePath &/ sLoc &/ sPkg, "
-R ", ClsGlobal.sTargetMnt, " || echo \'FAILED\' 2> /tmp/installdump"]
+ WAIT 1
+ IF hproc.State = Process.Running THEN
+ REPEAT
+ WAIT
+ UNTIL hproc.State = Process.Stopped
+ END IF
+ sDump = File.Load("/tmp/installdump")
+
+ INC i
+ FrmInstallSys.pbInstallProg.Value = i / iStepTotal
+ IF InStr(sDump, "FAILED") > 0 THEN
+ Message.Error("Error installing user-selected package" &
Space(1) & sPkg)
+ RETURN 1
+ ' ELSE
+ ' RETURN 0
+ END IF
+
+ END IF
+ INC ii
+ UNTIL ii = FrmUsrPkgSel.GridView1.Rows.Count - 1
+
+
+
+
+END
+
PUBLIC FUNCTION INSTALL_USER_SELECTED_PACKAGES() AS Integer
+
DIM cb AS CheckBox
DIM sBasePath AS String = ClsGlobal.sSourceMnt &/ "packages"
DIM iStepTotal AS Integer = 0
@@ -257,9 +313,7 @@
INC iStepTotal
END IF
NEXT
-
-
-
+
FOR EACH cb IN MdlPkgSel.Pkgs
IF cb.Value = TRUE THEN
' we will only measure #/##
Modified: branches/iVL/MdlNetConf.module
==============================================================================
--- branches/iVL/MdlNetConf.module (original)
+++ branches/iVL/MdlNetConf.module Wed Nov 5 14:31:19 2008
@@ -530,31 +530,35 @@
File.Save(ClsGlobal.sTargetMnt &/ "etc" &/ "rc.d" &/ "rc.inet" & ii,
sScript)
IF cb.Value = TRUE THEN
'''SHELL "chmod +x /tmp/rc.inet" & ii WAIT ''' This is the
wrong path
- SHELL "chmod +x " & ClsGlobal.sTargetMnt &/ "etc" &/ "rc.d"
&/ "rc.inet" & ii WAIT
- END IF
+ SHELL "chmod +x " & ClsGlobal.sTargetMnt &/ "etc" &/ "rc.d"
&/ "rc.inet" & ii WAIT
+ END IF
INC ii
NEXT
'INC ii
'ME.SET_HOSTNAME("Test")
END
-PUBLIC SUB SET_HOSTNAME(sHostName AS String)
+PUBLIC SUB SET_HOSTNAME(sHostName AS String, sDomain AS String)
DIM sRes AS String
SHELL "skill -n X" TO sRes
sRes = Trim(sRes)
- IF Len(sRes) > 0 THEN
- SHELL "echo " & sHostName & " > " & ClsGlobal.sTargetMnt &/ "etc"
&/ "HOSTNAME" WAIT
- ELSE ' X is not running
- SHELL "hostname $HOSTNAME; echo " & sHostName & " > " &
ClsGlobal.sTargetMnt &/ "etc" &/ "HOSTNAME" WAIT ' This sets the hostname
to the current CLI session and saves it for future boots
- END IF
- ME.UPDATE_HOSTS_FILE(sHostName)
+
+ EXEC ["echo ", sHostName & "." & sDomain, " >", ClsGlobal.sTargetMnt
&/ "etc" &/ "HOSTNAME"] WAIT
+
+ ' ' '
+ ' ' ' IF Len(sRes) > 0 THEN
+ ' ' ' SHELL "echo " & sHostName & " > " & ClsGlobal.sTargetMnt
&/ "etc" &/ "HOSTNAME" WAIT
+ ' ' ' ELSE ' X is not running
+ ' ' ' SHELL "hostname $HOSTNAME; echo " & sHostName & " > " &
ClsGlobal.sTargetMnt &/ "etc" &/ "HOSTNAME" WAIT ' This sets the hostname
to the current CLI session and saves it for future boots
+ ' ' ' END IF
+ ME.UPDATE_HOSTS_FILE(sHostName, sDomain)
END
-PUBLIC SUB UPDATE_HOSTS_FILE(sHostName AS String)
+PUBLIC SUB UPDATE_HOSTS_FILE(sHostName AS String, sDomain AS String)
DIM sFileIn, sFileOut AS String
@@ -564,7 +568,7 @@
"# This file describes a numeber of host-to-address mappings for the
TCP/IP subsystem. \n" &
"# It is mostly used at boot time, when no name servers are running.
On small systems, this \n" &
"# file can be used instead of a \"named\" name server. Just add the
names, addresses and any \n" &
- "# aliases to this file ...\n #\n#\n#n" &
+ "# aliases to this file ...\n #\n#\n#\n" &
"# By the way, Arnt Gulbrandsen <agr...@nv...> says that
127.0.0.1 should NEVER \n" &
"# be named with the name of the machine. It causes problem sor some
programs, irc and \n" &
"# reputedly talk. :^) \n#\n#\n" &
@@ -573,12 +577,14 @@
"#\n#\n" &
"# This next entry is technically wrong, but good enough to get TCP/IP
applications to quit complaining \n" &
"# that they can\'t clarify the hostname on a loopback-only system
\n#\n#\n# \n" &
- "127.0.0.1" & Space(5) & sHostName & Space(5) & sHostName & "\n#\n#" &
+ "127.0.0.1" & Space(5) & sHostName & "." & sDomain & Space(5) &
sHostName & "\n#\n#" &
"# End of hosts."
IF Exist(ClsGlobal.sTargetMnt &/ "etc" &/ "hosts") THEN MOVE
ClsGlobal.sTargetMnt &/ "etc" &/ "hosts" TO ClsGlobal.sTargetMnt &/ "etc"
&/ "hosts.bak"
IF Exist(ClsGlobal.sTargetMnt &/ "etc" &/ "hosts") THEN KILL
ClsGlobal.sTargetMnt &/ "etc" &/ "hosts"
+ Message.Info(sFileIn)
+ RETURN
TRY File.Save(ClsGlobal.sTargetMnt &/ "etc" &/ "hosts",
SConv(sFileIn))
CATCH
Message.Error(Error.where & gb.NewLine & Error.text)
Added: branches/iVL/MdlPkgSelNew.module
==============================================================================
--- (empty file)
+++ branches/iVL/MdlPkgSelNew.module Wed Nov 5 14:31:19 2008
@@ -0,0 +1,18 @@
+' Gambas module file
+
+PUBLIC SUB GET_LIST_OF_SELECTED_PACKAGES()
+ DIM i AS Integer
+ DIM sList AS String
+
+ 'FrmUsrPkgSel.GridView1[0, 0].
+ REPEAT
+ IF FrmUsrPkgSel.GridView1[i, 0].Picture = FrmUsrPkgSel.pYes THEN
+ sList = sList & FrmUsrPkgSel.GridView1[i, 1].Text
+ END IF
+ INC i
+ UNTIL i = FrmUsrPkgSel.GridView1.Rows.Count
+
+ Message(sList)
+
+
+END
Added: branches/iVL/images/16px-Nocheck.png
==============================================================================
Binary file. No diff available.
Added: branches/iVL/images/16px-check.png
==============================================================================
Binary file. No diff available.
|