From d36c8e323a6f8df998edd185de8972dc5e6f87f0 Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Mon, 16 Nov 2009 06:37:38 +0000 Subject: Cleaning up SVN structure, moving tag under sca-cpp/tags. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@880619 13f79535-47bb-0310-9956-ffa450edef68 --- .../samples/Calculator/Client/.cdtbuild | 50 +++++++ .../samples/Calculator/Client/.cdtproject | 15 +++ .../samples/Calculator/Client/.project | 19 +++ .../org.eclipse.cdt.managedbuilder.core.prefs | 6 + .../samples/Calculator/Client/Calc.cpp | 144 +++++++++++++++++++++ .../samples/Calculator/Client/Calculator.h | 33 +++++ .../samples/Calculator/Client/Client.dsp | 108 ++++++++++++++++ .../samples/Calculator/Client/Client.plg | 16 +++ .../samples/Calculator/Client/Debug/makefile | 43 ++++++ .../samples/Calculator/Client/Debug/objects.mk | 7 + .../samples/Calculator/Client/Debug/sources.mk | 20 +++ .../samples/Calculator/Client/Debug/subdir.mk | 29 +++++ .../samples/Calculator/Client/readme.txt | 53 ++++++++ .../samples/Calculator/Client/runclient.cmd | 14 ++ 14 files changed, 557 insertions(+) create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.cdtbuild create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.cdtproject create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.project create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.settings/org.eclipse.cdt.managedbuilder.core.prefs create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Calc.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Calculator.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Client.dsp create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Client.plg create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/makefile create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/objects.mk create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/sources.mk create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/subdir.mk create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/readme.txt create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/runclient.cmd (limited to 'sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client') diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.cdtbuild b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.cdtbuild new file mode 100644 index 0000000000..68fe431c95 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.cdtbuild @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.cdtproject b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.cdtproject new file mode 100644 index 0000000000..48a12e6664 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.cdtproject @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.project b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.project new file mode 100644 index 0000000000..20d79410f9 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.project @@ -0,0 +1,19 @@ + + + CalculatorClient + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.core.ccnature + + diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.settings/org.eclipse.cdt.managedbuilder.core.prefs new file mode 100644 index 0000000000..64ec20058b --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.settings/org.eclipse.cdt.managedbuilder.core.prefs @@ -0,0 +1,6 @@ +#Tue Dec 13 10:20:35 GMT 2005 +eclipse.preferences.version=1 +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.exe.debug.1274891422=\n\n\n\n\n +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.exe.debug.1274891422=\n\n\n\n +environment/project=\n\n +environment/project/cdt.managedbuild.config.gnu.exe.debug.1274891422=\n\n diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Calc.cpp b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Calc.cpp new file mode 100644 index 0000000000..8322532617 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Calc.cpp @@ -0,0 +1,144 @@ +/* ++----------------------------------------------------------------------+ +| (c) Copyright IBM Corporation 2005. | +| All Rights Reserved. | ++----------------------------------------------------------------------+ +| | +| Licensed under the Apache License, Version 2.0 (the "License"); you | +| may not use this file except in compliance with the License. You may | +| obtain a copy of the License at | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | +| implied. See the License for the specific language governing | +| permissions and limitations under the License. | ++----------------------------------------------------------------------+ +*/ + +#include "Calculator.h" +#include "osoa/sca/sca.h" +#include +#include + +using namespace osoa::sca; +using namespace std; + +void usage(); +bool IsNumber(const char *p); + +int main(int argc, char* argv[]) +{ + const char *operation; + float arg1 = 0; + float arg2 = 0; + + if (argc == 4) + { + operation = argv[1]; + + if (!IsNumber(argv[2])) + { + cout << "Calc.exe: Argument 1 is not a number" << endl; + usage(); + } + else + { + arg1 = atof(argv[2]); + } + + if (!IsNumber(argv[3])) + { + cout << "Calc.exe: Argument 2 is not a number" << endl; + usage(); + } + else + { + arg2 = atof(argv[3]); + } + } + else + { + usage(); + } + + try + { + + // Set the default module environment variable: / + //char *defaultModule = "SCA4CPP_DEFAULT_MODULE=SubSystem2/CalculatorServiceModule"; + //putenv(defaultModule); + + // Locate a service + ModuleContext myContext = ModuleContext::getCurrent(); + Calculator *calcService = (Calculator*) myContext.locateService("CalculatorServiceComponent"); + if (calcService == 0) + { + cout << "Calc.exe: Unable to find Calculator service" << endl; + } + else + { + try + { + float result = 0; + if (strcmp(operation, "add") == 0) + { + result = calcService->add(arg1, arg2); + cout << "Calculator: add(" << arg1 << "," << arg2 << ") = " << result << endl; + } + else + if (strcmp(operation, "sub") == 0) + { + result = calcService->sub(arg1, arg2); + cout << "Calculator: sub(" << arg1 << "," << arg2 << ") = " << result << endl; + } + else + if (strcmp(operation, "mul") == 0) + { + result = calcService->mul(arg1, arg2); + cout << "Calculator: mul(" << arg1 << "," << arg2 << ") = " << result << endl; + } + else + if (strcmp(operation, "div") == 0) + { + result = calcService->div(arg1, arg2); + cout << "Calculator: div(" << arg1 << "," << arg2 << ") = " << result << endl; + } + else + { + cout << "Calculator: Unrecognized operation: " << operation << endl; + } + } + catch (char* x) + { + cout << "Calc.exe: exception caught: " << x << endl; + } + } + + } + catch (ServiceRuntimeException& ex) + { + cout << ex << endl; + } + return 0; +} + +void usage() +{ + cout << "Usage: calc add|sub|mul|div arg1 arg2" << endl; + exit(1); +} + +bool IsNumber (const char *p) +{ + int len = strlen(p); + for (int i = 0; i < len; i++) + { + if (!isdigit (p[i])) + { + return false; + } + } + return true; +} diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Calculator.h b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Calculator.h new file mode 100644 index 0000000000..9284178d5f --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Calculator.h @@ -0,0 +1,33 @@ +/* ++----------------------------------------------------------------------+ +| (c) Copyright IBM Corporation 2005. | +| All Rights Reserved. | ++----------------------------------------------------------------------+ +| | +| Licensed under the Apache License, Version 2.0 (the "License"); you | +| may not use this file except in compliance with the License. You may | +| obtain a copy of the License at | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | +| implied. See the License for the specific language governing | +| permissions and limitations under the License. | ++----------------------------------------------------------------------+ +*/ + +#ifndef CALCULATOR_H +#define CALCULATOR_H +class Calculator +{ +public: + virtual float add(float arg1, float arg2) = 0; + virtual float sub(float arg1, float arg2) = 0; + virtual float mul(float arg1, float arg2) = 0; + virtual float div(float arg1, float arg2) = 0; +}; + +#endif + + diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Client.dsp b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Client.dsp new file mode 100644 index 0000000000..75a19ae815 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Client.dsp @@ -0,0 +1,108 @@ +# Microsoft Developer Studio Project File - Name="Client" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=Client - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Client.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Client.mak" CFG="Client - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Client - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "Client - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Client - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "Client - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MD /W3 /Gm /GX /ZI /Od /I "$(SDO4CPP)/include" /I "$(SCA4CPP)/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sdo.lib tuscany_sca.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"$(SDO4CPP)/lib" /libpath:"$(SCA4CPP)/lib" + +!ENDIF + +# Begin Target + +# Name "Client - Win32 Release" +# Name "Client - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\Calc.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\Calculator.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=.\readme.txt +# End Source File +# End Target +# End Project diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Client.plg b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Client.plg new file mode 100644 index 0000000000..0f33cc8711 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Client.plg @@ -0,0 +1,16 @@ + + +
+

