You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by pn...@apache.org on 2016/10/11 08:43:06 UTC

[1/4] celix git commit: CELIX-379: Added LAUNCHER option to add_deploy command

Repository: celix
Updated Branches:
  refs/heads/develop 14ff72942 -> fcbbec518


CELIX-379: Added LAUNCHER option to add_deploy command


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/fc96bc5e
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/fc96bc5e
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/fc96bc5e

Branch: refs/heads/develop
Commit: fc96bc5ef42e83b6c7bb23dbdda9f1b647c24ffb
Parents: ab63081
Author: Erjan Altena <er...@nl.thalesgroup.com>
Authored: Mon Oct 10 16:19:05 2016 +0200
Committer: Erjan Altena <er...@nl.thalesgroup.com>
Committed: Mon Oct 10 16:19:05 2016 +0200

----------------------------------------------------------------------
 cmake/cmake_celix/Packaging.cmake | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/fc96bc5e/cmake/cmake_celix/Packaging.cmake
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/Packaging.cmake b/cmake/cmake_celix/Packaging.cmake
index eeb0a39..a2a969b 100644
--- a/cmake/cmake_celix/Packaging.cmake
+++ b/cmake/cmake_celix/Packaging.cmake
@@ -456,7 +456,7 @@ function(add_deploy)
     list(REMOVE_AT ARGN 0)
 
     set(OPTIONS COPY)
-    set(ONE_VAL_ARGS GROUP NAME)
+    set(ONE_VAL_ARGS GROUP NAME LAUNCHER)
     set(MULTI_VAL_ARGS BUNDLES PROPERTIES)
     cmake_parse_arguments(DEPLOY "${OPTIONS}" "${ONE_VAL_ARGS}" "${MULTI_VAL_ARGS}" ${ARGN})
 
@@ -556,7 +556,15 @@ $<JOIN:$<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_PROPERTIES>,
         OUTPUT ${DEPLOY_RELEASE_SH}
         CONTENT ${RELEASE_CONTENT}
     )
-    set(RUN_CONTENT "${RELEASE_CONTENT}\ncelix \$@")
+    if(DEPLOY_LAUNCHER)
+        if(TARGET ${DEPLOY_LAUNCHER})
+            set(RUN_CONTENT "${RELEASE_CONTENT}\n$<TARGET_FILE:${DEPLOY_LAUNCHER}> \$@\n")
+        else() 
+            set(RUN_CONTENT "${RELEASE_CONTENT}\n${DEPLOY_LAUNCHER} \$@\n")
+        endif()
+    else()
+        set(RUN_CONTENT "${RELEASE_CONTENT}\ncelix \$@\n")
+    endif()
     file(GENERATE
         OUTPUT ${DEPLOY_RUN_SH}
         CONTENT ${RUN_CONTENT}


[4/4] celix git commit: CELIX-379: Refactors LAUNCHER option so that it will be used in the created softlink and eclipse launcher file. Also updated add_deploy documentation

Posted by pn...@apache.org.
CELIX-379: Refactors LAUNCHER option so that it will be used in the created softlink and eclipse launcher file. Also updated add_deploy documentation


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/fcbbec51
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/fcbbec51
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/fcbbec51

Branch: refs/heads/develop
Commit: fcbbec5181617b0f43f36189d3f3a234f8221133
Parents: fbd81b9
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Tue Oct 11 10:42:01 2016 +0200
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Tue Oct 11 10:42:01 2016 +0200

----------------------------------------------------------------------
 cmake/cmake_celix/Packaging.cmake  | 32 +++++++++++++++++++-------------
 documents/cmake_commands/readme.md |  2 ++
 2 files changed, 21 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/fcbbec51/cmake/cmake_celix/Packaging.cmake
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/Packaging.cmake b/cmake/cmake_celix/Packaging.cmake
index a2a969b..881c2fd 100644
--- a/cmake/cmake_celix/Packaging.cmake
+++ b/cmake/cmake_celix/Packaging.cmake
@@ -536,12 +536,26 @@ $<JOIN:$<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_PROPERTIES>,
         INPUT "${STAGE1_PROPERTIES}"
     )
 
+
+    #Setup launcher using celix target, celix binary or custom launcher
+    if (DEPLOY_LAUNCHER)
+        if (IS_ABSOLUTE "${DEPLOY_LAUNCHER}")
+            #assuming target
+            set(LAUNCHER "${DEPLOY_LAUNCHER}")
+        else()
+            set(LAUNCHER "$<TARGET_FILE:${DEPLOY_LAUNCHER}>")
+        endif()
+    else()
+        #Use CELIX_LAUNCHER
+        set(LAUNCHER "${CELIX_LAUNCHER}")
+    endif()
+
     #softlink celix exe file
     add_custom_command(OUTPUT "${DEPLOY_EXE}"
-        COMMAND ${LINK_CMD} -s "${CELIX_LAUNCHER}" "${DEPLOY_EXE}"
+        COMMAND ${LINK_CMD} -s "${LAUNCHER}" "${DEPLOY_EXE}"
         WORKING_DIRECTORY ${DEPLOY_LOCATION}
-        DEPENDS "${CELIX_LAUNCHER}" 
-        COMMENT "Symbolic link celix exe to ${DEPLOY_EXE}" VERBATIM
+        DEPENDS "${LAUNCHER}" 
+        COMMENT "Symbolic link launcher to ${DEPLOY_EXE}" VERBATIM
     ) 
 
 
