| <!-- | |
| Build file for the Windows IE Plugin installer. This build should only be | |
| run on a Windows system with WIX installed. You can download WIX at: | |
| http://wix.sourceforge.net/ | |
| --> | |
| <project name="ieInstaller" default="build" basedir="."> | |
| <property name="gwt.root" location="../../../" /> | |
| <property name="project.tail" value="plugins/ie/installer" /> | |
| <import file="../../../common.ant.xml" /> | |
| <property name="wix.bin" | |
| location="C:/Program Files/Windows Installer XML v3/bin" /> | |
| <property name="wix.log" location="${project.build}/wix.log" /> | |
| <property name="installer.name" value="gwt-dev-plugin.msi" /> | |
| <!-- Verify that this is a windows system. --> | |
| <fail unless="build.host.iswindows" | |
| message="Installer can only be built on a Windows system." /> | |
| <!-- Verify that wix is installed. --> | |
| <property.ensure name="wix.bin.exists" location="${wix.bin}" | |
| message="You must install Wix (http://wix.sourceforge.net) to build the installer." /> | |
| <!-- Verify that the version has been specified. --> | |
| <fail unless="installer.version" | |
| message="You must specify installer.version parameter in the form major.minor.build.revision (ex. -Dinstaller.version=0.9.1234.0)" /> | |
| <target name="build" description="Build the installer"> | |
| <mkdir dir="${project.build}" /> | |
| <echo message="Preparing WIX script for oophm.dll" /> | |
| <exec executable="${wix.bin}/heat.exe" | |
| dir="../prebuilt" | |
| failonerror="yes" | |
| output="${wix.log}"> | |
| <arg line="file oophm.dll" /> | |
| <arg line="-out ${project.build}/oophm.wxs.xml" /> | |
| <arg line="-gg -g1" /> | |
| <arg line="-dr INSTALLDIR" /> | |
| <arg line="-cg oophmDll" /> | |
| <arg line="-var var.SourceDir" /> | |
| <arg line="-indent 2" /> | |
| </exec> | |
| <replace file="${project.build}/oophm.wxs.xml" | |
| token='KeyPath="yes"' | |
| value='KeyPath="no"' /> | |
| <replace file="${project.build}/oophm.wxs.xml" | |
| token='Directory="dir8D1DE08B7ED2BEAAD2CDE02C8AF2005E"' | |
| value='Directory="INSTALLDIR"' /> | |
| <replace file="${project.build}/oophm.wxs.xml"> | |
| <replacetoken><![CDATA[<File]]></replacetoken> | |
| <replacevalue><![CDATA[ | |
| <RegistryKey Root="HKCU" Key="SOFTWARE\Google\Google Web Toolkit\Installer" Action="createAndRemoveOnUninstall"> | |
| <RegistryValue Name="oophmDllRemove" Value="" Type="string" KeyPath="yes"/> | |
| </RegistryKey> | |
| <File]]></replacevalue> | |
| </replace> | |
| <echo message="Compiling WIX scripts" /> | |
| <exec executable="${wix.bin}/candle.exe" | |
| failonerror="yes" | |
| output="${wix.log}" | |
| append="true"> | |
| <arg line="-out ${project.build}/" /> | |
| <arg line="-dSourceDir=..\\" /> | |
| <arg line="-dversion=${installer.version}" /> | |
| <arg line="${project.build}/oophm.wxs.xml" /> | |
| <arg line="installer.wxs.xml" /> | |
| </exec> | |
| <echo message="Generating Windows Installer" /> | |
| <exec executable="${wix.bin}/light.exe" | |
| failonerror="yes" | |
| output="${wix.log}" | |
| append="true"> | |
| <arg line="-o ${project.build}/${installer.name}" /> | |
| <arg line="${project.build}/oophm.wxs.wixobj" /> | |
| <arg line="${project.build}/installer.wxs.wixobj" /> | |
| </exec> | |
| <echo message="Copying Windows Installer to prebuilt directory" /> | |
| <copy file="${project.build}/${installer.name}" | |
| tofile="../prebuilt/${installer.name}" /> | |
| </target> | |
| </project> |