COREmanager Documentation

How to build custom components

 

You may build custom components in a manner that fits you best. Or you can use Ubix Makefile materials provided by COREmanager. The files are located in the src directory.

UNIX

If you want to build programs using our libraries, you will need a compiler supporting c++0x. You should use gcc 4.4. or later, and GNU make to be able to use our makefile.

Makefile

To use our makefile, create a new directory in the src directory. A directory name should match the name of the control panel that you are developing, for correct upload. For example mypanel. Create the Makefile file with the following contents in that directory:

LIB += mypanel
mypanel_SOURCES = mypanel.cpp
mypanel_LDADD = -lbase
#mypanel_LDADD = -rdynamic
#WRAPPER += some_command_line_tool
#XMLLIST += some_xml
#XMLPATH = my_xml_path

include ../isp.mk

LIBa list of .so files to be built.SBINa list of application started from the command line that you need to set up.WRAPPERthe same as SBIN - a list of application started from the command line that you need to set upIn COREmanager all the console applications are represented as .so files located in the libexec directory. They are started by the sbin/wrapper program. All binary files in the sbin directory are links to the wrapper file.XMLPATHthe directoy where standard XML files are located. They are .xml, _menu.xml and _msg_*.xml. By default, makefile tries to locate the files in the xml directory, if any. If the XML directory doesn't exist - in the current directory..xml contains a description of forms and lists metadata._menu.xml contains a description of the main menu for different user roles.files _msg_*.xml contains a description of languages, one per language.PKGCTLprograms that are started by the installer.

You can provide the following parameters for every name, which was added to one of the above variables:

_SOURCESlist of source codes_LDADDadditional linker parameters_SLIBlibraries included into the product and activated statically. Unlike the libraries specified in LDADD, the libraries listed in this variable will be set up automatically._DLIBlibraries included into the product and connected dynamically. Unlike libraries specified in LDADD, the libraries listed in this variable will be set up automatically and included into the product's distribution_FOLDERdirectory in the distribution with results(each type has a default value)

mypanel_SOURCESdescription of sources for libraries (the list of .cpp files)mypanel_LDADDdescription of additional linker parameters include ../isp.mkconnect the templates provided by COREmanager for Makefile. Make sure this record exists and stands at the very end.

XMLLISTthe list of additional XML files with metadata describing the interface of your control panel. XMLPATH doesn't affect these files. The list may contain file templates, where '*' is any number of arbitrary symbols.SUBDIRthe directory with source code files. Also, the directory contains the Makefile.inc file, which contents will be automatically connected to the main Makefile.

Build

To build our library mypanel.so, you only need to execute gmake in the src/mypanel directory. Or in the src directory, in this case, the projects from all the directories inside src will be set up. в этом случае будут собраны проекты из всех каталогов внутри .

Installation

To install the panel, go to the directory with the source code ([mgr5_DIR]/src/mypanel) and execute the make install command. The mypanel.so library will be copied into the lib directory.

For WRAPPER applications, the file will be copied into the libexec directory, and the corresponding link to wrapper will be made in sbin.

The corresponding control panel will be automatically restarted.

Deletion

To delete all the files, you may execute gmake clean

This command wont' delete the files that were created during setup.