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

Revision 19456, 4.5 KB (checked in by oranfry, 11 years ago)

readmes will now make it into distribution, also fixed mark2 to produce cdrom components, and removed unused code

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    </target>
19   
20    <target name="compress-components">
21        <antcall target="compress-core-component" />
22        <antcall target="compress-imagemagick-component" />
23        <antcall target="compress-ghostscript-component" />
24    </target>
25   
26    <!-- 3rd level --> 
27    <target name="prepare-core-component">
28        <!-- delete old stuff to create new components -->
29        <delete dir="components/tmp/core" quiet="true"/>
30        <mkdir dir="components/tmp/core"/>
31               
32        <copy todir="components/tmp/core" overwrite="true">
33                <fileset dir="distributions/web">
34                    <include name="**/*"/>
35               
36                    <!-- exclude imagemagick -->
37                    <exclude name="bin/windows/imagemagick"/>
38                    <exclude name="bin/windows/imagemagick/**/*"/>
39
40                    <!-- exclude ghostscript -->
41                    <exclude name="bin/windows/ghostscript"/>
42                    <exclude name="bin/windows/ghostscript/**/*"/>
43                   
44                </fileset>
45        </copy>
46
47        <zip destfile="components/core.comp" basedir="components/tmp/core" compress="false" />
48    </target>
49   
50    <target name="compress-core-component">
51        <!-- <sevenzip task="encode" input="${basedir}/components/core.comp" output="${basedir}/components/core.lzma" dictionnary="26"/> -->
52        <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 core.lzma core.comp"/></exec>
53    </target>
54   
55    <target name="prepare-imagemagick-component">
56        <delete dir="components/tmp/imagemagick" quiet="true"/>
57        <mkdir dir="components/tmp/imagemagick"/>
58        <copy todir="components/tmp/imagemagick" overwrite="true">
59            <fileset dir="distributions/web/bin/windows/">
60                <include name="imagemagick/**/*"/>
61            </fileset>
62        </copy>
63       
64        <zip destfile="components/imagemagick.comp" basedir="components/tmp/imagemagick" compress="false" />
65    </target>
66       
67    <target name="compress-imagemagick-component">
68        <!-- <sevenzip task="encode" input="${basedir}/components/imagemagick.comp" output="${basedir}/components/imagemagick.lzma" dictionnary="26"/> -->
69        <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 imagemagick.lzma imagemagick.comp"/></exec>
70    </target>
71   
72    <target name="prepare-ghostscript-component">
73        <delete dir="components/tmp/ghostscript" quiet="true"/>
74        <mkdir dir="components/tmp/ghostscript"/>
75        <copy todir="components/tmp/ghostscript" overwrite="true">
76            <fileset dir="distributions/web/bin/windows/">
77                <include name="ghostscript/**/*"/>
78            </fileset>
79        </copy>
80       
81        <zip destfile="components/ghostscript.comp" basedir="components/tmp/ghostscript" compress="false" />
82    </target>
83       
84    <target name="compress-ghostscript-component">
85        <!-- <sevenzip task="encode" input="${basedir}/components/ghostscript.comp" output="${basedir}/components/ghostscript.lzma" dictionnary="26"/> -->
86        <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 ghostscript.lzma ghostscript.comp"/></exec>
87    </target>
88
89    <!--
90        cd components
91        produce components for cdrom distributions, to be picked up and used by cdrk2 release kit
92        pull out windows only files
93    -->
94    <target name="produce-cd-components">
95        <delete dir="components/tmp/cdrom"/>
96        <mkdir dir="components/tmp/cdrom"/>
97
98        <!-- core -->
99        <mkdir dir="components/tmp/cdrom/core/windows"/>
100        <copy todir="components/tmp/cdrom/core/windows" overwrite="true">
101            <fileset dir="components/tmp/core">
102                <include name="bin/windows"/>
103                <include name="bin/windows/**/*"/>
104                <include name="*.bat"/>
105            </fileset>
106        </copy>
107
108        <!-- imagemagick -->
109        <mkdir dir="components/tmp/cdrom/imagemagick/windows"/>
110        <copy todir="components/tmp/cdrom/imagemagick/windows" overwrite="true">
111            <fileset dir="components/tmp/imagemagick"/>
112        </copy>
113
114        <!-- ghostscript -->
115        <mkdir dir="components/tmp/cdrom/ghostscript/windows"/>
116        <copy todir="components/tmp/cdrom/ghostscript/windows" overwrite="true">
117            <fileset dir="components/tmp/ghostscript"/>
118        </copy>
119       
120        <tar destfile="products/cdrom-components-${version}-windows.tar.gz" basedir="components/tmp/cdrom" compression="gzip"/>
121
122    </target>
123       
124</project>
Note: See TracBrowser for help on using the browser.