2008-05-28 Servaas Goossens * 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. diff -u setup/root.cc.orig setup/root.cc --- setup/root.cc.orig 2006-04-06 16:45:19.000000000 +0000 +++ setup/root.cc 2008-06-24 11:19:29.078125000 +0000 @@ -39,10 +39,15 @@ #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 +201,14 @@ { 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 ());