source: versions/3.5.201/Bui_Core/xPackaging.mac.xml @ 12019

Revision 12019, 6.6 KB checked in by sam, 4 years ago (diff)

MAJ icônes scbd mac

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 utc.fr code.
16 *
17 * The Initial Developer of the Original Code is
18 * Universite de Technologie de Compiegne.
19 *
20 * Portions created by the Initial Developer are Copyright (C) 2005
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
41<project name="Bui_Mac" default="All" basedir=".">
42       
43        <!-- Emplacement des sources -->
44        <property name="coreMacDir" value="${corePackagingDir}\mac"/>
45       
46                <target name="package.mac" description="permet de créer le ZIP">
47                <!--
48                        A déclarer ds l'appelant:
49                                - app.name;
50                                - app.name(fullName);
51                                - app.version;
52                                - app.version(developmentStage);
53                                - destapprootdir
54                                - destinstallerdir
55                                - destmainappmacdir
56                                - mainmacdir.name
57                -->
58                <echo message="Packaging MAC"/>
59                       
60                <!-- Réorganiation bundle MAC -->
61                <echo message="Réorganiation bundle MAC"/>
62                       
63                <!-- * xulrunner -> Frameworks -->
64                <move todir="${destapprootdir}/Frameworks/XUL.framework">
65                        <fileset dir="${destapprootdir}/MacOS/bin/xulrunner" includes="**/**"/>
66                </move>
67                <move file="${destapprootdir}/Frameworks/XUL.framework/xulrunner" todir="${destapprootdir.macOs}"/>
68                       
69                <!-- * scServer -> racine -->
70                <if><available file="${destserverdir}" type="dir"/>
71                        <then>
72                                <move file="${destserverdir}" todir="${destapprootdir}"/>
73                        </then>
74                </if>
75                       
76                <!-- * scApp -> Resources -->
77                <if><available file="${destscchaindir}" type="dir"/>
78                        <then>
79                                <move todir="${destapprootdir.resources}">
80                                        <fileset dir="${destscchaindir}" includes="**/**"/>
81                                </move>
82                        </then>
83                </if>
84                <if><available file="${destscbuilderdir}" type="dir"/>
85                        <then>
86                                <move todir="${destapprootdir.resources}">
87                                        <fileset dir="${destscbuilderdir}" includes="**/**"/>
88                                </move>
89                        </then>
90                </if>
91               
92                <!-- * Construction scTest.app -->
93                <if><available file="${destsctestdir}" type="dir"/>
94                        <then>
95                                <property name="destapprootdir.sctest" value="${destapprootdir}/scTest.app/Contents"/>
96                                <mkdir dir="${destapprootdir.sctest}/MacOS"/>
97                                <copy file="${destapprootdir.macOs}/xulrunner" todir="${destapprootdir.sctest}/MacOS"/>
98                                <mkdir dir="${destapprootdir.sctest}/Resources"/>
99                                <move todir="${destapprootdir.sctest}/Resources">
100                                        <fileset dir="${destsctestdir}" includes="**/**"/>
101                                </move>
102                                <replaceregexp match="../../scBuilder/chrome" replace="../../../../Resources/chrome/" byline="yes">
103                                        <fileset dir="${destapprootdir.sctest}/Resources/chrome" includes="*.manifest"/>
104                                </replaceregexp>
105                                <move file="${destapprootdir.resources}/scTest/icon.icns" todir="${destapprootdir.sctest}/Resources"/>
106                                <move file="${destapprootdir.resources}/scTest/Info.plist" todir="${destapprootdir.sctest}"/>
107                                <delete dir="${destapprootdir.resources}/scTest"/>
108                        </then>
109                </if>
110                <!-- * suppr dossier bin -->
111                <delete dir="${destappbindir}"/>
112                       
113                <!-- Initialisations -->
114                <echo message="Création package MAC"/>
115                <tstamp>
116                        <format property="ts" pattern="yyMMdd-HHmm"/>
117                </tstamp>
118                <property name="package.fileName" value="${app.name}_${app.version(full)}${app.version(developmentStage)}_${ts}"/>
119                <property name="package.mac.tmpDir" value="${basedir}/tmpPackageMac/${package.fileName}"/>
120                <delete dir="${package.mac.tmpDir}"/>
121                <mkdir dir="${package.mac.tmpDir}"/>
122                       
123                <!-- packaging -->
124                <mkdir dir="${package.mac.tmpDir}/${app.name(fullName)}.app"/>
125                <copy todir="${package.mac.tmpDir}/${app.name(fullName)}.app">
126                        <fileset dir="${destmainappmacdir}" includes="**/**"/>
127                </copy>
128                <copy todir="${package.mac.tmpDir}">
129                        <fileset dir="${destappdir}">
130                                <include name="*"/>
131                                <exclude name="${mainmacdir.name}"/>
132                        </fileset>
133                </copy>
134                <copy todir="${package.mac.tmpDir}">
135                        <fileset dir="${coreMacDir}" includes="**/**"/>
136                </copy>
137                        <replaceregexp match="##app.name##" replace="${app.name}" flags="g" byline="true">
138                                <fileset dir="${package.mac.tmpDir}" includes="*.txt"/>
139                        </replaceregexp>
140                        <replaceregexp match="##app.name\(fullName\)##" replace="${app.name(fullName)}" flags="g" byline="true">
141                                <fileset dir="${package.mac.tmpDir}" includes="*.txt"/>
142                        </replaceregexp>
143                <replaceregexp match="##app.server\(port\)##" replace="${app.server(port)}" flags="g" byline="true">
144                        <fileset dir="${package.mac.tmpDir}" includes="*.txt"/>
145                </replaceregexp>
146                <replaceregexp match="##app.profile\(name\)##" replace="${app.profile(name)}" flags="g" byline="true">
147                        <fileset dir="${package.mac.tmpDir}" includes="*.txt"/>
148                </replaceregexp>
149               
150                <!-- # S'assurer que les fichiers de licence sont au bon format -->
151                <fixcrlf srcdir="${destapprootdir}" eol="lf" eof="remove" includes="license*"/>
152               
153                <!-- Recopie des fichiers de licence dans le tarball d'install -->
154                <copy todir="${package.mac.tmpDir}">
155                        <fileset dir="${destapprootdir}" includes="licence*"/>
156                </copy>
157               
158                <tar compression="gzip" destfile="${destinstallerdir}/${package.fileName}_mac.tgz" longfile="gnu">
159                        <tarfileset dir="${package.mac.tmpDir}/.." mode="755" includes="**/**"/>
160                </tar>
161                <!-- PostProcessing -->
162                <delete dir="${package.mac.tmpDir}"/>
163                <delete dir="${package.mac.tmpDir}/.."/>
164        </target>
165       
166</project>
167
Note: See TracBrowser for help on using the repository browser.