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]

Re: setup size prefs


Hannu E K Nevalainen wrote:

>  Windows style isn't always the best. Cygwin isn't much "Windows" in other
> ways, why should it be in this regard?

Inventing things to get around windows design is poor practice.  When
the operating system provides well-defined and documented ways for
storing program settings you should use them, not litter the filesystem
with config files because you have some unfounded perception that the
registry is evil.  Setup is an odd example because it has to know both
about the windows idioms and the posix idioms.  However, it's a pure
windows program and its own settings (those that no cygwin/posix app
would really ever need to know or care about) should be saved in the
same way all well-behaived windows programs do it.

> If something is "brain dead" I'd say that keeping ALL "INI-files" (e.g the
> registry, fonts and whatnot) in memory at once is;
>  I have no facts to backup this, but this is how I "feel" that Windows
> behaves - given less than a certain amount of memory. [W98: 128MB, W2K:
> 256MB, XP: 512MB(?) - the lowest amounts of RAM to make the machine usable.]
>  Example: Install a few thousand fonts and realise that you need to increase
> the amount of available RAM by a constant times the number of fonts. Before
> you do, you can't go on using your machine as you're used to. And this is
> before you even attempt to access any font.

Where to begin... your beef about fonts has nothing to do with the
registry.  Older 9x windows had to load all installed fonts into memory
at startup, but that is not the case with NT based versions, IIRC.  And
there is nothing that says the entire registry hive(s) must be in
memory.  Windows' virtual memory manager that will page out pages that
have not been used recently.  If you really want to prove this then go
add dozens of MB of random stuff to some key in the registry and watch
the memory usage of all running tasks.  NOthing changes, unless some app
actually tries to access those keys.

> > If you really want to be able to programmatically do that, just
> > use regtool.  e.g. "regtool set HKLM\Software\Cygwin setup\height
> > 480". Don't go do something outside of the OS's idioms for how program
> > settings are to be stored.  That's bad programming.
> 
>  ... and how do you use regtool? The man page, webhelp nor help output does
> contain a single example that works.
>  And then: BEFORE you've installed Cygwin it is HARD to use regtool.

Documentation is a seperate issue.  Both an .ini file format and
registry keys will need to be documented, otherwise they would not be
easy to set.  Neither of them is intuitive.  But that's okay, because
99.99% of setup users don't have a need or a care to do what you're
trying to do.  They just want to be able to resize the program and have
the size remembered next time.

The need to preset defined sizes to setup before running it just seems
like a corner-case feature, not something that should be specifically
designed around.  If the settings are stored in the registry then you
can just make a .reg file with the desired settings and use regedit to
merge them into the registry - no Cygwin tools involved, and it can be
automated.  Or you could add command line switches to allow the user to
override (replace) the size/position settings in the registry.  Just
please don't go littering the user's hard drive with deprecated .ini
files.

Brian


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