This is the mail archive of the cygwin-patches@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]

Re: setup.exe command line options


Sorry about the delay getting back to you...


===
----- Original Message -----
From: "keith_starsmeare@yahoo.co.uk" <kxs@breathemail.net>
To: <cygwin-patches@cygwin.com>
Sent: Friday, January 25, 2002 12:25 AM
Subject: setup.exe command line options


> I've attached the diffs for the work in progress implementation of
command
> line options. I've tried to copy the dialog's terminology when
choosing the
> options and the variables used within WinMain.

Cool.

> I'm using the PropertyPage Create functions as my interface. In many
> instances the Create function can do all the work for that dialog, and
can
> return false - so no dialog will be created.
>
> I'm having problems with the packagedir and the rootdir Create
functions, I
> must be missing something. Most importantly I'm having difficulty
getting
> yyparse called. :(

Simply populate the sites array and the source, and the parsing will
happen in the ini dialog automatically. IMO you are better off using the
_same_ code -> command line parameters != windowless.

> Much work still to be done, but have a look and let me know how
appalled you
> all are at my strategy!

Shock! Horror!. :].

Seriously though, some feedback.

* I think that the default window constructors should be left intact -
add new constructors,or better yet methods that accept parameters. This
will result in cleaner code in main.cc IMO. (i.e. create all the
windows, then pass in all the parameters).
* (optional) It'd be really neat to have the command line options
register themselves, rather than all put in one place. Thats a more OOP
approach, but more initial effort required. It also means that the
parameter passing methods above wouldn't be needed per se - the
registered code would do that on the callback.
* for SourcePage, use an enum, not three bools - they are mutually
exclusive after all.
* Rather than skipping all the pages completely, I'd  suggest having the
page thread/function post a message that the dialog has finished after
your options are  processed. This is both simpler (no need to fiddle
with what pages exist) and easier (greater ability to leverage the
existing code).

Other than that, good work.

Cheers,
Rob


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