Simplify MSI build by removing x86 support

This commit is contained in:
Reinhard Pointner 2018-06-10 06:46:26 +07:00
parent 632616a2b6
commit cc5ec455d0
2 changed files with 18 additions and 37 deletions

View File

@ -653,28 +653,20 @@
<target name="msi" description="Build Windows Installer packages" depends="revision">
<antcall target="msi-arch">
<param name="arch" value="x64" />
<param name="arch.env" value="AMD64" />
</antcall>
</target>
<target name="msi-arch">
<property name="dir.staging" location="${dir.dist}/msi/${arch}" />
<property name="dir.staging" location="${dir.dist}/msi/x64" />
<!-- 1. prepare application files for heat harvest -->
<get-windows-jre dest="${dir.staging}/jre" />
<get-windows-jre dest="${dir.staging}/base/jre" />
<copy todir="${dir.staging}/jar">
<copy todir="${dir.staging}/base/jar">
<fileset dir="${dir.dist}/lib" includes="*.jar" />
</copy>
<copy todir="${dir.staging}/lib">
<fileset dir="${dir.lib}/native/win32-${arch}" />
<copy todir="${dir.staging}/base/lib">
<fileset dir="${dir.lib}/native/win32-x64" />
</copy>
<exec executable="heat" dir="${dir.staging}" failonerror="true">
<arg line="dir . -v -srd -gg -dr ApplicationBase -cg ApplicationBase -template fragment -sreg -sfrag -scom -out base.wxs" />
<arg line="dir base -v -srd -gg -dr ApplicationBase -cg ApplicationBase -template fragment -sreg -sfrag -scom -out base.wxs" />
</exec>
<exec executable="candle" dir="${dir.staging}" failonerror="true">
<arg line="base.wxs -out base.wixobj" />
@ -682,21 +674,16 @@
<!-- 2. prepare installer files and application stub for candle light -->
<copy todir="${dir.staging}">
<fileset dir="${dir.installer}/msi" includes="*.exe, *.rtf, *.bmp" />
</copy>
<copy todir="${dir.staging}">
<fileset dir="${dir.installer}/icons" includes="*.ico" />
</copy>
<copy-replace todir="${dir.staging}">
<fileset dir="${dir.installer}/msi" includes="*.wix, *.ini" />
</copy-replace>
<exec executable="candle" dir="${dir.staging}" failonerror="true">
<arg line="filebot.wix -out filebot.wixobj" />
</exec>
<!-- 3. compile MSI package (use -b to add additional resource folders) -->
<exec executable="light" dir="${dir.staging}" failonerror="true">
<arg line="filebot.wixobj base.wixobj -sval -ext WixUIExtension -out ${dir.dist}/${release}_${arch}.msi" />
<arg line="filebot.wixobj base.wixobj -b base -b '${dir.installer}/msi' -b '${dir.installer}/icons' -sval -ext WixUIExtension -out ${dir.dist}/${release}_x64.msi" />
</exec>
</target>

View File

@ -1,34 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Pass in Processor Architecture via Ant Build Properties -->
<?define Platform = "@{arch}" ?>
<!-- Windows Installer product code and upgrade code -->
<?define UpgradeCode = "86809B6B-E2E3-43EC-9351-D4D66CAF7864" ?>
<!-- Set a specific product code based on the processor architecture build variable -->
<?if $(var.Platform)=x64 ?>
<?define ProgramFiles = "ProgramFiles64Folder" ?>
<?define Win64 = "yes" ?>
<?else ?>
<?define ProgramFiles = "ProgramFilesFolder" ?>
<?define Win64 = "no" ?>
<?endif ?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Product Id='*' Name='@{application.name}' Manufacturer='@{package.developer}' Version='@{application.version}' UpgradeCode='$(var.UpgradeCode)' Language='1033' Codepage='1252'>
<Package Description="FileBot Installer" Manufacturer='@{package.developer}' InstallerVersion='300' Compressed='yes' Platform="$(var.Platform)" />
<Package Description="FileBot Installer" Manufacturer='@{package.developer}' InstallerVersion='300' Compressed='yes' Platform="x64" />
<MajorUpgrade AllowDowngrades="yes" IgnoreRemoveFailure="yes" />
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='$(var.ProgramFiles)' Name='Program Files'>
<Directory Id='ProgramFiles64Folder' Name='Program Files'>
<Directory Id='INSTALLDIR' Name='@{application.name}'>
<Component Id='ApplicationStub' Guid='A7B21026-DA54-4AF8-9227-188565AB9C4E' Win64="$(var.Win64)">
<Component Id='ApplicationStub' Guid='A7B21026-DA54-4AF8-9227-188565AB9C4E' Win64="yes">
<File Id='filebot.launcher.exe' Name='filebot.launcher.exe' Source='filebot.launcher.exe' KeyPath='yes'>
<Shortcut Id="shortcut.menu.filebot" Directory="ProgramMenuDir" Name="@{application.name}" Description="@{package.synopsis}" WorkingDirectory='INSTALLDIR' Icon="icon.ico" Advertise="no">
<ShortcutProperty Key="System.AppUserModel.ID" Value="@{application.name}" />
@ -55,6 +43,12 @@
<Environment Id="PATH" Name="PATH" Value="[INSTALLDIR]" Action="set" Part="last" Permanent="no" System="yes" />
<ProgId Id="ActivateLicense" Description="FileBot License File" Advertise="no" >
<Extension Id="psm" ContentType="application/filebot-license" Advertise="no" >
<Verb Id="Open" Command="Activate License" TargetFile="filebot.exe" Argument='--import-license "%1"' />
</Extension>
</ProgId>
<Shortcut Id="shortcut.uninstall" Directory="ProgramMenuDir" Name="Uninstall FileBot" Description="Uninstall FileBot" Icon="icon.ico" Target="[SystemFolder]msiexec.exe" Arguments="/x [ProductCode]" Advertise="no" />
</Component>