source: release-kits/wirk2/ant-scripts/create-components.xml@ 19396

Last change on this file since 19396 was 19396, checked in by oranfry, 15 years ago

don't make the source components of binary zips anymore

File size: 6.2 KB
Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<project name="wirk2-create-components" default="create-components">
3
4 <!-- create components from the distribution folder -->
5
6 <!-- 1st level -->
7 <target name="create-components">
8 <antcall target="prepare-components"/>
9 <antcall target="compress-components"/>
10 <antcall target="produce-cd-components"/>
11 </target>
12
13 <!-- 2nd level -->
14 <target name="prepare-components">
15 <antcall target="prepare-core-component" />
16 <antcall target="prepare-imagemagick-component" />
17 <antcall target="prepare-ghostscript-component" />
18 </target>
19
20 <target name="compress-components">
21 <antcall target="compress-core-component" />
22 <antcall target="compress-imagemagick-component" />
23 <antcall target="compress-ghostscript-component" />
24 </target>
25
26 <!-- 3rd level -->
27 <target name="prepare-core-component">
28 <!-- delete old stuff to create new components -->
29 <delete dir="components/tmp/core" quiet="true"/>
30 <mkdir dir="components/tmp/core"/>
31
32 <copy todir="components/tmp/core" overwrite="true">
33 <fileset dir="distributions/web">
34 <include name="**/*"/>
35
36 <!-- exclude imagemagick -->
37 <exclude name="bin/windows/imagemagick"/>
38 <exclude name="bin/windows/imagemagick/**/*"/>
39
40 <!-- exclude ghostscript -->
41 <exclude name="bin/windows/ghostscript"/>
42 <exclude name="bin/windows/ghostscript/**/*"/>
43
44 <!-- exclude sourcecode -->
45 <exclude name="common-src"/>
46 <exclude name="common-src/**/*"/>
47 <exclude name="runtime-src"/>
48 <exclude name="runtime-src/**/*"/>
49 <exclude name="build-src"/>
50 <exclude name="build-src/**/*"/>
51
52 <!-- exclude buildfiles -->
53 <exclude name="win32.mak"/>
54 <exclude name="win32cfg.h"/>
55 <exclude name="makegs2.bat"/>
56 <exclude name="Install.txt"/>
57
58 <!-- exclude all readmes but the english one -->
59 <exclude name="READMEfr.txt"/>
60 <exclude name="READMEes.txt"/>
61 <exclude name="READMEru.txt"/>
62 <exclude name="READMEar.txt"/>
63
64
65 </fileset>
66 </copy>
67
68 <zip destfile="components/core.comp" basedir="components/tmp/core" compress="false" />
69 </target>
70
71
72 <target name="compress-core-component">
73 <!-- <sevenzip task="encode" input="${basedir}/components/core.comp" output="${basedir}/components/core.lzma" dictionnary="26"/> -->
74 <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 core.lzma core.comp"/></exec>
75 </target>
76
77
78
79 <target name="prepare-imagemagick-component">
80 <delete dir="components/tmp/imagemagick" quiet="true"/>
81 <mkdir dir="components/tmp/imagemagick"/>
82 <copy todir="components/tmp/imagemagick" overwrite="true">
83 <fileset dir="distributions/web/bin/windows/">
84 <include name="imagemagick/**/*"/>
85 </fileset>
86 </copy>
87
88 <zip destfile="components/imagemagick.comp" basedir="components/tmp/imagemagick" compress="false" />
89 </target>
90
91 <target name="compress-imagemagick-component">
92 <!-- <sevenzip task="encode" input="${basedir}/components/imagemagick.comp" output="${basedir}/components/imagemagick.lzma" dictionnary="26"/> -->
93 <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 imagemagick.lzma imagemagick.comp"/></exec>
94 </target>
95
96
97
98 <target name="prepare-ghostscript-component">
99 <delete dir="components/tmp/ghostscript" quiet="true"/>
100 <mkdir dir="components/tmp/ghostscript"/>
101 <copy todir="components/tmp/ghostscript" overwrite="true">
102 <fileset dir="distributions/web/bin/windows/">
103 <include name="ghostscript/**/*"/>
104 </fileset>
105 </copy>
106
107 <zip destfile="components/ghostscript.comp" basedir="components/tmp/ghostscript" compress="false" />
108 </target>
109
110 <target name="compress-ghostscript-component">
111 <!-- <sevenzip task="encode" input="${basedir}/components/ghostscript.comp" output="${basedir}/components/ghostscript.lzma" dictionnary="26"/> -->
112 <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 ghostscript.lzma ghostscript.comp"/></exec>
113 </target>
114
115
116
117 <target name="prepare-sourcecode-component">
118 <delete dir="components/tmp/sourcecode" quiet="true"/>
119 <mkdir dir="components/tmp/sourcecode"/>
120 <copy todir="components/tmp/sourcecode" overwrite="true">
121 <fileset dir="distributions/web">
122 <include name="common-src/**/*"/>
123 <include name="runtime-src/**/*"/>
124 <include name="build-src/**/*"/>
125 <include name="win32.mak"/>
126 <include name="win32cfg.h"/>
127 <include name="makegs2.bat"/>
128 <include name="Install.txt"/>
129 </fileset>
130 </copy>
131
132 <mkdir dir="products"/>
133 <zip destfile="products/Greenstone-${version}-${os.suffix}-sourcecode-component.zip" basedir="components/tmp/sourcecode" compress="true"/>
134 </target>
135
136 <!--
137 cd components
138 produce components for cdrom distributions, to be picked up and used by cdrk2 release kit
139 pull out windows only files
140 -->
141 <target name="produce-cd-components">
142 <delete dir="components/tmp/cdrom"/>
143 <mkdir dir="components/tmp/cdrom"/>
144
145 <!-- core -->
146 <mkdir dir="components/tmp/cdrom/core/windows"/>
147 <copy todir="components/tmp/cdrom/core/windows" overwrite="true">
148 <fileset dir="components/tmp/core">
149 <include name="bin/windows"/>
150 <include name="bin/windows/**/*"/>
151 <include name="*.bat"/>
152 </fileset>
153 </copy>
154
155 <!-- imagemagick -->
156 <mkdir dir="components/tmp/cdrom/imagemagick/windows"/>
157 <copy todir="components/tmp/cdrom/imagemagick/windows" overwrite="true">
158 <fileset dir="components/tmp/imagemagick"/>
159 </copy>
160
161 <!-- ghostscript -->
162 <mkdir dir="components/tmp/cdrom/ghostscript/windows"/>
163 <copy todir="components/tmp/cdrom/ghostscript/windows" overwrite="true">
164 <fileset dir="components/tmp/ghostscript"/>
165 </copy>
166
167 <!-- sourcecode -->
168 <mkdir dir="components/tmp/cdrom/sourcecode/windows"/>
169 <copy todir="components/tmp/cdrom/sourcecode/windows" overwrite="true">
170 <fileset dir="components/tmp/sourcecode">
171 <include name="win32.mak"/>
172 <include name="win32cfg.h"/>
173 <include name="makegs2.bat"/>
174 </fileset>
175 </copy>
176
177 <tar destfile="products/cdrom-components-${version}-windows.tar.gz" basedir="components/tmp/cdrom" compression="gzip"/>
178
179 </target>
180
181</project>
Note: See TracBrowser for help on using the repository browser.