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

Revision 17652, 5.5 KB (checked in by oranfry, 11 years ago)

started source releases

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