Skip to content

How to start

jano42 edited this page Jan 18, 2016 · 19 revisions

The easier solution to develop a plugin, is to get the Yadoms sources, and to develop it in the trunk/sources/plugins path. First create a folder with your plugin name.

To make a plugin be recognized by Yadoms, these files are required :

  • CMakeLists.txt : used for plugin build
  • package.json : plugin information and configuration schema
  • icon.png : plugin visual identity

Build your plugin

Yadoms and all of its components are using CMake to generate project files. You have to write the CMakeLists.txt file for your plugin. Yadoms build system will parse all plugin folders for the CMakeLists.txt, and call it to build project files. These file contains the list of source files, libraries dependancies, post-build file copies... Some macros are provided so it is easy to write it (see FakePlugin as example).

Declare your plugin

To make your plugin usable by Yadoms, you have to provide some information :

  • The plugin description (name, description, version, author, credits, etc...)
  • The supported platforms ([see here for supported values](Plugin supported platforms))
  • The configuration schema
  • An icon

The file package.json contains the plugin description and configuration schema (see FakePlugin as example). The icon is the icon.png file.

Internationalize your plugin

You can add a sub-directory called "locales" to manage labels translations. In these directory, add a file for each supported language. The file must be called by the language-ISO code (2 chars), for example for french : fr.json. This file has the same structure of package.json file, but with only translate-able values ("name" and "description" fields).

Clone this wiki locally