Files
sqlitebrowser/installer/windows/product.wxs
T
2018-06-05 17:09:05 +02:00

189 lines
10 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?include variables.wxi ?>
<Product Id="*" UpgradeCode="124623D9-35D6-4D2E-9474-2ADACC8BABBB" Name="$(var.Name)" Manufacturer="$(var.Team)" Version="$(var.Version)" Language="1033">
<Package Id="*" Compressed="yes" InstallerVersion="301" InstallScope="perMachine" />
<Media Id="1" Cabinet="Media.cab" EmbedCab="yes" CompressionLevel="high" />
<!--
Schedule="afterInstallInitialize"
Removes the installed product first then installs the new version, if the installation of the new version
fails, Windows Installer also rolls back the removal of the installed product, in other words, reinstalls it.
AllowSameVersionUpgrades="yes"
When upgrading products (using the same "UpgradeCode"), Windows Installer only check the first three version
fields (Major.Minor.Patch) to decide if it should upgrade the product or not. The nightly build version never
change and therefore "AllowSameVersionUpgrades" is required if we want to be able to update the installed
nightly version.
-->
<MajorUpgrade
Schedule="afterInstallInitialize"
AllowSameVersionUpgrades="yes"
DowngradeErrorMessage="A later version of $(var.Name) is already installed. Setup will now exit."
/>
<!-- ========================================= Add/Remove Programs ========================================= -->
<Icon Id="app.ico" SourceFile="$(var.AppIcon)" />
<Property Id="ARPPRODUCTICON" Value="app.ico" />
<Property Id='ARPCOMMENTS' Value="$(var.AppComments)" />
<Property Id='ARPCONTACT' Value="$(var.AppContact)" />
<Property Id='ARPREADME' Value="$(var.AppReadme)" />
<Property Id="ARPHELPLINK" Value="$(var.AppHelpLink)" />
<Property Id="ARPURLINFOABOUT" Value="$(var.AppSupportLink)" />
<Property Id="ARPURLUPDATEINFO" Value="$(var.AppUpdateInfoLink)" />
<SetProperty Id="ARPINSTALLLOCATION" Value="[INSTALLDIR]" After="CostFinalize" />
<!-- ================================================ Files ================================================ -->
<?if $(sys.BUILDARCH)="x64"?>
<?define ProgramFilesFolder="ProgramFiles64Folder" ?>
<?elseif $(sys.BUILDARCH)="x86"?>
<?define ProgramFilesFolder="ProgramFilesFolder" ?>
<?endif?>
<Directory Id="TARGETDIR" Name="SourceDir">
<Merge Id="VCRedist" SourceFile="$(var.VCRedistPath)\$(var.VCRedistFile)" DiskId="1" Language="0" />
<Directory Id="$(var.ProgramFilesFolder)">
<Directory Id="INSTALLDIR" Name="$(var.Name)">
<Directory Id="imageformats" Name="imageformats">
<Component><File Source="$(var.QtPath)\plugins\imageformats\qgif.dll" /></Component>
<Component><File Source="$(var.QtPath)\plugins\imageformats\qicns.dll" /></Component>
<Component><File Source="$(var.QtPath)\plugins\imageformats\qico.dll" /></Component>
<Component><File Source="$(var.QtPath)\plugins\imageformats\qjpeg.dll" /></Component>
<Component><File Source="$(var.QtPath)\plugins\imageformats\qsvg.dll" /></Component>
<Component><File Source="$(var.QtPath)\plugins\imageformats\qtga.dll" /></Component>
<Component><File Source="$(var.QtPath)\plugins\imageformats\qtiff.dll" /></Component>
<Component><File Source="$(var.QtPath)\plugins\imageformats\qwbmp.dll" /></Component>
<Component><File Source="$(var.QtPath)\plugins\imageformats\qwebp.dll" /></Component>
</Directory>
<Directory Id="platforms" Name="platforms">
<Component><File Source="$(var.QtPath)\plugins\platforms\qwindows.dll" /></Component>
</Directory>
<Directory Id="licenses" Name="licenses">
<Component><File Source="..\..\LICENSE" /></Component>
<Component><File Source="..\..\LICENSE-PLUGINS" /></Component>
</Directory>
<Component><File Source="$(var.QtPath)\bin\Qt5Concurrent.dll" /></Component>
<Component><File Source="$(var.QtPath)\bin\Qt5Core.dll" /></Component>
<Component><File Source="$(var.QtPath)\bin\Qt5Gui.dll" /></Component>
<Component><File Source="$(var.QtPath)\bin\Qt5Network.dll" /></Component>
<Component><File Source="$(var.QtPath)\bin\Qt5PrintSupport.dll" /></Component>
<Component><File Source="$(var.QtPath)\bin\Qt5Widgets.dll" /></Component>
<Component><File Source="$(var.QtPath)\bin\Qt5Xml.dll" /></Component>
<Component><File Source="$(var.OpenSSLPath)\libeay32.dll" /></Component>
<Component><File Source="$(var.OpenSSLPath)\ssleay32.dll" /></Component>
<?ifdef SQLCipher ?>
<Component><File Source="$(var.SQLCipherPath)\sqlcipher.dll" /></Component>
<?else?>
<Component><File Source="$(var.SQLitePath)\sqlite3.dll" /></Component>
<?endif?>
<Component><File Source="..\..\Release\DB Browser for SQLite.exe" Checksum="yes" /></Component>
</Directory>
</Directory>
<Directory Id="DesktopFolder">
<Component Id="DesktopShortcut">
<Shortcut Id="DSC" Name="$(var.Name)" Description="$(var.AppComments)" Target="[INSTALLDIR]DB Browser for SQLite.exe" WorkingDirectory="INSTALLDIR" />
<RegistryValue Root="HKLM" Key="Software\$(var.Name)" Name="DesktopShortcut" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</Directory>
<Directory Id="ProgramMenuFolder">
<Component Id="ProgramMenuShortcut">
<Shortcut Id="PMSC" Name="$(var.Name)" Description="$(var.AppComments)" Target="[INSTALLDIR]DB Browser for SQLite.exe" WorkingDirectory="INSTALLDIR" />
<RegistryValue Root="HKLM" Key="Software\$(var.Name)" Name="ProgramMenuShortcut" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</Directory>
</Directory>
<!-- ============================================== Features =============================================== -->
<Feature Id="Complete" Title="$(var.Name)" Description="The complete package" ConfigurableDirectory="INSTALLDIR" AllowAdvertise="no" Display="expand">
<Feature Id="VCRedist" Title="Visual C++ Runtime" AllowAdvertise="no" Display="hidden">
<MergeRef Id="VCRedist"/>
</Feature>
<Feature Id="Shortcuts" Title="Shortcuts" Description="Show shortcuts for the application in different locations" AllowAdvertise="no" Display="expand">
<Feature Id="FeatureDesktopShortcut" Title="Desktop" AllowAdvertise="no">
<ComponentRef Id="DesktopShortcut" />
</Feature>
<Feature Id="FeatureProgramMenuShortcut" Title="Program Menu" AllowAdvertise="no">
<ComponentRef Id="ProgramMenuShortcut" />
</Feature>
</Feature>
<!-- Plugins -->
<ComponentRef Id="qgif.dll" />
<ComponentRef Id="qicns.dll" />
<ComponentRef Id="qico.dll" />
<ComponentRef Id="qjpeg.dll" />
<ComponentRef Id="qsvg.dll" />
<ComponentRef Id="qtga.dll" />
<ComponentRef Id="qtiff.dll" />
<ComponentRef Id="qwbmp.dll" />
<ComponentRef Id="qwebp.dll" />
<!-- Platforms -->
<ComponentRef Id="qwindows.dll" />
<!-- Licenses -->
<ComponentRef Id="LICENSE" />
<ComponentRef Id="LICENSE_PLUGINS" />
<!-- Qt -->
<ComponentRef Id="Qt5Concurrent.dll" />
<ComponentRef Id="Qt5Core.dll" />
<ComponentRef Id="Qt5Gui.dll" />
<ComponentRef Id="Qt5Network.dll" />
<ComponentRef Id="Qt5PrintSupport.dll" />
<ComponentRef Id="Qt5Widgets.dll" />
<ComponentRef Id="Qt5Xml.dll" />
<!-- OpenSSL -->
<ComponentRef Id="libeay32.dll" />
<ComponentRef Id="ssleay32.dll" />
<!-- SQLCipher or SQLite -->
<?ifdef SQLCipher ?>
<ComponentRef Id="sqlcipher.dll" />
<?else?>
<ComponentRef Id="sqlite3.dll" />
<?endif?>
<!-- Application -->
<ComponentRef Id="DB_Browser_for_SQLite.exe" />
</Feature>
<!-- ============================================= Installation UI ============================================= -->
<!-- Dialog Set -->
<UIRef Id="WixUI_FeatureTree" />
<!-- License file -->
<WixVariable Id="WixUILicenseRtf" Value="license.rtf" />
<!-- Banner image -->
<WixVariable Id="WixUIBannerBmp" Value="banner.bmp" />
<!-- Background image -->
<WixVariable Id="WixUIDialogBmp" Value="background.bmp" />
<!-- Optional text, shown at the end of installation -->
<Property Id="WIXUI_EXITDIALOGOPTIONALTEXT" Value="Thank you for installing $(var.Name)." />
<!-- ===================================== Run the application after setup ===================================== -->
<!-- http://wixtoolset.org/documentation/manual/v3/howtos/ui_and_localization/run_program_after_install.html -->
<!-- Step 1: Add the checkbox, and select it, at the end of installation -->
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Run $(var.Name)" />
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1" />
<!-- Step 2: Include the custom Action -->
<Property Id="WixShellExecTarget" Value="[#DB_Browser_for_SQLite.exe]" />
<CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />
<!-- Step 3: Trigger the custom action -->
<UI><Publish Control="Finish" Dialog="ExitDialog" Event="DoAction" Value="LaunchApplication">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish></UI>
</Product>
</Wix>