From 5bcd206b9270d9a79e212f91723ea1a08a4d4859 Mon Sep 17 00:00:00 2001 From: Christian Linke Date: Thu, 11 Feb 2016 07:28:47 +0100 Subject: * rework of the build structure, adopt to standard cmake package structure * check versions when loading the libs * introduction of the AudioManagerCore * give control plugin as file or directory * remove SQLITE * either find and use gmock or build and install it * fixed [Bug 411] * compile flag gnu11 is now used Signed-off-by: Christian Linke Signed-off-by: Christian Linke --- README | 138 +++++++++++++++++++++++++++-------------------------------------- 1 file changed, 57 insertions(+), 81 deletions(-) (limited to 'README') diff --git a/README b/README index 2611ac4..6a53965 100755 --- a/README +++ b/README @@ -23,9 +23,11 @@ Author Christian Linke = Christian Linke christian.linke@bmw.de BMW 2011-2015 For further information see http://projects.genivi.org/audio-manager/. == Repositories -The main repository is http://git.projects.genivi.org-AudioManager.git +The main repository is +http://git.projects.genivi.org-AudioManager.git -The repository for example plugins can be found here: http://git.projects.genivi.org/AudioManagerPlugins.git +The repository for example plugins can be found here: +http://git.projects.genivi.org/AudioManagerPlugins.git == License The licenses of this project are split into two parts: @@ -67,44 +69,35 @@ The README is compiled into README.html with asciidoc === Compile Options These are the compile options with default values: - - AM_MAP_CAPACITY 10 - AM_MAX_CONNECTIONS 0x1000 - AM_SHARE_FOLDER /usr/local/share/audiomanager - BUILD_SHARED_LIBS OFF - CMAKE_BUILD_TYPE - CMAKE_INSTALL_PREFIX /usr/local - COMMON_API_DBUS_LIBRARY /usr/local/lib/libCommonAPI-DBus.so - COMMON_API_LIBRARY /usr/local/lib/libCommonAPI.so - DBUS_SERVICE_OBJECT_PATH /org/genivi/audiomanager - DBUS_SERVICE_PREFIX org.genivi.audiomanager - DEFAULT_TELNETPORT 6080 - DOC_OUTPUT_PATH XXX/build/doc - DYNAMIC_ID_BOUNDARY 100 - EXECUTABLE_OUTPUT_PATH XXX/build/bin - GLIB_DBUS_TYPES_TOLERANT ON - LIB_INSTALL_SUFFIX audiomanager - MAX_TELNETCONNECTIONS 3 - NSM_BUS_INTERFACE org.genivi.NodeStateManager - NSM_INTERFACE org.genivi.NodeStateManager.Consumer - NSM_PATH /org/genivi/NodeStateManager - PLUGINS_OUTPUT_PATH XXX/build/plugins - TEST_EXECUTABLE_INSTALL_PATH ~/tests - TEST_EXECUTABLE_OUTPUT_PATH XXX/build/bin/tests - USE_BUILD_LIBS ON - WITH_DATABASE_STORAGE OFF - WITH_DLT ON - WITH_DOCUMENTATION OFF - WITH_SHARED_UTILITIES OFF - WITH_SYSTEMD_WATCHDOG OFF - WITH_TELNET ON - WITH_TESTS ON - gmock_build_tests OFF - gtest_build_samples OFF - gtest_build_tests OFF - gtest_disable_pthreads OFF - gtest_force_shared_crt OFF - +---- +AudioManager Configuration: +-- CMAKE_BUILD_TYPE = +-- CMAKE_INSTALL_PREFIX = /usr/local +-- BUILD_DOCUMENTATION = OFF +-- WITH_TESTS = ON +-- WITH_DLT = ON +-- WITH_TESTS = ON +-- WITH_TELNET = ON +-- WITH_SYSTEMD_WATCHDOG = OFF +-- WITH_CAPI_WRAPPER = ON +-- WITH_DBUS_WRAPPER = OFF +-- WITH_SHARED_UTILITIES = OFF +-- WITH_SHARED_CORE = OFF +-- DYNAMIC_ID_BOUNDARY = 100 +-- LIB_INSTALL_SUFFIX = audiomanager +-- TEST_EXECUTABLE_INSTALL_PATH = ~/tests +-- DEFAULT_PLUGIN_COMMAND_DIR = /usr/local/lib/audiomanager/command +-- DEFAULT_PLUGIN_ROUTING_DIR = /usr/local/lib/audiomanager/routing +-- CONTROLLER_PLUGIN_DIR = /usr/local/lib/audiomanager/control +-- AM_SHARE_FOLDER = /usr/local/share/audiomanager +-- AM_MAP_CAPACITY = 10 +-- AM_MAX_CONNECTIONS = 0x1000 +-- AM_MAX_MAIN_CONNECTIONS = 0x1000 +-- BUILD_TESTING = ON +-- CommandInterface version: 4.0 +-- ControlInterface version: 5.0 +-- RoutingInterface version: 5.0 +---- === Passing options to cmake: Standard CMake can be used to configure these options. Tools like ccmake can be used to visually change the values. @@ -116,36 +109,32 @@ for example... You will need optionally fulfill some dependencies in order to compile the GENIVI AudioManager Daemon, these are: -* dbus (only when DBUS_WRAPPER==ON) [tested on version 1.2.16] -* sqlite3 [tested on version 3.6.22] (only when WITH_DATABASE_STORAGE==ON) +* dbus (only when WITH_DBUS_WRAPPER==ON) [tested on version 1.2.16] * automotive-dlt [greater 2.5.0] (only when WITH_DLT==ON) * doxygen [tested on version 1.6.3] (only when WITH_DOCUMENTATION==ON) -* commonAPI [version > 2.1] (only with WITH_ENABLED_IPC CAPI), more information here http://projects.genivi.org/commonapi/ - -To install them in a build environment like Ubuntu you can use: ----- -sudo apt-get install libdbus-1-dev libsqlite3-dev doxygen git cmake build-essential ----- +* commonAPI [version > 3.1.5] (only with WITH_CAPI_WRAPPER), more information here http://projects.genivi.org/commonapi/ +* systemd [ version > 44 ] (only WITH_SYSTEMD_WATCHDOG) === AudioManagerUtilities In the AudioManagerUtilites you can find helper functions that can be reused by other projects as well. The library can be shipped as a static or a dynamic link library (WITH_SHARED_UTILITIES). -=== The NodeStateManager +=== AudioManagerCore -The nodestatemanager headers are needed to compile the audiomanager. If the nodestatemanager includes are not found, -the headers shipped with the audiomanager are used. -The nodestatemanager can be retrieved from projects.genivi.org . +The AudioMangerCore is build as a static (or with WITH_SHARED_CORE) library. Sometimes it is useful for unit testing of a plugin to compile against the core. -Please note that the NSM interface must be compatible with Dbus properties. This requires for CommonAPI to use the commonAPI fdepl. -It used to work, but currently with CommmonAPI 2.6.1 the generation does not work anymore. +=== CommonAPI Wrapper -=== CommonAPI File generation +The commonapi wrapper provides the mainloop intergration for commonapi into the Mainloop of the audiomanager (CAmSockethandler). +In order to use it, just use: -The audiomanager will search in /usr/share or /usr/local/share for a generator. He will generate all necessary files with this generator into the build tree. +---- +CAPI->registerService(....) +CAPI->buildProxy(...) +---- -The addresses used for commonAPI are fixed. If you need to change them, you can use a central or local configure file. More information on CommonAPI documentation: http://projects.genivi.org/commonapi/ +instead of the standard calls. The CAPIWrapper will serialize the commands and integrate it smoothly with the mainloop. === Tests @@ -184,39 +173,26 @@ sudo make install this installs everything. -== Build targets +== Compiling plugins -Several install targets exists: +Once the Audiomanager is installed, it will also install *.pc files for autotools and *Config.cmake files for cmake projects. +In order to compile and link against the AudioMananger, you can use: -just install the audiomanager ---- -sudo make bin-install +find_package(AudioManager REQUIRED ) +find_package(AudioManagerUtilities) ---- - -just install the dev package with all headers and cmake file, needed to compile plugins out of source ----- -sudo make dev-install +to find the configuration files. To use the right include paths, use: ---- - -just install the tests +${AudioManager_INCLUDE_DIRS} +${AudioManagerUtilities_INCLUDE_DIRS} ---- -sudo make test-install ----- - -just install the plugins (only available if plugins are compiled) +to link agains the right libs use: ---- -sudo make plugins-install +${AudioManagerUtilities_LIBRARIES} ---- -just install the test for the plugins (only available if plugins are compiled) ----- -sudo make plugin-test-install ----- - -If you want to compile the Audiomanager together with the plugins, simply clone the plugins into a folder -Plugins on the main level. The Plugins will be then compiled together with the AudioManager. - -If the plugins are compiled separately, the AudioManager needs to be installed on the system. The plugins will find and read the important CMake variables and use them. +for example, see the AudiomanagerPlugins === Adding own plugins To keep the own sources away from the GENIVI code the project specific elements can be reconfigured with own type definitions. -- cgit v1.2.1