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

Revision 17472, 4.3 KB (checked in by oranfry, 11 years ago)

component fixes

Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<project name="wirk2-create-components" default="create-components">
3
4
5    <target name="create-components">
6        <antcall target="prepare-components" />
7        <antcall target="compress-components" />
8    </target>
9   
10    <!-- create components from the distribution folder -->
11    <target name="prepare-components">
12        <antcall target="prepare-core-component" />
13        <antcall target="prepare-imagemagick-component" />
14        <antcall target="prepare-ghostscript-component" />
15        <antcall target="prepare-sourcecode-component" />
16    </target>
17   
18    <target name="compress-components">
19        <antcall target="compress-core-component" />
20        <antcall target="compress-imagemagick-component" />
21        <antcall target="compress-ghostscript-component" />
22        <antcall target="compress-sourcecode-component" />
23    </target>
24   
25   
26   
27   
28    <target name="prepare-core-component">
29        <!-- delete old stuff to create new components -->
30        <delete dir="components/tmp/core" quiet="true"/>
31        <mkdir dir="components/tmp/core"/>
32               
33        <copy todir="components/tmp/core" overwrite="true">
34                <fileset dir="distributions/web">
35                    <include name="**/*"/>
36               
37                    <!-- exclude imagemagick -->
38                    <exclude name="bin/windows/imagemagick"/>
39                    <exclude name="bin/windows/imagemagick/**/*"/>
40
41                    <!-- exclude ghostscript -->
42                    <exclude name="bin/windows/ghostscript"/>
43                    <exclude name="bin/windows/ghostscript/**/*"/>
44
45                    <!-- exclude sourcecode -->
46                    <exclude name="common-src"/>
47                    <exclude name="common-src/**/*"/>
48                    <exclude name="runtime-src"/>
49                    <exclude name="runtime-src/**/*"/>
50                    <exclude name="build-src"/>
51                    <exclude name="build-src/**/*"/>
52                   
53                </fileset>
54        </copy>
55
56        <zip destfile="components/core.comp" basedir="components/tmp/core" compress="false" />
57    </target>
58   
59   
60    <target name="compress-core-component">
61        <!-- <sevenzip task="encode" input="${basedir}/components/core.comp" output="${basedir}/components/core.lzma" dictionnary="26"/> -->
62        <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 core.lzma core.comp"/></exec>
63    </target>
64   
65   
66   
67    <target name="prepare-imagemagick-component">
68        <delete dir="components/tmp/imagemagick" quiet="true"/>
69        <mkdir dir="components/tmp/imagemagick"/>
70        <copy todir="components/tmp/imagemagick" overwrite="true">
71            <fileset dir="distributions/web/bin/windows/">
72                <include name="imagemagick/**/*"/>
73            </fileset>
74        </copy>
75       
76        <zip destfile="components/imagemagick.comp" basedir="components/tmp/imagemagick" compress="false" />
77    </target>
78       
79    <target name="compress-imagemagick-component">
80        <!-- <sevenzip task="encode" input="${basedir}/components/imagemagick.comp" output="${basedir}/components/imagemagick.lzma" dictionnary="26"/> -->
81        <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 imagemagick.lzma imagemagick.comp"/></exec>
82    </target>
83   
84   
85   
86    <target name="prepare-ghostscript-component">
87        <delete dir="components/tmp/ghostscript" quiet="true"/>
88        <mkdir dir="components/tmp/ghostscript"/>
89        <copy todir="components/tmp/ghostscript" overwrite="true">
90            <fileset dir="distributions/web/bin/windows/">
91                <include name="ghostscript/**/*"/>
92            </fileset>
93        </copy>
94       
95        <zip destfile="components/ghostscript.comp" basedir="components/tmp/ghostscript" compress="false" />
96    </target>
97       
98    <target name="compress-ghostscript-component">
99        <!-- <sevenzip task="encode" input="${basedir}/components/ghostscript.comp" output="${basedir}/components/ghostscript.lzma" dictionnary="26"/> -->
100        <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 ghostscript.lzma ghostscript.comp"/></exec>
101    </target>
102   
103   
104   
105    <target name="prepare-sourcecode-component">
106        <delete dir="components/tmp/sourcecode" quiet="true"/>
107        <mkdir dir="components/tmp/sourcecode"/>
108        <copy todir="components/tmp/sourcecode" overwrite="true">
109                <fileset dir="distributions/web">
110                    <include name="common-src/**/*"/>
111                    <include name="runtime-src/**/*"/>
112                    <include name="build-src/**/*"/>
113                </fileset>
114        </copy>
115               
116        <zip destfile="components/sourcecode.comp" basedir="components/tmp/sourcecode" compress="false" />
117    </target>
118       
119    <target name="compress-sourcecode-component">
120        <!-- <sevenzip task="encode" input="${basedir}/components/sourcecode.comp" output="${basedir}/components/sourcecode.lzma" dictionnary="26"/> -->
121        <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 sourcecode.lzma sourcecode.comp"/></exec>
122    </target>
123   
124   
125</project>
Note: See TracBrowser for help on using the browser.