mirror of https://github.com/sipwise/jitsi.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
668 lines
28 KiB
668 lines
28 KiB
<?xml version="1.0"?>
|
|
<!--
|
|
Installation procedure.
|
|
The install scripts are located inside the resources/install directory . The
|
|
files are separated in subdirectories according to distribution - generic,
|
|
linux, windows, macosx.
|
|
|
|
1. For building any of the distributions you must fill in the
|
|
path to the installation of IzPack. For instructions on how to install
|
|
izPack please referer to http://www.izforge.com/izpack/. And uncomment the
|
|
taskdef of izpack in this file.
|
|
|
|
2. When building the linux installation package you must set the
|
|
linux.jre.path variable to point to a location containing an extracted jre
|
|
so that it could be bundled inside the installation package.
|
|
|
|
3. When building the windows installation package you must set the
|
|
windows.jre.file variable. This is the path to an installation file of a
|
|
jre (online or offline one). The 7zip software package
|
|
(http://www.7-zip.org) must also be installed.
|
|
|
|
4. When changing the application version things you must do:
|
|
- generic
|
|
- there is app-version variable in the izpack installer xml
|
|
- linux
|
|
- there is app-version variable in the izpack installer xml
|
|
- windows
|
|
- there is app-version variable in the izpack installer xml
|
|
- you must change the installer jar name in the launcher.ini file
|
|
-->
|
|
<project name="sip-communicator-installer" basedir="." default="ant-usage">
|
|
|
|
<property file="${inst.resrc}/ant-build-config.properties"/>
|
|
<!-- Load installer properties -->
|
|
<!-- USERS NEED TO UPDATE THIS FILE -->
|
|
<property file="${inst.resrc}/installers.properties"/>
|
|
|
|
<!-- define the izpack task in a separate target so that we don't get an
|
|
error when izpack properties are not set-->
|
|
<target name="define-izpack-task">
|
|
<taskdef name="izpack" classpath="${izpack.dir}/lib/compiler.jar"
|
|
classname="com.izforge.izpack.ant.IzPackTask"/>
|
|
</target>
|
|
|
|
<!-- Put here the Windows release directory -->
|
|
<property name="windows.app.dir" value="${sc.basedir}/${release}/windows"/>
|
|
<!-- Put here the Linux release directory -->
|
|
<property name="linux.app.dir" value="${sc.basedir}/${release}/linux"/>
|
|
<!-- Put here the Generic release directory -->
|
|
<property name="generic.app.dir" value="${sc.basedir}/${release}/generic"/>
|
|
|
|
<!-- change the 7zip executable corresponding the OS
|
|
7-zip is used to create windows self-extract installer binary
|
|
In order to work 7-zip must be installed and tobe in the path
|
|
For Debian linux use : apt-get install p7zip
|
|
For other go to : http://www.7-zip.org/
|
|
-->
|
|
<condition property="7zip.executable" value="7z">
|
|
<os family="windows"/>
|
|
</condition>
|
|
<condition property="7zip.executable" value="7zr">
|
|
<equals arg1="${os.name}" arg2="linux"
|
|
casesensitive="false" trim="true"/>
|
|
</condition>
|
|
|
|
<!-- Put here the release directory -->
|
|
<property name="macosx.app.dir" value="${release}/macosx"/>
|
|
<!-- Put here the resource directory -->
|
|
<property name="macosx.resrc.dir" value="${inst.resrc}/macosx"/>
|
|
|
|
<!-- The release directory for Debian packages -->
|
|
<property name="debian.dir" value="${release}/debian"/>
|
|
<property name="debian.binary.dir" value="${debian.dir}/binary"/>
|
|
<!-- Can we build debian packages? -->
|
|
<condition property="dpkg.build.present">
|
|
<available file="/usr/bin/dpkg-buildpackage"/>
|
|
</condition>
|
|
<!-- Can we deploy debian packages? -->
|
|
<condition property="dpkg.scan.present">
|
|
<available file="/usr/bin/dpkg-scanpackages"/>
|
|
</condition>
|
|
|
|
<!-- default Ant target does nothing except print helpful options -->
|
|
<target name="ant-usage"
|
|
description="simply execute 'ant' to discover the most useful targets.">
|
|
<echo message="Useful ant commands for the SIP Communicator Build Installer..." />
|
|
<echo message="'ant build-installation-generic' for building generic installator jar" />
|
|
<echo message="'ant build-installation-linux' for building linux instalation file" />
|
|
<echo message="'ant build-installation-windows' for building windows instalation file" />
|
|
</target>
|
|
|
|
<target name="clean-install-generic">
|
|
<delete dir="${generic.app.dir}"/>
|
|
<mkdir dir="${generic.app.dir}"/>
|
|
</target>
|
|
|
|
<target name="build-installation-generic"
|
|
depends="clean-install-generic,define-izpack-task,version">
|
|
|
|
<propertyfile file="${generic.app.dir}/versionupdate.properties"
|
|
comment="Last Build Version">
|
|
<entry key="last_version" value="${sip-communicator.version}"/>
|
|
<entry key="download_link"
|
|
value="http://download.sip-communicator.org/nightly/generic/${package.name}-${sip-communicator.version}.jar"/>
|
|
</propertyfile>
|
|
|
|
<filter token="VERSION" value="${sip-communicator.version}" />
|
|
<filter token="BUILDDATE" value="${build.date}" />
|
|
<filter token="PKG_NAME" value="${package.name}" />
|
|
<filter token="APP_NAME" value="${application.name}" />
|
|
<filter token="APP_EMAIL" value="${application.email}" />
|
|
<filter token="APP_WEB" value="${application.web}" />
|
|
<filter token="DEST_DIR" value="${release}" />
|
|
<copy
|
|
tofile="${generic.app.dir}/tmp-installer-generic.xml"
|
|
file="${inst.resrc}/generic/installer-generic.xml"
|
|
filtering="yes"
|
|
/>
|
|
<copy
|
|
tofile="${generic.app.dir}/tmp-windows_shortcut_specification.xml"
|
|
file="${inst.resrc}/windows/windows_shortcut_specification.xml"
|
|
filtering="yes"
|
|
/>
|
|
<copy
|
|
tofile="${generic.app.dir}/tmp-linux_shortcut_specification.xml"
|
|
file="${inst.resrc}/linux/linux_shortcut_specification.xml"
|
|
filtering="yes"
|
|
/>
|
|
|
|
<izpack
|
|
input="${generic.app.dir}/tmp-installer-generic.xml"
|
|
output="${generic.app.dir}/${package.name}-${sip-communicator.version}.jar"
|
|
installerType="standard"
|
|
izPackDir="${izpack.dir}/"
|
|
basedir="${sc.basedir}"/>
|
|
|
|
<delete quiet="yes" failonerror="false">
|
|
<fileset dir="${generic.app.dir}">
|
|
<include name="tmp-*"/>
|
|
</fileset>
|
|
</delete>
|
|
</target>
|
|
|
|
<target name="clean-install-linux">
|
|
<delete dir="${linux.app.dir}"/>
|
|
<mkdir dir="${linux.app.dir}"/>
|
|
<mkdir dir="${linux.app.dir}/tmp"/>
|
|
</target>
|
|
|
|
<target name="build-installation-linux"
|
|
depends="clean-install-linux,define-izpack-task,version">
|
|
|
|
<propertyfile file="${linux.app.dir}/versionupdate.properties"
|
|
comment="Last Build Version">
|
|
<entry key="last_version" value="${sip-communicator.version}"/>
|
|
<entry key="download_link"
|
|
value="http://download.sip-communicator.org/nightly/linux/${package.name}-${sip-communicator.version}-linux.bin"/>
|
|
</propertyfile>
|
|
|
|
<filter token="VERSION" value="${sip-communicator.version}" />
|
|
<filter token="BUILDDATE" value="${build.date}" />
|
|
<filter token="PKG_NAME" value="${package.name}" />
|
|
<filter token="APP_NAME" value="${application.name}" />
|
|
<filter token="APP_EMAIL" value="${application.email}" />
|
|
<filter token="APP_WEB" value="${application.web}" />
|
|
<filter token="DEST_DIR" value="${release}" />
|
|
|
|
<copy todir="${linux.app.dir}/tmp" filtering="yes" >
|
|
<fileset dir="${inst.resrc}/linux">
|
|
<include name="setup.sh"/>
|
|
<include name="inst_path"/>
|
|
</fileset>
|
|
</copy>
|
|
<!-- copy the jre -->
|
|
<copy todir="${linux.app.dir}/tmp/jre">
|
|
<fileset dir="${linux.jre.path}">
|
|
<include name="**/*"/>
|
|
</fileset>
|
|
</copy>
|
|
|
|
<copy
|
|
tofile="${linux.app.dir}/tmp/tmp-installer-linux.xml"
|
|
file="${inst.resrc}/linux/installer-linux.xml"
|
|
filtering="yes"
|
|
/>
|
|
<copy
|
|
tofile="${linux.app.dir}/tmp-linux_shortcut_specification.xml"
|
|
file="${inst.resrc}/linux/linux_shortcut_specification.xml"
|
|
filtering="yes"
|
|
/>
|
|
|
|
<!-- create izpack installer jar file -->
|
|
<izpack input="${linux.app.dir}/tmp/tmp-installer-linux.xml"
|
|
output="${linux.app.dir}/tmp/${package.name}-${sip-communicator.version}-linux.jar"
|
|
installerType="standard"
|
|
basedir="${sc.basedir}"
|
|
izPackDir="${izpack.dir}/"/>
|
|
|
|
<!-- Create self extract linux binary-->
|
|
<tar tarfile="${linux.app.dir}/tmp/install.tar"
|
|
basedir="${linux.app.dir}/tmp"/>
|
|
<gzip zipfile="${linux.app.dir}/tmp/install.tar.gz"
|
|
src="${linux.app.dir}/tmp/install.tar"/>
|
|
<concat destfile="${linux.app.dir}/${package.name}-${sip-communicator.version}-linux.bin"
|
|
binary="true">
|
|
<fileset dir="${inst.resrc}/linux/">
|
|
<include name="sfx-header"/>
|
|
</fileset>
|
|
<fileset dir="${linux.app.dir}/tmp">
|
|
<include name="install.tar.gz"/>
|
|
</fileset>
|
|
</concat>
|
|
<chmod file="${linux.app.dir}/${package.name}-${sip-communicator.version}-linux.bin" perm="+x"/>
|
|
|
|
<!-- Delete the temp directory-->
|
|
<delete dir="${linux.app.dir}/tmp"/>
|
|
<delete quiet="yes" failonerror="false">
|
|
<fileset dir="${linux.app.dir}">
|
|
<include name="tmp-*"/>
|
|
</fileset>
|
|
</delete>
|
|
</target>
|
|
|
|
<target name="clean-install-windows">
|
|
<delete dir="${windows.app.dir}"/>
|
|
<mkdir dir="${windows.app.dir}"/>
|
|
<mkdir dir="${windows.app.dir}/tmp"/>
|
|
<mkdir dir="${windows.app.dir}/tmp/jre"/>
|
|
</target>
|
|
|
|
<target name="build-installation-windows"
|
|
depends="clean-install-windows,define-izpack-task,version">
|
|
|
|
<propertyfile file="${windows.app.dir}/versionupdate.properties"
|
|
comment="Last Build Version">
|
|
<entry key="last_version" value="${sip-communicator.version}"/>
|
|
<entry key="download_link"
|
|
value="http://download.sip-communicator.org/nightly/windows/${package.name}-${sip-communicator.version}.exe"/>
|
|
</propertyfile>
|
|
|
|
<filter token="VERSION" value="${sip-communicator.version}" />
|
|
<filter token="BUILDDATE" value="${build.date}" />
|
|
<filter token="PKG_NAME" value="${package.name}" />
|
|
<filter token="APP_NAME" value="${application.name}" />
|
|
<filter token="APP_EMAIL" value="${application.email}" />
|
|
<filter token="APP_WEB" value="${application.web}" />
|
|
<filter token="DEST_DIR" value="${release}" />
|
|
|
|
<copy
|
|
tofile="${windows.app.dir}/tmp-windows_shortcut_specification.xml"
|
|
file="${inst.resrc}/windows/windows_shortcut_specification.xml"
|
|
filtering="yes"
|
|
/>
|
|
|
|
<!-- Copy with replacing some parameters in text files -->
|
|
<copy todir="${windows.app.dir}/tmp" filtering="yes">
|
|
<fileset dir="${inst.resrc}/windows">
|
|
<include name="launcher.ini"/>
|
|
</fileset>
|
|
</copy>
|
|
|
|
<!-- Copy other needed files to tmp folder -->
|
|
<copy todir="${windows.app.dir}/tmp">
|
|
<fileset dir="${inst.resrc}/windows">
|
|
<include name="setup-sip-communicator.exe"/>
|
|
</fileset>
|
|
</copy>
|
|
|
|
<!-- copy the windows jre file -->
|
|
<copy file="${windows.jre.file}"
|
|
tofile="${windows.app.dir}/tmp/jre/jre-windows.exe"/>
|
|
|
|
<copy
|
|
tofile="${windows.app.dir}/tmp/tmp-installer-windows.xml"
|
|
file="${inst.resrc}/windows/installer-windows.xml"
|
|
filtering="yes"
|
|
/>
|
|
|
|
<izpack
|
|
input="${windows.app.dir}/tmp/tmp-installer-windows.xml"
|
|
output="${windows.app.dir}/tmp/sip-communicator-windows.jar"
|
|
installerType="standard"
|
|
basedir="${sc.basedir}"
|
|
izPackDir="${izpack.dir}/"/>
|
|
|
|
<zip destfile="${windows.app.dir}/${package.name}-${sip-communicator.version}-windows.zip"
|
|
basedir="${windows.app.dir}/tmp"/>
|
|
|
|
<!--exec dir="${windows.app.dir}/tmp" executable="${7zip.executable}" failifexecutionfails="false">
|
|
<arg line="a -y data.7z *"/>
|
|
</exec>
|
|
|
|
<copy
|
|
tofile="${windows.app.dir}/tmp/7zip.conf"
|
|
file="${inst.resrc}/windows/7zip.conf"
|
|
filtering="yes"
|
|
/>
|
|
|
|
<concat destfile="${windows.app.dir}/${package.name}-${sip-communicator.version}.exe"
|
|
binary="true">
|
|
<fileset dir="${inst.resrc}/windows">
|
|
<include name="7zS.sfx"/>
|
|
</fileset>
|
|
<fileset dir="${windows.app.dir}/tmp">
|
|
<include name="7zip.conf"/>
|
|
</fileset>
|
|
<fileset dir="${windows.app.dir}/tmp">
|
|
<include name="data.7z"/>
|
|
</fileset>
|
|
</concat-->
|
|
|
|
<!-- Delete the temp directory-->
|
|
<delete dir="${windows.app.dir}/tmp"/>
|
|
<delete quiet="yes" failonerror="false">
|
|
<fileset dir="${windows.app.dir}">
|
|
<include name="tmp-*"/>
|
|
</fileset>
|
|
</delete>
|
|
</target>
|
|
|
|
<!-- - - - - - - - - - - BUILDING RELEASE PACKAGES - - - - - - - - - - - -->
|
|
<target name="macosx" depends="make"
|
|
description="Create an .app package for MACOSX">
|
|
|
|
<taskdef name="jarbundler"
|
|
classname="net.sourceforge.jarbundler.JarBundler"/>
|
|
|
|
<mkdir dir="${macosx.app.dir}"/>
|
|
|
|
<property name="macosx.stubfile"
|
|
value="${macosx.resrc.dir}/JavaApplicationStub"/>
|
|
<condition property="macosx.stubfile"
|
|
value="/System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub">
|
|
<equals arg1="${os.name}"
|
|
arg2="Mac OS X"
|
|
casesensitive="false"
|
|
trim="true"/>
|
|
</condition>
|
|
|
|
<!-- Prepare the logging.properties file for macosx -->
|
|
<copy file="${inst.resrc}/logging.properties"
|
|
tofile="${macosx.resrc.dir}/logging.properties"
|
|
overwrite="true"/>
|
|
<replace file="${macosx.resrc.dir}/logging.properties"
|
|
token="java.util.logging.FileHandler.pattern = %h/.sip-communicator/log"
|
|
value="java.util.logging.FileHandler.pattern = log"/>
|
|
|
|
<!-- Prepare the felix.client.run.properties file for macosx -->
|
|
<copy file="${lib}/felix.client.run.properties"
|
|
tofile="${macosx.resrc.dir}/felix.client.run.properties"
|
|
overwrite="true"/>
|
|
<replace file="${macosx.resrc.dir}/felix.client.run.properties"
|
|
token="org.osgi.framework.system.packages="
|
|
value="org.osgi.framework.system.packages= com.growl;"/>
|
|
<echo file="${macosx.resrc.dir}/felix.client.run.properties"
|
|
append="true">felix.auto.start.70= reference:file:sc-bundles/growlnotification.jar
|
|
</echo>
|
|
|
|
<!-- We copy macosx-specific bundles from
|
|
sc-bundles/os-specific/macosx to sc-bundles -->
|
|
<copy todir="${bundles.dest}">
|
|
<fileset dir="${bundles.dest.mac}">
|
|
<include name="**/*.jar"/>
|
|
</fileset>
|
|
</copy>
|
|
|
|
<!-- Delete the old .app if it exists -->
|
|
<delete dir="${macosx.app.dir}/${application.name}.app"
|
|
quiet="yes" failonerror="false"/>
|
|
|
|
<!-- Sparkle needs the build number. If it is not
|
|
available, we use the normal build label -->
|
|
<condition property="sparkle.build"
|
|
value="${label}"
|
|
else="${build.label}">
|
|
<isset property="label"/>
|
|
</condition>
|
|
|
|
<!-- This creates the .app for MacOSX -->
|
|
<jarbundler dir="${macosx.app.dir}"
|
|
name="${application.name}"
|
|
shortname="${application.name}"
|
|
signature="sipc"
|
|
mainclass="net.java.sip.communicator.launcher.SIPCommunicator"
|
|
icon="resources/images/logo/sc_logo_128x128.icns"
|
|
jvmversion="1.5+"
|
|
version="${sip-communicator.version}"
|
|
build="${sparkle.build}"
|
|
infostring="SIP Communicator"
|
|
bundleid="org.sip-communicator"
|
|
stubfile="${macosx.stubfile}"
|
|
extraclasspath="/System/Library/Java"
|
|
workingdirectory="$APP_PACKAGE/Contents/Resources/Java">
|
|
|
|
<javaproperty name="apple.laf.useScreenMenuBar" value="true"/>
|
|
<javaproperty name="apple.awt.brushMetalRounded" value="true"/>
|
|
<javaproperty name="apple.awt.showGrowBox" value="false"/>
|
|
<javaproperty name="java.library.path"
|
|
value="$JAVAROOT/lib/native/mac:${system.DYLD_LIBRARY_PATH}"/>
|
|
|
|
<!-- Tell felix to run sip-communicator -->
|
|
<javaproperty name="felix.config.properties"
|
|
value="file:felix.client.run.properties"/>
|
|
<!-- Tell java.util.logging about our logging preferences -->
|
|
<javaproperty name="java.util.logging.config.file"
|
|
value="logging.properties"/>
|
|
|
|
<jarfileset dir=".">
|
|
<include name="lib/*.jar" />
|
|
<include name="lib/os-specific/mac/*.jar" />
|
|
<include name="lib/bundle/*.jar" />
|
|
<exclude name="lib/bundle/junit.jar" />
|
|
<include name="lib/native/mac/*.jnilib" />
|
|
<include name="lib/native/mac/*.dylib" />
|
|
<include name="${bundles.dest}/*.jar" />
|
|
<exclude name="${bundles.dest}/*-slick.jar" />
|
|
<include name="resources/images/logo/sc_logo_128x128.icns" />
|
|
</jarfileset>
|
|
<javafilelist dir="${macosx.resrc.dir}"
|
|
files="logging.properties"/>
|
|
<javafilelist dir="${macosx.resrc.dir}"
|
|
files="felix.client.run.properties"/>
|
|
<javafilelist dir="${macosx.resrc.dir}"
|
|
files="versionupdate.properties"/>
|
|
</jarbundler>
|
|
<mkdir dir="${macosx.app.dir}/${application.name}.app/Contents/Resources/Java/log"/>
|
|
</target>
|
|
|
|
<!-- Create a MacOSX application package with Sparkle support.
|
|
Executed only if the label property is set, i.e. if the
|
|
package is built from CruiseControl -->
|
|
<target name="macosx-sparkle" depends="macosx"
|
|
if="label"
|
|
description="Create an .app package for MACOSX with Sparkle support">
|
|
|
|
<!-- Add the sparkle bundle path in the felix.client.run.properties file -->
|
|
<echo file="${macosx.app.dir}/${application.name}.app/Contents/Resources/Java/felix.client.run.properties"
|
|
append="true">felix.auto.start.71= reference:file:sc-bundles/sparkle.jar
|
|
</echo>
|
|
|
|
<!-- Remove the path to the updatechecker bundle in the felix.client.run.properties file -->
|
|
<replace file="${macosx.app.dir}/${application.name}.app/Contents/Resources/Java/felix.client.run.properties"
|
|
token="reference:file:sc-bundles/updatechecker.jar"
|
|
value=""/>
|
|
|
|
<!-- Add the Sparkle properties in the Info.plist file -->
|
|
<replace file="${macosx.app.dir}/${application.name}.app/Contents/Info.plist">
|
|
<replacetoken><![CDATA[<key>CFBundleName</key>]]></replacetoken>
|
|
<replacevalue><![CDATA[<key>SUCheckAtStartup</key>
|
|
<string>false</string>
|
|
<key>SUFeedURL</key>
|
|
<string>http://download.sip-communicator.org/nightly/macosx/sparkle/updates.xml</string>
|
|
<key>SUShowReleaseNotes</key>
|
|
<string>true</string>
|
|
<key>CFBundleName</key>]]></replacevalue>
|
|
</replace>
|
|
|
|
<!-- Install the Sparkle Framework in the application package -->
|
|
<mkdir dir="${macosx.app.dir}/${application.name}.app/Contents/Frameworks"/>
|
|
<unzip src="${macosx.resrc.dir}/Sparkle.framework.zip"
|
|
dest="${macosx.app.dir}/${application.name}.app/Contents/Frameworks"/>
|
|
<!-- Ant unzip tasks does not preserve symlinks, so we recreate them -->
|
|
<symlink link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/Sparkle.framework/Versions/Current"
|
|
resource="./A"/>
|
|
<symlink link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/Sparkle.framework/Headers"
|
|
resource="./Versions/Current/Headers"/>
|
|
<symlink link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/Sparkle.framework/Resources"
|
|
resource="./Versions/Current/Resources"/>
|
|
<symlink link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/Sparkle.framework/Sparkle"
|
|
resource="./Versions/Current/Sparkle"/>
|
|
</target>
|
|
|
|
<!-- Create the DMG - This only works on MacOSX (need hdiutil) -->
|
|
<target name="dmg" depends="macosx-sparkle"
|
|
if="is.running.macos"
|
|
description="Create a .dmg package for MACOSX (only works on MACOSX)">
|
|
|
|
<propertyfile file="${macosx.app.dir}/versionupdate.properties"
|
|
comment="Last Build Version">
|
|
<entry key="last_version" value="${sip-communicator.version}"/>
|
|
<entry key="download_link"
|
|
value="http://download.sip-communicator.org/nightly/macosx/${package.name}-${sip-communicator.version}.dmg"/>
|
|
</propertyfile>
|
|
|
|
<property name="macosx.dmg.name"
|
|
value="${package.name}-${sip-communicator.version}.dmg"/>
|
|
<property name="macosx.dmg.tmpname"
|
|
value="${package.name}-tmp.dmg"/>
|
|
<delete file="${macosx.app.dir}/${macosx.dmg.name}"
|
|
quiet="yes" failonerror="false"/>
|
|
|
|
<!-- Create a temporary Disk Image -->
|
|
<exec executable="/usr/bin/hdiutil" os="Mac OS X">
|
|
<arg value="create"/>
|
|
<arg value="-srcfolder"/>
|
|
<arg value="${macosx.app.dir}/${application.name}.app"/>
|
|
<arg value="-volname"/>
|
|
<arg value="${application.name}"/>
|
|
<arg value="-ov"/>
|
|
<arg value="${macosx.app.dir}/${macosx.dmg.tmpname}"/>
|
|
<arg value="-format"/>
|
|
<arg value="UDRW"/>
|
|
</exec>
|
|
<!-- Attach the temporary image -->
|
|
<exec executable="/usr/bin/hdiutil" os="Mac OS X">
|
|
<arg value="attach"/>
|
|
<arg value="${macosx.app.dir}/${macosx.dmg.tmpname}"/>
|
|
<arg value="-mountroot"/>
|
|
<arg value="${release}/"/>
|
|
</exec>
|
|
<!-- Copy the background, icon and DS_Store files -->
|
|
<mkdir dir="${release}/${application.name}/.background"/>
|
|
<copy file="${macosx.resrc.dir}/dmg-background.png"
|
|
tofile="${release}/${application.name}/.background/background.png"
|
|
overwrite="true"/>
|
|
<copy file="${macosx.resrc.dir}/dmg-VolumeIcon.icns"
|
|
tofile="${release}/${application.name}/.VolumeIcon.icns"
|
|
overwrite="true"/>
|
|
<copy file="${macosx.resrc.dir}/dmg-DS_Store"
|
|
tofile="${release}/${application.name}/.DS_Store"
|
|
overwrite="true"/>
|
|
<exec executable="/Developer/Tools/SetFile" os="Mac OS X">
|
|
<arg value="-a"/>
|
|
<arg value="C"/>
|
|
<arg value="${release}/${application.name}"/>
|
|
</exec>
|
|
<!-- Add a symbolic link to the Applications directory -->
|
|
<symlink link="${release}/${application.name}" resource="/Applications"/>
|
|
<!-- Detach the temporary image -->
|
|
<exec executable="/usr/bin/hdiutil" os="Mac OS X">
|
|
<arg value="detach"/>
|
|
<arg value="${release}/${application.name}"/>
|
|
</exec>
|
|
<!-- Compress it to a new image -->
|
|
<exec executable="/usr/bin/hdiutil" os="Mac OS X">
|
|
<arg value="convert"/>
|
|
<arg value="${macosx.app.dir}/${macosx.dmg.tmpname}"/>
|
|
<arg value="-format"/>
|
|
<arg value="UDZO"/>
|
|
<arg value="-o"/>
|
|
<arg value="${macosx.app.dir}/${macosx.dmg.name}"/>
|
|
</exec>
|
|
<!-- Delete the temporary image -->
|
|
<delete file="${macosx.app.dir}/${macosx.dmg.tmpname}"
|
|
quiet="yes" failonerror="false"/>
|
|
</target>
|
|
|
|
<!-- Create a Debian package - This needs dpkg utilities -->
|
|
<target name="deb" depends="make"
|
|
if="dpkg.build.present"
|
|
description="Create a .deb package for Debian (needs dpkg utilities)">
|
|
|
|
<!-- Prepare the changelog file for the version number -->
|
|
<copy file="${inst.resrc}/debian/changelog.tmpl"
|
|
tofile="${inst.resrc}/debian/changelog"
|
|
overwrite="true"/>
|
|
<replace file="${inst.resrc}/debian/changelog"
|
|
token="_VERSION_"
|
|
value="${sip-communicator.version}"/>
|
|
<replace file="${inst.resrc}/debian/changelog"
|
|
token="_PACKAGE_NAME_"
|
|
value="${package.name}"/>
|
|
|
|
<!-- Prepare the changelog file for the version number -->
|
|
<copy file="${inst.resrc}/debian/control.tmpl"
|
|
tofile="${inst.resrc}/debian/control"
|
|
overwrite="true"/>
|
|
<replace file="${inst.resrc}/debian/control"
|
|
token="_PACKAGE_NAME_"
|
|
value="${package.name}"/>
|
|
|
|
<!-- Prepare the changelog file for the version number -->
|
|
<copy file="${inst.resrc}/debian/rules.tmpl"
|
|
tofile="${inst.resrc}/debian/rules"
|
|
overwrite="true"/>
|
|
<replace file="${inst.resrc}/debian/rules"
|
|
token="_PACKAGE_NAME_"
|
|
value="${package.name}"/>
|
|
<chmod file="${inst.resrc}/debian/rules" perm="+x"/>
|
|
|
|
<!-- Put the current date in the changelog -->
|
|
<tstamp>
|
|
<format property="date"
|
|
pattern="EEE, d MMM yyyy HH:mm:ss Z"
|
|
locale="en,US"/>
|
|
</tstamp>
|
|
<replace file="${inst.resrc}/debian/changelog"
|
|
token="_DATE_"
|
|
value="${date}"/>
|
|
|
|
<!-- Put correct version in the sip-communicator executable file -->
|
|
<copy file="${inst.resrc}/debian/sip-communicator.sh.tmpl"
|
|
tofile="${inst.resrc}/debian/sip-communicator.sh"
|
|
overwrite="true"/>
|
|
<replace file="${inst.resrc}/debian/sip-communicator.sh"
|
|
token="_SC_VERSION_"
|
|
value="${sip-communicator.version}"/>
|
|
|
|
<exec executable="/usr/bin/dpkg-buildpackage" dir="${inst.resrc}">
|
|
<arg value="-rfakeroot"/>
|
|
<arg value="-tc"/>
|
|
<arg value="-us"/>
|
|
<arg value="-uc"/>
|
|
<arg value="-b"/>
|
|
<arg value="-d"/>
|
|
</exec>
|
|
|
|
<mkdir dir="${debian.dir}"/>
|
|
<move todir="${debian.dir}">
|
|
<fileset dir="${sc.basedir}/resources">
|
|
<include name="${package.name}*"/>
|
|
</fileset>
|
|
</move>
|
|
|
|
<propertyfile file="${debian.dir}/versionupdate.properties"
|
|
comment="Last Build Version">
|
|
<entry key="last_version" value="${sip-communicator.version}"/>
|
|
<entry key="download_link"
|
|
value="http://download.sip-communicator.org/nightly/debian/${package.name}_${sip-communicator.version}_i386.deb"/>
|
|
</propertyfile>
|
|
|
|
<!-- Delete the temporary file -->
|
|
<delete quiet="yes" failonerror="false">
|
|
<fileset dir="${inst.resrc}/debian/">
|
|
<include name="changelog"/>
|
|
<include name="control"/>
|
|
<include name="rules"/>
|
|
<include name="sip-communicator.sh"/>
|
|
</fileset>
|
|
</delete>
|
|
|
|
</target>
|
|
|
|
<!-- Prepare to deploy the Debian package - This needs dpkg utilities -->
|
|
<target name="deb-rel" depends="deb"
|
|
if="dpkg.scan.present"
|
|
description="Prepare to deploy Debian package (needs dpkg utilities)">
|
|
|
|
<mkdir dir="${debian.binary.dir}"/>
|
|
<move todir="${debian.binary.dir}">
|
|
<fileset dir="${debian.dir}">
|
|
<include name="sip-communicator*"/>
|
|
</fileset>
|
|
</move>
|
|
|
|
<exec executable="/usr/bin/dpkg-scanpackages"
|
|
dir="${debian.dir}"
|
|
output="${debian.binary.dir}/dpkg-scanpackages.out"
|
|
errorproperty="dpkg-scanpackages.err">
|
|
<arg value="binary"/>
|
|
<arg value="/dev/null"/>
|
|
</exec>
|
|
|
|
<exec executable="/bin/gzip"
|
|
dir="${debian.dir}"
|
|
input="${debian.binary.dir}/dpkg-scanpackages.out"
|
|
output="${debian.binary.dir}/Packages.gz">
|
|
<arg value="-9c"/>
|
|
</exec>
|
|
|
|
<!-- Delete the temporary file -->
|
|
<delete file="${debian.binary.dir}/dpkg-scanpackages.out"
|
|
quiet="yes" failonerror="false"/>
|
|
|
|
</target>
|
|
|
|
</project>
|