Activating Sparkle (auto-update) for MacOSX.

Sparkle is available only if a valid build number was available at 
compilation time. If not, the plugin is not started. 
Next Mac package should hopefully get it activated. 
Release notes and appcast will be available here:
http://download.sip-communicator.org/nightly/macosx/sparkle/
cusax-fix
Romain Kuntz 18 years ago
parent 2f037f18f3
commit 7a94e5b1ea

@ -607,7 +607,8 @@
bundle-plugin-msnaccregwizz,bundle-plugin-sipaccregwizz, bundle-plugin-msnaccregwizz,bundle-plugin-sipaccregwizz,
bundle-plugin-yahooaccregwizz,bundle-plugin-aimaccregwizz, bundle-plugin-yahooaccregwizz,bundle-plugin-aimaccregwizz,
bundle-version,bundle-version-impl,bundle-shutdown, bundle-version,bundle-version-impl,bundle-shutdown,
bundle-growlnotification,bundle-audionotifier,bundle-plugin-branding, bundle-growlnotification,bundle-sparkle,
bundle-audionotifier,bundle-plugin-branding,
bundle-systray,bundle-browserlauncher,bundle-gibberish, bundle-systray,bundle-browserlauncher,bundle-gibberish,
bundle-gibberish-slick,bundle-plugin-gibberishaccregwizz, bundle-gibberish-slick,bundle-plugin-gibberishaccregwizz,
bundle-plugin-extended-callhistory-search, bundle-plugin-extended-callhistory-search,
@ -1298,6 +1299,16 @@ javax.swing.event, javax.swing.border"/>
</jar> </jar>
</target> </target>
<!--BUNDLE-SPARKLE-->
<target name="bundle-sparkle">
<!-- Creates a bundle for the sparkle activator plugin.-->
<jar compress="false" destfile="${bundles.dest.mac}/sparkle.jar"
manifest="${src}/net/java/sip/communicator/impl/sparkle/sparkle.manifest.mf">
<zipfileset dir="${dest}/net/java/sip/communicator/impl/sparkle"
prefix="net/java/sip/communicator/impl/sparkle" />
</jar>
</target>
<!--BUNDLE-AUDIO NOTIFIER--> <!--BUNDLE-AUDIO NOTIFIER-->
<target name="bundle-audionotifier"> <target name="bundle-audionotifier">
<!-- Creates a bundle for the audio notifier service.--> <!-- Creates a bundle for the audio notifier service.-->

@ -325,7 +325,7 @@
<taskdef name="jarbundler" <taskdef name="jarbundler"
classname="net.sourceforge.jarbundler.JarBundler"/> classname="net.sourceforge.jarbundler.JarBundler"/>
<mkdir dir="${macosx.app.dir}"/> <mkdir dir="${macosx.app.dir}"/>
<property name="macosx.stubfile" <property name="macosx.stubfile"
value="${macosx.resrc.dir}/JavaApplicationStub"/> value="${macosx.resrc.dir}/JavaApplicationStub"/>
@ -367,6 +367,14 @@
<!-- Delete the old .app if it exists --> <!-- Delete the old .app if it exists -->
<delete dir="${macosx.app.dir}/${application.name}.app" <delete dir="${macosx.app.dir}/${application.name}.app"
quiet="yes" failonerror="false"/> 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 --> <!-- This creates the .app for MacOSX -->
<jarbundler dir="${macosx.app.dir}" <jarbundler dir="${macosx.app.dir}"
@ -377,7 +385,7 @@
icon="resources/images/logo/sc_logo_128x128.icns" icon="resources/images/logo/sc_logo_128x128.icns"
jvmversion="1.5+" jvmversion="1.5+"
version="${sip-communicator.version}" version="${sip-communicator.version}"
build="draft" build="${sparkle.build}"
infostring="SIP Communicator" infostring="SIP Communicator"
bundleid="org.sip-communicator" bundleid="org.sip-communicator"
stubfile="${macosx.stubfile}" stubfile="${macosx.stubfile}"
@ -403,6 +411,7 @@
<include name="lib/bundle/*.jar" /> <include name="lib/bundle/*.jar" />
<exclude name="lib/bundle/junit.jar" /> <exclude name="lib/bundle/junit.jar" />
<include name="lib/native/mac/*.jnilib" /> <include name="lib/native/mac/*.jnilib" />
<include name="lib/native/mac/*.dylib" />
<include name="${bundles.dest}/*.jar" /> <include name="${bundles.dest}/*.jar" />
<exclude name="${bundles.dest}/*-slick.jar" /> <exclude name="${bundles.dest}/*-slick.jar" />
<include name="resources/images/logo/sc_logo_128x128.icns" /> <include name="resources/images/logo/sc_logo_128x128.icns" />
@ -417,8 +426,52 @@
<mkdir dir="${macosx.app.dir}/${application.name}.app/Contents/Resources/Java/log"/> <mkdir dir="${macosx.app.dir}/${application.name}.app/Contents/Resources/Java/log"/>
</target> </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) --> <!-- Create the DMG - This only works on MacOSX (need hdiutil) -->
<target name="dmg" depends="macosx" <target name="dmg" depends="macosx-sparkle"
if="is.running.macos" if="is.running.macos"
description="Create a .dmg package for MACOSX (only works on MACOSX)"> description="Create a .dmg package for MACOSX (only works on MACOSX)">

Loading…
Cancel
Save