summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author <philippe colliot>2015-12-03 17:36:14 +0100
committer <philippe colliot>2015-12-03 17:36:14 +0100
commitec98b346ff5570c52fdd609c154271e4df93e24a (patch)
tree3962c3c031c199f35bb796f821b568556fafdc0e
parentd0720928ee5e669b6ffc13330a878f132dd2a331 (diff)
downloadpoi-service-ec98b346ff5570c52fdd609c154271e4df93e24a.tar.gz
Update of poi service with the new fidl
-rw-r--r--api/franca/CMakeLists.txt30
-rw-r--r--api/franca/navigation/poiservice/CMakeLists.txt29
-rw-r--r--src/poi-service/CMakeLists.txt2
-rw-r--r--src/poi-service/README4
-rw-r--r--src/poi-service/poi-manager-server/CMakeLists.txt2
-rw-r--r--src/poi-service/poi-manager-server/poi-manager-server-stub.cpp8
-rw-r--r--src/poi-service/poi-manager-server/poi-manager-server-stub.h8
-rwxr-xr-xsrc/poi-service/rebuild_all.sh18
-rw-r--r--test/poi-service/CMakeLists.txt2
-rw-r--r--test/poi-service/README5
-rw-r--r--test/poi-service/poi-manager-client/CMakeLists.txt2
-rw-r--r--test/poi-service/poi-manager-client/main.cpp18
-rwxr-xr-xtest/poi-service/rebuild_all.sh18
13 files changed, 83 insertions, 63 deletions
diff --git a/api/franca/CMakeLists.txt b/api/franca/CMakeLists.txt
index 421fa8e..6efc9ef 100644
--- a/api/franca/CMakeLists.txt
+++ b/api/franca/CMakeLists.txt
@@ -4,9 +4,9 @@
#
# Component Name: whole franca generation
#
-# Author: Marco Residori
+# Author: Philippe Colliot
#
-# Copyright (C) 2015, XS Embedded GmbH
+# Copyright (C) 2015, PCA Peugeot Citroen
#
# Note:
# The current file is an adaptation of the example file
@@ -24,10 +24,16 @@ cmake_minimum_required (VERSION 2.8.1)
project(whole-franca)
-option(COMMONAPI_TOOL_GENERATOR
- "Absolute path to CommonAPI code generator" "")
-option(COMMONAPI_DBUS_TOOL_GENERATOR
- "Absolute path to CommonAPI-DBus code generator" "")
+option(COMMONAPI_TOOL_DIR
+ "Absolute path to CommonAPI tool" "")
+option(COMMONAPI_DBUS_TOOL_DIR
+ "Absolute path to CommonAPI-DBus tool" "")
+
+execute_process(COMMAND uname -i OUTPUT_VARIABLE OS_VERSION)
+if("${OS_VERSION}" MATCHES "i686")
+ set(OS_VERSION "x86")
+endif()
+message(STATUS "OS_VERSION = ${OS_VERSION}")
set(COMMONAPI_FIDL_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
set(COMMONAPI_FIDL_DIR_NAVIGATION "${COMMONAPI_FIDL_DIR}/navigation")
@@ -50,17 +56,17 @@ ${COMMONAPI_FIDL_DIR_HMI}/*.fidl
${COMMONAPI_FIDL_DIR_HMI}/speechservice/*.fidl
)
-if (COMMONAPI_TOOL_GENERATOR)
+if (COMMONAPI_TOOL_DIR)
execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR}
- COMMAND ${COMMONAPI_DBUS_TOOL_GENERATOR} -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES})
+ COMMAND ${COMMONAPI_TOOL_DIR}/org.genivi.commonapi.core.cli.product/target/products/org.genivi.commonapi.core.cli.product/linux/gtk/${OS_VERSION}/commonapi-generator-linux-${OS_VERSION} -sk -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES})
else ()
- message (FATAL_ERROR "Set the variable -DCOMMONAPI_TOOL_GENERATOR=<path>")
+ message (FATAL_ERROR "Set the variable -DCOMMONAPI_TOOL_DIR=<path>")
endif ()
-if (COMMONAPI_DBUS_TOOL_GENERATOR)
+if (COMMONAPI_DBUS_TOOL_DIR)
execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR}
- COMMAND ${COMMONAPI_TOOL_GENERATOR} -sk -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES})
+ COMMAND ${COMMONAPI_DBUS_TOOL_DIR}/org.genivi.commonapi.dbus.cli.product/target/products/org.genivi.commonapi.dbus.cli.product/linux/gtk/${OS_VERSION}/commonapi-dbus-generator-linux-${OS_VERSION} -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES})
else ()
- message (FATAL_ERROR "Set the variable -DCOMMONAPI_DBUS_TOOL_GENERATOR=<path>")
+ message (FATAL_ERROR "Set the variable -DCOMMONAPI_DBUS_TOOL_DIR=<path>")
endif ()
diff --git a/api/franca/navigation/poiservice/CMakeLists.txt b/api/franca/navigation/poiservice/CMakeLists.txt
index 042441a..f057935 100644
--- a/api/franca/navigation/poiservice/CMakeLists.txt
+++ b/api/franca/navigation/poiservice/CMakeLists.txt
@@ -22,12 +22,18 @@
cmake_minimum_required (VERSION 2.8.1)
-project(poi-manager-server)
+project(franca-poiservice)
-option(COMMONAPI_TOOL_GENERATOR
- "Absolute path to CommonAPI code generator" "")
-option(COMMONAPI_DBUS_TOOL_GENERATOR
- "Absolute path to CommonAPI-DBus code generator" "")
+option(COMMONAPI_TOOL_DIR
+ "Absolute path to CommonAPI tool" "")
+option(COMMONAPI_DBUS_TOOL_DIR
+ "Absolute path to CommonAPI-DBus tool" "")
+
+execute_process(COMMAND uname -i OUTPUT_VARIABLE OS_VERSION)
+if("${OS_VERSION}" MATCHES "i686")
+ set(OS_VERSION "x86")
+endif()
+message(STATUS "OS_VERSION = ${OS_VERSION}")
set(COMMONAPI_FIDL_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
@@ -37,19 +43,18 @@ include(FindPkgConfig)
# generate code from fidl
file(GLOB FIDL_FILES "${COMMONAPI_FIDL_DIR}/*.fidl")
-message("FIDL_FILES: ${FIDL_FILES}")
-if (COMMONAPI_TOOL_GENERATOR)
+if (COMMONAPI_TOOL_DIR)
execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR}
- COMMAND ${COMMONAPI_DBUS_TOOL_GENERATOR} -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES})
+ COMMAND ${COMMONAPI_TOOL_DIR}/org.genivi.commonapi.core.cli.product/target/products/org.genivi.commonapi.core.cli.product/linux/gtk/${OS_VERSION}/commonapi-generator-linux-${OS_VERSION} -sk -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES})
else ()
- message (FATAL_ERROR "Set the variable -DCOMMONAPI_TOOL_GENERATOR=<path>")
+ message (FATAL_ERROR "Set the variable -DCOMMONAPI_TOOL_DIR=<path>")
endif ()
-if (COMMONAPI_DBUS_TOOL_GENERATOR)
+if (COMMONAPI_DBUS_TOOL_DIR)
execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR}
- COMMAND ${COMMONAPI_TOOL_GENERATOR} -sk -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES})
+ COMMAND ${COMMONAPI_DBUS_TOOL_DIR}/org.genivi.commonapi.dbus.cli.product/target/products/org.genivi.commonapi.dbus.cli.product/linux/gtk/${OS_VERSION}/commonapi-dbus-generator-linux-${OS_VERSION} -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES})
else ()
- message (FATAL_ERROR "Set the variable -DCOMMONAPI_DBUS_TOOL_GENERATOR=<path>")
+ message (FATAL_ERROR "Set the variable -DCOMMONAPI_DBUS_TOOL_DIR=<path>")
endif ()
diff --git a/src/poi-service/CMakeLists.txt b/src/poi-service/CMakeLists.txt
index dcb7f2b..300cfae 100644
--- a/src/poi-service/CMakeLists.txt
+++ b/src/poi-service/CMakeLists.txt
@@ -47,6 +47,6 @@ add_subdirectory(${API_DIR}/poi-service "${DBUS_GENERATED_INCLUDE_DIR}/poi-servi
add_subdirectory(poi-server)
if (WITH_FRANCA_DBUS_INTERFACE)
- set(FRANCA_DIR "${API_DIR}/franca/navigation")
+ set(FRANCA_DIR "${API_DIR}/franca")
add_subdirectory(poi-manager-server)
endif()
diff --git a/src/poi-service/README b/src/poi-service/README
index ca219cf..5c64dcd 100644
--- a/src/poi-service/README
+++ b/src/poi-service/README
@@ -59,10 +59,8 @@ NB: You need CommonAPI 3.1.2 and Franca 0.9.1 installed
You need to pass as parameter to the cmake the link to your patched dbus library (required by CommonAPI)
-NB: For the 64 bits version, replace 'x86' with 'x86_64' in the command below:
-
cd build
-cmake -DWITH_FRANCA_DBUS_INTERFACE=ON -DDBUS_LIB_PATH=yourPath -DCOMMONAPI_DBUS_TOOL_GENERATOR=<common-api-dbus-tools folder>/org.genivi.commonapi.dbus.cli.product/target/products/org.genivi.commonapi.dbus.cli.product/linux/gtk/x86/commonapi-dbus-generator-linux-x86 -DCOMMONAPI_TOOL_GENERATOR=<common-api-tools folder>/org.genivi.commonapi.core.cli.product/target/products/org.genivi.commonapi.core.cli.product/linux/gtk/x86/commonapi-generator-linux-x86 -DWITH_DEBUG=ON ../
+cmake -DWITH_FRANCA_DBUS_INTERFACE=ON -DDBUS_LIB_PATH=yourPath -DCOMMONAPI_DBUS_TOOL_DIR=<common-api-dbus-tools folder> -DCOMMONAPI_TOOL_DIR=<common-api-tools folder> -DWITH_DEBUG=ON ../
make
cd ..
diff --git a/src/poi-service/poi-manager-server/CMakeLists.txt b/src/poi-service/poi-manager-server/CMakeLists.txt
index 75cbca7..56fbe8a 100644
--- a/src/poi-service/poi-manager-server/CMakeLists.txt
+++ b/src/poi-service/poi-manager-server/CMakeLists.txt
@@ -47,7 +47,7 @@ pkg_check_modules(GLIB REQUIRED glib-2.0)
FILE(GLOB PRJ_LOCAL_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
FILE(GLOB PRJ_COMMON_SRCS ${COMMON_DIR}/poi-common-database.cpp ${COMMON_DIR}/poi-common-math.cpp)
-add_subdirectory(${FRANCA_DIR}/poiservice "${CMAKE_CURRENT_BINARY_DIR}/franca")
+add_subdirectory(${FRANCA_DIR}/navigation/poiservice "${CMAKE_CURRENT_BINARY_DIR}/franca")
FILE(GLOB PRJ_STUB_GEN_SRCS ${PRJ_SRC_GEN_PATH}/*Stub*.cpp)
FILE(GLOB PRJ_STUB_GEN_TYPES ${PRJ_SRC_GEN_NAVIGATION_TYPES_PATH}/*Types*.cpp ${PRJ_SRC_GEN_POISERVICE_TYPES_PATH}/*Types*.cpp)
diff --git a/src/poi-service/poi-manager-server/poi-manager-server-stub.cpp b/src/poi-service/poi-manager-server/poi-manager-server-stub.cpp
index 2832278..a4345db 100644
--- a/src/poi-service/poi-manager-server/poi-manager-server-stub.cpp
+++ b/src/poi-service/poi-manager-server/poi-manager-server-stub.cpp
@@ -1234,7 +1234,7 @@ PoiManagerServerStub::~PoiManagerServerStub() {
void PoiManagerServerStub::getVersion(const std::shared_ptr<CommonAPI::ClientId> _client, getVersionReply_t _reply)
{
- NavigationTypes::Version POIContentManagerVersion(m_version);
+ CommonTypes::Version POIContentManagerVersion(m_version);
_reply(POIContentManagerVersion);
}
@@ -1259,9 +1259,9 @@ void PoiManagerServerStub::getLocale(const std::shared_ptr<CommonAPI::ClientId>
void PoiManagerServerStub::getSupportedLocales(const std::shared_ptr<CommonAPI::ClientId> _client, getSupportedLocalesReply_t _reply)
{
- std::vector< NavigationTypes::Locales> localeList;
- NavigationTypes::Locales en_US { "eng","USA", "Latn" };
- NavigationTypes::Locales fr_FR { "fra","FRA", "Latn" };
+ std::vector< NavigationTypes::Locale> localeList;
+ NavigationTypes::Locale en_US { "eng","USA", "Latn" };
+ NavigationTypes::Locale fr_FR { "fra","FRA", "Latn" };
localeList.push_back(en_US);
localeList.push_back(fr_FR);
diff --git a/src/poi-service/poi-manager-server/poi-manager-server-stub.h b/src/poi-service/poi-manager-server/poi-manager-server-stub.h
index db49660..0435bc7 100644
--- a/src/poi-service/poi-manager-server/poi-manager-server-stub.h
+++ b/src/poi-service/poi-manager-server/poi-manager-server-stub.h
@@ -29,9 +29,10 @@
#include <CommonAPI/CommonAPI.hpp>
+#include <org/genivi/CommonTypes.hpp>
#include <org/genivi/navigation/NavigationTypes.hpp>
#include <v0_1/org/genivi/navigation/poiservice/POIServiceTypes.hpp>
-#include <v0_1/org/genivi/navigation/poiservice/POIContentManagerStubDefault.hpp>
+#include <v0_1/org/genivi/navigation/poiservice/POIContentAccessModuleStubDefault.hpp>
#include "poi-common-database.h"
@@ -42,6 +43,7 @@
using namespace std;
using namespace v0_1::org::genivi::navigation::poiservice;
using namespace org::genivi::navigation;
+using namespace org::genivi;
class sqlRequest
{
@@ -184,7 +186,7 @@ private:
};
-class PoiManagerServerStub: public POIContentManagerStubDefault {
+class PoiManagerServerStub: public POIContentAccessModuleStubDefault {
public:
PoiManagerServerStub();
@@ -212,7 +214,7 @@ public:
private:
- NavigationTypes::Version m_version;
+ CommonTypes::Version m_version;
std::string m_languageCode, m_countryCode, m_scriptCode;
uint16_t m_availableCategories;
diff --git a/src/poi-service/rebuild_all.sh b/src/poi-service/rebuild_all.sh
index 25f4067..2ef165a 100755
--- a/src/poi-service/rebuild_all.sh
+++ b/src/poi-service/rebuild_all.sh
@@ -1,10 +1,16 @@
#!/bin/bash
-if [ ! $COMMON_API_ROOT_DIR ]
+if [ ! $COMMONAPI_TOOL_DIR ]
then
- echo 'Set the root dir of the common api tools'
- echo 'You are supposed to build common-api-dbus-tools and common-api-tools under the same root dir'
- echo 'export COMMON_API_ROOT_DIR=<path>'
+ echo 'Set the dir of the common api tools'
+ echo 'export COMMONAPI_TOOL_DIR=<path>'
+ exit 1
+fi
+
+if [ ! $COMMONAPI_DBUS_TOOL_DIR ]
+then
+ echo 'Set the dir of the common api dbus tools'
+ echo 'export COMMONAPI_DBUS_TOOL_DIR=<path>'
exit 1
fi
@@ -14,10 +20,8 @@ rm -rf build
mkdir build
cd build
-OS_VERSION=$(uname -i)
-
echo 'build with CommonAPI'
-cmake -DWITH_FRANCA_DBUS_INTERFACE=ON -DWITH_DBUS_INTERFACE=OFF -DCOMMONAPI_DBUS_TOOL_GENERATOR=$COMMON_API_ROOT_DIR/common-api-dbus-tools/org.genivi.commonapi.dbus.cli.product/target/products/org.genivi.commonapi.dbus.cli.product/linux/gtk/$OS_VERSION/commonapi-dbus-generator-linux-$OS_VERSION -DCOMMONAPI_TOOL_GENERATOR=$COMMON_API_ROOT_DIR/common-api-tools/org.genivi.commonapi.core.cli.product/target/products/org.genivi.commonapi.core.cli.product/linux/gtk/$OS_VERSION/commonapi-generator-linux-$OS_VERSION -DWITH_DEBUG=ON . ../
+cmake -DWITH_FRANCA_DBUS_INTERFACE=ON -DWITH_DBUS_INTERFACE=OFF -DCOMMONAPI_DBUS_TOOL_DIR=$COMMONAPI_DBUS_TOOL_DIR -DCOMMONAPI_TOOL_DIR=$COMMONAPI_TOOL_DIR -DWITH_DEBUG=ON . ../
make
diff --git a/test/poi-service/CMakeLists.txt b/test/poi-service/CMakeLists.txt
index c77a9d6..aa52baa 100644
--- a/test/poi-service/CMakeLists.txt
+++ b/test/poi-service/CMakeLists.txt
@@ -64,7 +64,7 @@ add_subdirectory(poi-client)
add_subdirectory(poi-contentaccess-module)
if(WITH_FRANCA_DBUS_INTERFACE)
- set(FRANCA_DIR "${API_DIR}/franca/navigation")
+ set(FRANCA_DIR "${API_DIR}/franca")
add_subdirectory(poi-manager-client)
endif()
diff --git a/test/poi-service/README b/test/poi-service/README
index 026bb3c..4342517 100644
--- a/test/poi-service/README
+++ b/test/poi-service/README
@@ -119,9 +119,10 @@ First you need to build the poi-manager-server, see the README in ../../src/poi-
cd build
-NB: For the 64 bits version, replace 'x86' with 'x86_64' in the command below:
+You need to pass as parameter to the cmake the link to your patched dbus library (required by CommonAPI)
-cmake -DWITH_FRANCA_DBUS_INTERFACE=ON -DCOMMONAPI_DBUS_TOOL_GENERATOR=<common-api-dbus-tools folder>/org.genivi.commonapi.dbus.cli.product/target/products/org.genivi.commonapi.dbus.cli.product/linux/gtk/x86/commonapi-dbus-generator-linux-x86 -DCOMMONAPI_TOOL_GENERATOR=<common-api-tools folder>/org.genivi.commonapi.core.cli.product/target/products/org.genivi.commonapi.core.cli.product/linux/gtk/x86/commonapi-generator-linux-x86 -DWITH_DEBUG=ON . ../
+cd build
+cmake -DWITH_FRANCA_DBUS_INTERFACE=ON -DDBUS_LIB_PATH=yourPath -DCOMMONAPI_DBUS_TOOL_DIR=<common-api-dbus-tools folder> -DCOMMONAPI_TOOL_DIR=<common-api-tools folder> -DWITH_DEBUG=ON ../
make
diff --git a/test/poi-service/poi-manager-client/CMakeLists.txt b/test/poi-service/poi-manager-client/CMakeLists.txt
index ba00c2f..78636b2 100644
--- a/test/poi-service/poi-manager-client/CMakeLists.txt
+++ b/test/poi-service/poi-manager-client/CMakeLists.txt
@@ -57,7 +57,7 @@ pkg_check_modules(GTK gtk+-3.0)
# Source Files
FILE(GLOB PRJ_LOCAL_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
-add_subdirectory(${FRANCA_DIR}/poiservice "${CMAKE_CURRENT_BINARY_DIR}/franca")
+add_subdirectory(${FRANCA_DIR}/navigation/poiservice "${CMAKE_CURRENT_BINARY_DIR}/franca")
FILE(GLOB PRJ_PROXY_GEN_SRCS ${PRJ_SRC_GEN_PATH}/*Proxy.cpp)
FILE(GLOB PRJ_STUB_GEN_TYPES ${PRJ_SRC_GEN_NAVIGATION_TYPES_PATH}/*Types*.cpp ${PRJ_SRC_GEN_POISERVICE_TYPES_PATH}/*Types*.cpp)
diff --git a/test/poi-service/poi-manager-client/main.cpp b/test/poi-service/poi-manager-client/main.cpp
index 9072ad5..6e59ac4 100644
--- a/test/poi-service/poi-manager-client/main.cpp
+++ b/test/poi-service/poi-manager-client/main.cpp
@@ -40,7 +40,7 @@
#include <functional>
#include <CommonAPI/CommonAPI.hpp> //Defined in the Common API Runtime library
-#include <v0_1/org/genivi/navigation/poiservice/POIContentManagerProxy.hpp>
+#include <v0_1/org/genivi/navigation/poiservice/POIContentAccessModuleProxy.hpp>
#include "poi-common-data-model.h"
@@ -48,7 +48,7 @@ using namespace std;
using namespace v0_1::org::genivi::navigation;
using namespace poiservice;
using namespace org::genivi::navigation;
-
+using namespace org::genivi;
// class contentManager
class contentManager
@@ -56,7 +56,7 @@ class contentManager
public:
- contentManager(std::shared_ptr<POIContentManagerProxyDefault> proxy);
+ contentManager(std::shared_ptr<POIContentAccessModuleProxyDefault> proxy);
~contentManager();
@@ -93,20 +93,20 @@ public:
private:
GtkWidget *mp_popupWindow;
- std::shared_ptr<POIContentManagerProxyDefault> mp_proxy;
+ std::shared_ptr<POIContentAccessModuleProxyDefault> mp_proxy;
POIServiceTypes::CAMCategory m_category;
POIServiceTypes::CategoryID m_category_id;
std::vector<POIServiceTypes::CategoryID> m_category_ids;
std::vector<POIServiceTypes::POI_ID> m_poi_ids;
POIServiceTypes::PoiAddedDetails m_poi;
- NavigationTypes::Locales m_locales;
+ NavigationTypes::Locale m_locales;
std::string m_strTest;
};
static contentManager *clientContentManager;
-contentManager::contentManager(std::shared_ptr<POIContentManagerProxyDefault> proxy)
+contentManager::contentManager(std::shared_ptr<POIContentAccessModuleProxyDefault> proxy)
{
// test: create a new category, with a new attribute and add a poi under this category
POIServiceTypes::Details categoryDetails;
@@ -204,7 +204,7 @@ contentManager::~contentManager()
{
}
-static void getVersionAsyncCallback(const CommonAPI::CallStatus& callStatus, const NavigationTypes::Version& version)
+static void getVersionAsyncCallback(const CommonAPI::CallStatus& callStatus, const CommonTypes::Version& version)
{
if (callStatus != CommonAPI::CallStatus::SUCCESS) {
cout << "Remote getVersion failed with status: " << static_cast<std::underlying_type<CommonAPI::CallStatus>::type>(callStatus) << endl;
@@ -217,7 +217,7 @@ static void getVersionAsyncCallback(const CommonAPI::CallStatus& callStatus, con
void contentManager::getServerStatus()
{
- function<void(const CommonAPI::CallStatus&, const NavigationTypes::Version&)> getVersion = getVersionAsyncCallback;
+ function<void(const CommonAPI::CallStatus&, const CommonTypes::Version&)> getVersion = getVersionAsyncCallback;
CommonAPI::CallStatus callStatus;
mp_proxy->getVersionAsync(getVersionAsyncCallback);
@@ -580,7 +580,7 @@ int main(int argc , char** argv )
const std::string &domain = "local";
const std::string &instance = "POIContentManager";
- std::shared_ptr<POIContentManagerProxyDefault> myProxy = runtime->buildProxy<POIContentManagerProxy>(domain,instance);
+ std::shared_ptr<POIContentAccessModuleProxyDefault> myProxy = runtime->buildProxy<POIContentAccessModuleProxy>(domain,instance);
while (!myProxy->isAvailable()) {
usleep(10);
diff --git a/test/poi-service/rebuild_all.sh b/test/poi-service/rebuild_all.sh
index b115d32..ac20e38 100755
--- a/test/poi-service/rebuild_all.sh
+++ b/test/poi-service/rebuild_all.sh
@@ -1,10 +1,16 @@
#!/bin/bash
-if [ ! $COMMON_API_ROOT_DIR ]
+if [ ! $COMMONAPI_TOOL_DIR ]
then
- echo 'Set the root dir of the common api tools'
- echo 'You are supposed to build common-api-dbus-tools and common-api-tools under the same root dir'
- echo 'export COMMON_API_ROOT_DIR=<path>'
+ echo 'Set the dir of the common api tools'
+ echo 'export COMMONAPI_TOOL_DIR=<path>'
+ exit 1
+fi
+
+if [ ! $COMMONAPI_DBUS_TOOL_DIR ]
+then
+ echo 'Set the dir of the common api dbus tools'
+ echo 'export COMMONAPI_DBUS_TOOL_DIR=<path>'
exit 1
fi
@@ -21,10 +27,8 @@ rm -rf build
mkdir build
cd build
-OS_VERSION=$(uname -i)
-
echo 'build with CommonAPI'
-cmake -DWITH_FRANCA_DBUS_INTERFACE=ON -DWITH_DATABASE_SUPPLIER=ON -DCOMMONAPI_DBUS_TOOL_GENERATOR=$COMMON_API_ROOT_DIR/common-api-dbus-tools/org.genivi.commonapi.dbus.cli.product/target/products/org.genivi.commonapi.dbus.cli.product/linux/gtk/$OS_VERSION/commonapi-dbus-generator-linux-$OS_VERSION -DCOMMONAPI_TOOL_GENERATOR=$COMMON_API_ROOT_DIR/common-api-tools/org.genivi.commonapi.core.cli.product/target/products/org.genivi.commonapi.core.cli.product/linux/gtk/$OS_VERSION/commonapi-generator-linux-$OS_VERSION -DWITH_DEBUG=ON . ../
+cmake -DWITH_FRANCA_DBUS_INTERFACE=ON -DWITH_DATABASE_SUPPLIER=ON -DCOMMONAPI_DBUS_TOOL_DIR=$COMMONAPI_DBUS_TOOL_DIR -DCOMMONAPI_TOOL_DIR=$COMMONAPI_TOOL_DIR -DWITH_DEBUG=ON . ../
make