Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3CA05200BA6 for ; Tue, 18 Oct 2016 21:26:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3B3CE160ACE; Tue, 18 Oct 2016 19:26:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8C223160B05 for ; Tue, 18 Oct 2016 21:26:07 +0200 (CEST) Received: (qmail 38130 invoked by uid 500); 18 Oct 2016 19:26:06 -0000 Mailing-List: contact commits-help@celix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@celix.apache.org Delivered-To: mailing list commits@celix.apache.org Received: (qmail 36741 invoked by uid 99); 18 Oct 2016 19:26:04 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Oct 2016 19:26:04 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 96F60E9411; Tue, 18 Oct 2016 19:26:04 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: pnoltes@apache.org To: commits@celix.apache.org Date: Tue, 18 Oct 2016 19:26:34 -0000 Message-Id: <31ac2e0d3dae4aa699b808f35a8f3840@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [32/50] [abbrv] 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 archived-at: Tue, 18 Oct 2016 19:26:09 -0000 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/release/celix-2.0.0 Commit: fcbbec5181617b0f43f36189d3f3a234f8221133 Parents: fbd81b9 Author: Pepijn Noltes Authored: Tue Oct 11 10:42:01 2016 +0200 Committer: Pepijn Noltes 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 @@ $, 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 "$") + 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 @@ $, OUTPUT ${DEPLOY_RELEASE_SH} CONTENT ${RELEASE_CONTENT} ) - if(DEPLOY_LAUNCHER) - if(TARGET ${DEPLOY_LAUNCHER}) - set(RUN_CONTENT "${RELEASE_CONTENT}\n$ \$@\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( [COPY] [GROUP group_name] [NAME deploy_name] + [LAUNCHER launcher] [BUNDLES ...] [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