| 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 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_client" default="mainBuiClient" basedir=".">
|
|---|
| 42 | <!--**
|
|---|
| 43 | * Copie des différents éléments permettant d'intégrer la couche client à un déploiement
|
|---|
| 44 | * Properties à déclarer :
|
|---|
| 45 | * - pDestAppDir
|
|---|
| 46 | * - pDestChromeDir
|
|---|
| 47 | **-->
|
|---|
| 48 |
|
|---|
| 49 | <!-- Emplacement des sources -->
|
|---|
| 50 | <property name="coreresourcesdir" value="${coredir}/resources"/>
|
|---|
| 51 | <property name="coreclientresourcesdir" value="${coreresourcesdir}/resClient"/>
|
|---|
| 52 | <property name="coreprofiledir" value="${coreclientresourcesdir}/profile"/>
|
|---|
| 53 | <property name="corelauncherdir.win" value="${coreresourcesdir}/launcher/win"/>
|
|---|
| 54 | <property name="corelauncherfile.win" value="${corelauncherdir.win}/launcher.exe"/>
|
|---|
| 55 | <property name="corelauncherdir.lin" value="${coreresourcesdir}/launcher/lin"/>
|
|---|
| 56 | <property name="corelauncherfile.lin" value="${corelauncherdir.lin}/launcher"/>
|
|---|
| 57 | <property name="corelauncherdir.mac" value="${coreresourcesdir}/launcher/mac"/>
|
|---|
| 58 | <property name="corelauncherfile.mac" value="${corelauncherdir.mac}/launcher"/>
|
|---|
| 59 | <property name="coredevresourcesdir" value="${coreresourcesdir}/devPackages"/>
|
|---|
| 60 |
|
|---|
| 61 | <!-- xulRunner-->
|
|---|
| 62 | <property name="xulRunnerSrcDir.win" value="${wspdir}/Lib_XulRunner/win"/>
|
|---|
| 63 | <property name="xulRunnerSrcDir.lin" value="${wspdir}/Lib_XulRunner/lin"/>
|
|---|
| 64 | <property name="xulRunnerSrcDir.mac" value="${wspdir}/Lib_XulRunner/mac"/>
|
|---|
| 65 | <property name="xulRunnerDstDir" value="${destappbindir}/xulrunner"/>
|
|---|
| 66 | <property name="corexulrunnerresourcesdir" value="${coreresourcesdir}/xulRunner"/>
|
|---|
| 67 | <property name="corexulrunneraddonsdir" value="${corexulrunnerresourcesdir}/complements"/>
|
|---|
| 68 | <property name="appDefaultChromeUri" value="chrome://scenaricms/content/deskwsp/deskwsp.xul"/>
|
|---|
| 69 | <property name="appIcoName" value="scenaricms"/><!-- liée au nom de la window principale -->
|
|---|
| 70 |
|
|---|
| 71 | <!-- app -->
|
|---|
| 72 | <property name="app.iniFileName" value="application.ini"/>
|
|---|
| 73 |
|
|---|
| 74 | <!-- gecko -->
|
|---|
| 75 | <property name="gecko.minVersion" value="1.9.0"/>
|
|---|
| 76 | <property name="gecko.maxVersion" value="1.9.*"/><!-- NOTE : sur macOs, gecko.maxVersion > gecko.minVersion -->
|
|---|
| 77 |
|
|---|
| 78 | <tstamp>
|
|---|
| 79 | <format property="timestamp" pattern="yyyyMMddHH"/>
|
|---|
| 80 | </tstamp>
|
|---|
| 81 |
|
|---|
| 82 | <!-- targets publics -->
|
|---|
| 83 | <target name="mainBuiClient" description="création des composantes clients de l'application">
|
|---|
| 84 | <!--
|
|---|
| 85 | A déclarer ds l'appelant:
|
|---|
| 86 | - pDestAppDir : répertoire de destination du SC compilé
|
|---|
| 87 | - pSrcProfileDir
|
|---|
| 88 | - pSrcPrefsDir
|
|---|
| 89 | - pSrcIcoFile
|
|---|
| 90 | - pSrcLinkIcoFile
|
|---|
| 91 | - pSrcFileInputIco
|
|---|
| 92 | - pSrcFileOutputIco
|
|---|
| 93 | - pSrcFileRes1Ico
|
|---|
| 94 | - app.extensions.version
|
|---|
| 95 | - app.version
|
|---|
| 96 | - app.version(developmentStage)
|
|---|
| 97 | - pAppName
|
|---|
| 98 | - pAppNameFull
|
|---|
| 99 | - pAppId
|
|---|
| 100 | - pDestAppLicencesDir : répertoire ou ont été générés les fichiers de licence
|
|---|
| 101 | -->
|
|---|
| 102 | <echo message="Création de la partie cliente"/>
|
|---|
| 103 | <ant target="xCreateConfFile"/> |
|---|
| 104 | <ant target="xCopyMainClientDir"/>
|
|---|
| 105 | <ant target="xCopyProfile"/>
|
|---|
| 106 | <ant target="xCopyPrefs"/>
|
|---|
| 107 | <ant target="xCopyIco"/>
|
|---|
| 108 | <ant target="xCreateIniFile"/>
|
|---|
| 109 | <ant target="xCreateAppPackage"/>
|
|---|
| 110 | <ant target="xCreateXulrunnerJar"/>
|
|---|
| 111 | </target>
|
|---|
| 112 |
|
|---|
| 113 | <!--**
|
|---|
| 114 | * Compilation des XPCom
|
|---|
| 115 | **-->
|
|---|
| 116 | <target name="compilXPCom" description="Copie des components">
|
|---|
| 117 | <!-- a déclarer :
|
|---|
| 118 | pProjectPath
|
|---|
| 119 | pDestAppDir
|
|---|
| 120 | -->
|
|---|
| 121 | <property name="tmp.compilXPCom" value="${tmpRep}/tmp.compilXPCom"/>
|
|---|
| 122 | <property name="tmp.compilXPCom.loc" value="${tmpRep}/tmp.compilXPComloc"/>
|
|---|
| 123 | <delete dir="${tmp.compilXPCom}" failonerror="false"/><mkdir dir="${tmp.compilXPCom}"/>
|
|---|
| 124 | <delete dir="${tmp.compilXPCom.loc}" failonerror="false"/><mkdir dir="${tmp.compilXPCom.loc}"/>
|
|---|
| 125 | <!-- - compilation (uniquement sous win et lin)-->
|
|---|
| 126 | <ant target="xCompilIdl"/>
|
|---|
| 127 | <!-- - copie du résultat de la compil -->
|
|---|
| 128 | <echo message="Copie des éléments XPCom de ${pProjectPath} dans '${pDestAppDir}'"/>
|
|---|
| 129 | <copy todir="${tmp.compilXPCom}/components" overwrite="true">
|
|---|
| 130 | <fileset dir="${pProjectPath}/components">
|
|---|
| 131 | <include name="*.xpt"/>
|
|---|
| 132 | <include name="*.js"/>
|
|---|
| 133 | </fileset>
|
|---|
| 134 | </copy>
|
|---|
| 135 | <!-- - copie des éléments os dépendant -->
|
|---|
| 136 | <echo message="Copie des éléments OS dépendant de ${pProjectPath} dans '${pDestAppDir}'"/>
|
|---|
| 137 | <copy todir="${tmp.compilXPCom}" overwrite="true" failonerror="false">
|
|---|
| 138 | <fileset dir="${pProjectPath}/platform/${app.os.fullName}"/>
|
|---|
| 139 | </copy>
|
|---|
| 140 | <!-- localisation -->
|
|---|
| 141 | <if>
|
|---|
| 142 | <equals arg1="${pLocalise}" arg2="false"/>
|
|---|
| 143 | <then>
|
|---|
| 144 | <copy todir="${tmp.compilXPCom.loc}">
|
|---|
| 145 | <fileset dir="${tmp.compilXPCom}" includes="**/**"/>
|
|---|
| 146 | </copy>
|
|---|
| 147 | </then>
|
|---|
| 148 | <else>
|
|---|
| 149 | <i8n sourceFile="${tmp.compilXPCom}" destFile="${tmp.compilXPCom.loc}" uriResolverRegexp="\/tmp.compilXPCom([\/.]*)" uriResolverReplacement="$1">
|
|---|
| 150 | <xliff>
|
|---|
| 151 | <fileset dir="${app.localization.scenariCore}" includes="**/*.xliff"/>
|
|---|
| 152 | </xliff>
|
|---|
| 153 | </i8n>
|
|---|
| 154 | </else>
|
|---|
| 155 | </if>
|
|---|
| 156 | <!-- intégration du projet localisé -->
|
|---|
| 157 | <copy todir="${pDestAppDir}">
|
|---|
| 158 | <fileset dir="${tmp.compilXPCom.loc}"/>
|
|---|
| 159 | </copy>
|
|---|
| 160 | <!-- cleanUp -->
|
|---|
| 161 | <delete dir="${tmp.compilXPCom}" failonerror="false"/>
|
|---|
| 162 | <delete dir="${tmp.compilXPCom.loc}" failonerror="false"/>
|
|---|
| 163 | </target>
|
|---|
| 164 |
|
|---|
| 165 | <target name="xCompilIdl" description="Appel du .bat qui compile les XPCom. ATTENTION la declaratin de certaines variables est indispensable">
|
|---|
| 166 | <!-- a déclarer :
|
|---|
| 167 | pProjectPath
|
|---|
| 168 | pDestAppDir
|
|---|
| 169 | --> |
|---|
| 170 |
|
|---|
| 171 | <echo message="Compilation des XPCom de ${pProjectPath} dans '${pDestAppDir}'"/> |
|---|
| 172 | <if>
|
|---|
| 173 | <equals arg1="${os.name}" arg2="Linux"/>
|
|---|
| 174 | <then>
|
|---|
| 175 | <!-- # Compilation sur Linux --> |
|---|
| 176 | <exec dir="${pProjectPath}/_idl" executable="sh">
|
|---|
| 177 | <arg line="${pProjectPath}/_idl/buildxpcom.sh"/>
|
|---|
| 178 | <arg value="${pDestAppDir}"/>
|
|---|
| 179 | </exec>
|
|---|
| 180 | </then>
|
|---|
| 181 | <else> |
|---|
| 182 | <!-- # Compilation sur Windows --> |
|---|
| 183 | <exec dir="${pProjectPath}/_idl" executable="cmd.exe"> |
|---|
| 184 | <arg line="/c ${pProjectPath}/_idl/buildxpcom.bat"/> |
|---|
| 185 | <arg value="${pDestAppDir}"/> |
|---|
| 186 | </exec> |
|---|
| 187 | </else> |
|---|
| 188 | </if>
|
|---|
| 189 | </target>
|
|---|
| 190 | <!--**
|
|---|
| 191 | * Copie de XulRunner
|
|---|
| 192 | **-->
|
|---|
| 193 | <target name="copyXulRunner" description="Copie l'application XulRunner et les composents additionnels">
|
|---|
| 194 | <!--
|
|---|
| 195 | A déclarer ds l'appelant:
|
|---|
| 196 | - destappbindir : répertoire de destination du SC compilé
|
|---|
| 197 | - (xulRunnerDstDir)
|
|---|
| 198 | -->
|
|---|
| 199 | <if>
|
|---|
| 200 | <!-- # Win -->
|
|---|
| 201 | <equals arg1="${app.os}" arg2="win"/>
|
|---|
| 202 | <then>
|
|---|
| 203 | <!-- copie de xulRunner -->
|
|---|
| 204 | <echo message="Copie de XulRunner"/>
|
|---|
| 205 | <copy todir="${xulRunnerDstDir}" overwrite="true">
|
|---|
| 206 | <fileset dir="${xulRunnerSrcDir.win}">
|
|---|
| 207 | <exclude name="**/chrome/en-US.*"/>
|
|---|
| 208 | </fileset>
|
|---|
| 209 | </copy>
|
|---|
| 210 | <move file="${xulRunnerDstDir}/xulrunner.exe" tofile="${xulRunnerDstDir}/scenari.exe"/><!-- note : renommage pour regroupement correct dans win XP -->
|
|---|
| 211 | <!-- copie d'éléments additionnels à xulRunner -->
|
|---|
| 212 | <ant target="xCopyXulrunnerAddons"/>
|
|---|
| 213 | </then>
|
|---|
| 214 | <!-- # Lin -->
|
|---|
| 215 | <elseif>
|
|---|
| 216 | <equals arg1="${app.os}" arg2="lin"/>
|
|---|
| 217 | <then>
|
|---|
| 218 | <!-- copie de xulrunner. Attention, juste le fichier à copier en prod, en dev il faut le dezipper -->
|
|---|
| 219 | <if>
|
|---|
| 220 | <equals arg1="${app.status}" arg2="dev"/>
|
|---|
| 221 | <then>
|
|---|
| 222 | <echo message="UNTAR de XulRunner LINUX DEV"/>
|
|---|
| 223 | <untar dest="${destappbindir}" compression="gzip">
|
|---|
| 224 | <fileset dir="${xulRunnerSrcDir.lin}">
|
|---|
| 225 | <include name="xulrunner.tar.gz"/>
|
|---|
| 226 | </fileset>
|
|---|
| 227 | </untar>
|
|---|
| 228 | <echo message="Corrections des droits sur xulrunner..."/>
|
|---|
| 229 | <exec dir="${destappbindir}" executable="chmod">
|
|---|
| 230 | <arg line="-R 755 ${destappbindir}/xulrunner"/>
|
|---|
| 231 | </exec>
|
|---|
| 232 | </then>
|
|---|
| 233 | <else>
|
|---|
| 234 | <echo message="Copie de XulRunner"/>
|
|---|
| 235 | <copy todir="${destappbindir}" overwrite="true">
|
|---|
| 236 | <fileset dir="${xulRunnerSrcDir.lin}">
|
|---|
| 237 | <exclude name="**/chrome/en-US.*"/>
|
|---|
| 238 | </fileset>
|
|---|
| 239 | </copy>
|
|---|
| 240 | </else>
|
|---|
| 241 | </if>
|
|---|
| 242 | <!-- copie d'éléments additionnels à xulRunner -->
|
|---|
| 243 | <ant target="xCopyXulrunnerAddons"/>
|
|---|
| 244 | </then>
|
|---|
| 245 | </elseif>
|
|---|
| 246 | <elseif>
|
|---|
| 247 | <equals arg1="${app.os}" arg2="mac"/>
|
|---|
| 248 | <then>
|
|---|
| 249 | <!-- copie de xulRunner -->
|
|---|
| 250 | <echo message="Copie de XulRunner"/>
|
|---|
| 251 | <copy todir="${xulRunnerDstDir}" overwrite="true">
|
|---|
| 252 | <fileset dir="${xulRunnerSrcDir.mac}">
|
|---|
| 253 | <exclude name="**/chrome/en-US.*"/>
|
|---|
| 254 | </fileset>
|
|---|
| 255 | </copy>
|
|---|
| 256 | <!-- copie d'éléments additionnels à xulRunner -->
|
|---|
| 257 | <ant target="xCopyXulrunnerAddons"/>
|
|---|
| 258 | </then>
|
|---|
| 259 | </elseif>
|
|---|
| 260 | <else><!-- Other OS -->
|
|---|
| 261 | <echo message="Bui_Core > xBuildClient > copyXulRunner : xulRunner pour l'OS '${app.os}' non implémenté" level="warning"/>
|
|---|
| 262 | </else>
|
|---|
| 263 | </if>
|
|---|
| 264 | <!-- communs à tous les OS -->
|
|---|
| 265 | <ant target="xCopyXulRunner.audio"/>
|
|---|
| 266 | </target>
|
|---|
| 267 |
|
|---|
| 268 | <!--**
|
|---|
| 269 | * Copie de des composants audion de XulRunner
|
|---|
| 270 | **-->
|
|---|
| 271 | <target name="xCopyXulRunner.audio" description="Copie des composants audio de xulRunner">
|
|---|
| 272 | <!--
|
|---|
| 273 | A déclarer ds l'appelant:
|
|---|
| 274 | - xulRunnerDstDir
|
|---|
| 275 | -->
|
|---|
| 276 | <!--
|
|---|
| 277 | <mkdir dir="${xulRunnerDstDir}"/>
|
|---|
| 278 | <if>
|
|---|
| 279 | <equals arg1="${app.os}" arg2="win"/>
|
|---|
| 280 | <then>
|
|---|
| 281 | <copy todir="${xulRunnerDstDir}">
|
|---|
| 282 | <fileset dir="${wspdir.devaudio}/Lib_Audio/build-win32-msvc/xulrunner" casesensitive="yes">
|
|---|
| 283 | <include name="**/**"/>
|
|---|
| 284 | </fileset>
|
|---|
| 285 | </copy>
|
|---|
| 286 | </then>
|
|---|
| 287 | <elseif>
|
|---|
| 288 | <equals arg1="${app.os}" arg2="lin"/>
|
|---|
| 289 | <then>
|
|---|
| 290 | <copy todir="${xulRunnerDstDir}">
|
|---|
| 291 | <fileset dir="${wspdir.devaudio}/Lib_Audio/build-linux-gcc/xulrunner" casesensitive="yes">
|
|---|
| 292 | <include name="**/**"/>
|
|---|
| 293 | </fileset>
|
|---|
| 294 | </copy>
|
|---|
| 295 | </then>
|
|---|
| 296 | </elseif>
|
|---|
| 297 | <elseif>
|
|---|
| 298 | <equals arg1="${app.os}" arg2="mac"/>
|
|---|
| 299 | <then>
|
|---|
| 300 |
|
|---|
| 301 | </then>
|
|---|
| 302 | </elseif>
|
|---|
| 303 | <else>
|
|---|
| 304 | <echo message="Bui_Core > xBuildClient > xCopyXulRunner.audio : composants audio pour l'OS '${app.os}' non implémenté" level="warning"/>
|
|---|
| 305 | </else>
|
|---|
| 306 | </if>
|
|---|
| 307 | -->
|
|---|
| 308 | </target>
|
|---|
| 309 |
|
|---|
| 310 | <!--**
|
|---|
| 311 | * Copie de différents éléments dans XulRunner
|
|---|
| 312 | **-->
|
|---|
| 313 |
|
|---|
| 314 | <target name="xCopyXulrunnerAddons" description="copie des répertoires complémentaires dans xulRunner">
|
|---|
| 315 | <!--
|
|---|
| 316 | A déclarer ds l'appelant:
|
|---|
| 317 | - xulRunnerDstDir, corecomponentsdir
|
|---|
| 318 | -->
|
|---|
| 319 | <echo message="Copie des plugins et components de xulRunner dans '${xulRunnerDstDir}'"/>
|
|---|
| 320 | <mkdir dir="${xulRunnerDstDir}"/>
|
|---|
| 321 | <copy todir="${xulRunnerDstDir}" overwrite="true" failonerror="false">
|
|---|
| 322 | <fileset dir="${corexulrunneraddonsdir}/${app.os}" casesensitive="yes" includes="**/**" excludes="readme.txt *.about.xml"/>
|
|---|
| 323 | <fileset dir="${corexulrunneraddonsdir}/all" casesensitive="yes" includes="**/**" excludes="readme.txt *.about.xml"/>
|
|---|
| 324 | </copy>
|
|---|
| 325 | </target>
|
|---|
| 326 |
|
|---|
| 327 | <!--**
|
|---|
| 328 | * Copie du launcher
|
|---|
| 329 | **-->
|
|---|
| 330 | <target name="copyLauncher" description="Copie de l'environnement d'execution">
|
|---|
| 331 | <!--
|
|---|
| 332 | A déclarer ds l'appelant:
|
|---|
| 333 | - pLauncherConfDir, destapprootdir, destappbindir, app.name
|
|---|
| 334 | - destapprootdir.macOs pour mac
|
|---|
| 335 | - app.clientName
|
|---|
| 336 | - app.dynFileExtension pour scKit
|
|---|
| 337 | - app.copyright pour scKit
|
|---|
| 338 | - app.localization(target)
|
|---|
| 339 | -->
|
|---|
| 340 | <property name="app.dynFileExtension" value=""/><!-- utilisé par scKit-->
|
|---|
| 341 | <property name="app.clientName" value="sc"/>
|
|---|
| 342 | <echo message="Copie de l'environnement d'execution"/>
|
|---|
| 343 | <!-- fichiers de paramétrage du launcher -->
|
|---|
| 344 | <copy todir="${destappbindir}" overwrite="true" failonerror="false">
|
|---|
| 345 | <fileset dir="${pLauncherConfDir}" includes="**/*.*"/>
|
|---|
| 346 | <globmapper from="*" to="*${app.dynFileExtension}"/>
|
|---|
| 347 | </copy>
|
|---|
| 348 | <replaceregexp match="##app.localization##" replace="${app.localization(target)}" flags="g" byline="true">
|
|---|
| 349 | <fileset dir="${destappbindir}" includes="*.bat,*.ini,*.conf,*${app.dynFileExtension}"/>
|
|---|
| 350 | </replaceregexp>
|
|---|
| 351 | <replaceregexp match="##app.name##" replace="${app.name}" flags="g" byline="true">
|
|---|
| 352 | <fileset dir="${destappbindir}" includes="*.bat,*.ini,*.conf,*${app.dynFileExtension}"/>
|
|---|
| 353 | </replaceregexp>
|
|---|
| 354 | <replaceregexp match="##app.server\(port\)##" replace="${app.server(port)}" flags="g" byline="true">
|
|---|
| 355 | <fileset dir="${destappbindir}" includes="*.bat,*.ini,*.conf,*${app.dynFileExtension}"/>
|
|---|
| 356 | </replaceregexp>
|
|---|
| 357 | <replaceregexp match="##app.clientName##" replace="${app.clientName}" flags="g" byline="true">
|
|---|
| 358 | <fileset dir="${destappbindir}" includes="*.bat,*.ini,*.conf,*${app.dynFileExtension}"/>
|
|---|
| 359 | </replaceregexp>
|
|---|
| 360 | <replaceregexp match="##app.profile\(name\)##" replace="${app.profile(name)}" flags="g" byline="true">
|
|---|
| 361 | <fileset dir="${destappbindir}" includes="*.bat,*.ini,*.conf,*${app.dynFileExtension}"/>
|
|---|
| 362 | </replaceregexp>
|
|---|
| 363 | <!-- launcher lui meme-->
|
|---|
| 364 | <!-- # win --> |
|---|
| 365 | <if><equals arg1="${app.os}" arg2="win"/>
|
|---|
| 366 | <then>
|
|---|
| 367 | <copy file="${corelauncherfile.win}" tofile="${destapprootdir}/${app.name}.exe" overwrite="true"/>
|
|---|
| 368 | </then>
|
|---|
| 369 | <!-- # lin -->
|
|---|
| 370 | <elseif><equals arg1="${app.os}" arg2="lin"/>
|
|---|
| 371 | <then>
|
|---|
| 372 | <copy file="${corelauncherfile.lin}" tofile="${destapprootdir}/${app.name}" overwrite="true"/>
|
|---|
| 373 | </then>
|
|---|
| 374 | </elseif>
|
|---|
| 375 | <!-- # mac -->
|
|---|
| 376 | <elseif><equals arg1="${app.os}" arg2="mac"/>
|
|---|
| 377 | <then>
|
|---|
| 378 | <!-- pList -->
|
|---|
| 379 | <copy file="${corelauncherdir.mac}/Info.plist" tofile="${destapprootdir}/Info.plist${app.dynFileExtension}" encoding="UTF-8" overwrite="true"/>
|
|---|
| 380 | <replaceregexp file="${destapprootdir}/Info.plist${app.dynFileExtension}" match="##app.name##" replace="${app.name}" byline="yes"/> |
|---|
| 381 | <replaceregexp file="${destapprootdir}/Info.plist${app.dynFileExtension}" match="##app.publisher##" replace="${app.publisher}" byline="yes"/> |
|---|
| 382 | <replaceregexp file="${destapprootdir}/Info.plist${app.dynFileExtension}" match="##app.name\(fullName\)##" replace="${app.name(fullName)}" byline="yes"/>
|
|---|
| 383 | <replaceregexp file="${destapprootdir}/Info.plist${app.dynFileExtension}" match="##app.profile\(name\)##" replace="${app.profile(name)}" byline="yes"/>
|
|---|
| 384 | <replaceregexp file="${destapprootdir}/Info.plist${app.dynFileExtension}" match="##app.version##" replace="${app.version}" byline="yes"/> |
|---|
| 385 | <replaceregexp file="${destapprootdir}/Info.plist${app.dynFileExtension}" match="##app.copyright##" replace="${app.copyright}" byline="yes"/>
|
|---|
| 386 | <replaceregexp file="${destapprootdir}/Info.plist${app.dynFileExtension}" match="##app.version.developmentStage##" replace="${app.version(developmentStage)}" byline="yes"/> |
|---|
| 387 | |
|---|
| 388 | <!-- Init des props d'ext de types de fichier si ils n'existent pas (sckit) -->
|
|---|
| 389 | <condition property="fileInputExt" value=""><not><isset property="fileInputExt"/></not></condition> |
|---|
| 390 | <condition property="fileOutputExt" value=""><not><isset property="fileOutputExt"/></not></condition> |
|---|
| 391 | <condition property="fileRes1Ext" value=""><not><isset property="fileRes1Ext"/></not></condition> |
|---|
| 392 | |
|---|
| 393 | <!-- Ajout des reg des types de fichiers (Input, Output et Res1 à Info.plist) --> |
|---|
| 394 | <if><not><and><equals arg1="${fileInputExt}" arg2=""/><equals arg1="${fileOutputExt}" arg2=""/><equals arg1="${fileRes1Ext}" arg2=""/></and></not> |
|---|
| 395 | <then> |
|---|
| 396 | <concat fixlastline="yes" append="true" destfile="${destapprootdir}/Info.plist${app.dynFileExtension}"><![CDATA[ <key>CFBundleDocumentTypes</key> |
|---|
| 397 | <array> |
|---|
| 398 | ]]></concat> |
|---|
| 399 | <if><not><equals arg1="${fileInputExt}" arg2=""/></not> |
|---|
| 400 | <then> |
|---|
| 401 | <concat fixlastline="yes" append="true" destfile="${destapprootdir}/Info.plist${app.dynFileExtension}"><![CDATA[ <dict> |
|---|
| 402 | <key>CFBundleTypeExtensions</key> |
|---|
| 403 | <array> |
|---|
| 404 | <string>${fileInputExt}</string> |
|---|
| 405 | </array> |
|---|
| 406 | <key>CFBundleTypeIconFile</key> |
|---|
| 407 | <string>${shortcutFileInputIco}</string> |
|---|
| 408 | <key>CFBundleTypeName</key> |
|---|
| 409 | <string>${fileInputDesc}</string> |
|---|
| 410 | <key>CFBundleTypeRole</key> |
|---|
| 411 | <string>None</string> |
|---|
| 412 | </dict> |
|---|
| 413 | ]]></concat> |
|---|
| 414 | </then> |
|---|
| 415 | </if> |
|---|
| 416 | <if><not><equals arg1="${fileOutputExt}" arg2=""/></not> |
|---|
| 417 | <then> |
|---|
| 418 | <concat fixlastline="yes" append="true" destfile="${destapprootdir}/Info.plist${app.dynFileExtension}"><![CDATA[ <dict> |
|---|
| 419 | <key>CFBundleTypeExtensions</key> |
|---|
| 420 | <array> |
|---|
| 421 | <string>${fileOutputExt}</string> |
|---|
| 422 | </array> |
|---|
| 423 | <key>CFBundleTypeIconFile</key> |
|---|
| 424 | <string>${shortcutFileOutputIco}</string> |
|---|
| 425 | <key>CFBundleTypeName</key> |
|---|
| 426 | <string>${fileOutputDesc}</string> |
|---|
| 427 | <key>CFBundleTypeRole</key> |
|---|
| 428 | <string>None</string> |
|---|
| 429 | </dict> |
|---|
| 430 | ]]></concat> |
|---|
| 431 | </then> |
|---|
| 432 | </if> |
|---|
| 433 | <if><not><equals arg1="${srcFileRes1Ico}" arg2=""/></not> |
|---|
| 434 | <then> |
|---|
| 435 | <concat fixlastline="yes" append="true" destfile="${destapprootdir}/Info.plist${app.dynFileExtension}"><![CDATA[ <dict> |
|---|
| 436 | <key>CFBundleTypeExtensions</key> |
|---|
| 437 | <array> |
|---|
| 438 | <string>${fileRes1Ext}</string> |
|---|
| 439 | </array> |
|---|
| 440 | <key>CFBundleTypeIconFile</key> |
|---|
| 441 | <string>${shortcutFileRes1Ico}</string> |
|---|
| 442 | <key>CFBundleTypeName</key> |
|---|
| 443 | <string>${fileRes1Desc}</string> |
|---|
| 444 | <key>CFBundleRes1Role</key> |
|---|
| 445 | <string>None</string> |
|---|
| 446 | </dict> |
|---|
| 447 | ]]></concat> |
|---|
| 448 | </then> |
|---|
| 449 | </if> |
|---|
| 450 | <concat fixlastline="yes" append="true" destfile="${destapprootdir}/Info.plist${app.dynFileExtension}"><![CDATA[ </array> |
|---|
| 451 | ]]></concat> |
|---|
| 452 | </then> |
|---|
| 453 | </if> |
|---|
| 454 | <concat fixlastline="yes" append="true" destfile="${destapprootdir}/Info.plist${app.dynFileExtension}"><![CDATA[ </dict> |
|---|
| 455 | </plist>]]></concat> |
|---|
| 456 | </then>
|
|---|
| 457 | </elseif>
|
|---|
| 458 | <!-- # other OS -->
|
|---|
| 459 | <else>
|
|---|
| 460 | <echo message="Bui_Core > xBuildClient > copyLauncher : Pas de launcher pour l'OS '${app.os}'" level="warning"/>
|
|---|
| 461 | </else>
|
|---|
| 462 | </if>
|
|---|
| 463 | </target> |
|---|
| 464 | |
|---|
| 465 | <!--** |
|---|
| 466 | * Création de confGeneral.js avec les parametres SCENARI |
|---|
| 467 | **--> |
|---|
| 468 | <target name="xCreateConfFile" description="Crée le fichier JS de configuration"> |
|---|
| 469 | <!--
|
|---|
| 470 | A déclarer ds l'appelant:
|
|---|
| 471 | - pDestAppDir : répertoire de destination du SC compilé
|
|---|
| 472 | - app.extensions.version
|
|---|
| 473 | - app.version
|
|---|
| 474 | - pAppName
|
|---|
| 475 | - app.version(developmentStage)
|
|---|
| 476 | - app.localization(target)
|
|---|
| 477 | -->
|
|---|
| 478 | <property name="app.dynFileExtension" value=""/><!-- utilisé par scKit-->
|
|---|
| 479 | <property name="allJsFilePath" value="${pDestAppDir}/defaults/preferences/confGeneral.js${app.dynFileExtension}"/>
|
|---|
| 480 | <concat fixlastline="yes" append="true" destfile="${allJsFilePath}">// ###
|
|---|
| 481 | // # Préférences SCENARI éventuellement surchargées dans allOveride.js
|
|---|
| 482 | // #
|
|---|
| 483 | pref("toolkit.defaultChromeURI", "${appDefaultChromeUri}");
|
|---|
| 484 | //Ne demande pas confirmation pour ouvrir des application externes.
|
|---|
| 485 | pref("network.protocol-handler.warn-external-default", false);
|
|---|
| 486 |
|
|---|
| 487 | // SCENARI : Ne pas utiliser un dossier prédéfini pour le téléchargement, masquer la fenetre de télécharement
|
|---|
| 488 | pref("browser.download.useDownloadDir", false);
|
|---|
| 489 | pref("browser.download.manager.focusWhenStarting", false);
|
|---|
| 490 | pref("browser.download.manager.showWhenStarting", false);
|
|---|
| 491 | pref("browser.download.manager.useWindow", false);
|
|---|
| 492 | pref("browser.download.folderList", 0);
|
|---|
| 493 | pref("browser.download.manager.showAlertOnComplete", false);
|
|---|
| 494 | // SCENARI : Coller dans un editor.singleLine, du multiline en remplaçant les CR par des ' '
|
|---|
| 495 | // The 5 possible options for editor.singleLine.pasteNewlines are:
|
|---|
| 496 | // 0. paste newlines intact
|
|---|
| 497 | // 1. paste up to the first newline
|
|---|
| 498 | // 2. replace newlines with spaces
|
|---|
| 499 | // 3. strip newlines
|
|---|
| 500 | // 4. replace with commas
|
|---|
| 501 | pref("editor.singleLine.pasteNewlines", 1);
|
|---|
| 502 | //surcharge de la langue
|
|---|
| 503 | pref("general.useragent.locale", "${app.localization(target)}");
|
|---|
| 504 | // SCENARI : Pour édition Inline :
|
|---|
| 505 | pref("editor.custom_direction", "none");
|
|---|
| 506 | pref("editor.custom_language", "");
|
|---|
| 507 | pref("editor.custom_charset", "UTF-8");
|
|---|
| 508 | pref("editor.use_custom_colors", false);
|
|---|
| 509 |
|
|---|
| 510 | //Délai avant warning script JS trop long.
|
|---|
| 511 | pref("dom.max_chrome_script_run_time", 30);
|
|---|
| 512 | pref("dom.max_script_run_time", 30);
|
|---|
| 513 |
|
|---|
| 514 | //spellcheck et languages
|
|---|
| 515 | pref("layout.spellcheckDefault", 2);
|
|---|
| 516 | pref("extensions.spellcheck.inline.max-misspellings", 500);
|
|---|
| 517 | pref("spellchecker.dictionary", "${app.localization(target)}");
|
|---|
| 518 |
|
|---|
| 519 | //Prefs utilises au fonctionnement des fenetres des maj
|
|---|
| 520 | pref("xpinstall.dialog.confirm", "chrome://mozapps/content/xpinstall/xpinstallConfirm.xul");
|
|---|
| 521 | pref("xpinstall.dialog.progress.skin", "chrome://mozapps/content/extensions/extensions.xul?type=themes");
|
|---|
| 522 | pref("xpinstall.dialog.progress.chrome", "chrome://mozapps/content/extensions/extensions.xul?type=extensions");
|
|---|
| 523 | pref("xpinstall.dialog.progress.type.skin", "Extension:Manager-themes");
|
|---|
| 524 | pref("xpinstall.dialog.progress.type.chrome", "Extension:Manager-extensions");
|
|---|
| 525 | pref("extensions.update.enabled", false);
|
|---|
| 526 | pref("extensions.update.interval", 86400);
|
|---|
| 527 | pref("extensions.dss.enabled", false);
|
|---|
| 528 | pref("extensions.dss.switchPending", false);
|
|---|
| 529 | pref("extensions.ignoreMTimeChanges", false);
|
|---|
| 530 | pref("extensions.logging.enabled", false);
|
|---|
| 531 | pref("general.skins.selectedSkin", "classic/1.0");
|
|---|
| 532 | pref("extensions.update.url", "chrome://mozapps/locale/extensions/extensions.properties");
|
|---|
| 533 | pref("extensions.getMoreExtensionsURL", "chrome://mozapps/locale/extensions/extensions.properties");
|
|---|
| 534 | pref("extensions.getMoreThemesURL", "chrome://mozapps/locale/extensions/extensions.properties");
|
|---|
| 535 | pref("extensions.checkCompatibility", false);
|
|---|
| 536 |
|
|---|
| 537 | // hack de nsExtensionManager : permet de ne pas afficher la fenetre de compatibilité des extensions au premier démarrage de l'appli
|
|---|
| 538 | pref("scenari.extensions.showMigrateWindow", false);
|
|---|
| 539 |
|
|---|
| 540 | // permet d'interpréter le numéro de version
|
|---|
| 541 | pref("scenari.version.minor.length", ${app.version(minor).length});//Permet de spécifier la taille de la version mineure de communication. 0 => que la vMineur de comm correspond à tout le paramètre @mineur
|
|---|
| 542 |
|
|---|
| 543 | pref("app.update.silent", true);
|
|---|
| 544 | pref("app.update.auto", false);
|
|---|
| 545 |
|
|---|
| 546 | // Execution externe des protocoles :
|
|---|
| 547 | pref("network.protocol-handler.expose.mailto", false);
|
|---|
| 548 | pref("network.protocol-handler.expose.mailbox", false);
|
|---|
| 549 | pref("network.protocol-handler.expose.http", false);
|
|---|
| 550 | pref("network.protocol-handler.expose.https", false);
|
|---|
| 551 | pref("network.protocol-handler.warn-external.http", false);
|
|---|
| 552 | pref("network.protocol-handler.warn-external.https", false);
|
|---|
| 553 |
|
|---|
| 554 | pref("scenari.install.xpi.mode", "inProfile");//[inProfile | inApplication | forbidden]
|
|---|
| 555 | pref("app.name","${pAppName}");
|
|---|
| 556 | pref("app.version.developmentStage","${app.version(developmentStage)}");
|
|---|
| 557 | pref("app.version.buildId","${timestamp}");
|
|---|
| 558 | pref("app.version","${app.version}");
|
|---|
| 559 | pref("app.extensions.version","${app.extensions.version}");
|
|---|
| 560 | // TJS SURCHARGEE pref("scenari.urlServerLocal", "serverlocal:##app.server(port)##");
|
|---|
| 561 | pref("scenari.reposCmsServerName", "scServer");
|
|---|
| 562 | pref("scenari.jvm.xms", "256M");
|
|---|
| 563 | pref("scenari.jvm.xmx", "256M");
|
|---|
| 564 | </concat> |
|---|
| 565 | |
|---|
| 566 | <!-- Dans le cas de Mac on explicite le path de la JVM pour garantir l'utilisation de la JVM 1.5 --> |
|---|
| 567 | <if><equals arg1="${app.os}" arg2="mac"/> |
|---|
| 568 | <then> |
|---|
| 569 | <concat fixlastline="yes" append="true" destfile="${allJsFilePath}"> |
|---|
| 570 | // PATH absolu vers JVM 1.5 |
|---|
| 571 | pref("scenari.jvm.path", "/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Commands/java"); |
|---|
| 572 | </concat> |
|---|
| 573 | </then> |
|---|
| 574 | </if> |
|---|
| 575 | </target> |
|---|
| 576 |
|
|---|
| 577 | <!--**
|
|---|
| 578 | * Copie de différents éléments dans l'appication
|
|---|
| 579 | **-->
|
|---|
| 580 | <target name="xCopyProfile" description="copie des fichiers du profile" if="pSrcProfileDir">
|
|---|
| 581 | <!--
|
|---|
| 582 | A déclarer ds l'appelant:
|
|---|
| 583 | - pSrcProfileDir, pDestAppDir
|
|---|
| 584 | -->
|
|---|
| 585 | <echo message="Copie du profile de '${pDestAppDir}'"/>
|
|---|
| 586 | <mkdir dir="${pDestAppDir}/defaults/profile"/>
|
|---|
| 587 | <copy todir="${pDestAppDir}/defaults/profile" flatten="true">
|
|---|
| 588 | <fileset dir="${pSrcProfileDir}" casesensitive="yes">
|
|---|
| 589 | <include name="**/*"/>
|
|---|
| 590 | </fileset>
|
|---|
| 591 | </copy>
|
|---|
| 592 | </target>
|
|---|
| 593 | <target name="xCopyPrefs" description="copie des fichiers de preference (.js)" if="pSrcPrefsDir">
|
|---|
| 594 | <!--
|
|---|
| 595 | A déclarer ds l'appelant:
|
|---|
| 596 | - pSrcPrefsDir, pDestAppDir
|
|---|
| 597 | -->
|
|---|
| 598 | <property name="app.dynFileExtension" value=""/><!-- utilisé par scKit-->
|
|---|
| 599 | <echo message="Copie des préférences de '${pDestAppDir}'"/>
|
|---|
| 600 | <mkdir dir="${pDestAppDir}/defaults/preferences"/>
|
|---|
| 601 | <copy todir="${pDestAppDir}/defaults/preferences" flatten="true">
|
|---|
| 602 | <fileset dir="${pSrcPrefsDir}" casesensitive="yes">
|
|---|
| 603 | <include name="**/*"/>
|
|---|
| 604 | </fileset>
|
|---|
| 605 | </copy>
|
|---|
| 606 | <replaceregexp match="##app.server\(port\)##" replace="${app.server(port)}" flags="g" byline="true">
|
|---|
| 607 | <fileset dir="${pDestAppDir}/defaults/preferences" includes="*.js,*${app.dynFileExtension}"/>
|
|---|
| 608 | </replaceregexp>
|
|---|
| 609 | <replaceregexp match="##app.server\(univers\)##" replace="${app.server(univers)}" flags="g" byline="true">
|
|---|
| 610 | <fileset dir="${pDestAppDir}/defaults/preferences" includes="*.js,*${app.dynFileExtension}"/>
|
|---|
| 611 | </replaceregexp>
|
|---|
| 612 | </target>
|
|---|
| 613 | <target name="xCopyMainClientDir" description="copie des repertoires/fichiers enrichissant la définition de la coucje cliente" if="pSrcScplayerMainClientDir">
|
|---|
| 614 | <!--
|
|---|
| 615 | A déclarer ds l'appelant:
|
|---|
| 616 | - pSrcScplayerMainClientDir, pDestAppDir
|
|---|
| 617 | -->
|
|---|
| 618 | <echo message="Copie des préférences de '${pDestAppDir}'"/>
|
|---|
| 619 | <mkdir dir="${pDestAppDir}"/>
|
|---|
| 620 | <copy todir="${pDestAppDir}">
|
|---|
| 621 | <fileset dir="${pSrcScplayerMainClientDir}" casesensitive="yes">
|
|---|
| 622 | <include name="**/**"/>
|
|---|
| 623 | </fileset>
|
|---|
| 624 | </copy>
|
|---|
| 625 | </target>
|
|---|
| 626 | <target name="xCopyIco" description="copie de l'icone">
|
|---|
| 627 | <!--
|
|---|
| 628 | A déclarer ds l'appelant:
|
|---|
| 629 | - pSrcIcoFile, pSrcLinkIcoFile, pDestAppDir
|
|---|
| 630 | - (pSrcFileInputIco)
|
|---|
| 631 | - (pSrcFileOutputIco)
|
|---|
| 632 | - (pSrcFileRes1Ico)
|
|---|
| 633 | -->
|
|---|
| 634 | <echo message="Copie des icones de'${pDestAppDir}'"/>
|
|---|
| 635 | <if>
|
|---|
| 636 | <!-- # Win -->
|
|---|
| 637 | <equals arg1="${app.os}" arg2="win"/>
|
|---|
| 638 | <then>
|
|---|
| 639 | <mkdir dir="${pDestAppDir}/chrome/icons/default"/>
|
|---|
| 640 | <copy tofile="${pDestAppDir}/chrome/icons/default/${appIcoName}.ico" file="${pSrcIcoFile}" failonerror="false"/>
|
|---|
| 641 | <if>
|
|---|
| 642 | <not><equals arg1="${pSrcFileInputIco}" arg2=""/></not>
|
|---|
| 643 | <then>
|
|---|
| 644 | <copy todir="${pDestAppDir}/chrome/icons/default" file="${pSrcFileInputIco}" failonerror="false"/>
|
|---|
| 645 | </then>
|
|---|
| 646 | </if>
|
|---|
| 647 | <if>
|
|---|
| 648 | <not><equals arg1="${pSrcFileOutputIco}" arg2=""/></not>
|
|---|
| 649 | <then>
|
|---|
| 650 | <copy todir="${pDestAppDir}/chrome/icons/default" file="${pSrcFileOutputIco}" failonerror="false"/>
|
|---|
| 651 | </then>
|
|---|
| 652 | </if>
|
|---|
| 653 | <if>
|
|---|
| 654 | <not><equals arg1="${pSrcFileRes1Ico}" arg2=""/></not>
|
|---|
| 655 | <then>
|
|---|
| 656 | <copy todir="${pDestAppDir}/chrome/icons/default" file="${pSrcFileRes1Ico}" failonerror="false"/>
|
|---|
| 657 | </then>
|
|---|
| 658 | </if>
|
|---|
| 659 | </then>
|
|---|
| 660 | <!-- # Lin-->
|
|---|
| 661 | <elseif>
|
|---|
| 662 | <equals arg1="${app.os}" arg2="lin"/>
|
|---|
| 663 | <then>
|
|---|
| 664 | <mkdir dir="${pDestAppDir}/chrome/icons/default"/>
|
|---|
| 665 | <copy tofile="${pDestAppDir}/chrome/icons/default/${appIcoName}.xpm" file="${pSrcIcoFile}" failonerror="false"/>
|
|---|
| 666 | <copy tofile="${pDestAppDir}/chrome/icons/default/${appIcoName}.png" file="${pSrcLinkIcoFile}" failonerror="false"/>
|
|---|
| 667 | <if>
|
|---|
| 668 | <not><equals arg1="${pSrcFileInputIco}" arg2=""/></not>
|
|---|
| 669 | <then>
|
|---|
| 670 | <copy todir="${pDestAppDir}/chrome/icons/default" file="${pSrcFileInputIco}" failonerror="false"/>
|
|---|
| 671 | </then>
|
|---|
| 672 | </if>
|
|---|
| 673 | <if>
|
|---|
| 674 | <not><equals arg1="${pSrcFileOutputIco}" arg2=""/></not>
|
|---|
| 675 | <then>
|
|---|
| 676 | <copy todir="${pDestAppDir}/chrome/icons/default" file="${pSrcFileOutputIco}" failonerror="false"/>
|
|---|
| 677 | </then>
|
|---|
| 678 | </if>
|
|---|
| 679 | <if>
|
|---|
| 680 | <not><equals arg1="${pSrcFileRes1Ico}" arg2=""/></not>
|
|---|
| 681 | <then>
|
|---|
| 682 | <copy todir="${pDestAppDir}/chrome/icons/default" file="${pSrcFileRes1Ico}" failonerror="false"/>
|
|---|
| 683 | </then>
|
|---|
| 684 | </if>
|
|---|
| 685 | </then>
|
|---|
| 686 | </elseif>
|
|---|
| 687 | <!-- # Mac-->
|
|---|
| 688 | <elseif>
|
|---|
| 689 | <equals arg1="${app.os}" arg2="mac"/>
|
|---|
| 690 | <then>
|
|---|
| 691 | <copy tofile="${pDestAppDir}/../../../Resources/icon.icns" file="${pSrcIcoFile}" failonerror="false"/>
|
|---|
| 692 | <if>
|
|---|
| 693 | <not><equals arg1="${pSrcFileInputIco}" arg2=""/></not>
|
|---|
| 694 | <then>
|
|---|
| 695 | <copy todir="${pDestAppDir}/../../../Resources" file="${pSrcFileInputIco}" failonerror="false"/>
|
|---|
| 696 | </then>
|
|---|
| 697 | </if>
|
|---|
| 698 | <if>
|
|---|
| 699 | <not><equals arg1="${pSrcFileOutputIco}" arg2=""/></not>
|
|---|
| 700 | <then>
|
|---|
| 701 | <copy todir="${pDestAppDir}/../../../Resources" file="${pSrcFileOutputIco}" failonerror="false"/>
|
|---|
| 702 | </then>
|
|---|
| 703 | </if>
|
|---|
| 704 | <if>
|
|---|
| 705 | <not><equals arg1="${pSrcFileRes1Ico}" arg2=""/></not>
|
|---|
| 706 | <then>
|
|---|
| 707 | <copy todir="${pDestAppDir}/../../../Resources" file="${pSrcFileRes1Ico}" failonerror="false"/>
|
|---|
| 708 | </then>
|
|---|
| 709 | </if>
|
|---|
| 710 | </then>
|
|---|
| 711 | </elseif>
|
|---|
| 712 | <!-- # Other OS -->
|
|---|
| 713 | <else>
|
|---|
| 714 |
|
|---|
| 715 | </else>
|
|---|
| 716 | </if>
|
|---|
| 717 | </target>
|
|---|
| 718 |
|
|---|
| 719 | <!--**
|
|---|
| 720 | * Création du jat de localisation de xulRunner
|
|---|
| 721 | **-->
|
|---|
| 722 | <target name="xCreateXulrunnerJar" description="Création du fichier de localisation de xulRunner">
|
|---|
| 723 | <!-- a déclarer :
|
|---|
| 724 | pLocalise
|
|---|
| 725 | pDestAppDir
|
|---|
| 726 | -->
|
|---|
| 727 | <if>
|
|---|
| 728 | <equals arg1="${pLocalise}" arg2="false"/>
|
|---|
| 729 | <then>
|
|---|
| 730 | <copy file="${xulRunnerSrcDir.win}/chrome/en-US.jar" tofile="${pDestAppDir}/chrome/sc-SC.jar"/>
|
|---|
| 731 | </then>
|
|---|
| 732 | <else>
|
|---|
| 733 | <i8n sourceFile="${xulRunnerSrcDir.win}/chrome/en-US.jar" |
|---|
| 734 | logErrorForMissingEntryInDic="false"
|
|---|
| 735 | destFile="${pDestAppDir}/chrome/sc-SC.jar"
|
|---|
| 736 | localizePropertiesUtf8Format="true"
|
|---|
| 737 | localizeDtdEntitiesFormat="true"
|
|---|
| 738 | uriResolverRegexp="\/en-US.jar\/([\/.]*)"
|
|---|
| 739 | uriResolverReplacement="sc-SC/$1">
|
|---|
| 740 | <xliff>
|
|---|
| 741 | <fileset dir="${app.localization.framework}" includes="**/*.xliff"/>
|
|---|
| 742 | </xliff>
|
|---|
| 743 | </i8n>
|
|---|
| 744 | </else>
|
|---|
| 745 | </if>
|
|---|
| 746 | <copy file="${xulRunnerSrcDir.win}/chrome/en-US.manifest" tofile="${pDestAppDir}/chrome/sc-SC.manifest">
|
|---|
| 747 | <filterchain>
|
|---|
| 748 | <tokenfilter>
|
|---|
| 749 | <replaceregex pattern="en-US([^/])" replace="sc-SC\1" flags="gi"/>
|
|---|
| 750 | </tokenfilter>
|
|---|
| 751 | </filterchain>
|
|---|
| 752 | </copy>
|
|---|
| 753 | </target>
|
|---|
| 754 |
|
|---|
| 755 | <!--**
|
|---|
| 756 | * création du fichier application.ini
|
|---|
| 757 | **-->
|
|---|
| 758 | <target name="xCreateIniFile" description="Création du fichier application.ini">
|
|---|
| 759 | <!--
|
|---|
| 760 | A déclarer ds l'appelant:
|
|---|
| 761 | - pDestAppDir : répertoire de destination du SC compilé
|
|---|
| 762 | - pAppName
|
|---|
| 763 | - pProfileName
|
|---|
| 764 | - app.publisher
|
|---|
| 765 | - app.version
|
|---|
| 766 | - app.version(developmentStage)
|
|---|
| 767 | -->
|
|---|
| 768 | <property name="app.dynFileExtension" value=""/><!-- utilisé par scKit-->
|
|---|
| 769 | <property name="iniFilePath" value="${pDestAppDir}/${app.iniFileName}${app.dynFileExtension}"/>
|
|---|
| 770 | <concat fixlastline="yes" append="true" destfile="${iniFilePath}">
|
|---|
| 771 | [App]
|
|---|
| 772 | Vendor=${app.publisher}
|
|---|
| 773 | Name=${pProfileName}
|
|---|
| 774 | Version=${app.version}
|
|---|
| 775 | BuildID=${timestamp}
|
|---|
| 776 | Copyright=${app.copyright}
|
|---|
| 777 | ID={${pAppId}}
|
|---|
| 778 |
|
|---|
| 779 | [Gecko]
|
|---|
| 780 | MinVersion=${gecko.minVersion}
|
|---|
| 781 | MaxVersion=${gecko.maxVersion}
|
|---|
| 782 |
|
|---|
| 783 | [XRE]
|
|---|
| 784 | EnableExtensionManager=1
|
|---|
| 785 |
|
|---|
| 786 | [Shell]
|
|---|
| 787 | Icon=chrome/icons/default/scenaricms
|
|---|
| 788 | </concat>
|
|---|
| 789 | </target>
|
|---|
| 790 |
|
|---|
| 791 | <!--**
|
|---|
| 792 | * Création des fichiers branding
|
|---|
| 793 | * utilisés par xulRunner : appName, ...
|
|---|
| 794 | **-->
|
|---|
| 795 | <target name="xCreateAppPackage" description="Création des fichiers chrome de l'appli : branding + licences">
|
|---|
| 796 | <!--
|
|---|
| 797 | A déclarer ds l'appelant:
|
|---|
| 798 | - pDestAppDir : répertoire de destination du SC compilé
|
|---|
| 799 | - pDestAppLicencesDir : répertoire ou ont été générés les fichiers de licence
|
|---|
| 800 | - pAppName
|
|---|
| 801 | - pAppNameFull
|
|---|
| 802 | - app.publisher
|
|---|
| 803 | - app(url)
|
|---|
| 804 | - app.copyright
|
|---|
| 805 | - (app.dynFileExtension) si besoin
|
|---|
| 806 | -->
|
|---|
| 807 | <property name="app.dynFileExtension" value=""/><!-- utilisé par scKit-->
|
|---|
| 808 | <property name="brandingDir" value="${pDestAppDir}/chrome/scenari/locale/branding"/>
|
|---|
| 809 | <property name="licenseDir" value="${pDestAppDir}/chrome/scenari/content/license"/>
|
|---|
| 810 | <mkdir dir="${licenseDir}"/>
|
|---|
| 811 | <!-- # fichiers de licence -->
|
|---|
| 812 | <copy file="${pDestAppLicencesDir}/${license.app.filename}" todir="${licenseDir}" failonerror="false"/>
|
|---|
| 813 | <copy file="${pDestAppLicencesDir}/${license.thirdParty.filename}" todir="${licenseDir}" failonerror="false"/>
|
|---|
| 814 | <!-- # fichiers branding -->
|
|---|
| 815 | <mkdir dir="${brandingDir}"/>
|
|---|
| 816 | <concat fixlastline="yes" append="false" destfile="${brandingDir}/brand.dtd${app.dynFileExtension}"><![CDATA[
|
|---|
| 817 | <!ENTITY brandShortName "${pAppName}">
|
|---|
| 818 | <!ENTITY brandFullName "${pAppNameFull}">
|
|---|
| 819 | <!ENTITY vendorShortName "${app.publisher}">
|
|---|
| 820 | <!ENTITY releaseURL "${app(url)}">
|
|---|
| 821 | <!ENTITY copyright "${app.copyright}">
|
|---|
| 822 |
|
|---|
| 823 | ]]></concat>
|
|---|
| 824 | <concat fixlastline="yes" append="false" destfile="${brandingDir}/brand.properties${app.dynFileExtension}"><![CDATA[
|
|---|
| 825 | brandShortName=${pAppName}
|
|---|
| 826 | brandFullName=${pAppNameFull}
|
|---|
| 827 | vendorShortName=${app.publisher}
|
|---|
| 828 | copyright=${app.copyright}
|
|---|
| 829 | releaseURL=${app(url)}
|
|---|
| 830 | ]]></concat>
|
|---|
| 831 | <!-- création du manifest
|
|---|
| 832 | - le mode de packaging XPI impose de spécifier des noms différents pour "app" et "branding" déjas utilisés par firefox
|
|---|
| 833 | - mais l'implémentation de xulRunner impose l'existance de "app" et "branding" (pour des fenetres d'info utilisateur)
|
|---|
| 834 | -->
|
|---|
| 835 | <concat fixlastline="yes" append="false" destfile="${pDestAppDir}/chrome/app.manifest">
|
|---|
| 836 | content scenari file:scenari/content/
|
|---|
| 837 | locale scenaribranding scenari file:scenari/locale/branding/
|
|---|
| 838 | content app file:scenari/content/
|
|---|
| 839 | locale branding app file:scenari/locale/branding/
|
|---|
| 840 | </concat>
|
|---|
| 841 | <!--
|
|---|
| 842 | <concat fixlastline="yes" append="false" destfile="${pDestAppDir}/chrome/app.manifest">locale branding app jar:app.jar!/branding/</concat>
|
|---|
| 843 | <delete dir="${tmpDir}"/>
|
|---|
| 844 | -->
|
|---|
| 845 | <!-- # fichiers de licence -->
|
|---|
| 846 | </target>
|
|---|
| 847 |
|
|---|
| 848 | <!--**
|
|---|
| 849 | * Création des différents packages
|
|---|
| 850 | **-->
|
|---|
| 851 | <target name="createChrome" description="Création des packages du chrome (content + localisation)">
|
|---|
| 852 | <!-- Crée 2 packages : un pour les "content" et un pour les "langue" -->
|
|---|
| 853 | <!--
|
|---|
| 854 | A déclarer ds l'appelant:
|
|---|
| 855 | - pDestChromeDir : répertoire chrome de destination du SC compilé
|
|---|
| 856 | - pChromeName : nom package dans le chrome
|
|---|
| 857 | - pPathXulProject : path vers les fichiers à inclure dans le package
|
|---|
| 858 | - pLocalise[true] : execute les sripts de localisation ou pas
|
|---|
| 859 | -->
|
|---|
| 860 | <echo message="Création du chrome '${pChromeName}'"/>
|
|---|
| 861 | <ant target="createChrome.full"/>
|
|---|
| 862 | </target>
|
|---|
| 863 | <target name="createChrome.full">
|
|---|
| 864 | <!-- Crée un unique package contenant les "content" et les "langue" -->
|
|---|
| 865 | <!--
|
|---|
| 866 | A déclarer ds l'appelant:
|
|---|
| 867 | - pDestChromeDir : répertoire chrome de destination du SC compilé
|
|---|
| 868 | - pChromeName : nom package dans le chrome
|
|---|
| 869 | - pPathXulProject : path vers les fichiers à inclure dans le package
|
|---|
| 870 | - pLocalise[false] : execute les sripts de localisation ou pas
|
|---|
| 871 | -->
|
|---|
| 872 | <property name="tmp.createChrome" value="${tmpRep}/tmp.createChrome"/>
|
|---|
| 873 | <property name="tmp.createChrome.locale" value="${tmpRep}/tmp.createChrome.locale"/>
|
|---|
| 874 | <mkdir dir="${tmp.createChrome}"/>
|
|---|
| 875 | <mkdir dir="${tmp.createChrome.locale}"/>
|
|---|
| 876 | <!-- copie pour cleanUp -->
|
|---|
| 877 | <copy todir="${tmp.createChrome}">
|
|---|
| 878 | <fileset dir="${pPathXulProject}">
|
|---|
| 879 | <exclude name="*.manifest"/>
|
|---|
| 880 | <exclude name="**/SVN/**"/>
|
|---|
| 881 | <exclude name="**/.settings/**"/>
|
|---|
| 882 | </fileset>
|
|---|
| 883 | </copy>
|
|---|
| 884 | <ant target="cleanUp" antfile="${wspdir}/Bui_Core/toolkit/cleanup.xml">
|
|---|
| 885 | <property name="pProjectPath" value="${tmp.createChrome}"/>
|
|---|
| 886 | </ant>
|
|---|
| 887 | <!-- localisation -->
|
|---|
| 888 | <if>
|
|---|
| 889 | <equals arg1="${pLocalise}" arg2="false"/>
|
|---|
| 890 | <then>
|
|---|
| 891 | <copy todir="${tmp.createChrome.locale}">
|
|---|
| 892 | <fileset dir="${tmp.createChrome}"/>
|
|---|
| 893 | </copy>
|
|---|
| 894 | </then>
|
|---|
| 895 | <else>
|
|---|
| 896 | <i8n sourceFile="${tmp.createChrome}" destFile="${tmp.createChrome.locale}" uriResolverRegexp="\/tmp.createChrome\/content([\/.]*)" uriResolverReplacement="$1">
|
|---|
| 897 | <xliff>
|
|---|
| 898 | <fileset dir="${app.localization.scenariCore}" includes="**/*.xliff"/>
|
|---|
| 899 | </xliff>
|
|---|
| 900 | </i8n>
|
|---|
| 901 | </else>
|
|---|
| 902 | </if>
|
|---|
| 903 | <!-- Création du jar -->
|
|---|
| 904 | <zip destfile="${pDestChromeDir}/${pChromeName}.jar" compress="no">
|
|---|
| 905 | <fileset dir="${tmp.createChrome.locale}"/>
|
|---|
| 906 | </zip>
|
|---|
| 907 | <delete dir="${tmp.createChrome}"/>
|
|---|
| 908 | <delete dir="${tmp.createChrome.locale}"/>
|
|---|
| 909 | </target>
|
|---|
| 910 | <target name="xCreateChrome.local">
|
|---|
| 911 | <!-- package de langue -->
|
|---|
| 912 | <mkdir dir="${pDestChromeDir}"/>
|
|---|
| 913 | <zip destfile="${pDestChromeDir}/${pChromeName}Locale.jar" compress="no">
|
|---|
| 914 | <fileset dir="${pPathXulProject}/locale">
|
|---|
| 915 | <exclude name="*.manifest"/>
|
|---|
| 916 | <exclude name="**/SVN/**"/>
|
|---|
| 917 | <exclude name="**/_*"/>
|
|---|
| 918 | <exclude name=".*"/>
|
|---|
| 919 | </fileset>
|
|---|
| 920 | </zip>
|
|---|
| 921 | </target>
|
|---|
| 922 |
|
|---|
| 923 | <target name="copyDevMozPackages" description="copie de fichiers dans le répertoire scApp (scClient, scTest, scChain, ...)">
|
|---|
| 924 | <!--
|
|---|
| 925 | A déclarer ds l'appelant:
|
|---|
| 926 | - pDestAppDir
|
|---|
| 927 | -->
|
|---|
| 928 | <echo message="Copie des extensions de développement dans '${pDestAppDir}'"/>
|
|---|
| 929 | <mkdir dir="${pDestAppDir}"/>
|
|---|
| 930 | <copy todir="${pDestAppDir}">
|
|---|
| 931 | <fileset dir="${coredevresourcesdir}/${app.os}" casesensitive="yes">
|
|---|
| 932 | <include name="**/*"/>
|
|---|
| 933 | </fileset>
|
|---|
| 934 | </copy>
|
|---|
| 935 | </target>
|
|---|
| 936 |
|
|---|
| 937 | <target name="createChromeManifest" description="Création du .manifest associé à un chrome">
|
|---|
| 938 | <!--
|
|---|
| 939 | A déclarer ds l'appelant:
|
|---|
| 940 | - pDestChromeDir : répertoire chrome de destination du SC compilé
|
|---|
| 941 | - pProjectManifestDir : path vers le répertoire manifest du projet
|
|---|
| 942 | - pContentPath : path vers le package à déclarer (ex : jar:${pChromeName}.jar!)
|
|---|
| 943 | -->
|
|---|
| 944 | <echo message="Création du manifest '${pProjectManifestDir}'"/>
|
|---|
| 945 | <!-- package de contenu -->
|
|---|
| 946 | <ant target="xCreateChrome">
|
|---|
| 947 | <property name="createChrome.destChromeDir" value="${pDestChromeDir}"/>
|
|---|
| 948 | <property name="createChrome.manifestDir" value="${pProjectManifestDir}"/>
|
|---|
| 949 | <property name="createChrome.contentPath" value="${pContentPath}"/>
|
|---|
| 950 | </ant>
|
|---|
| 951 | </target>
|
|---|
| 952 |
|
|---|
| 953 | <target name="xCreateChrome">
|
|---|
| 954 | <copy todir="${createChrome.destChromeDir}" overwrite="true" failonerror="false">
|
|---|
| 955 | <fileset dir="${createChrome.manifestDir}" includes="*.manifest"/>
|
|---|
| 956 | </copy>
|
|---|
| 957 | <replaceregexp match="##baseContentUri##" replace="${createChrome.contentPath}" flags="g" byline="true">
|
|---|
| 958 | <fileset dir="${createChrome.destChromeDir}" includes="*.manifest"/>
|
|---|
| 959 | </replaceregexp>
|
|---|
| 960 | <replaceregexp match="##baseLocaleUri##" replace="${createChrome.contentPath}/locale" flags="g" byline="true">
|
|---|
| 961 | <fileset dir="${createChrome.destChromeDir}" includes="*.manifest"/>
|
|---|
| 962 | </replaceregexp>
|
|---|
| 963 | </target>
|
|---|
| 964 | </project>
|
|---|