From owner-freebsd-libh@FreeBSD.ORG Mon Jun 7 01:28:19 2004 Return-Path: Delivered-To: freebsd-libh@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 241C616A4CE for ; Mon, 7 Jun 2004 01:28:19 +0000 (GMT) Received: from barry.mail.mindspring.net (barry.mail.mindspring.net [207.69.200.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id A0A9A43D31 for ; Sun, 6 Jun 2004 18:28:18 -0700 (PDT) (envelope-from david@usermode.org) Received: from h-68-165-66-220.snvacaid.dynamic.covad.net ([68.165.66.220] helo=scatha.home) by barry.mail.mindspring.net with esmtp (Exim 3.33 #1) id 1BX8va-00039s-00; Sun, 06 Jun 2004 21:27:54 -0400 From: David Johnson Organization: Usermode To: freebsd-libh@freebsd.org Date: Sun, 6 Jun 2004 18:27:53 -0700 User-Agent: KMail/1.6.2 References: <3684.192.168.0.1.1086515427.squirrel@192.168.0.1> In-Reply-To: <3684.192.168.0.1.1086515427.squirrel@192.168.0.1> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200406061827.53216.david@usermode.org> Subject: Re: Installer X-BeenThere: freebsd-libh@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Dedicated to libh code development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jun 2004 01:28:19 -0000 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