@@ -556,22 +570,14 @@ $<JOIN:$<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_PROPERTIES>,
         OUTPUT ${DEPLOY_RELEASE_SH}
         CONTENT ${RELEASE_CONTENT}
     )
-    if(DEPLOY_LAUNCHER)
-        if(TARGET ${DEPLOY_LAUNCHER})
-            set(RUN_CONTENT "${RELEASE_CONTENT}\n$<TARGET_FILE:${DEPLOY_LAUNCHER}> \$@\n")
-        else() 
-            set(RUN_CONTENT "${RELEASE_CONTENT}\n${DEPLOY_LAUNCHER} \$@\n")
-        endif()
-    else()
-        set(RUN_CONTENT "${RELEASE_CONTENT}\ncelix \$@\n")
-    endif()
+    set(RUN_CONTENT "${RELEASE_CONTENT}\n${LAUNCHER} \$@\n")
     file(GENERATE
         OUTPUT ${DEPLOY_RUN_SH}
         CONTENT ${RUN_CONTENT}
     )
 
     #generate eclipse project launch file
-    set(PROGRAM_NAME "${CELIX_LAUNCHER}")
+    set(PROGRAM_NAME "${LAUNCHER}")
     set(CONTAINER_NAME ${DEPLOY_NAME})
     set(PROJECT_ATTR "${CMAKE_PROJECT_NAME}-build")
     set(WORKING_DIRECTORY ${DEPLOY_LOCATION})

http://git-wip-us.apache.org/repos/asf/celix/blob/fcbbec51/documents/cmake_commands/readme.md
----------------------------------------------------------------------
diff --git a/documents/cmake_commands/readme.md b/documents/cmake_commands/readme.md
index a796180..9045cf2 100644
--- a/documents/cmake_commands/readme.md
+++ b/documents/cmake_commands/readme.md
@@ -160,6 +160,7 @@ add_deploy(<deploy_target_name>
     [COPY] 
     [GROUP group_name]
     [NAME deploy_name]
+    [LAUNCHER launcher]
     [BUNDLES <bundle1> <bundle2> ...]
     [PROPERTIES "prop1=val1" "prop2=val2" ...]
 )
@@ -177,6 +178,7 @@ If the bundle target is never added CMake will give an error:
 - If COPY is provided the selected bundles will be copied in a bundles dir and the generated config.properties will use relative paths to the bundle locations. Default bundles will not be copied and the generated config.properties will use absolute references to the bundle locations.
 - If GROUP is provided the deployment will be grouped in the provided group name. 
 - If NAME is provided that name will be used for the deployment dir. Default the deploy target name will be used.
+- If LAUNCHER is provided that path or target will be used as launcher executable for the deployment. If no LAUNCHER is not provided the celix executable will be used.
 - If BUNDLES is provided the list of bundles will be added the the generated config.properties for startup. Combined with COPY the bundles will also be copied to a bundles dir.
 - If PROPERTIES is provided the list of properties will be appended to the generated config.properties
 


[3/4] celix git commit: Merge branch 'develop' of https://github.com/ErjanAltena/celix into develop

Posted by pn...@apache.org.
Merge branch 'develop' of https://github.com/ErjanAltena/celix into develop

This closes #10


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/fbd81b9d
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/fbd81b9d
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/fbd81b9d

Branch: refs/heads/develop
Commit: fbd81b9d4093562b5fa23bb1d992daf6e9b997a6
Parents: 14ff729 7ab8b6b
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Tue Oct 11 10:18:44 2016 +0200
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Tue Oct 11 10:18:44 2016 +0200

----------------------------------------------------------------------
 cmake/cmake_celix/Packaging.cmake     | 12 ++++++++++--
 framework/public/include/properties.h |  6 ++----
 2 files changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------



[2/4] celix git commit: CELIX-380: Fix for PROPERTIES_FOR_EACH macro

Posted by pn...@apache.org.
CELIX-380: Fix for PROPERTIES_FOR_EACH macro


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/7ab8b6b4
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/7ab8b6b4
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/7ab8b6b4

Branch: refs/heads/develop
Commit: 7ab8b6b43ed16c40ca8aaf529d5c8382d644b3ad
Parents: fc96bc5
Author: Erjan Altena <er...@gmail.com>
Authored: Mon Oct 10 19:25:24 2016 +0200
Committer: Erjan Altena <er...@gmail.com>
Committed: Mon Oct 10 19:25:24 2016 +0200

----------------------------------------------------------------------
 framework/public/include/properties.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/7ab8b6b4/framework/public/include/properties.h
----------------------------------------------------------------------
diff --git a/framework/public/include/properties.h b/framework/public/include/properties.h
index 597aff1..9a12a2a 100644
--- a/framework/public/include/properties.h
+++ b/framework/public/include/properties.h
@@ -47,10 +47,8 @@ FRAMEWORK_EXPORT void properties_set(properties_pt properties, const char* key,
 
 FRAMEWORK_EXPORT celix_status_t properties_copy(properties_pt properties, properties_pt *copy);
 
-
 #define PROPERTIES_FOR_EACH(props, key) \
-	for(hash_map_iterator_t iter = hashMapIterator_construct((props)); \
-		hashMapIterator_hasNext(&iter); \
-		(key) = (const char*)hashMapIterator_nextKey(&iter))
+	for(hash_map_iterator_t iter = hashMapIterator_construct(props); \
+		hashMapIterator_hasNext(&iter), (key) = (const char*)hashMapIterator_nextKey(&iter);) 
 
 #endif /* PROPERTIES_H_ */