Builds the Windows MSI with the JRE setup built-in and optionally runs it during installation.

cusax-fix
Lyubomir Marinov 18 years ago
parent e2d5c2d5c7
commit 57016e8c15

@ -97,7 +97,7 @@
<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" />
<echo message="'ant build-installation-wix' for building Windows MSI instalation file using WiX" />
<echo message="'ant build-installation-wix' for building Windows MSI instalation file using WiX and mt.exe" />
</target>
<target name="clean-install-generic">
@ -432,6 +432,7 @@
<filter token="APP_EMAIL" value="${application.email}" />
<filter token="APP_NAME" value="${application.name}" />
<filter token="APP_WEB" value="${application.web}" />
<filter token="WINDOWS_JRE_FILE" value="${windows.jre.file}" />
<filter token="WIX_UPGRADE_CODE" value="${wix.upgrade.code}" />
<copy
file="${inst.resrc}/windows/installer-windows.wxs"
@ -472,10 +473,9 @@
<arg value="-ext" />
<arg value="WixUtilExtension" />
<arg value="-out" />
<arg value="${windows.app.dir}\${package.name}-${sip-communicator.version}.msi" />
<arg value="${windows.app.dir}\tmp\setup.msi" />
<arg value="${windows.app.dir}\tmp\installer-windows.wixobj" />
</exec>
<delete file="${windows.app.dir}\${package.name}-${sip-communicator.version}.wixpdb" />
<!-- Bootstrap the MSI into an EXE -->
<exec
@ -485,10 +485,15 @@
<arg value="-out" />
<arg value="${windows.app.dir}\${package.name}-${sip-communicator.version}.exe" />
<arg value="-mps" />
<arg value="${windows.app.dir}\${package.name}-${sip-communicator.version}.msi" />
<arg value="${windows.app.dir}\tmp\setup.msi" />
<arg value="-setup" />
<arg value="C:\Program Files\WiX\setup.exe" />
</exec>
<exec executable="mt.exe" dir="${windows.app.dir}" failonerror="true">
<arg value="-manifest" />
<arg value="${inst.resrc}\windows\setup.exe.manifest" />
<arg value="-outputresource:${package.name}-${sip-communicator.version}.exe;#1" />
</exec>
<delete dir="${light.dir}" />

@ -108,15 +108,52 @@
Dialog="ExitDialog"
Event="DoAction"
Value="LaunchApplication">
WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed
<![CDATA[WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 AND JRE_VERSION >= "1.5" AND NOT Installed]]>
</Publish>
<Publish
Control="Finish"
Dialog="ExitDialog"
Event="DoAction"
Value="InstallJRE">
<![CDATA[WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 AND JRE_VERSION < "1.5" AND NOT Installed]]>
</Publish>
<InstallUISequence>
<Custom Action="SetWIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" After="AppSearch">
<![CDATA[JRE_VERSION < "1.5" AND NOT Installed]]>
</Custom>
</InstallUISequence>
</UI>
<CustomAction
Id="InstallJRE"
BinaryKey="JRESetup"
ExeCommand=""
Return="asyncNoWait" />
<CustomAction
Id="LaunchApplication"
BinaryKey="WixCA"
DllEntry="WixShellExec"
Impersonate="yes" />
<CustomAction
Id="SetWIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT"
Property="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT"
Value="Install Java(TM) SE Runtime Environment" />
<InstallExecuteSequence>
<Custom Action="SetWIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" After="AppSearch">
<![CDATA[JRE_VERSION < "1.5" AND NOT Installed]]>
</Custom>
</InstallExecuteSequence>
<Property Id="JRE_VERSION">
<RegistrySearch
Id="RegistrySearch_JREVersion"
Key="Software\JavaSoft\Java Runtime Environment"
Name="CurrentVersion"
Root="HKLM"
Type="raw" />
</Property>
<Property Id="ARPCONTACT" Value="@APP_EMAIL@" />
<Property Id="ARPHELPLINK" Value="@APP_WEB@" />
@ -132,6 +169,8 @@
<Icon Id="Icon.ico" SourceFile="sc-logo.ico" />
<Binary Id="JRESetup" SourceFile="@WINDOWS_JRE_FILE@" />
</Product>
</Wix>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<dependency><dependentAssembly><assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*"></assemblyIdentity></dependentAssembly></dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"><security><requestedPrivileges><requestedExecutionLevel level="requireAdministrator" uiAccess="false"></requestedExecutionLevel></requestedPrivileges></security></trustInfo>
</assembly>
Loading…
Cancel
Save