Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added installer/windows/background.bmp
Binary file not shown.
Binary file added installer/windows/banner.bmp
Binary file not shown.
34 changes: 34 additions & 0 deletions installer/windows/build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
@echo off

:: Set the output MSI and ARCH based on the calling parameter
if "%1"=="" (
echo ERROR: You must select "Win64" or "Win32"
goto :eof
) else if "%1"=="Win32" (
set MSI=DB.Browser.for.SQLite-win32
set ARCH=x86
) else if "%1"=="Win64" (
set MSI=DB.Browser.for.SQLite-win64
set ARCH=x64
) else (
echo ERROR: Unknown ARCH="%1"
goto :eof
)

:: Suppress some ICE checks
:: - 61 (major upgrade)
:: - 03 & 82 (merge module)
:: - 43 & 57 (non-advertised shortcuts)
set ICE=-sice:ICE03 -sice:ICE82 -sice:ICE61 -sice:ICE43 -sice:ICE57

:: Suppress 'light.exe' warning
:: - 1104 (vcredist merge module installer version)
set LIGHT=-sw1104

:: Compile & Link
"%WIX%\bin\candle.exe" -nologo -pedantic -arch %ARCH% product.wxs
"%WIX%\bin\light.exe" -nologo -pedantic %LIGHT% %ICE% -ext WixUIExtension -ext WixUtilExtension product.wixobj -out %MSI%.msi

:: Cleanup
del product.wixobj
del %MSI%.wixpdb
238 changes: 238 additions & 0 deletions installer/windows/license.rtf

Large diffs are not rendered by default.

173 changes: 173 additions & 0 deletions installer/windows/product.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
<?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="ProgramMenuFolder" />
<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>
<Component><File Source="$(var.SQLitePath)\sqlite3.dll" /></Component>
<Component>
<File Source="..\..\Release\DB Browser for SQLite.exe" Checksum="yes" KeyPath="yes">
<Shortcut
Id="StartMenuShortcut"
Name="$(var.Name)"
Description="$(var.AppComments)"
Directory="ProgramMenuFolder"
WorkingDirectory="INSTALLDIR"
Icon="app.ico"
/>
</File>
</Component>
</Directory>
</Directory>
</Directory>

<!-- ============================================== Features =============================================== -->

<Feature Id="VCRedist" Title="Visual C++ Runtime" AllowAdvertise="no" Display="hidden" Level="1">
<MergeRef Id="VCRedist"/>
</Feature>

<Feature Id="Complete" Level="1">
<!-- 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" />
<!-- SQLite -->
<ComponentRef Id="sqlite3.dll" />
<!-- Application -->
<ComponentRef Id="DB_Browser_for_SQLite.exe" />
</Feature>

<!-- ============================================= Installation UI ============================================= -->

<!-- Dialog Set -->
<UIRef Id="WixUI_InstallDir" />

<!-- Default installation directory -->
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />

<!-- 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>
Binary file added installer/windows/resources/background.xcf
Binary file not shown.
Binary file added installer/windows/resources/banner.xcf
Binary file not shown.
Binary file added installer/windows/resources/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 62 additions & 0 deletions installer/windows/variables.wxi
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8"?>
<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">

<?define Name="DB Browser for SQLite" ?>
<?define Team="$(var.Name) Team" ?>
<?define Version="3.10.99" ?>

<!--
=============================================== Add/Remove Programs ================================================
https://www.firegiant.com/wix/tutorial/com-expression-syntax-miscellanea/add-or-remove-programs-entries/

In the Programs and Features Control Panel tool, the application can have various entries like contact information.
-->

<?define AppIcon="..\..\src\iconwin.ico" ?>
<?define AppComments="$(var.Name) is a high quality, visual, open source tool to create, design, and edit database files compatible with SQLite." ?>
<?define AppContact="db4s-dev@sqlitebrowser.org" ?>
<?define AppReadme="https://github.com/sqlitebrowser/sqlitebrowser" ?>
<?define AppHelpLink="https://github.com/sqlitebrowser/sqlitebrowser/wiki" ?>
<?define AppSupportLink="https://github.com/sqlitebrowser/sqlitebrowser/issues" ?>
<?define AppUpdateInfoLink="https://github.com/sqlitebrowser/sqlitebrowser/releases" ?>

<!--
================================================== Visual C++ CRT ==================================================
http://wixtoolset.org/documentation/manual/v3/howtos/redistributables_and_install_checks/install_vcredist.html

To use the application, we must also deploy the files that are required to support it. To deploy redistributable
Visual C++ files, we were using the Visual C++ Redistributable Package (VCRedist_x86.exe or VCRedist_x64.exe) and
silently installing it at the end of the installation. Unfortunately, this package is a self-extracting MSI.
A Windows Installer mutex will prevent us from installing this package from within our application MSI.

Another option is to use redistributable merge modules (.msm files). Merge modules enables the installation of
redistributable Visual C++ DLLs into the "%SYSTEMROOT%\system32\" folder.

VCRedistPath
The Visual C++ runtime merge modules are installed with Visual Studio and are located in this directory.
VCRedistFile
The Visual C++ runtime file. This file is usually named "Microsoft_[VERSION]_CRT_[ARCH].msm". "VERSION" is the
Visual Studio version the application is built with. Use VC120 (version 12.0) if the application is built with
Visual Studio 2013. The build "ARCH" will be set automatically.
-->

<?define VCRedistPath="C:\Program Files (x86)\Common Files\Merge Modules" ?>
<?define VCRedistFile="Microsoft_VC120_CRT_$(sys.BUILDARCH).msm" ?>

<!--
=================================================== Build System ===================================================

Paths for the various libraries the application needs to compile. Change these to match the build machine.
-->

<?if $(sys.BUILDARCH)="x64"?>
<?define QtPath="C:\dev\Qt\5.7\msvc2013_64" ?>
<?define SQLitePath="C:\dev\SQLite-Win64" ?>
<?define OpenSSLPath="C:\dev\OpenSSL-Win64" ?>
<?elseif $(sys.BUILDARCH)="x86"?>
<?define QtPath="C:\dev\Qt\5.7\msvc2013" ?>
<?define SQLitePath="C:\dev\SQLite-Win32" ?>
<?define OpenSSLPath="C:\dev\OpenSSL-Win32" ?>
<?endif?>

</Include>