[lokisetup] Slightly obscurer platforms, and UI Code

Stephane Peter megastep at megastep.org
Tue Oct 14 17:49:14 EDT 2003

On Tue, 2003-10-14 at 12:42, Chunky Kibbles wrote:
> Has anyone here tried using loki_setup to install stuff on GPE and/or
> Opie? Or anything else similarly obscure? It's still a linux box, but
> how would you distinguish between the platforms? - for various reasons,
> you'll need to use different binaries for what is, underneath, exactly
> the same distribution of linux...
> I know that there are other, more-popular mechanisms [ipkg sucks],
> on familiar, but this is in the whole spirit of complete platform
> independance.

Though I don't really know why you would need a big installer like setup in such
an embedded environment, in theory it should just be a matter of adding
the necessary detection code in setupdb to be able to distinguish the
platforms (if they are not already recognized). We already have Linux on
PPC/Alpha/Sparc support so any other architecture should be a no

> In other news, I've been using wxWindows recently, and I have some
> thoughts on it and setup:
> 1) You can't compile the library to have multiple graphics targets...
> wxWindows uses the normal library loader, not dlopen() and friends,
> in order to do what it does.
> The same binary wouldn't be able to do both ncurses and gtk, with
> wx alone.
> You could code some kind of logic in [eg "don't bother initialising wx if
> DISPLAY isn't set - intialise ncurses instead", and link with ncurses
> aswell], but I think we'd rather see this done properly using a tooklit
> that does that work for us?

While I like the idea (for 2.0), my main grudge about it is that
wxWindows is C++, and that opens a whole bunch of problems regarding
compilers and any libraries. It may be possible to do it by being
careful about statically linking in any C++ libs...

Another way around this could also be something that has been up in the
air for a little while, that is make Setup system-installable, so that
distros can start including it as RPMs, Debs, or whatever. This way the
dependencies on any funky libs are managed by the OS, and really all we
have to do is fix the setup.sh script to go look for these first. The
changes are not too major, so I may even get to do this on the current
1.6 tree.

> 2) It doesn't have a curses-style interface...
> I can think of a couple incredibly hacky solutions to that, that would
> still involve wxWindows as the coding layer, but... let's just not. If
> you want a gui-in-the-console, wx doesn't have that in a manner that
> we'd appreciate.

Yeah, I'd also like to move away from the dialog-based stuff we have for
now as a ncurses interfaces. The widgets are very limited and obviously
not intuitive in the context of setup. I'd rather move to another
higher-level API than ncurses though, if we can find a good alternative
with more GUI-like features.

> 3) On the plus side, it's trivially simple to code [especially for the
> widgetry that we use in setup], gives you free MacOS support [both 9 and
> X], free win32s support, and bonus use-motif-on-unices-where-we-use-motif,
> if you want [it can also run with GTK on the same systems].


> Basically, as I see it, a combination of wxWindows-and-the-current-ncurses
> would be OK and give us free OSX & Windows compatability in addition to
> what we already have - but isn't avoiding the problem of having to build
> against multiple different GUI libraries for each platform, or having
> program logic to acheive the same thing.

It's not like we're not already doing that ;-)

Stephane Peter
Sr. Software Engineer
Codehost, Inc.

More information about the Lokisetup mailing list