source: versions/3.5.201/Bui_postPackLin/xBuildTools.xml @ 11803

Revision 11803, 5.1 KB checked in by sam, 4 years ago (diff)

encoding

  • Property svn:mime-type set to text/plain
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 * LICENCE[[
4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1/CeCILL 2.O
5 *
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 1.1 (the "License"); you may not use this file except in compliance with
8 * the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
9 *
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
14 *
15 * The Original Code is kelis.fr code.
16 *
17 * The Initial Developer of the Original Code is
18 * samuel.monsarrat@kelis.fr
19 *
20 * Portions created by the Initial Developer are Copyright (C) 2007
21 * the Initial Developer. All Rights Reserved.
22 *
23 * Contributor(s):
24 *
25 *
26 * Alternatively, the contents of this file may be used under the terms of
27 * either of the GNU General Public License Version 2 or later (the "GPL"),
28 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29 * or the CeCILL Licence Version 2.0 (http://www.cecill.info/licences.en.html),
30 * in which case the provisions of the GPL, the LGPL or the CeCILL are applicable
31 * instead of those above. If you wish to allow use of your version of this file
32 * only under the terms of either the GPL or the LGPL, and not to allow others
33 * to use your version of this file under the terms of the MPL, indicate your
34 * decision by deleting the provisions above and replace them with the notice
35 * and other provisions required by the GPL or the LGPL. If you do not delete
36 * the provisions above, a recipient may use your version of this file under
37 * the terms of any one of the MPL, the GPL, the LGPL or the CeCILL.
38 * ]]LICENCE
39  -->
40<project name="Bui_postPackLin.xBuildTools" basedir=".">
41
42<!-- == Tools =================================================== -->   
43        <target name="xUntar" description="Untar en utilisant tar de l'OS">
44                <dirname property="vSourceTarDir" file="${pSourceTarPath}"/>
45                <condition property="pDestPath" value="${vSourceTarDir}"><not><isset property="pDestPath"/></not></condition>
46                <condition property="pFilePatern" value=""><not><isset property="pFilePatern"/></not></condition>
47                <echo message="Décompression de ${pSourceTarPath} vers ${pDestPath}"/>
48                <!-- NOTE: on ne peut pas utiliser la task ANT untar car les permissions sont supprimés (flag a+x sur les exécutables) -->
49                <!-- ATTENTION : Il faut tar (>=1.14) pour ce target -->
50                <exec dir="${pDestPath}" executable="tar" failonerror="true">
51                        <arg line="xzf ${pSourceTarPath} '${pFilePatern}'"/>
52                </exec>
53        </target>
54       
55        <target name="xUntarDel" description="Untar en utilisant tar de l'OS et suppr la source">
56                <dirname property="vSourceTarDir" file="${pSourceTarPath}"/>
57                <condition property="pDestPath" value="${vSourceTarDir}"><not><isset property="pDestPath"/></not></condition>
58                <condition property="pFilePatern" value=""><not><isset property="pFilePatern"/></not></condition>
59                <antcall target="xUntar">
60                        <param name="pSourceTarPath" value="${pSourceTarPath}"/>
61                        <param name="pDestPath" value="${pDestPath}"/>
62                        <param name="pFilePatern" value="${pFilePatern}"/>
63                </antcall>
64                <delete file="${pSourceTarPath}"/>
65        </target>
66       
67        <target name="xCopy" description="Copy en utilisant cp de l'OS">
68                <!-- NOTE: on ne peut pas utiliser la task ANT copy car les permissions sont supprimés (flag a+x sur les exécutables) -->
69                <exec executable="sh" failonerror="true">
70                        <arg line="-c 'cp -Rp ${pSourcePath} ${pDestPath}'"/>
71                </exec>
72        </target>
73               
74        <target name="xGzipBest" description="Effectue un gzip (gzip de l'OS) avec la meilleure compression">
75                <exec executable="gzip" failonerror="true">
76                        <arg line="--best ${pSourcePath}"/>
77                </exec>
78        </target>
79       
80        <target name="xMakeIcons" description="Utilise convert pour décliner in icône 48px en 36px, 32px, 24px, 22px et 16px">
81                <mkdir dir="${pBasePath}/36x36/${pIconType}"/>
82                <mkdir dir="${pBasePath}/32x32/${pIconType}"/>
83                <mkdir dir="${pBasePath}/24x24/${pIconType}"/>
84                <mkdir dir="${pBasePath}/22x22/${pIconType}"/>
85                <mkdir dir="${pBasePath}/16x16/${pIconType}"/>
86                <exec executable="convert" failonerror="true">
87                        <arg line="${pBasePath}/48x48/${pIconType}/${pIconName} -resize 75% -sharpen 1 ${pBasePath}/36x36/${pIconType}/${pIconName}"/>
88                </exec>
89                <exec executable="convert" failonerror="true">
90                        <arg line="${pBasePath}/48x48/${pIconType}/${pIconName} -resize 66.6% -sharpen 1 ${pBasePath}/32x32/${pIconType}/${pIconName}"/>
91                </exec>
92                <exec executable="convert" failonerror="true">
93                        <arg line="${pBasePath}/48x48/${pIconType}/${pIconName} -resize 50% -sharpen 1 ${pBasePath}/24x24/${pIconType}/${pIconName}"/>
94                </exec>
95                <exec executable="convert" failonerror="true">
96                        <arg line="${pBasePath}/48x48/${pIconType}/${pIconName} -resize 45.8% -sharpen 1 ${pBasePath}/22x22/${pIconType}/${pIconName}"/>
97                </exec>
98                <exec executable="convert" failonerror="true">
99                        <arg line="${pBasePath}/48x48/${pIconType}/${pIconName} -resize 33.3% -sharpen 1 ${pBasePath}/16x16/${pIconType}/${pIconName}"/>
100                </exec>
101        </target>
102       
103</project>
Note: See TracBrowser for help on using the repository browser.