Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Jun 2004 18:27:53 -0700
From:      David Johnson <david@usermode.org>
To:        freebsd-libh@freebsd.org
Subject:   Re: Installer
Message-ID:  <200406061827.53216.david@usermode.org>
In-Reply-To: <3684.192.168.0.1.1086515427.squirrel@192.168.0.1>
References:  <3684.192.168.0.1.1086515427.squirrel@192.168.0.1>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday 06 June 2004 02:50 am, Jonathan Belson wrote:

> I notice that DragonFlyBSD has made some progress on their NG
> installer. There's some information about its design here:
>
> http://freebsd0.sitetronics.com/cgi-bin/cvsweb.cgi/~checkout~/tissue/
>docs/dfui/dfui.html?rev=1.1&content-type=text/html

Reading through the page, this general design is straight forward, but 
the specifics are dependent upon DragonFly's libcaps, which FreeBSD 
does not have. So this doesn't look like something we can grab "as is" 
from DragonFly, without first importing libcaps and its messaging 
model.

> Using or building on an existing UI abstraction would save a lot of
> work. The Linux installers I've looked at seem to use separate code
> for each type of front-end (eg. console, gui), but having a common
> API would have advantages.

I've been thinking about this for quite some time, and tried to rough 
out some designs. The hardest thing to write is this generic UI 
abstraction. The fact that no one has done it successfully before means 
that it's probably not worth the effort. What does exist is at a much 
higher level (dldialog). Trying to map one GUI API onto another is 
extremely problematic. Even writing an API to match another (for 
example a ncurses API that matches the Qt or GTK+ API) will cause 
problems mapping character based UI concepts onto pixel based UI 
concepts.

I think the Linux distros have the right idea with their installers. 
Have a common backend, but write separate UI frontends. This still 
leaves considerable opportunities for common code. Only the actual UI 
need be written twice (or three times).

I am currently getting some other projects of mine updated and out of 
the way so I can work on this in the near future. Here's my basic idea: 
Make the backend a shared library (libh, for example). It should 
contain all of the real functionality, as well as any common code such 
as saving/loading configuration sets or profiles. Around this should be 
a basic command line interface. If there are existing utilties that do 
what we want (such as useradd), then this library would merely provide 
a thin wrapper to it. Then a text front end could be written in tvision 
or ncurses, and a graphic in Qt or GTK+. Even a CGI wrapper should be 
straightforward.

I'm planning on writing a protype of this idea using just the 
functionality contained within the existing "useradd" utility. I've 
also thought about writing a higher level ncurses toolkit, since I'm 
not particularly enamored of the tvision look and feel, but that's 
secondary to doing a prototype. It's probably going to be a couple of 
months until I get the spare time to devote to it though.

-- 
David Johnson
___________________
http://www.usermode.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406061827.53216.david>