But when you want to use native capabilities that go beyond the web app, plugins are where it’s at.
Coraline plugins need two important components:
- A Coraline Plugin interface — this is how coraline bridges the client-side requests with your C++ code on the native side.
Quick Start: Plugin Skeleton Generator
The absolute easiest way to get started is to use the Coraline Plugin Development Skeleton Generator.
To use it, start by installing the coraline plugin development headers:
Once that’s done, choose a name for your plugin and get the skeleton generator:
$ git clone \ https://github.com/psychogenic/coraline-dev-plugin.git $ cd coraline-dev-plugin $ mkdir gen; cd gen $ cmake -DPLUGIN_CLASS=AwesomePossum ..
This will prompt the generator to create an “awesomepossum” directory under coraline-dev-plugin. You can leave it there, or move it somewhere else.
From within the awesomepossum directory, creating the plugin is basically
$ mkdir build; cd build $ cmake .. $ make package
That’s it, your plugin is ready to install. You’ll want to customize it, of course, but all the boilerplate is taken care of, and there’s some sample code as well.