Build Log

+

+--------------------Configuration: Client - Win32 Debug-------------------- +

+

Command Lines

+ + + +

Results

+Client.exe - 0 error(s), 0 warning(s) +
+ + diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/makefile b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/makefile new file mode 100644 index 0000000000..4fed2ace08 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/makefile @@ -0,0 +1,43 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +ROOT := .. + +-include $(ROOT)/makefile.init + +RM := rm -rf + +# All of the sources participating in the build are defined here +-include sources.mk +-include $(SUBDIRS:%=%/subdir.mk) +-include objects.mk +ifneq ($(strip $(DEPS)),) +-include $(DEPS) +endif + +-include $(ROOT)/makefile.defs + +# Add inputs and outputs from these tool invocations to the build variables + +# All Target +all: CalculatorClient + +# Tool invocations +CalculatorClient: $(OBJS) $(USER_OBJS) + @echo 'Building target: $@' + @echo 'Invoking: GCC C++ Linker' + @echo g++ -L${SCA4CPP}/lib -L${SDO4CPP}/lib -L${AXISCPP_DEPLOY}/lib -oCalculatorClient $(OBJS) $(USER_OBJS) $(LIBS) + @g++ -L${SCA4CPP}/lib -L${SDO4CPP}/lib -L${AXISCPP_DEPLOY}/lib -oCalculatorClient $(OBJS) $(USER_OBJS) $(LIBS) + @echo 'Finished building target: $@' + @echo ' ' + +# Other Targets +clean: + -$(RM) $(OBJS)$(DEPS)$(EXECUTABLES) CalculatorClient + -@echo ' ' + +.PHONY: all clean dependents +.SECONDARY: + +-include $(ROOT)/makefile.targets diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/objects.mk b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/objects.mk new file mode 100644 index 0000000000..a6aa648eba --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/objects.mk @@ -0,0 +1,7 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +LIBS := -ltuscany_sca -ltuscany_sdo -lxml2 -laxis_clientC -laxis_client + +USER_OBJS := \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/sources.mk b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/sources.mk new file mode 100644 index 0000000000..3c384d3f72 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/sources.mk @@ -0,0 +1,20 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +C_UPPER_SRCS := +CPP_SRCS := +O_SRCS := +ASM_SRCS := +S_SRCS := +CXX_SRCS := +CC_SRCS := +OBJ_SRCS := +OBJS := +DEPS := +EXECUTABLES := + +# Every subdirectory with source files must be described here +SUBDIRS := \ +. \ + diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/subdir.mk b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/subdir.mk new file mode 100644 index 0000000000..3328b2862f --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/subdir.mk @@ -0,0 +1,29 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +CPP_SRCS += \ +$(ROOT)/Calc.cpp + +OBJS += \ +./Calc.o + +DEPS += \ +${addprefix ./, \ +Calc.d \ +} + + +# Each subdirectory must supply rules for building sources it contributes +%.o: $(ROOT)/%.cpp + @echo 'Building file: $<' + @echo 'Invoking: GCC C++ Compiler' + @echo g++ -D_DEBUG -I${SCA4CPP}/include -I${SDO4CPP}/include -I${SCA4CPP_HOME}/samples/Calculator/CalculatorModule -O0 -g3 -Wall -c -fmessage-length=0 -o$@ $< + @g++ -D_DEBUG -I${SCA4CPP}/include -I${SDO4CPP}/include -I${SCA4CPP_HOME}/samples/Calculator/CalculatorModule -O0 -g3 -Wall -c -fmessage-length=0 -o$@ $< && \ + echo -n $(@:%.o=%.d) $(dir $@) > $(@:%.o=%.d) && \ + g++ -MM -MG -P -w -D_DEBUG -I${SCA4CPP}/include -I${SDO4CPP}/include -I${SCA4CPP_HOME}/samples/Calculator/CalculatorModule -O0 -g3 -Wall -c -fmessage-length=0 $< >> $(@:%.o=%.d) + @echo 'Finished building: $<' + @echo ' ' + + diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/readme.txt b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/readme.txt new file mode 100644 index 0000000000..615f1533b1 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/readme.txt @@ -0,0 +1,53 @@ +Tuscany SCA for C++ Samples - Calculator Sample +=============================================== + +This is a very simple sample to show how an SCA module with a single component +can be built and called from an executable. + +There are three sub projects in this workspace: + - CalculatorModule + This contains the source code and SCA artifacts for the SCA module. This + is the module that will be deployed into the SCA runtime. + - CalculatorSubsystem + This contains the sca.subsystem file which describes a subsystem to the + SCA runtime. + - Client + An example client which will call the service exposed by the single component + in the CalculatorModule. + + +Build instructions +------------------ + +1) Build the SCA module. + - Set CalculatorModule project as the active project. + Right click->Set as active project + + - Run the SCA generation tool to create the proxy and wrapper classes. + Either Tools->SCA Gen if you have added SCA Gen as an external tool + Or run from the command line: + scagen -dir -output + where the projectDirectory is the directory with the sca.module file. + + - Rebuild All + Build->Rebuild All + +2) Package and deploy the SCA module + - There is a script file in the sca/samples/Calculator directory which will + copy across all the files needed for deployment to the Tuscany runtime. + On a command line run pack_deploy.cmd + As a default, the sample will be copied to sca/samples/runtime directory + Both the SCA module and the subsystem will be copied. + +3) Build the client + - Set the Client project as the active project. + Right click->Set as active project + + - Rebuild All + Build->Rebuild All + +4) Run the client + - Use the command file in the sca/samples/Calculator/Client directory to run the + client. This command file will set the SCA environment variables before running + the client. For example, + runclient add 4 9 diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/runclient.cmd b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/runclient.cmd new file mode 100644 index 0000000000..8aa6f24f65 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/runclient.cmd @@ -0,0 +1,14 @@ +@echo off +rem Runs the client after setting the SCA environment variables to use the +rem CalculatorSubsystem +setlocal +set SCA4CPP_SYSTEM_ROOT=%~d0%~p0\..\..\runtime + +rem Only need to specify the subsystem (and not the moduleComponent as well) because +rem there is only one moduleComponent in the subsystem - it is a very simple sample. +set SCA4CPP_DEFAULT_MODULE=CalculatorSubsystem + +rem Run the client +%~d0%~p0\debug\Client.exe %* + +endlocal \ No newline at end of file -- cgit v1.2.3