This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Help Option


Setup has all these wonderful command line options, but no way to find out
what they are!

Possible patch below. exit(0) seems a little clumsy. Would you rather I did
something via theLog ?
Although I think we don't really want logs just for a help invocation.

Max.


Index: main.cc
===================================================================
RCS file: /home/max/cvsmirror/cygwin-apps-cvs/setup/main.cc,v
retrieving revision 2.22
diff -u -p -r2.22 main.cc
--- main.cc 2002/11/10 03:56:05 2.22
+++ main.cc 2002/11/10 09:49:13
@@ -65,6 +65,7 @@ int next_dialog;
 HINSTANCE hinstance;

 static BoolOption UnattendedOption (false, 'q', "quiet-mode", "Unattended
setup mode");
+static BoolOption HelpOption (false, 'h', "help", "Show this help");

 /* Maximum size of a SID on NT/W2K. */
 #define MAX_SID_LEN 40
@@ -210,6 +211,8 @@ main (int argc, char **argv)
   if (!GetOption::GetInstance().Process (argc,_argv))
     theLog->exit(1);
 // #endif
+
+  if (HelpOption) { GetOption::GetInstance().ParameterUsage(std::cout);
exit (0); }

   unattended_mode = UnattendedOption;



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]