Makes it possible to deploy a private Java Runtime Environment on Windows as part of the setup of SIP Communicator.

cusax-fix
Lyubomir Marinov 16 years ago
parent ef16da43d9
commit de8bc02e5f

@ -423,6 +423,9 @@
depends="load-properties">
<property name="windows_native_path" value="${sc.basedir}\lib\native\windows"/>
<property name="windows.jre.arch.file" value="${windows.jre.file}"/>
<condition property="windows.jre.arch.zip" value="${windows.jre.zip}">
<isset property="windows.jre.zip" />
</condition>
<property name="windows.download.link" value="${link.download.windows32}"/>
<property name="windows.package.name" value="${package.name}-${sip-communicator.version}-x86.exe"/>
<property name="windows.arch" value="32"/>
@ -434,6 +437,9 @@
depends="load-properties">
<property name="windows_native_path" value="${sc.basedir}\lib\native\windows-64"/>
<property name="windows.jre.arch.file" value="${windows.jre64.file}"/>
<condition property="windows.jre.arch.zip" value="${windows.jre64.zip}">
<isset property="windows.jre64.zip" />
</condition>
<property name="windows.download.link" value="${link.download.windows64}"/>
<property name="windows.package.name" value="${package.name}-${sip-communicator.version}-x64.exe"/>
<property name="windows.arch" value="64"/>
@ -441,6 +447,12 @@
<antcall target="build-installation-wix-base" />
</target>
<target name="unzip-windows-jre" if="windows.jre.arch.zip.isset">
<unzip
src="${unzip.windows.jre.src}"
dest="${unzip.windows.jre.dest}" />
</target>
<target name="build-installation-wix-base"
depends="clean-install-windows,windows-generate-exe">
<!--
@ -515,6 +527,19 @@
</fileset>
</copy>
<condition property="windows.jre.arch.zip.isset">
<and>
<isset property="windows.jre.arch.zip" />
<not>
<equals arg1="${windows.jre.arch.zip}" arg2="" />
</not>
</and>
</condition>
<antcall target="unzip-windows-jre">
<param name="unzip.windows.jre.src" value="${windows.jre.arch.zip}" />
<param name="unzip.windows.jre.dest" value="${light.dir}" />
</antcall>
<!--
This update-location.properties file is the only of interest to the
MSI i.e. it gets installed on the user machine.
@ -537,7 +562,6 @@
<arg value="-ag" />
<arg value="-cg" />
<arg value="ComponentGroup_HeatExe" />
<arg value="-ke" />
<arg value="-out" />
<arg value="${windows.app.dir}\tmp\heat.wxs" />
<arg value="-sfrag" />
@ -555,9 +579,7 @@
out="${windows.app.dir}/tmp/component-refs.wxi"
style="${inst.resrc}/windows/heat-component-refs.xsl" />
<condition property="windows.is.64"
value="yes"
else="no">
<condition property="windows.is.64" value="yes" else="no">
<equals arg1="${windows.arch}" arg2="64" />
</condition>
@ -568,7 +590,6 @@
<filter token="WelcomeText1" value="${installer.welcome.wtext1}" />
<filter token="WelcomeText2" value="${installer.welcome.wtext2}" />
<filter token="WelcomeText3" value="${installer.welcome.wtext3}" />
<filter token="WINDOWS_JRE_FILE" value="${windows.jre.arch.file}" />
<filter token="WINDOWS_IS_64" value="${windows.is.64}" />
<filter token="WIX_PRODUCT_ID" value="${wix.product.id}" />
<filter token="WIX_UPGRADE_CODE" value="${wix.upgrade.code}" />
@ -585,20 +606,35 @@
</copy>
<!-- Execute candle.exe -->
<condition property="wix.var.Platform" value="x64" else="x86">
<condition property="candle.var.Platform" value="x64" else="x86">
<equals arg1="${windows.arch}" arg2="64" />
</condition>
<condition
property="candle.arg.var.JRESetup"
value="-dJRESetup=${windows.jre.arch.file}"
else="-nologo">
<and>
<isset property="windows.jre.arch.file" />
<not>
<equals arg1="${windows.jre.arch.file}" arg2="" />
</not>
<not>
<isset property="windows.jre.arch.zip.isset" />
</not>
</and>
</condition>
<exec
executable="${wix.home}\candle.exe"
dir="${windows.app.dir}/tmp"
failonerror="true">
<arg value="-nologo" />
<arg value="-dPlatform=${wix.var.Platform}" />
<arg value="-dPlatform=${candle.var.Platform}" />
<arg value="-ext" />
<arg value="WixUIExtension" />
<arg value="-ext" />
<arg value="WixUtilExtension" />
<arg value="-dSourceDir=light" />
<arg value="${candle.arg.var.JRESetup}" />
<arg value="installer-windows.wxs" />
</exec>

