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.