Files
sqlitebrowser/installer/windows/product.wxs
T
Karim ElDeeb 31c3a05f9a Fix Windows Vista style when using Qt 5.10 and up
Since Qt 5.10, the Windows Vista style has been moved to its own plugin. This plugin must be included in order to show the new style. It will be included for the 64-bit build only for now, since we are using a different Qt version (5.7) for the 32-bit build.

See #1580.
2018-10-20 11:30:56 +02:00

215 lines
12 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" InstallPrivileges="elevated" 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)">
<!--
This DLL is required when using Qt 5.10 and higher to show Windows Vista style GUI. The check for
64-bit is required here since we are using Qt 5.7 for the 32-bit build. This file does not exist
on earlier version of Qt. If Qt 5.10 is used for both 32-bit and 64-bit then this check can be removed.
See https://bugreports.qt.io/browse/QTBUG-65177
-->
<?if $(sys.BUILDARCH)="x64"?>
<Directory Id="styles" Name="styles">
<Component><File Source="$(var.QtPath)\plugins\styles\qwindowsvistastyle.dll" /></Component>
</Directory>
<?endif?>
<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="printsupport" Name="printsupport">
<Component><File Source="$(var.QtPath)\plugins\printsupport\windowsprintersupport.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" />
<!-- Windows Vista Style -->
<?if $(sys.BUILDARCH)="x64"?>
<ComponentRef Id="qwindowsvistastyle.dll" />
<?endif?>
<!-- Printer -->
<ComponentRef Id="windowsprintersupport.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>
<!-- ================================================= Logging ================================================= -->
<!-- Enable verbose logging during installation. The log file is named MSI*.LOG and located in %TEMP% folder. -->
<Property Id="MsiLogging" Value="voicewarmupx" />
</Product>
</Wix>