root/release-kits/wirk2/ant-scripts/create-components.xml @ 18847

Revision 18847, 6.3 KB (checked in by oranfry, 11 years ago)

deleting traces of links to /home/nzdl, having installer create gsdlsite.cfg, changes to cdrk2

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
19        <antcall target="prepare-sourcecode-component" />
20
21    </target>
22   
23    <target name="compress-components">
24        <antcall target="compress-core-component" />
25        <antcall target="compress-imagemagick-component" />
26        <antcall target="compress-ghostscript-component" />
27
28        <antcall target="compress-zipped-binary-release"><param name="format" value="zip"/></antcall> <!-- from init -->
29
30    </target>
31   
32    <!-- 3rd level --> 
33    <target name="prepare-core-component">
34        <!-- delete old stuff to create new components -->
35        <delete dir="components/tmp/core" quiet="true"/>
36        <mkdir dir="components/tmp/core"/>
37               
38        <copy todir="components/tmp/core" overwrite="true">
39                <fileset dir="distributions/web">
40                    <include name="**/*"/>
41               
42                    <!-- exclude imagemagick -->
43                    <exclude name="bin/windows/imagemagick"/>
44                    <exclude name="bin/windows/imagemagick/**/*"/>
45
46                    <!-- exclude ghostscript -->
47                    <exclude name="bin/windows/ghostscript"/>
48                    <exclude name="bin/windows/ghostscript/**/*"/>
49
50                    <!-- exclude sourcecode -->
51                    <exclude name="common-src"/>
52                    <exclude name="common-src/**/*"/>
53                    <exclude name="runtime-src"/>
54                    <exclude name="runtime-src/**/*"/>
55                    <exclude name="build-src"/>
56                    <exclude name="build-src/**/*"/>
57                   
58                    <!-- exclude buildfiles -->
59                    <exclude name="win32.mak"/>
60                    <exclude name="win32cfg.h"/>
61                    <exclude name="makegs2.bat"/>
62                    <exclude name="Install.txt"/>
63                   
64                    <!-- exclude all readmes but the english one -->
65                    <exclude name="READMEfr.txt"/>
66                    <exclude name="READMEes.txt"/>
67                    <exclude name="READMEru.txt"/>
68                    <exclude name="READMEar.txt"/>
69                   
70                                       
71                </fileset>
72        </copy>
73
74        <zip destfile="components/core.comp" basedir="components/tmp/core" compress="false" />
75    </target>
76   
77   
78    <target name="compress-core-component">
79        <!-- <sevenzip task="encode" input="${basedir}/components/core.comp" output="${basedir}/components/core.lzma" dictionnary="26"/> -->
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/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        <!-- <sevenzip task="encode" input="${basedir}/components/imagemagick.comp" output="${basedir}/components/imagemagick.lzma" dictionnary="26"/> -->
99        <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 imagemagick.lzma imagemagick.comp"/></exec>
100    </target>
101   
102   
103   
104    <target name="prepare-ghostscript-component">
105        <delete dir="components/tmp/ghostscript" quiet="true"/>
106        <mkdir dir="components/tmp/ghostscript"/>
107        <copy todir="components/tmp/ghostscript" overwrite="true">
108            <fileset dir="distributions/web/bin/windows/">
109                <include name="ghostscript/**/*"/>
110            </fileset>
111        </copy>
112       
113        <zip destfile="components/ghostscript.comp" basedir="components/tmp/ghostscript" compress="false" />
114    </target>
115       
116    <target name="compress-ghostscript-component">
117        <!-- <sevenzip task="encode" input="${basedir}/components/ghostscript.comp" output="${basedir}/components/ghostscript.lzma" dictionnary="26"/> -->
118        <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 ghostscript.lzma ghostscript.comp"/></exec>
119    </target>
120   
121   
122   
123    <target name="prepare-sourcecode-component">
124        <delete dir="components/tmp/sourcecode" quiet="true"/>
125        <mkdir dir="components/tmp/sourcecode"/>
126        <copy todir="components/tmp/sourcecode" overwrite="true">
127                <fileset dir="distributions/web">
128                    <include name="common-src/**/*"/>
129                    <include name="runtime-src/**/*"/>
130                    <include name="build-src/**/*"/>
131                    <include name="win32.mak"/>
132                    <include name="win32cfg.h"/>
133                    <include name="makegs2.bat"/>
134                    <include name="Install.txt"/>
135                </fileset>
136        </copy>
137               
138        <mkdir dir="products"/>
139        <zip destfile="products/Greenstone-${version}-${os.suffix}-sourcecode-component.zip" basedir="components/tmp/sourcecode" compress="true"/>
140    </target>
141
142    <!--
143        cd components
144        produce components for cdrom distributions, to be picked up and used by cdrk2 release kit
145        split components into windows only files (windows) and general files (all)
146    -->
147    <target name="produce-cd-components">
148        <delete dir="components/tmp/cdrom"/>
149        <mkdir dir="components/tmp/cdrom"/>
150
151        <!-- core -->
152        <mkdir dir="components/tmp/cdrom/core/all"/>
153        <mkdir dir="components/tmp/cdrom/core/windows"/>
154        <copy todir="components/tmp/cdrom/core/all" overwrite="true">
155            <fileset dir="components/tmp/core"/>
156        </copy>
157        <move todir="components/tmp/cdrom/core/windows" overwrite="true">
158            <fileset dir="components/tmp/cdrom/core/all">
159                <include name="bin/windows"/>
160                <include name="bin/windows/**/*"/>
161                <include name="*.bat"/>
162            </fileset>
163        </move>
164
165        <!-- imagemagick (all windows specific) -->
166        <mkdir dir="components/tmp/cdrom/imagemagick/windows"/>
167        <copy todir="components/tmp/cdrom/imagemagick/windows" overwrite="true">
168            <fileset dir="components/tmp/imagemagick"/>
169        </copy>
170
171
172        <!-- sourcecode -->
173        <mkdir dir="components/tmp/cdrom/sourcecode/all"/>
174        <mkdir dir="components/tmp/cdrom/sourcecode/windows"/>
175        <copy todir="components/tmp/cdrom/sourcecode/all" overwrite="true">
176            <fileset dir="components/tmp/sourcecode"/>
177        </copy>
178        <move todir="components/tmp/cdrom/sourcecode/windows" overwrite="true">
179            <fileset dir="components/tmp/cdrom/sourcecode/all">
180                <include name="win32.mak"/>
181            </fileset>
182        </move>
183
184        <tar destfile="products/cdrom-linux-${version}.tar.gz" basedir="components/tmp/cdrom" compression="gzip"/>
185       
186    </target>
187       
188</project>
Note: See TracBrowser for help on using the browser.