celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abroekh...@apache.org
Subject svn commit: r1543324 - in /incubator/celix/trunk: cmake/ device_access/ remote_services/ remote_services/calculator_endpoint/ remote_services/calculator_proxy/ remote_services/remote_service_admin/private/include/
Date Tue, 19 Nov 2013 07:18:46 GMT
Author: abroekhuis
Date: Tue Nov 19 07:18:45 2013
New Revision: 1543324

URL: http://svn.apache.org/r1543324
Log:
Updated deploy macro to differentiate between bundles, drivers and endpoints.

Modified:
    incubator/celix/trunk/cmake/Packaging.cmake
    incubator/celix/trunk/device_access/deploy.cmake
    incubator/celix/trunk/remote_services/calculator_endpoint/CMakeLists.txt
    incubator/celix/trunk/remote_services/calculator_proxy/CMakeLists.txt
    incubator/celix/trunk/remote_services/deploy.cmake
    incubator/celix/trunk/remote_services/remote_service_admin/private/include/remote_service_admin_impl.h

Modified: incubator/celix/trunk/cmake/Packaging.cmake
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/cmake/Packaging.cmake?rev=1543324&r1=1543323&r2=1543324&view=diff
==============================================================================
--- incubator/celix/trunk/cmake/Packaging.cmake (original)
+++ incubator/celix/trunk/cmake/Packaging.cmake Tue Nov 19 07:18:45 2013
@@ -212,7 +212,7 @@ ENDMACRO(package)
 
 ADD_CUSTOM_TARGET(deploy)
 MACRO(deploy)
-    PARSE_ARGUMENTS(DEPLOY "BUNDLES" "" ${ARGN})
+    PARSE_ARGUMENTS(DEPLOY "BUNDLES;DRIVERS;ENDPOINTS" "" ${ARGN})
     LIST(GET DEPLOY_DEFAULT_ARGS 0 DEPLOY_NAME)
     
 	SET(DEPLOY_COMPONENT deploy_${DEPLOY_NAME})
@@ -220,6 +220,7 @@ MACRO(deploy)
 		
 	SET(BUNDLES "")
 	SET(DEPS)
+	
 	FOREACH(BUNDLE ${DEPLOY_BUNDLES})
 		SET(DEP_NAME ${DEPLOY_NAME}_${BUNDLE}) 
 		get_property(bundle_file TARGET ${BUNDLE} PROPERTY BUNDLE)
