Skip to content
OpenCockpitPublic

About

Next generation Enigma2 skin design with High Level Skin Design language ZAML

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SkinForge - Next generation Enigma2 skin design

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

Language levels

  1. XML: the flat XML enigma2 itself understands: what the compiler produces.
  2. ZAML (Zenith Advanced Markup Language): the language a skin is written in (skin.zml and the *.zmlinc parts 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 a for loop for repeated blocks, a table that lays elements out in rows and columns, like the tables of HTML, LaTeX or XAML, and a list whose 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"])
Loading

Quick start

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.

Wiki

About

Next generation Enigma2 skin design with High Level Skin Design language ZAML

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Used by

Contributors

Languages