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

Revision 17814, 4.8 KB (checked in by oranfry, 11 years ago)

prepare source releases on each os

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    </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
18        <antcall target="prepare-sourcecode-component" />
19
20        <antcall target="prepare-source-release" />
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-sourcecode-component" />-->
29
30        <antcall target="compress-source-release" />
31
32    </target>
33   
34    <!-- 3rd level --> 
35    <target name="prepare-core-component">
36        <!-- delete old stuff to create new components -->
37        <delete dir="components/tmp/core" quiet="true"/>
38        <mkdir dir="components/tmp/core"/>
39               
40        <copy todir="components/tmp/core" overwrite="true">
41                <fileset dir="distributions/web">
42                    <include name="**/*"/>
43               
44                    <!-- exclude imagemagick -->
45                    <exclude name="bin/windows/imagemagick"/>
46                    <exclude name="bin/windows/imagemagick/**/*"/>
47
48                    <!-- exclude ghostscript -->
49                    <exclude name="bin/windows/ghostscript"/>
50                    <exclude name="bin/windows/ghostscript/**/*"/>
51
52                    <!-- exclude sourcecode -->
53                    <exclude name="common-src"/>
54                    <exclude name="common-src/**/*"/>
55                    <exclude name="runtime-src"/>
56                    <exclude name="runtime-src/**/*"/>
57                    <exclude name="build-src"/>
58                    <exclude name="build-src/**/*"/>
59                   
60                </fileset>
61        </copy>
62
63        <zip destfile="components/core.comp" basedir="components/tmp/core" compress="false" />
64    </target>
65   
66   
67    <target name="compress-core-component">
68        <!-- <sevenzip task="encode" input="${basedir}/components/core.comp" output="${basedir}/components/core.lzma" dictionnary="26"/> -->
69        <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 core.lzma core.comp"/></exec>
70    </target>
71   
72   
73   
74    <target name="prepare-imagemagick-component">
75        <delete dir="components/tmp/imagemagick" quiet="true"/>
76        <mkdir dir="components/tmp/imagemagick"/>
77        <copy todir="components/tmp/imagemagick" overwrite="true">
78            <fileset dir="distributions/web/bin/windows/">
79                <include name="imagemagick/**/*"/>
80            </fileset>
81        </copy>
82       
83        <zip destfile="components/imagemagick.comp" basedir="components/tmp/imagemagick" compress="false" />
84    </target>
85       
86    <target name="compress-imagemagick-component">
87        <!-- <sevenzip task="encode" input="${basedir}/components/imagemagick.comp" output="${basedir}/components/imagemagick.lzma" dictionnary="26"/> -->
88        <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 imagemagick.lzma imagemagick.comp"/></exec>
89    </target>
90   
91   
92   
93    <target name="prepare-ghostscript-component">
94        <delete dir="components/tmp/ghostscript" quiet="true"/>
95        <mkdir dir="components/tmp/ghostscript"/>
96        <copy todir="components/tmp/ghostscript" overwrite="true">
97            <fileset dir="distributions/web/bin/windows/">
98                <include name="ghostscript/**/*"/>
99            </fileset>
100        </copy>
101       
102        <zip destfile="components/ghostscript.comp" basedir="components/tmp/ghostscript" compress="false" />
103    </target>
104       
105    <target name="compress-ghostscript-component">
106        <!-- <sevenzip task="encode" input="${basedir}/components/ghostscript.comp" output="${basedir}/components/ghostscript.lzma" dictionnary="26"/> -->
107        <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 ghostscript.lzma ghostscript.comp"/></exec>
108    </target>
109   
110   
111   
112    <target name="prepare-sourcecode-component">
113        <delete dir="components/tmp/sourcecode" quiet="true"/>
114        <mkdir dir="components/tmp/sourcecode"/>
115        <copy todir="components/tmp/sourcecode" overwrite="true">
116                <fileset dir="distributions/web">
117                    <include name="common-src/**/*"/>
118                    <include name="runtime-src/**/*"/>
119                    <include name="build-src/**/*"/>
120                </fileset>
121        </copy>
122               
123        <zip destfile="components/sourcecode.comp" basedir="components/tmp/sourcecode" compress="false" />
124        <zip destfile="components/Greenstone-${version}-win32-sourcecode.zip"  basedir="components/tmp/sourcecode" compress="true"/>
125    </target>
126       
127    <target name="compress-sourcecode-component">
128        <!-- <sevenzip task="encode" input="${basedir}/components/sourcecode.comp" output="${basedir}/components/sourcecode.lzma" dictionnary="26"/> -->
129        <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 sourcecode.lzma sourcecode.comp"/></exec>
130    </target>
131
132    <target name="compress-source-release">
133        <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 source-release.lzma source-release.comp"/></exec>
134    </target>
135
136
137</project>
Note: See TracBrowser for help on using the browser.