This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
[PATCH] - setup.exe --text-mode and --current-user-only options
- From: "Servaas Goossens" <SGoossens at ortec dot nl>
- To: <cygwin-apps at cygwin dot com>
- Date: Wed, 28 May 2008 11:51:48 +0200
- Subject: [PATCH] - setup.exe --text-mode and --current-user-only options
Hello,
Please consider the following patch to setup. (I tried to follow the
patch submission guidelines, please correct me if I missed something).
Note that the new commandline options do *not* override the settings of
a currently existing installation. I chose this behaviour because I'm
unsure what the effect would be. It would be easy to change this,
though.
The output of setup.exe -h (to the logfile) becomes:
Command Line Options:
-D --download Download from internet
-L --local-install Install from local directory
-s --site Download site
-R --root Root installation directory
+ -t --text-mode Use text mode mount for root
directory
+ -c --current-user-only Make cygwin available to the
current
+ user only
-p --proxy HTTP/FTP proxy (host:port)
-q --quiet-mode Unattended setup mode
-h --help print help
-l --local-package-dir Local package directory
-r --no-replaceonreboot Disable replacing in-use files
on next
reboot.
-n --no-shortcuts Disable creation of desktop and
start
menu shortcuts
-N --no-startmenu Disable creation of start menu
shortcut
-d --no-desktop Disable creation of desktop
shortcut
-A --disable-buggy-antivirus Disable known or suspected
buggy anti
virus software packages during
execution.
Thanks,
Servaas.
--
Index: ChangeLog
===================================================================
RCS file: /cvs/cygwin-apps/setup/ChangeLog,v
retrieving revision 2.592
diff -u -p -r2.592 ChangeLog
--- ChangeLog 16 Apr 2008 10:07:25 -0000 2.592
+++ ChangeLog 28 May 2008 08:38:13 -0000
@@ -1,3 +1,11 @@
+2008-05-28 Servaas Goossens <sgoossens-AT-ortec.nl>
+
+ * root.cc (OnInit): Two new BoolOptions (TextModeOption,
+ CurrentUserOption). These new options (-t and -c) allow the use
+ of text-mode mounts and user mounts for unattended setups.
+
2008-04-16 Brian Dessent <brian@dessent.net>
* mount.cc: Include malloc.h.
Index: root.cc
===================================================================
RCS file: /cvs/cygwin-apps/setup/root.cc,v
retrieving revision 2.21
diff -u -p -r2.21 root.cc
--- root.cc 6 Apr 2006 16:45:19 -0000 2.21
+++ root.cc 28 May 2008 08:38:13 -0000
@@ -39,10 +39,13 @@ static const char *cvsid =
#include "mount.h"
#include "getopt++/StringOption.h"
+#include "getopt++/BoolOption.h"
using namespace std;
-StringOption RootOption ("", 'R', "root", "Root installation
directory", false);
+static StringOption RootOption ("", 'R', "root", "Root installation
directory", false);
+static BoolOption TextModeOption (false, 't', "text-mode", "Use text
mode mount for root directory");
+static BoolOption CurrentUserOption (false, 'c', "current-user-only",
"Make cygwin available to the current user only");
static ControlAdjuster::ControlInfo RootControlsInfo[] = {
{ IDC_ROOTDIR_GRP, CP_STRETCH, CP_TOP },
@@ -196,8 +199,14 @@ RootPage::OnInit ()
{
makeClickable (IDC_FILEMODES_LINK,
"http://cygwin.com/cygwin-ug-net/using-textbinary.html");
+
if (((string)RootOption).size())
set_root_dir((string)RootOption);
+ if (TextModeOption)
+ root_text = IDC_ROOT_TEXT;
+ if (CurrentUserOption)
+ root_scope = IDC_ROOT_USER;
+
if (!get_root_dir ().size())
read_mounts ();
load_dialog (GetHWND ());