Adding modules 0 Hedera Library Adding modules How to add your own modules Previous stage Before you can add a module, you have to create it. To do so, the Hedera Library ships with an Anjuta IDE project wizzard that creates an empty module written in Vala, ready to be configured and built. If you won't be using the Anjuta IDE, you'll have to work your way to a built module. More on that will be covered in the section about the module creation on the Tutorials. Adding the module At this point, you should have a compiled module, this consisting in a folder with the data (images, UI definitions, etc.) of the module along with the dynamic library (a .so file) that Hedera will link in runtime to load the module. There can also be an optional query directory. It can also be the single .so, due to that may be the module developer has coded the UI creation or may be beacuse both the module and its data were compiled in a single file. To run the module in the hedera runtime you must set the environment variable VN_MODULE_LIB_PATH to the full path to the module or modules .so files (separated by :), and VN_MODULE_DATA_PATH pointing to the .xml, .glade and any other data of the module, there is also an optional third variable, VN_MODULE_QUERY_PATH that points to .sql files. Once these variables are set you'll have to run the Hedera application normally, and it will look for the values on the variables and load the module. Note that if you use the Anjuta IDE with the project created by the wizzard, as you run in Anjuta the variables will be automatically set pointing to your project files (if the project folder is changed, you'll need to manually reset the variables in Anjuta). Expected form definition Each module can have any number of forms, that will be compiled inside the same file. Independently from the form functionality, each form needs to offer some things necesary for Hedera to recognize and load it as expected. The main of these requirements is to list the form in the .xml file of the module. Also, the interface description file must have the .glade extension and contain a #GtkContainer with the identifier "main" as the base widget, this widget will be loaded inside a #GtkNotebook and will be the first thing the user will see when the form gets opened. This glade file may also contain a #VnBatch with all the models needed by the form and with the identifier "models", every model inside this batch will get its connection property set automatically.