SkinForge is a skin design kit that encompasses
- a hierarchical building block concept with
- shared building blocks (buttons, title bars, lists, screen parts, ...) that live in one place and are reused by all your plugins
- relative positioning of building blocks
- global variables
- a high level skin definition language, ZAML
- an offline skin compiler that compiles it down to the plain, flat XML enigma2 actually loads
- XML: the flat XML enigma2 itself understands: what the compiler produces.
- ZAML (Zenith Advanced Markup Language): the language a skin is written in (
skin.zmland the*.zmlincparts it includes). It describes the elements of an enigma2 skin in YAML, with includes with parameters, variables, relative positioning, frames, formulas, default widgets and compile-time checks of colors, variables and font heights, plus aforloop for repeated blocks, atablethat lays elements out in rows and columns, like the tables of HTML, LaTeX or XAML, and alistwhose rows are such a table (zmlcompile).
flowchart TD
SKIN["skin.zml<br/>the skin: what it includes"] -->|zml2xml| XMLINC{{"xmlinc<br/>the compiler"}}
PARTS[".zmlinc<br/>screens, bodies, parts"] -->|"zml2xml, when included"| XMLINC
COMMON[("Common/<br/>shared .zmlinc building blocks")] -->|"zml2xml, when included"| XMLINC
XMLINC --> FLAT["flat XML<br/>compiled, unformatted"]
FLAT -->|xmlpretty| FINAL(["skin.xml<br/>what enigma2 loads"])
Clone the repo and add the git dir to the PATH variable:
git clone git@github.com:OpenCockpit/SkinForge.git
Then compile a plugin's skin, where <domain> is the plugin's directory name:
zmlcompile <domain> [srcbase] [dstbase] [cmnbase]
For every skin variant it converts skin.zml to skin.xml with zml2xml and compiles that with xmlinc; the .zmlinc the skin includes (of the plugin and of Common) are converted when the compiler reaches them.
To debug a single screen without compiling all the others, compile the skin completely once, then recompile only the
screen_* file you are working on - its screen replaces the one of the same name in the compiled skin.xml:
xmlcompilescreen <domain> <screen_file> [srcbase] [dstbase] [cmnbase]
The other screens are not touched, so a change somewhere else (the globals, a part several screens include) needs a full compile.
zml2xml <.zml/.zmlinc file> converts a single file to XML, with its loops, tables and lists expanded.