Add support code for compiling the proto decl, auto-install missing templates