As mentioned in Quick Start, the ALFAsim-SDK package has some utilities to help in the process to create a new plugin project and to create a plugin file.
At any moment, it is possible to invoke the help command to list all commands available.
help
>>> alfasim-sdk --help
You can also learn about the available options of each command invoking the –help option for each command:
>>> alfasim-sdk template --help >>> alfasim-sdk package --help >>> alfasim-sdk compile --help
Generate a template with the necessary files and structure to create a plugin.
The template folder will be placed on the dst option, that by default is the current directory from where the command was invoked.
dst
The files generated and their contents are ready to be used or customized and have the following structure:
\---myplugin | CMakeLists.txt | compile.py | +---assets | plugin.yaml | README.md | \---src | CMakeLists.txt | hook_specs.h | myplugin.cpp | \---python myplugin.py
alfasim-sdk template [OPTIONS]
Options
--dst
<dst>
A path to where the plugin project should be created. Default: Current directory
--caption
<caption>
Caption to be used across the application to identify the plugin
--plugin-id
<plugin_id>
The name of the plugin
--author-name
<author_name>
Name of the plugin author, this value is stored in plugin metadata and not displayed on the application explicitly
--author-email
<author_email>
Email of the plugin author, this value is stored in plugin metadata and not displayed on the application explicitly
Creates a new <package-name>.hmplugin file containing all the necessary files.
<package-name>.hmplugin
This command will first invoke the compile command to generate the shared library, and after that, the plugin package will be generated with all the content available from the directory assets and artifacts.
compile
By default, the package command will assume that the plugin project is the current directory and the generated file will be placed also in the current directory.
package
In order to change that, it’s possible to use the options plugin-dir and dst
plugin-dir
alfasim-sdk package [OPTIONS]
--plugin-dir
<plugin_dir>
Path to the plugin directory, where configuration and the shared library is located.
A path to where the output package should be created.
--package-name
<package_name>
Name of the package
Generate a <package_name>.hmplugin file with all the content from the directory assets and artifacts.
<package_name>.hmplugin
By default, the package will be created inside the folder plugin_dir, however, it’s possible to give another path filling the dst argument.
alfasim-sdk package_only [OPTIONS]
Compile the plugin from the given plugin-dir option. When not provided plugin-dir will be the current folder location.
This command basically calls the compile.py informing the location of the header files of alfasim_sdk_api. For more details about the build steps, check the compile.py generated for your plugin project.
alfasim-sdk compile [OPTIONS]