Michael Sheldon's Stuff

Michael Sheldon (mike at mikeasoft dot com)

November 3, 2005

STX Installer
Mike @ 10:46 pm

Finally sat down and got some more work on the STX installer done. Most of the GUI is pretty much finished, I’m now working on the flashy backend system. With the old SphinxOS installer the install instructions were coded in to the installer itself, for the STX installer I thought it’d be nice to try and separate them out a bit. Originally I had planned to have the instructions stored in an XML file, with a format something along the lines of:

<installer>
    <item>
        <title>Copying /var</title>
        <progress>23</progress>
        <command>cp -r /var /mnt/$ROOT</command>
    <item>
<installer>

But I came to the conclusion that this wouldn’t be workable as the installer would need support for certain conditionals (such as if the user wants a swap partition, or if the user wants to have home on the same partition as root). I then decided to look in to the use of the shlex python module (which offers simple lexical analysis features) with a view to creating a mini scripting language for the installer. Finally I decided it’d be very cool if I implemented a subset of bash’s scripting features, allowing the installer instructions to double up as a textual installer themselves.

Here’s a quick example file to show what I’m getting at: http://junk.mikeasoft.com/stxinstall.txt

Still a lot of work to do in actually implementing it, but I think it’s a fun enough solution that I might actually stick with it for a few days.


4 Comments »

  1. I presume that variables like $SWAP are populated by the installer GUI which too is scriptable in some way? 🙂

    -Dx

    Comment by D — November 3, 2005 @ 11:33 pm

  2. Yeah, the gui provides various variables such as $SWAP; but if the GUI isn’t being used then the normal bash script before the ####START INSTALL#### section can provide it (as shown in the example). There isn’t a lot that needs scripting within the actual GUI itself (outside of the installation instructions, provided by the system mentioned above) as things stand. The visual elements of the installer can be changed with fluid. I might at some stage take the backend from this and create a nice general purpose installer system for normal programs (at the moment it’s only purpose is installation of GNU/Linux LiveCD distributions).

    A few pictures of the installer can be seen in this post: http://blog.mikeasoft.com/2005/09/23/stx-installer/

    Comment by Mike — November 4, 2005 @ 12:08 am

  3. > There isn’t a lot that needs scripting within the actual GUI itself
    > (outside of the installation instructions, provided by the system
    > mentioned above) as things stand.

    I was more refering to the GUI stages before the installer kicks in to do the gruntwork, the questions it asks, etc. if those scriptable. eg: in the future if you need to ask for WPA details or whatnot, how griefsome would that be to squidge in? Although by the sounds of it, you’re going to have the entire shebang scriptable (so you can use installer for other things) so that covers that point anywho.

    -Dx

    Comment by D — November 4, 2005 @ 8:24 am

  4. Well you could consider the graphical steps of the GUI vaguely scriptable as they are, since the whole thing’s written in Python; but there’s currently no simple way for non-python (& pyfltk) programmers to change the installation steps. But that is something I’ll change if I get around to trying to make it a full on general purpose installation solution.

    Comment by Mike — November 4, 2005 @ 9:02 am

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress