From 2170911bc36156172ffa7a5e1a5b738446124643 Mon Sep 17 00:00:00 2001 From: Senthil Kumar G S Date: Tue, 30 Aug 2016 21:08:42 +0530 Subject: [PATCH] [IoTivity Simulator] Updated the eclipse plugins to load the connectivity abstraction library. Previouly CA was built as a static library but now its built as a shared library. Due to this, simulator eclipse plugins should explicitly load it and update the manifest file. Also the run-time path should be specified to help the loader to find the dependent libraries of octbstack in resource/csdk/SConscript for simulator to avoid the need to set the LD_LIBRARY_PATH to run the plugins (Similar to one of our previous changes https://gerrit.iotivity.org/gerrit/#/c/7673/). Change-Id: I153934ecff71e9978e4726c017cdb816c96b96d6 Signed-off-by: Senthil Kumar G S Reviewed-on: https://gerrit.iotivity.org/gerrit/11163 Reviewed-by: Harish Marappa Reviewed-by: Uze Choi Tested-by: Uze Choi --- resource/csdk/SConscript | 3 +++ .../eclipse-plugin/ClientControllerPlugin/META-INF/MANIFEST.MF | 8 +++++--- .../eclipse-plugin/ServiceProviderPlugin/META-INF/MANIFEST.MF | 8 +++++--- .../java/sdk/src/org/oic/simulator/SimulatorManager.java | 1 + 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/resource/csdk/SConscript b/resource/csdk/SConscript index 7c5224e..7aa175e 100644 --- a/resource/csdk/SConscript +++ b/resource/csdk/SConscript @@ -84,6 +84,9 @@ liboctbstack_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')]) liboctbstack_env.PrependUnique(LIBS = ['ocsrm', 'coap']) +if target_os in ['linux'] and liboctbstack_env.get('SIMULATOR', False): + liboctbstack_env.Append( RPATH = liboctbstack_env.Literal('\\$$ORIGIN')) + if env.get('SECURED') == '1': liboctbstack_env.AppendUnique(LIBS = ['tinydtls']) if env.get('WITH_TCP') == True: diff --git a/service/simulator/java/eclipse-plugin/ClientControllerPlugin/META-INF/MANIFEST.MF b/service/simulator/java/eclipse-plugin/ClientControllerPlugin/META-INF/MANIFEST.MF index 4044a58..71c70a7 100644 --- a/service/simulator/java/eclipse-plugin/ClientControllerPlugin/META-INF/MANIFEST.MF +++ b/service/simulator/java/eclipse-plugin/ClientControllerPlugin/META-INF/MANIFEST.MF @@ -8,17 +8,19 @@ Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Bundle-ActivationPolicy: lazy -Bundle-NativeCode: libs/linux-x86/liboc_logger.so; +Bundle-NativeCode: libs/linux-x86/libconnectivity_abstraction.so; + libs/linux-x86/liboc_logger.so; libs/linux-x86/liboctbstack.so; libs/linux-x86/libSimulatorManager.so; - libs/linux-x86/liboc.so; + libs/linux-x86/liboc.so; libs/linux-x86/libRamlParser.so; osname=linux; processor=x86, + libs/linux-x86_64/libconnectivity_abstraction.so; libs/linux-x86_64/liboc_logger.so; libs/linux-x86_64/liboctbstack.so; libs/linux-x86_64/libSimulatorManager.so; - libs/linux-x86_64/liboc.so; + libs/linux-x86_64/liboc.so; libs/linux-x86_64/libRamlParser.so; osname=linux; processor=x86-64 diff --git a/service/simulator/java/eclipse-plugin/ServiceProviderPlugin/META-INF/MANIFEST.MF b/service/simulator/java/eclipse-plugin/ServiceProviderPlugin/META-INF/MANIFEST.MF index f91f396..da98eff 100644 --- a/service/simulator/java/eclipse-plugin/ServiceProviderPlugin/META-INF/MANIFEST.MF +++ b/service/simulator/java/eclipse-plugin/ServiceProviderPlugin/META-INF/MANIFEST.MF @@ -8,17 +8,19 @@ Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Bundle-ActivationPolicy: lazy -Bundle-NativeCode: libs/linux-x86/liboc_logger.so; +Bundle-NativeCode: libs/linux-x86/libconnectivity_abstraction.so; + libs/linux-x86/liboc_logger.so; libs/linux-x86/liboctbstack.so; libs/linux-x86/libSimulatorManager.so; - libs/linux-x86/liboc.so; + libs/linux-x86/liboc.so; libs/linux-x86/libRamlParser.so; osname=linux; processor=x86, + libs/linux-x86_64/libconnectivity_abstraction.so; libs/linux-x86_64/liboc_logger.so; libs/linux-x86_64/liboctbstack.so; libs/linux-x86_64/libSimulatorManager.so; - libs/linux-x86_64/liboc.so; + libs/linux-x86_64/liboc.so; libs/linux-x86_64/libRamlParser.so; osname=linux; processor=x86-64 diff --git a/service/simulator/java/sdk/src/org/oic/simulator/SimulatorManager.java b/service/simulator/java/sdk/src/org/oic/simulator/SimulatorManager.java index a1d93d7..ed20a9c 100644 --- a/service/simulator/java/sdk/src/org/oic/simulator/SimulatorManager.java +++ b/service/simulator/java/sdk/src/org/oic/simulator/SimulatorManager.java @@ -28,6 +28,7 @@ import org.oic.simulator.server.SimulatorResource; public class SimulatorManager { static { + System.loadLibrary("connectivity_abstraction"); System.loadLibrary("oc_logger"); System.loadLibrary("octbstack"); System.loadLibrary("oc"); -- 2.7.4