Writing a plugin

Top  Previous  Next

A plugin contain three files:

main.lua
info.xml
desc.rtf (currently unused)

 

Development

 

1.Find the plugin storage directory
Normally located at C:\Users\<user>\AppData\Local\Hondata\SManager\Plugins, the easiest way to open this location is to double click to directory pathname as shown in the the bottom of the Manage Plugins window.
 
2.Create a directory for your plugin.
 
3.Create main.lua file in the plugin directory
 
4.Edit main.lua with a starting script
 
-- script skeleton
require("utilities")
 
-- called when user invokes script from menu
function main
-- add here
end
 
5.The implementation of the script using Lua is beyond the scope of this help.

 

Distribution

 

1.Create a description file desc.rtf for your plugin.
The description file is a rich text format file that contains a description of the plugin.
 
2.Create an information file info.xml for your plugin.

 
<?xml version="1.0" encoding="UTF-8"?>

<plugin>

<id>test_plugin</id>

<version>1</version>

<name>Name of Plugin</name>

<description>Plugin description</description>

<author></author>

<url></url>

<license>Apache 2.0 License</license>

<depends></depends>

</plugin>

 

id should be unique

 

3.Zip the three files (main.lua, desc.rtf, info.xml) into a single zip file.
If the plugin has additional source files then include those in the zip as well.
 
4.Change the file extension from .zip to .fplugin