1 | <?xml version="1.0" encoding="utf-8" ?>
|
---|
2 | <project name="wirk3-create-components" default="create-components">
|
---|
3 |
|
---|
4 | <!-- create components from the distributions folder -->
|
---|
5 |
|
---|
6 | <!-- 1st level -->
|
---|
7 | <target name="create-components">
|
---|
8 | <antcall target="prepare-components" />
|
---|
9 | <antcall target="compress-components" />
|
---|
10 | </target>
|
---|
11 |
|
---|
12 | <!-- 2nd level -->
|
---|
13 | <target name="prepare-components">
|
---|
14 | <antcall target="prepare-core-component" />
|
---|
15 | <antcall target="prepare-imagemagick-component" />
|
---|
16 | <antcall target="prepare-ghostscript-component" />
|
---|
17 | <antcall target="prepare-ant-component" />
|
---|
18 | <antcall target="prepare-tomcat-component" />
|
---|
19 |
|
---|
20 | <antcall target="prepare-sourcecode-component" />
|
---|
21 |
|
---|
22 | </target>
|
---|
23 |
|
---|
24 | <target name="compress-components">
|
---|
25 | <antcall target="compress-core-component" />
|
---|
26 | <antcall target="compress-imagemagick-component" />
|
---|
27 | <antcall target="compress-ghostscript-component" />
|
---|
28 | <antcall target="compress-ant-component" />
|
---|
29 | <antcall target="compress-tomcat-component" />
|
---|
30 |
|
---|
31 | <antcall target="compress-zipped-binary-release"><param name="format" value="zip"/></antcall> <!-- from init -->
|
---|
32 |
|
---|
33 | </target>
|
---|
34 |
|
---|
35 | <!-- 3rd level -->
|
---|
36 | <target name="prepare-core-component">
|
---|
37 |
|
---|
38 | <!-- delete old stuff to create new components -->
|
---|
39 | <delete dir="components/tmp/core" quiet="true"/>
|
---|
40 | <mkdir dir="components/tmp/core"/>
|
---|
41 |
|
---|
42 | <copy todir="components/tmp/core" overwrite="true">
|
---|
43 | <fileset dir="distributions/web">
|
---|
44 | <include name="**/*"/>
|
---|
45 |
|
---|
46 | <!-- exclude ghostscript -->
|
---|
47 | <exclude name="gs2build/bin/windows/ghostscript/**/*"/>
|
---|
48 | <exclude name="gs2build/bin/windows/ghostscript"/>
|
---|
49 |
|
---|
50 | <!-- exclude imagemagick -->
|
---|
51 | <exclude name="gs2build/bin/windows/imagemagick/**/*"/>
|
---|
52 | <exclude name="gs2build/bin/windows/imagemagick"/>
|
---|
53 |
|
---|
54 | <!-- exclude sourcecode -->
|
---|
55 | <exclude name="src/**/*"/>
|
---|
56 | <exclude name="src"/>
|
---|
57 | <exclude name="gs2build/common-src/**/*"/>
|
---|
58 | <exclude name="gs2build/common-src"/>
|
---|
59 | <exclude name="gs2build/build-src/**/*"/>
|
---|
60 | <exclude name="gs2build/build-src"/>
|
---|
61 | <exclude name="gs2build/runtime-src/**/*"/>
|
---|
62 | <exclude name="gs2build/runtime-src"/>
|
---|
63 |
|
---|
64 | <!-- exclude ant -->
|
---|
65 | <exclude name="packages/ant/**/*"/>
|
---|
66 | <exclude name="packages/ant"/>
|
---|
67 |
|
---|
68 | <!-- exclude tomcat -->
|
---|
69 | <exclude name="packages/tomcat/**/*"/>
|
---|
70 | <exclude name="packages/tomcat"/>
|
---|
71 |
|
---|
72 | </fileset>
|
---|
73 | </copy>
|
---|
74 |
|
---|
75 | <zip destfile="components/core.comp" basedir="components/tmp/core" compress="false" />
|
---|
76 | </target>
|
---|
77 |
|
---|
78 |
|
---|
79 | <target name="compress-core-component">
|
---|
80 | <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 core.lzma core.comp"/></exec>
|
---|
81 | </target>
|
---|
82 |
|
---|
83 |
|
---|
84 |
|
---|
85 | <target name="prepare-imagemagick-component">
|
---|
86 | <delete dir="components/tmp/imagemagick" quiet="true"/>
|
---|
87 | <mkdir dir="components/tmp/imagemagick"/>
|
---|
88 | <copy todir="components/tmp/imagemagick" overwrite="true">
|
---|
89 | <fileset dir="distributions/web/gs2build/bin/windows/">
|
---|
90 | <include name="imagemagick/**/*"/>
|
---|
91 | </fileset>
|
---|
92 | </copy>
|
---|
93 |
|
---|
94 | <zip destfile="components/imagemagick.comp" basedir="components/tmp/imagemagick" compress="false" />
|
---|
95 | </target>
|
---|
96 |
|
---|
97 | <target name="compress-imagemagick-component">
|
---|
98 | <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 imagemagick.lzma imagemagick.comp"/></exec>
|
---|
99 | </target>
|
---|
100 |
|
---|
101 |
|
---|
102 |
|
---|
103 | <target name="prepare-ghostscript-component">
|
---|
104 | <delete dir="components/tmp/ghostscript" quiet="true"/>
|
---|
105 | <mkdir dir="components/tmp/ghostscript"/>
|
---|
106 | <copy todir="components/tmp/ghostscript" overwrite="true">
|
---|
107 | <fileset dir="distributions/web/gs2build/bin/windows/">
|
---|
108 | <include name="ghostscript/**/*"/>
|
---|
109 | </fileset>
|
---|
110 | </copy>
|
---|
111 |
|
---|
112 | <zip destfile="components/ghostscript.comp" basedir="components/tmp/ghostscript" compress="false" />
|
---|
113 | </target>
|
---|
114 |
|
---|
115 | <target name="compress-ghostscript-component">
|
---|
116 | <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 ghostscript.lzma ghostscript.comp"/></exec>
|
---|
117 | </target>
|
---|
118 |
|
---|
119 | <target name="prepare-sourcecode-component">
|
---|
120 | <delete dir="components/tmp/sourcecode" quiet="true"/>
|
---|
121 | <mkdir dir="components/tmp/sourcecode"/>
|
---|
122 | <copy todir="components/tmp/sourcecode" overwrite="true">
|
---|
123 | <fileset dir="distributions/web">
|
---|
124 | <include name="src/**/*"/>
|
---|
125 | <include name="gs2build/common-src/**/*"/>
|
---|
126 | <include name="gs2build/build-src/**/*"/>
|
---|
127 | <include name="gs2build/runtime-src/**/*"/>
|
---|
128 | </fileset>
|
---|
129 | </copy>
|
---|
130 |
|
---|
131 | <mkdir dir="products"/>
|
---|
132 | <zip destfile="products/Greenstone-${version}-${os.suffix}-sourcecode-component.zip" basedir="components/tmp/sourcecode" compress="true"/>
|
---|
133 | </target>
|
---|
134 |
|
---|
135 | <target name="compress-sourcecode-component">
|
---|
136 | <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 sourcecode.lzma sourcecode.comp"/></exec>
|
---|
137 | </target>
|
---|
138 |
|
---|
139 | <target name="prepare-ant-component">
|
---|
140 | <delete dir="components/tmp/ant" quiet="true"/>
|
---|
141 | <mkdir dir="components/tmp/ant"/>
|
---|
142 |
|
---|
143 | <copy todir="components/tmp/ant" overwrite="true">
|
---|
144 | <fileset dir="distributions/web/packages">
|
---|
145 | <include name="ant/**/*"/>
|
---|
146 | </fileset>
|
---|
147 | </copy>
|
---|
148 |
|
---|
149 | <zip destfile="components/ant.comp" basedir="components/tmp/ant" compress="false" />
|
---|
150 | </target>
|
---|
151 |
|
---|
152 | <target name="compress-ant-component">
|
---|
153 | <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 ant.lzma ant.comp"/></exec>
|
---|
154 | </target>
|
---|
155 |
|
---|
156 | <target name="prepare-tomcat-component">
|
---|
157 | <delete dir="components/tmp/tomcat" quiet="true"/>
|
---|
158 | <mkdir dir="components/tmp/tomcat"/>
|
---|
159 | <copy todir="components/tmp/tomcat" overwrite="true">
|
---|
160 | <fileset dir="distributions/web/packages">
|
---|
161 | <include name="tomcat/**/*"/>
|
---|
162 | </fileset>
|
---|
163 | </copy>
|
---|
164 |
|
---|
165 | <zip destfile="components/tomcat.comp" basedir="components/tmp/tomcat" compress="false" />
|
---|
166 | </target>
|
---|
167 |
|
---|
168 | <target name="compress-tomcat-component">
|
---|
169 | <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 tomcat.lzma tomcat.comp"/></exec>
|
---|
170 | </target>
|
---|
171 |
|
---|
172 | </project>
|
---|