@@ -232,6 +233,31 @@ MACRO(deploy)
 	    SET(BUNDLES "${BUNDLES} bundles/${BUNDLE}.zip")
 	    SET(DEPS ${DEPS};${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/bundles/${BUNDLE}.zip)
 	ENDFOREACH(BUNDLE)
+	FOREACH(BUNDLE ${DEPLOY_DRIVERS})
+        SET(DEP_NAME ${DEPLOY_NAME}_${BUNDLE}) 
+        get_property(bundle_file TARGET ${BUNDLE} PROPERTY BUNDLE)
+        add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/drivers/${BUNDLE}.zip
+            COMMAND ${CMAKE_COMMAND} -E copy ${bundle_file} 
+                ${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/drivers/${BUNDLE}.zip
+            DEPENDS ${BUNDLE}
+            COMMENT "Deploying ${BUNDLE} to ${DEPLOY_NAME}"
+        )
+        #SET(BUNDLES "${BUNDLES} drivers/${BUNDLE}.zip")
+        SET(DEPS ${DEPS};${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/drivers/${BUNDLE}.zip)
+    ENDFOREACH(BUNDLE)
+    FOREACH(BUNDLE ${DEPLOY_ENDPOINTS})
+        SET(DEP_NAME ${DEPLOY_NAME}_${BUNDLE}) 
+        get_property(bundle_file TARGET ${BUNDLE} PROPERTY BUNDLE)
+        add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/endpoints/${BUNDLE}.zip
+            COMMAND ${CMAKE_COMMAND} -E copy ${bundle_file} 
+                ${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/endpoints/${BUNDLE}.zip
+            DEPENDS ${BUNDLE}
+            COMMENT "Deploying ${BUNDLE} to ${DEPLOY_NAME}"
+        )
+        #SET(BUNDLES "${BUNDLES} drivers/${BUNDLE}.zip")
+        SET(DEPS ${DEPS};${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/endpoints/${BUNDLE}.zip)
+    ENDFOREACH(BUNDLE)
+	
 	IF(NOT(CELIX_FOUND)) #celix project
 		set(DEPS ${DEPS};celix)
 	ENDIF()
@@ -242,6 +268,7 @@ MACRO(deploy)
     
     GET_DIRECTORY_PROPERTY(PROPS ADDITIONAL_MAKE_CLEAN_FILES)
 	SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${PROPS};${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/bundles")
+	SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${PROPS};${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/drivers")
 	
 	CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/cmake/config.properties.in ${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/config.properties
@ONLY)
 	

Modified: incubator/celix/trunk/device_access/deploy.cmake
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/device_access/deploy.cmake?rev=1543324&r1=1543323&r2=1543324&view=diff
==============================================================================
--- incubator/celix/trunk/device_access/deploy.cmake (original)
+++ incubator/celix/trunk/device_access/deploy.cmake Tue Nov 19 07:18:45 2013
@@ -16,5 +16,6 @@
 # under the License.
 is_enabled(DEVICE_ACCESS_EXAMPLE)
 if(DEVICE_ACCESS_EXAMPLE)
-	deploy("device_access_example" BUNDLES device_manager driver_locator shell shell_tui log_service
base_driver base_driver word_consumingdriver char_refiningdriver)
+	deploy("device_access_example" BUNDLES device_manager driver_locator shell shell_tui log_service
base_driver
+	                               DRIVERS word_consumingdriver char_refiningdriver)
 endif(DEVICE_ACCESS_EXAMPLE)
\ No newline at end of file

Modified: incubator/celix/trunk/remote_services/calculator_endpoint/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/remote_services/calculator_endpoint/CMakeLists.txt?rev=1543324&r1=1543323&r2=1543324&view=diff
==============================================================================
--- incubator/celix/trunk/remote_services/calculator_endpoint/CMakeLists.txt (original)
+++ incubator/celix/trunk/remote_services/calculator_endpoint/CMakeLists.txt Tue Nov 19 07:18:45
2013
@@ -23,11 +23,11 @@ include_directories("${PROJECT_SOURCE_DI
 include_directories("${PROJECT_SOURCE_DIR}/remote_services/calculator_endpoint/private/include")
 include_directories("${PROJECT_SOURCE_DIR}/remote_services/calculator_service/public/include")
 
-bundle(calculator_endpoint SOURCES 
+bundle(org.example.api.Calculator_endpoint SOURCES 
 	private/src/calculator_endpoint_activator
 	private/src/calculator_endpoint_impl.c
     
     private/include/calculator_endpoint_impl.h
 )
 
-target_link_libraries(calculator_endpoint celix_framework ${JANSSON_LIBRARIES})
+target_link_libraries(org.example.api.Calculator_endpoint celix_framework ${JANSSON_LIBRARIES})

Modified: incubator/celix/trunk/remote_services/calculator_proxy/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/remote_services/calculator_proxy/CMakeLists.txt?rev=1543324&r1=1543323&r2=1543324&view=diff
==============================================================================
--- incubator/celix/trunk/remote_services/calculator_proxy/CMakeLists.txt (original)
+++ incubator/celix/trunk/remote_services/calculator_proxy/CMakeLists.txt Tue Nov 19 07:18:45
2013
@@ -26,11 +26,11 @@ include_directories("${PROJECT_SOURCE_DI
 include_directories("${PROJECT_SOURCE_DIR}/remote_services/calculator_service/public/include")
 include_directories("${PROJECT_SOURCE_DIR}/remote_services/endpoint_listener/public/include")
 
-bundle(calculator_proxy SOURCES 
+bundle(org.example.api.Calculator_proxy SOURCES 
 	private/src/calculator_proxy_activator
 	private/src/calculator_proxy_impl.c
     
     private/include/calculator_proxy_impl.h
 )
 
-target_link_libraries(calculator_proxy celix_framework ${JANSSON_LIBRARIES} ${CURL_LIBRARIES})
+target_link_libraries(org.example.api.Calculator_proxy celix_framework ${JANSSON_LIBRARIES}
${CURL_LIBRARIES})

Modified: incubator/celix/trunk/remote_services/deploy.cmake
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/remote_services/deploy.cmake?rev=1543324&r1=1543323&r2=1543324&view=diff
==============================================================================
--- incubator/celix/trunk/remote_services/deploy.cmake (original)
+++ incubator/celix/trunk/remote_services/deploy.cmake Tue Nov 19 07:18:45 2013
@@ -16,11 +16,13 @@
 # under the License.
 is_enabled(REMOTE_SERVICE_ADMIN)
 if (REMOTE_SERVICE_ADMIN)
-	deploy("remote-services-bj" BUNDLES discovery_bonjour topology_manager remote_service_admin
calculator calculator_endpoint shell shell_tui log_service log_writer)
-	deploy("remote-services-bj-client" BUNDLES topology_manager remote_service_admin calculator_proxy
shell shell_tui log_service log_writer calculator_shell discovery_bonjour)
+	deploy("remote-services-bj" BUNDLES discovery_bonjour topology_manager remote_service_admin
calculator shell shell_tui log_service log_writer 
+	                            ENDPOINTS org.example.api.Calculator_endpoint)
+	deploy("remote-services-bj-client" BUNDLES topology_manager remote_service_admin shell shell_tui
log_service log_writer calculator_shell discovery_bonjour
+	                                   ENDPOINTS org.example.api.Calculator_proxy)
 	
-	deploy("remote-services" BUNDLES discovery_slp topology_manager remote_service_admin calculator
calculator_endpoint shell shell_tui log_service log_writer)
-	deploy("remote-services-client" BUNDLES topology_manager remote_service_admin calculator_proxy
shell shell_tui log_service log_writer calculator_shell discovery_slp)
+	deploy("remote-services" BUNDLES discovery_slp topology_manager remote_service_admin calculator
org.example.api.Calculator_endpoint shell shell_tui log_service log_writer)
+	deploy("remote-services-client" BUNDLES topology_manager remote_service_admin org.example.api.Calculator_proxy
shell shell_tui log_service log_writer calculator_shell discovery_slp)
 	
 	#TODO for remote-service-client the discovery should be added as last. If this is not done,

 	#discovery will discover services before the topology manager is registered as 

Modified: incubator/celix/trunk/remote_services/remote_service_admin/private/include/remote_service_admin_impl.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/remote_services/remote_service_admin/private/include/remote_service_admin_impl.h?rev=1543324&r1=1543323&r2=1543324&view=diff
==============================================================================
--- incubator/celix/trunk/remote_services/remote_service_admin/private/include/remote_service_admin_impl.h
(original)
+++ incubator/celix/trunk/remote_services/remote_service_admin/private/include/remote_service_admin_impl.h
Tue Nov 19 07:18:45 2013
@@ -30,8 +30,8 @@
 #include "remote_service_admin.h"
 #include "civetweb.h"
 
-#define BUNDLE_STORE_PROPERTY_NAME "RS_BUNDLE"
-#define DEFAULT_BUNDLE_STORE "rs_bundles"
+#define BUNDLE_STORE_PROPERTY_NAME "ENDPOINTS"
+#define DEFAULT_BUNDLE_STORE "endpoints"
 
 struct export_reference {
 	endpoint_description_pt endpoint;



Mime
View raw message