@ -109,7 +109,7 @@
<ComponentGroupRef Id="ComponentGroup_RegistryEntries" />
</Feature>
<Media Id="1" Cabinet="Data1.cab" EmbedCab="yes" />
<Media Id="1" Cabinet="Data1.cab" CompressionLevel="high" EmbedCab="yes" />
<UI>
<UIRef Id="WixUI_CInstallDir" />
@ -184,6 +184,7 @@
Value="LaunchApplication">
<![CDATA[WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 AND JRE_VERSION >= "1.5" AND NOT Installed]]>
</Publish>
<?ifdef JRESetup ?>
<Publish
Control="Finish"
Dialog="CExitDialog"
@ -191,6 +192,7 @@
Value="InstallJRE">
<![CDATA[WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 AND JRE_VERSION < "1.5" AND NOT Installed]]>
</Publish>
<?endif?>
<InstallUISequence>
<Show Dialog="CExitDialog" OnExit="success">
@ -237,9 +239,11 @@
<![CDATA[NOT HAS_STARTUP_REGISTRY AND NOT (HAS_STARTUP_REGISTRY = "#1")]]>
</Custom>
<?ifdef JRESetup ?>
<Custom Action="SetWIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" After="AppSearch">
<![CDATA[JRE_VERSION < "1.5" AND NOT Installed]]>
</Custom>
<?endif?>
</InstallUISequence>
<AdminUISequence>
@ -249,11 +253,13 @@
</AdminUISequence>
</UI>
<?ifdef JRESetup ?>
<CustomAction
Id="InstallJRE"
BinaryKey="JRESetup"
ExeCommand=""
Return="asyncNoWait" />
<?endif?>
<CustomAction
Id="LaunchApplication"
BinaryKey="WixCA"
@ -279,10 +285,12 @@
Id="SetIS_AUTOUPDATE"
Property="IS_AUTOUPDATE"
Value="1" />
<?ifdef JRESetup ?>
<CustomAction
Id="SetWIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT"
Property="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT"
Value="Install Java(TM) SE Runtime Environment" />
<?endif?>
<CustomAction
Id="UnsetCREATE_DESKTOP_SHORTCUT"
Property="CREATE_DESKTOP_SHORTCUT"
@ -329,9 +337,11 @@
<![CDATA[NOT HAS_STARTUP_REGISTRY AND NOT (HAS_STARTUP_REGISTRY = "#1")]]>
</Custom>
<?ifdef JRESetup ?>
<Custom Action="SetWIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" After="AppSearch">
<![CDATA[JRE_VERSION < "1.5" AND NOT Installed]]>
</Custom>
<?endif?>
</InstallExecuteSequence>
<Property Id="HAS_DESKTOP_SHORTCUT">
@ -370,6 +380,7 @@
HAS_STARTUP_SHORTCUT
</SetProperty>
<Property Id="JRE_VERSION">
<?ifdef JRESetup ?>
<RegistrySearch
Id="RegistrySearch_JREVersion"
Key="Software\JavaSoft\Java Runtime Environment"
@ -377,14 +388,17 @@
Root="HKLM"
Type="raw"
Win64="@WINDOWS_IS_64@" />
<?else?>
1.5
<?endif?>
</Property>
<Property Id="ARPCONTACT" Value="@APP_EMAIL@" />
<Property Id="ARPHELPLINK" Value="@APP_WEB@" />
<Property Id="ARPPRODUCTICON" Value="Icon.ico" />
<!-- we move from startup shortcut to registry entry, we
always set CREATE_STARTUP_SHORTCUT = 0 so on update
the old shortcuts will be removed
<!--
We've switched the startup from shortcut to registry so we'll always set
CREATE_STARTUP_SHORTCUT to 0 in order to remove the old shortcut on update.
-->
<Property Id="CREATE_STARTUP_SHORTCUT" Value="0" />
<Property Id="CREATE_FEED_REGISTRY_ENTRIES" Value="0" />
@ -404,7 +418,9 @@
<Icon Id="Icon.ico" SourceFile="sc-logo.ico" />
<Binary Id="JRESetup" SourceFile="@WINDOWS_JRE_FILE@" />
<?ifdef JRESetup ?>
<Binary Id="JRESetup" SourceFile="$(var.JRESetup)" />
<?endif?>
</Product>

Loading…
Cancel
Save