summaryrefslogtreecommitdiff
path: root/TAO/CIAO/DAnCE/ComponentPackager/README.html
blob: db235e9ccf0a50b82f23792ca98137541f538937 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>Building and Installing ComponentPackager</title> 
		<!-- $Id$  -->
		<link rev="made" href="mailto:schmidt@cs.wustl.edu">
	</head>
	<body style="COLOR: rgb(0,0,0); BACKGROUND-COLOR: rgb(255,255,255)" link="#000fff" vlink="#ff0f0f">
		<hr>
		<h3>Building and Using ComponentPackager
		</h3>
		<p><span style="FONT-WEIGHT: bold"></span>To successfully build 
			CIAO::ComponentPackager, you will need ZipArchive, a free zip compression and 
			decompression library developed by 
			artpol-software.(http://www.artpol-software.com/) . This file explains how to 
			set up the building of ZipArchive under different OS platforms such that the 
			CIAO::ComponentPackager can be compiled successfully. If this file does not 
			solve all the problems you might encounter compiling ComponentPackager, please 
			also check out <a href="http://www.artpol-software.com/zipdoc/pageSyst.html">ZipArchive 
				Compiling and Integration</a>&nbsp; for more information. If you are still 
			having problems, please feel free to contact me at <A href="mailto:mxiong@dre.vanderbilt.edu">
				mxiong@dre.vanderbilt.edu</A> .
			<br>
		</p>
		<p>Currently, the ZipArchive version supported by ComponentPackager is 2.4.4. So 
			unless otherwise specified, please stay with this version. The following 
			explains how to build ZipArchive under <a href="#Windows">Windows </a>and <a href="#Linux">
				Linux</a>.<br>
		</p>
		<h3><span style="FONT-WEIGHT: bold">Table of&nbsp; Contents</span></h3>
		<ul>
			<li>
				&nbsp;<a href="#Windows">Building under Windows</a>
			<li>
				&nbsp;<a href="#Linux">Building under Linux</a>
			<li>
				&nbsp;<a href="#Using">Creating packages using ComponentPackager</a></li>
		</ul>
		<br>
		<hr>
		<h3><a name="Windows">Windows </a>
		</h3>
		<p><a name="Windows"> To obtain and build ZipArchive under windows, please do:</a></p>
		<p><a name="Windows">1. Download the ZipArchive source from </a><a href="http://www.artpol-software.com/cgi-bin/download.cgi?ziparchive.zip">
				here</a> , unzip it to a local direcoty, e.g. E:\ZipArchive<br>
			2. Navigate to ZipArchive\Windows directory, copy all the files into 
			ZipArchive\<br>
			3. Navigate to ZipArchive\stl directory, copy all the files (except zippie 
			folder) into ZipArchive\<br>
			4. Open ZipArchive_STL.dsw, click yes to convert it to solution file.<br>
			5. Change the output file property of ZipArchive_STL.dsw to \lib\ziparchd.lib 
			(originally it's \debug\ZipArchive_STL.lib).
			<br>
			6. Build the solution, and you should be able to compile the ziparchive.<br>
			7. Add a environment variable ZIPARCHIVEROOT such that it contains the root 
			directory of ZipArchive. In this case, it would be E:\ZipArchive<br>
			<br>
			Now you should be able to build CIAO:Component_Packager.<br>
			<br>
		</p>
		<hr>
		<h3><a name="Linux">Linux</a></h3>
		<a name="Linux">To obtain and build ZipArchive, do:<br>
			1. Obtains&nbsp; the&nbsp; ZipArchive
			<br>
			&nbsp;&nbsp;&nbsp; &gt;wget 
			http://www.artpol-software.com/cgi-bin/download.cgi?ziparchive.zip<br>
			<br>
			2. Create a&nbsp; directory&nbsp; for ziparchive&nbsp; and decompressed the 
			ziparchive.zip<br>
			&nbsp;&nbsp; &gt;mkdir ziplib<br>
			&nbsp;&nbsp; &gt;unzip ziparchive.zip -d ziplib<br>
			<br>
			3. Copy the necessary files for linux OS<br>
			&nbsp;&nbsp; &gt;cd ziplib<br>
			&nbsp;&nbsp; &gt;cp ./Linux/* .<br>
			&nbsp;&nbsp; &gt;cp ./stl/* .<br>
			<br>
			4. Edit the Makefile in the ./ziplib directory, do the following:<br>
		</a>
		<ul>
			<a name="Linux">
				<li>
					&nbsp;&nbsp;&nbsp; uncomment the first OBJSZLIB variable which points to zlib 
					library object files, and comment the second OBJSZLIB, this step is very 
					important if you do not want to build zlib separately<br>
				<li>
					&nbsp;&nbsp;&nbsp; change prefix to the root directory of ziplib, e.g. 
					~/ziplib. You may choose not to proceed this step if you would like to install 
					ZipArchive to system include and library paths.<br>
			</a></LI>
		</ul>
		<a name="Linux">5. Build ZipArchive by typing
			<span style="FONT-STYLE: italic">make</span><br>
			6. Install the ZipArchive by typing
			<span style="FONT-STYLE: italic">make
install<span style="FONT-STYLE: italic"></span></span>
		</a>
		<p><a name="Linux">7. Set up the environment variable
				<br>
				&nbsp;&nbsp;&nbsp; If you have installed the ziparchive into the system include 
				and library paths, you may skip this step. Otherwise, you might want to add an 
				environment variable ZIPARCHIVEROOT that contains the root directory of the 
				ZipArchive. For instance, in my ./.bash_profile i have the following entry:<br>
			</a>
		</p>
		<p><a name="Linux">&nbsp;&nbsp;&nbsp; ZIPARCHIVEROOT=~/ziplib<br>
				&nbsp;&nbsp;&nbsp; export ZIPARCHIVEROOT<br>
			</a>
		</p>
		<p><a name="Linux">Now you should be able to successfully build the 
				CIAO::Component_Packager.<br>
			</a>
		</p>
		<hr>
		<h3 name="Using"><a name="Using">Create Component Package using ComponentPackager</a></h3>
		<P>
			<a name="Linux">To create a package, ComponentPackager need the 
				flattened_deploymentplan to obtain the information about component 
				implementations.  For instance, in the
                <A HREF="../../docs/tutorials/Quoter/">Quoter
                example</A>, here are the steps to
				create a package:<br>
				<br>
				(assuming windows platform)<br>
				1. cd descriptors<br>
				2. %CIAO_ROOT%/DAnCE/ComponentPackager/Component_Packager.exe -p 
				flattened_deploymentplan.cdp<br>
				&nbsp;&nbsp;&nbsp; (2552|3524) Initializing the Xerces runtime
				<br>
				&nbsp;&nbsp;&nbsp; ComponentPackager: Adding description ....[Done]
				<br>
				&nbsp;&nbsp;&nbsp; ComponentPackager: Adding 
				descriptors\flattened_deploymentplan.cdp ....[Done]<br>
				&nbsp;&nbsp;&nbsp; ComponentPackager: Adding implementations\Broker_execd.dll 
				....[Done]<br>
				&nbsp;&nbsp;&nbsp; ComponentPackager: Adding implementations\Broker_stubd.dll 
				....[Done]<br>
				&nbsp;&nbsp;&nbsp; ComponentPackager: Adding implementations\Broker_svntd.dll 
				....[Done]<br>
				&nbsp;&nbsp;&nbsp; ComponentPackager: Adding 
				implementations\Distributor_execd.dll ....[Done]<br>
				&nbsp;&nbsp;&nbsp; ComponentPackager: Adding 
				implementations\Distributor_stubd.dll ....[Done]<br>
				&nbsp;&nbsp;&nbsp; ComponentPackager: Adding 
				implementations\Distributor_svntd.dll ....[Done]<br>
				&nbsp;&nbsp;&nbsp; ComponentPackager: Adding 
				implementations\Stock_Base_stubd.dll ....[Done]<br>
				&nbsp;&nbsp;&nbsp; ComponentPackager: Adding 
				implementations\Stock_Base_svntd.dll ....[Done]<br>
				&nbsp; &nbsp; (2552|3524)[success] The Component Package has been created!<br>
				<br>
				Now you will be able to find a ComponentPackager.cpk file under ./descriptors 
				directory.Note that&nbsp;you can change the output package name by 
				using&nbsp;-o option, e.g.<br>
			</a><a name="Linux">&nbsp;%CIAO_ROOT%/DAnCE/ComponentPackager/Component_Packager.exe 
				-o Quoter.cpk -p flattened_deploymentplan.cdp</a></P>
		<P><Blockquote><hr>
				<STRONG>Note: </STRONG>To make sure the package has every implementation 
				artifact required, including the base library, e.g.Stock_Base_stub, you might 
				want to check your flattened_deploymentplan to make sure the base libraries are 
				also included as artifacts in the
                                implementation descriptions.Please check the Quoter example's 
				<A HREF="../../docs/tutorials/Quoter/Simple/descriptors/flattened_deploymentplan.cdp">
                                flattened_deploymentplan.cdp</A> for details.<hr>
			</Blockquote>
		If you also want to archive&nbsp;separated descriptors other than 
		flattened_deploymentplan.cdp (.cid, .cpd, .iad etc ) into your package, you 
		will need to create a PackageDescriptorsList XML file which specifies what 
		files to include in your package.&nbsp; There is a sample .pdl file Sample.pdl 
		in the root directory of&nbsp; ComponentPackager. Please follow the same 
		pattern to create your own .pdl file. Along with the .pdl file is a standalone 
		xml schema file package.xsd which you will need to validate Sample.pdl. So make 
		sure you have this schema file along with the .pdl file you need to use. To 
		create a package that includes separated descriptors
		<P></P>
		<P>
			1. cd descriptors<br>
			2. copy %COPY_ROOT%/ComponentPackager/Sample.pdl .\<br>
			3. copy %COPY_ROOT%/ComponentPackager/Package.xsd .\<br>
			4. %CIAO_ROOT%/DAnCE/ComponentPackager/Component_Packager.exe -p 
			flattened_deploymentplan.cdp -i Sample.pdl<br>
			<br>
		</P>
	</body>
</html>