| 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
|---|
| 2 | <!--
|
|---|
| 3 | ATTENTION : penser ajouter les variables d'environnement MOZ_TOOLS D:\scenari_dev3\apps\mozillabuildtools; et %MOZ_TOOLS%\bin; à path
|
|---|
| 4 | mettre dans le class path toute les librairies ant
|
|---|
| 5 |
|
|---|
| 6 | Permet de déployer sur un serveur donné des compiles automatiques des différents projets
|
|---|
| 7 | 1 - upadte des sources du workspace;
|
|---|
| 8 | 2 - execution des Bui_* des différentes applications à déployer
|
|---|
| 9 | 3 - compilation du nsi
|
|---|
| 10 | 4 - copie des installeurs sur un serveur de publication (ex : serveurscenaridata.utc/publichtml/....)
|
|---|
| 11 |
|
|---|
| 12 | -->
|
|---|
| 13 |
|
|---|
| 14 | <!--
|
|---|
| 15 | * LICENCE[[
|
|---|
| 16 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1/CeCILL 2.O
|
|---|
| 17 | *
|
|---|
| 18 | * The contents of this file are subject to the Mozilla Public License Version
|
|---|
| 19 | * 1.1 (the "License"); you may not use this file except in compliance with
|
|---|
| 20 | * the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
|
|---|
| 21 | *
|
|---|
| 22 | * Software distributed under the License is distributed on an "AS IS" basis,
|
|---|
| 23 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|---|
| 24 | * for the specific language governing rights and limitations under the
|
|---|
| 25 | * License.
|
|---|
| 26 | *
|
|---|
| 27 | * The Original Code is kelis.fr code.
|
|---|
| 28 | *
|
|---|
| 29 | * The Initial Developer of the Original Code is
|
|---|
| 30 | * antoine.pourchez@kelis.fr
|
|---|
| 31 | *
|
|---|
| 32 | * Portions created by the Initial Developer are Copyright (C) 2007
|
|---|
| 33 | * the Initial Developer. All Rights Reserved.
|
|---|
| 34 | *
|
|---|
| 35 | * Contributor(s):
|
|---|
| 36 | *
|
|---|
| 37 | *
|
|---|
| 38 | * Alternatively, the contents of this file may be used under the terms of
|
|---|
| 39 | * either of the GNU General Public License Version 2 or later (the "GPL"),
|
|---|
| 40 | * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|---|
| 41 | * or the CeCILL Licence Version 2.0 (http://www.cecill.info/licences.en.html),
|
|---|
| 42 | * in which case the provisions of the GPL, the LGPL or the CeCILL are applicable
|
|---|
| 43 | * instead of those above. If you wish to allow use of your version of this file
|
|---|
| 44 | * only under the terms of either the GPL or the LGPL, and not to allow others
|
|---|
| 45 | * to use your version of this file under the terms of the MPL, indicate your
|
|---|
| 46 | * decision by deleting the provisions above and replace them with the notice
|
|---|
| 47 | * and other provisions required by the GPL or the LGPL. If you do not delete
|
|---|
| 48 | * the provisions above, a recipient may use your version of this file under
|
|---|
| 49 | * the terms of any one of the MPL, the GPL, the LGPL or the CeCILL.
|
|---|
| 50 | * ]]LICENCE
|
|---|
| 51 | -->
|
|---|
| 52 |
|
|---|
| 53 | <project name="Bui_FullBuild" default="All.osNoDefine" basedir=".">
|
|---|
| 54 | <!-- antcontrib -->
|
|---|
| 55 | <taskdef resource="net/sf/antcontrib/antcontrib.properties">
|
|---|
| 56 | <classpath>
|
|---|
| 57 | <pathelement location="${libjavadir}/ant/ant-contrib.jar"/>
|
|---|
| 58 | </classpath>
|
|---|
| 59 | </taskdef>
|
|---|
| 60 |
|
|---|
| 61 | <!-- Run principal -->
|
|---|
| 62 | <target name="All.osNoDefine">
|
|---|
| 63 | <echo message="Aucun OS n'est spécifié. Veuillez lancer le build.xml des sous projets '_win' ou '_lin'." level="error"/>
|
|---|
| 64 | </target>
|
|---|
| 65 |
|
|---|
| 66 | <!--**
|
|---|
| 67 | *
|
|---|
| 68 | **-->
|
|---|
| 69 | <target name="main.init" description="">
|
|---|
| 70 | <!-- Properties à redéclarer dans les builds par OS -->
|
|---|
| 71 | <property name="compil.dir" value="${basedir}/../../compils"/>
|
|---|
| 72 | <property name="nsis.path" value="${basedir}/../../apps/nsis/makensis"/> |
|---|
| 73 | |
|---|
| 74 | <property name="SCENARIserver.win" value="false"/> |
|---|
| 75 | <property name="SCENARIserver.lin" value="false"/> |
|---|
| 76 | <property name="SCENARIclient.win" value="false"/> |
|---|
| 77 | <property name="SCENARIclient.lin" value="false"/> |
|---|
| 78 | <property name="SCENARIclient.mac" value="false"/> |
|---|
| 79 | <property name="SCENARIchain.win" value="false"/> |
|---|
| 80 | <property name="SCENARIchain.lin" value="false"/> |
|---|
| 81 | <property name="SCENARIchain.mac" value="false"/> |
|---|
| 82 | <property name="SCENARIbuilder.win" value="false"/> |
|---|
| 83 | <property name="SCENARIbuilder.lin" value="false"/> |
|---|
| 84 | <property name="SCENARIkit" value="false"/> |
|---|
| 85 | <property name="modeling" value="false"/> |
|---|
| 86 | <property name="modeling.assmnt" value="false"/> |
|---|
| 87 | <property name="modeling.sound" value="false"/> |
|---|
| 88 |
|
|---|
| 89 | <property name="wsp.dir" value="${basedir}/.."/>
|
|---|
| 90 | <property name="tmp.dir" value="${basedir}/tmp"/>
|
|---|
| 91 | <tstamp><format property="timestamp" pattern="d_MMMM_yyyy" locale="fr"/></tstamp>
|
|---|
| 92 |
|
|---|
| 93 | <mkdir dir="${tmp.dir}"/> |
|---|
| 94 | |
|---|
| 95 | <!-- Update du workspace --> |
|---|
| 96 | <if> |
|---|
| 97 | <equals arg1="${svn.update.wsp}" arg2="true"/> |
|---|
| 98 | <then> |
|---|
| 99 | <echo message="Update du workspace ..."/> |
|---|
| 100 | <exec dir="${wsp.dir}" executable="${svn.path}" failonerror="true"> |
|---|
| 101 | <arg line="update ${wsp.dir}"/> |
|---|
| 102 | </exec> |
|---|
| 103 | </then> |
|---|
| 104 | </if> |
|---|
| 105 | |
|---|
| 106 | <!-- Export de SCserver WIN -->
|
|---|
| 107 | <ant target="xExportProject">
|
|---|
| 108 | <property name="nb.project.name" value="SCENARIserver.win"/>
|
|---|
| 109 | <property name="nb.project.build.path" value="${wsp.dir}/Bui_scServer/_win"/>
|
|---|
| 110 | </ant>
|
|---|
| 111 | <!-- Export de SCserver LIN -->
|
|---|
| 112 | <ant target="xExportProject">
|
|---|
| 113 | <property name="nb.project.name" value="SCENARIserver.lin"/>
|
|---|
| 114 | <property name="nb.project.build.path" value="${wsp.dir}/Bui_scServer/_lin"/>
|
|---|
| 115 | </ant>
|
|---|
| 116 |
|
|---|
| 117 | <!-- Export de SCclient WIN -->
|
|---|
| 118 | <ant target="xExportProject">
|
|---|
| 119 | <property name="nb.project.name" value="SCENARIclient.win"/>
|
|---|
| 120 | <property name="nb.project.build.path" value="${wsp.dir}/Bui_scClient/_win"/>
|
|---|
| 121 | </ant>
|
|---|
| 122 | <!-- Export de SCclient LIN -->
|
|---|
| 123 | <ant target="xExportProject">
|
|---|
| 124 | <property name="nb.project.name" value="SCENARIclient.lin"/>
|
|---|
| 125 | <property name="nb.project.build.path" value="${wsp.dir}/Bui_scClient/_lin"/>
|
|---|
| 126 | </ant>
|
|---|
| 127 | <!-- Export de SCclient MAC -->
|
|---|
| 128 | <ant target="xExportProject">
|
|---|
| 129 | <property name="nb.project.name" value="SCENARIclient.mac"/>
|
|---|
| 130 | <property name="nb.project.build.path" value="${wsp.dir}/Bui_scClient/_mac"/>
|
|---|
| 131 | </ant>
|
|---|
| 132 |
|
|---|
| 133 | <!-- Export de SCchain WIN -->
|
|---|
| 134 | <ant target="xExportProject">
|
|---|
| 135 | <property name="nb.project.name" value="SCENARIchain.win"/>
|
|---|
| 136 | <property name="nb.project.build.path" value="${wsp.dir}/Bui_scChain/_win"/>
|
|---|
| 137 | </ant>
|
|---|
| 138 | <!-- Export de SCchain LIN -->
|
|---|
| 139 | <ant target="xExportProject">
|
|---|
| 140 | <property name="nb.project.name" value="SCENARIchain.lin"/>
|
|---|
| 141 | <property name="nb.project.build.path" value="${wsp.dir}/Bui_scChain/_lin"/>
|
|---|
| 142 | </ant>
|
|---|
| 143 | <!-- Export de SCchain MAC -->
|
|---|
| 144 | <ant target="xExportProject">
|
|---|
| 145 | <property name="nb.project.name" value="SCENARIchain.mac"/>
|
|---|
| 146 | <property name="nb.project.build.path" value="${wsp.dir}/Bui_scChain/_mac"/>
|
|---|
| 147 | </ant>
|
|---|
| 148 |
|
|---|
| 149 | <!-- Export de SCbuilder WIN -->
|
|---|
| 150 | <ant target="xExportProject">
|
|---|
| 151 | <property name="nb.project.name" value="SCENARIbuilder.win"/>
|
|---|
| 152 | <property name="nb.project.build.path" value="${wsp.dir}/Bui_scBuilder/_win"/>
|
|---|
| 153 | </ant>
|
|---|
| 154 | <!-- Export de SCbuilder LIN -->
|
|---|
| 155 | <ant target="xExportProject">
|
|---|
| 156 | <property name="nb.project.name" value="SCENARIbuilder.lin"/>
|
|---|
| 157 | <property name="nb.project.build.path" value="${wsp.dir}/Bui_scBuilder/_lin"/>
|
|---|
| 158 | </ant>
|
|---|
| 159 |
|
|---|
| 160 | <!-- Export de SCENARI kit -->
|
|---|
| 161 | <ant target="xExportProject">
|
|---|
| 162 | <property name="nb.project.name" value="SCENARIkit"/>
|
|---|
| 163 | <property name="nb.project.build.path" value="${wsp.dir}/Bui_scKit"/>
|
|---|
| 164 | </ant>
|
|---|
| 165 |
|
|---|
| 166 | <!-- Export de modeling.builderpack -->
|
|---|
| 167 | <ant target="xExportProject">
|
|---|
| 168 | <property name="nb.project.name" value="modeling"/>
|
|---|
| 169 | <property name="nb.project.build.path" value="${wsp.dir}/Bui_wspPack/builder/modeling"/>
|
|---|
| 170 | </ant>
|
|---|
| 171 | <!-- Export de mdpModelingAssmt.builderpack --> |
|---|
| 172 | <ant target="xExportProject"> |
|---|
| 173 | <property name="nb.project.name" value="modeling.assmnt"/> |
|---|
| 174 | <property name="nb.project.build.path" value="${wsp.dir}/Bui_wspPack/builder/assmnt"/> |
|---|
| 175 | </ant> |
|---|
| 176 | <!-- Export de mdpModelingSound.builderpack --> |
|---|
| 177 | <ant target="xExportProject"> |
|---|
| 178 | <property name="nb.project.name" value="modeling.sound"/> |
|---|
| 179 | <property name="nb.project.build.path" value="${wsp.dir}/Bui_wspPack/builder/sound"/> |
|---|
| 180 | </ant> |
|---|
| 181 |
|
|---|
| 182 | <!-- suppression du répertoire temporaire -->
|
|---|
| 183 | <delete dir="${tmp.dir}"/>
|
|---|
| 184 |
|
|---|
| 185 | </target>
|
|---|
| 186 |
|
|---|
| 187 | <target name="xExportProject">
|
|---|
| 188 | <!-- Parametres : nb.project.name; nb.project.build.path;
|
|---|
| 189 | -->
|
|---|
| 190 | <propertycopy name="shouldBeGenerate" from="${nb.project.name}" />
|
|---|
| 191 | <if>
|
|---|
| 192 | <equals arg1="${shouldBeGenerate}" arg2="true"/>
|
|---|
| 193 | <then>
|
|---|
| 194 | <echo message="##### ${nb.project.name}"/>
|
|---|
| 195 | <property name="nb.project.tmpRep" value="${tmp.dir}/${nb.project.name}"/>
|
|---|
| 196 | <property name="nb.project.buildReport" value="${tmp.dir}/${nb.project.name}_${timestamp}.txt"/>
|
|---|
| 197 | <property name="nb.project.compilRep" value="${nb.project.tmpRep}/compil"/>
|
|---|
| 198 | <!-- initialisation -->
|
|---|
| 199 | <delete dir="${nb.project.tmpRep}"/><mkdir dir="${nb.project.tmpRep}"/>
|
|---|
| 200 | <record name="${nb.project.buildReport}"/>
|
|---|
| 201 |
|
|---|
| 202 | <!-- # execution du ant -->
|
|---|
| 203 | <echo message=" - ${nb.project.name} : compilation du ant ..."/>
|
|---|
| 204 | <ant antfile="${nb.project.build.path}/build.xml" target="All" inheritall="false">
|
|---|
| 205 | <property name="destinstallerdir" value="${nb.project.tmpRep}"/>
|
|---|
| 206 | <property name="destappdir" value="${nb.project.compilRep}"/>
|
|---|
| 207 | <property name="wspdir.hardmodels" value="${wspdir.hardmodels}"/>
|
|---|
| 208 | <property name="realisesdir" value="${compil.dir}"/>
|
|---|
| 209 | <property name="nsis.pathExe" value="${nsis.path}"/>
|
|---|
| 210 | </ant>
|
|---|
| 211 | <!-- # copie des fichiers sur le serveur de déploiement -->
|
|---|
| 212 | <echo message=" - ${nb.project.name} : publication des fichiers générés vers ${compil.dir} ..."/>
|
|---|
| 213 | <copy todir="${compil.dir}" flatten="true">
|
|---|
| 214 | <fileset dir="${nb.project.tmpRep}" includes="*.exe"/>
|
|---|
| 215 | <fileset dir="${nb.project.tmpRep}" includes="*.tar.gz"/>
|
|---|
| 216 | <fileset dir="${nb.project.tmpRep}" includes="*.tgz"/>
|
|---|
| 217 | <fileset dir="${nb.project.tmpRep}" includes="*.zip"/>
|
|---|
| 218 | <fileset dir="${nb.project.tmpRep}" includes="compil/*.wsppack"/>
|
|---|
| 219 | <fileset dir="${nb.project.tmpRep}" includes="*.wsppack"/>
|
|---|
| 220 | <fileset dir="${nb.project.tmpRep}" includes="compil/*.builderpack"/>
|
|---|
| 221 | <fileset dir="${nb.project.tmpRep}" includes="*.builderpack"/>
|
|---|
| 222 | <fileset file="${nb.project.buildReport}"/>
|
|---|
| 223 | </copy>
|
|---|
| 224 | <!-- # post traitements -->
|
|---|
| 225 | <delete dir="${nb.project.tmpRep}"/> |
|---|
| 226 | <echo message=" - ${nb.project.name} : build OK"/>
|
|---|
| 227 | <echo message="END"/>
|
|---|
| 228 | </then>
|
|---|
| 229 | </if>
|
|---|
| 230 | </target>
|
|---|
| 231 | </project>
|
|---|