source: release-kits/wirk3/ant-scripts/create-components.xml@ 17366

Last change on this file since 17366 was 17366, checked in by oranfry, 16 years ago

a target to split the distribution into components and compress each component

File size: 5.8 KB
Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<project name="wirk3-create-components" default="create-components">
3
4 <!-- create components from the distribution folder -->
5 <target name="create-components">
6 <antcall target="create-core-component" />
7 <antcall target="create-imagemagick-component" />
8 <antcall target="create-ghostscript-component" />
9 <antcall target="create-sourcecode-component" />
10 <antcall target="create-ant-component" />
11 <antcall target="create-tomcat-component" />
12 </target>
13
14
15 <target name="create-core-component">
16 <antcall target="prepare-core-component" />
17 <antcall target="compress-core-component" />
18 </target>
19
20 <target name="create-imagemagick-component">
21 <antcall target="prepare-imagemagick-component" />
22 <antcall target="compress-imagemagick-component" />
23 </target>
24
25
26 <target name="create-ghostscript-component">
27 <antcall target="prepare-ghostscript-component" />
28 <antcall target="compress-ghostscript-component" />
29 </target>
30
31
32 <target name="create-sourcecode-component">
33 <antcall target="prepare-sourcecode-component" />
34 <antcall target="compress-sourcecode-component" />
35 </target>
36
37
38 <target name="create-ant-component">
39 <antcall target="prepare-ant-component" />
40 <antcall target="compress-ant-component" />
41 </target>
42
43
44 <target name="create-tomcat-component">
45 <antcall target="prepare-tomcat-component" />
46 <antcall target="compress-tomcat-component" />
47 </target>
48
49
50 <target name="prepare-core-component">
51 <!-- delete old stuff to create new components -->
52 <delete dir="components"/>
53 <mkdir dir="components"/>
54 <mkdir dir="components/tmp"/>
55
56 <copy todir="components/tmp/core" overwrite="true">
57 <fileset dir="distribution/greenstone3">
58 <include name="bin/**/*"/>
59 <include name="docs/**/*"/>
60 <include name="gli/**/*"/>
61 <include name="gs2build/**/*"/>
62
63 <exclude name="gs2build/common-src/**/*"/>
64 <exclude name="gs2build/build-src/**/*"/>
65 <exclude name="gs2build/runtime-src/**/*"/>
66 <exclude name="gs2build/bin/windows/imagemagick/**/*"/>
67 <exclude name="gs2build/bin/windows/ghostscript/**/*"/>
68
69 <include name="lib/**/*"/>
70 <include name="web/**/*"/>
71 <include name="resources/**/*"/>
72 <include name="winutil/**/*"/>
73
74 <include name="greenstone3-build.xml"/>
75 <include name="build.properties"/>
76 <include name="gs3-server.bat"/>
77 <include name="gs3-setup.bat"/>
78 <include name="LICENSE.txt"/>
79 <include name="README.txt"/>
80 <include name="server.jar"/>
81 <include name="Uninstall.jar"/>
82 </fileset>
83 </copy>
84
85 <!-- do some cleanup -->
86 <delete dir="components/tmp/core/gs2build/common-src"/>
87 <delete dir="components/tmp/core/gs2build/build-src"/>
88 <delete dir="components/tmp/core/gs2build/runtime-src"/>
89 <delete dir="components/tmp/core/gs2build/bin/windows/imagemagick"/>
90 <delete dir="components/tmp/core/gs2build/bin/windows/ghostscript"/>
91
92 <zip destfile="components/core.comp" basedir="components/tmp/core" compress="false" />
93 </target>
94
95
96 <target name="compress-core-component">
97 <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 core.lzma core.comp"/></exec>
98 </target>
99
100
101
102 <target name="prepare-imagemagick-component">
103 <copy todir="components/tmp/imagemagick" overwrite="true">
104 <fileset dir="distribution/greenstone3/gs2build/bin/windows/">
105 <include name="imagemagick/**/*"/>
106 </fileset>
107 </copy>
108
109 <zip destfile="components/imagemagick.comp" basedir="components/tmp/imagemagick" compress="false" />
110 </target>
111
112 <target name="compress-imagemagick-component">
113 <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 imagemagick.lzma imagemagick.comp"/></exec>
114 </target>
115
116
117
118 <target name="prepare-ghostscript-component">
119 <copy todir="components/tmp/ghostscript" overwrite="true">
120 <fileset dir="distribution/greenstone3/gs2build/bin/windows/">
121 <include name="ghostscript/**/*"/>
122 </fileset>
123 </copy>
124
125 <zip destfile="components/ghostscript.comp" basedir="components/tmp/ghostscript" compress="false" />
126 </target>
127
128 <target name="compress-ghostscript-component">
129 <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 ghostscript.lzma ghostscript.comp"/></exec>
130 </target>
131
132
133
134 <target name="prepare-sourcecode-component">
135 <copy todir="components/tmp/sourcecode" overwrite="true">
136 <fileset dir="distribution/greenstone3">
137 <include name="src/**/*"/>
138 <include name="gs2build/common-src/**/*"/>
139 <include name="gs2build/build-src/**/*"/>
140 <include name="gs2build/runtime-src/**/*"/>
141 </fileset>
142 </copy>
143
144 <zip destfile="components/sourcecode.comp" basedir="components/tmp/sourcecode" compress="false" />
145 </target>
146
147 <target name="compress-sourcecode-component">
148 <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 sourcecode.lzma sourcecode.comp"/></exec>
149 </target>
150
151
152
153 <target name="prepare-ant-component">
154 <copy todir="components/tmp/ant" overwrite="true">
155 <fileset dir="distribution/greenstone3/packages">
156 <include name="ant/**/*"/>
157 </fileset>
158 </copy>
159
160 <zip destfile="components/ant.comp" basedir="components/tmp/ant" compress="false" />
161 </target>
162
163 <target name="compress-ant-component">
164 <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 ant.lzma ant.comp"/></exec>
165 </target>
166
167
168
169 <target name="prepare-tomcat-component">
170 <copy todir="components/tmp/tomcat" overwrite="true">
171 <fileset dir="distribution/greenstone3/packages">
172 <include name="tomcat/**/*"/>
173 </fileset>
174 </copy>
175
176 <zip destfile="components/tomcat.comp" basedir="components/tmp/tomcat" compress="false" />
177 </target>
178
179 <target name="compress-tomcat-component">
180 <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 tomcat.lzma tomcat.comp"/></exec>
181 </target>
182
183
184
185</project>
Note: See TracBrowser for help on using the repository browser.