source: versions/3.5.201/Bui_postPackMac/xBuildTools.xml @ 11090

Revision 11090, 4.2 KB checked in by sam, 4 years ago (diff)

correction bug création dmg 3.5

  • Property svn:mime-type set to text/plain
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
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_postPackMac.xBuildTools" basedir=".">
41       
42<!-- == Tools =================================================== -->   
43        <target name="xUntar" description="Untar en utilisant tar de l'OS">
44                <echo message="Décompression de ${pSourceTarPath} vers ${pDestPath}"/>
45                <dirname property="vSourceTarDir" file="${pSourceTarPath}"/>
46                <!-- NOTE: on ne peut pas utiliser la task ANT untar car les permissions sont supprimés (flag a+x sur les exécutables) -->
47                <exec dir="${pDestPath}" executable="tar" failonerror="true">
48                        <arg line="xzf ${pSourceTarPath} '${pFilePatern}'"/>
49                </exec>
50        </target>
51       
52        <target name="xCreateDmg" description="Create an empty DMG">
53                <echo message="Creation du DMG ${pDmgFile} (VolName ${pDmgName})"/>
54                <dirname property="vDmgPath" file="${pDmgFile}"/>
55          <delete includeEmptyDirs="true" failonerror="false">
56            <fileset dir="${vDmgPath}/tmpTemplate" followsymlinks="false"/>
57          </delete>
58                <mkdir dir="${vDmgPath}/tmpTemplate"/>
59                <exec dir="${vDmgPath}" executable="hdiutil" failonerror="true">
60                        <arg line="create -size 150m -format UDRW -srcfolder ${vDmgPath}/tmpTemplate -volname &apos;${pDmgName}&apos; &apos;${pDmgFile}&apos;"/>
61                </exec>
62          <delete includeEmptyDirs="true" failonerror="false">
63            <fileset dir="${vDmgPath}/tmpTemplate" followsymlinks="false"/>
64          </delete>
65        </target>
66       
67        <target name="xMountDmg" description="Mount a dmg">
68          <delete includeEmptyDirs="true" failonerror="false">
69            <fileset dir="${pDmgMountPoint}" followsymlinks="false"/>
70          </delete>
71                <mkdir dir="${pDmgMountPoint}"/>
72                <exec executable="hdiutil" failonerror="true">
73                        <arg line="attach ${pDmgFile} -noautoopen -quiet -mountpoint ${pDmgMountPoint}"/>
74                </exec>
75        </target>
76       
77        <target name="xUnmountDmg" description="Unmount a dmg">
78                <exec executable="hdiutil" failonerror="false">
79                        <arg line="detach ${pDmgMountPoint}"/>
80                </exec>
81          <delete includeEmptyDirs="true" failonerror="false">
82            <fileset dir="${pDmgMountPoint}" followsymlinks="false"/>
83          </delete>
84        </target>
85       
86        <target name="xResizeDmg" description="Resize a dmg">
87                <exec executable="hdiutil" failonerror="true">
88                        <arg line="resize -sectors min ${pDmgFile}"/>
89                </exec>
90        </target>
91       
92        <target name="xCompressDmg" description="Compress a dmg">
93                <delete file="${pDmgFileOut}"/>
94                <exec executable="hdiutil" failonerror="true">
95                        <arg line="convert ${pDmgFileIn} -format UDZO -imagekey zlib-level=9 -o ${pDmgFileOut}"/>
96                </exec>
97        </target>
98</project>
Note: See TracBrowser for help on using the repository browser.