File: product.wxs

package info (click to toggle)
sqlitebrowser 3.13.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 23,472 kB
  • sloc: cpp: 117,707; ansic: 2,143; yacc: 798; lex: 262; sh: 126; xml: 65; python: 27; makefile: 5
file content (308 lines) | stat: -rw-r--r-- 18,762 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
<?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="405" 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.

        AllowDowngrades="yes"
            When set to yes, any version can be installed over any other version.

        Further info:
            http://wixtoolset.org/documentation/manual/v3/xsd/wix/majorupgrade.html
        -->
        <MajorUpgrade
            Schedule="afterInstallInitialize"
            AllowDowngrades="yes"
        />

        <!-- ========================================= 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)">
                    <!-- Save the install location to the Registry -->
                    <Component Id="RegistryInstallLocation">
                        <RegistryValue Root="HKLM" Key="Software\$(var.Name)" Name="InstallLocation" Value="[INSTALLDIR]" Type="string" />
                    </Component>

                    <Directory Id="styles" Name="styles">
                        <Component><File Source="$(var.QtPath)\plugins\styles\qwindowsvistastyle.dll" /></Component>
                    </Directory>
                    <Directory Id="bearer" Name="bearer">
                        <Component><File Source="$(var.QtPath)\plugins\bearer\qgenericbearer.dll" /></Component>
                    </Directory>
                    <Directory Id="extensions" Name="extensions">
                        <Component><File Source="$(var.SQLitePath)\math.dll" /></Component>
                        <Component><File Source="$(var.SQLitePath)\formats.dll" /></Component>
                        <Component><File Source="$(var.SQLitePath)\fileio.dll" /></Component>
                    </Directory>
                    <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.QtPath)\bin\Qt5Svg.dll" /></Component>
		    <!-- OpenSSL 1.1.1 -->
                    <?if $(sys.BUILDARCH)="x64"?>
                        <Component><File Id="libcrypto.dll" Source="$(var.OpenSSLPath)\libcrypto-1_1-x64.dll" /></Component>
                        <Component><File Id="libssl.dll" Source="$(var.OpenSSLPath)\libssl-1_1-x64.dll" /></Component>
                    <?elseif $(sys.BUILDARCH)="x86"?>
                        <Component><File Id="libcrypto.dll" Source="$(var.OpenSSLPath)\libcrypto-1_1.dll" /></Component>
                        <Component><File Id="libssl.dll" Source="$(var.OpenSSLPath)\libssl-1_1.dll" /></Component>
                    <?endif?>
                    <Component><File Source="$(var.SQLCipherPath)\sqlcipher.dll" /></Component>
                    <Component><File Source="$(var.SQLitePath)\sqlite3.dll" /></Component>
                    <Component><File Source="$(var.SQLiteExePath)\DB Browser for SQLite.exe" Checksum="yes" /></Component>
                    <Component><File Source="$(var.SQLCipherExePath)\DB Browser for SQLCipher.exe" Checksum="yes" /></Component>
                </Directory>
            </Directory>
            <Directory Id="DesktopFolder">
                <Component Id="SQLiteDesktopShortcut" Transitive="yes">
                    <Condition>SHORTCUT_SQLITE_DESKTOP</Condition>
                    <Shortcut Id="SLDSC" Name="DB Browser (SQLite)" Description="$(var.AppComments)" Target="[INSTALLDIR]DB Browser for SQLite.exe" WorkingDirectory="INSTALLDIR" />
                    <RegistryValue Root="HKLM" Key="Software\$(var.Name)" Name="SQLiteDesktopShortcut" Type="integer" Value="1" KeyPath="yes"/>
                </Component>
                <Component Id="SQLCipherDesktopShortcut" Transitive="yes">
                    <Condition>SHORTCUT_SQLCIPHER_DESKTOP</Condition>
                    <Shortcut Id="SCDSC" Name="DB Browser (SQLCipher)" Description="$(var.AppComments)" Target="[INSTALLDIR]DB Browser for SQLCipher.exe" WorkingDirectory="INSTALLDIR" />
                    <RegistryValue Root="HKLM" Key="Software\$(var.Name)" Name="SQLCipherDesktopShortcut" Type="integer" Value="1" KeyPath="yes"/>
                </Component>
            </Directory>
            <Directory Id="ProgramMenuFolder">
                <Component Id="SQLiteProgramMenuShortcut" Transitive="yes">
                    <Condition>SHORTCUT_SQLITE_PROGRAMMENU</Condition>
                    <Shortcut Id="SLPMSC" Name="DB Browser (SQLite)" Description="$(var.AppComments)" Target="[INSTALLDIR]DB Browser for SQLite.exe" WorkingDirectory="INSTALLDIR" />
                    <RegistryValue Root="HKLM" Key="Software\$(var.Name)" Name="SQLiteProgramMenuShortcut" Type="integer" Value="1" KeyPath="yes"/>
                </Component>
                <Component Id="SQLCipherProgramMenuShortcut" Transitive="yes">
                    <Condition>SHORTCUT_SQLCIPHER_PROGRAMMENU</Condition>
                    <Shortcut Id="SCPMSC" Name="DB Browser (SQLCipher)" Description="$(var.AppComments)" Target="[INSTALLDIR]DB Browser for SQLCipher.exe" WorkingDirectory="INSTALLDIR" />
                    <RegistryValue Root="HKLM" Key="Software\$(var.Name)" Name="SQLCipherProgramMenuShortcut" 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="Extensions" Title="SQLite Extensions" Description="SQLite runtime loadable extensions" AllowAdvertise="no" Display="expand">
                <Feature Id="MathExtension" Title="Math" Description="Provide mathematical and string extension functions for SQL queries." AllowAdvertise="no">
                    <ComponentRef Id="math.dll" />
                </Feature>
                <Feature Id="FormatsExtension" Title="Formats" Description="Provide additional field display formats." AllowAdvertise="no">
                    <ComponentRef Id="formats.dll" />
                </Feature>
                <Feature Id="FileioExtension" Title="Fileio" Description="Implements SQL functions readfile(), writefile(), and eponymous virtual type 'fsdir'." AllowAdvertise="no">
                    <ComponentRef Id="fileio.dll" />
                </Feature>
            </Feature>

            <!-- Registry -->
            <ComponentRef Id="RegistryInstallLocation" />

            <!-- Shortcuts -->
            <ComponentRef Id="SQLiteDesktopShortcut" />
            <ComponentRef Id="SQLiteProgramMenuShortcut" />
            <ComponentRef Id="SQLCipherDesktopShortcut" />
            <ComponentRef Id="SQLCipherProgramMenuShortcut" />

            <!-- Translations -->
            <ComponentGroupRef Id="TranslationsGroup" />

            <!-- Bearer -->
            <ComponentRef Id="qgenericbearer.dll" />
            <!-- 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 -->
                <ComponentRef Id="qwindowsvistastyle.dll" />
            <!-- 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" />
            <ComponentRef Id="Qt5Svg.dll" />
            <!-- OpenSSL -->
            <ComponentRef Id="libcrypto.dll" />
            <ComponentRef Id="libssl.dll" />
            <!-- SQLite & SQLCipher -->
            <ComponentRef Id="sqlcipher.dll" />
            <ComponentRef Id="sqlite3.dll" />
            <!-- Application -->
            <ComponentRef Id="DB_Browser_for_SQLite.exe" />
            <ComponentRef Id="DB_Browser_for_SQLCipher.exe" />
        </Feature>

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

        <!-- License file -->
        <WixVariable Id="WixUILicenseRtf" Value="license.rtf" />
        <!-- Banner image -->
        <WixVariable Id="WixUIBannerBmp" Value="banner.bmp" />
        <!-- Background image -->
        <WixVariable Id="WixUIDialogBmp" Value="background.bmp" />

        <UI>
            <!-- Standard Dialog Set -->
            <UIRef Id="WixUI_FeatureTree" />

            <!-- Shortcuts Dialog -->
            <DialogRef Id="ShortcutsDialog" />

            <!-- Show the Shortcuts dialog after "LicenseAgreementDlg" and before "CustomizeDlg" dialog -->
            <Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="ShortcutsDialog">LicenseAccepted = "1"</Publish>
            <Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="ShortcutsDialog" Order="2">NOT Installed</Publish>

            <!-- Restore the previous settings for the shortcuts -->
            <Property Id="SHORTCUT_SQLITE_DESKTOP" Secure="yes">
                <RegistrySearch Id="RS_SC_SL_DT" Root="HKLM" Key="Software\$(var.Name)" Name="SQLiteDesktopShortcut" Type="raw" />
            </Property>
            <Property Id="SHORTCUT_SQLITE_PROGRAMMENU" Secure="yes" Value="true">
                <RegistrySearch Id="RS_SC_SL_PM" Root="HKLM" Key="Software\$(var.Name)" Name="SQLiteProgramMenuShortcut" Type="raw" />
            </Property>
            <Property Id="SHORTCUT_SQLCIPHER_DESKTOP" Secure="yes">
                <RegistrySearch Id="RS_SC_SC_DT" Root="HKLM" Key="Software\$(var.Name)" Name="SQLCipherDesktopShortcut" Type="raw" />
            </Property>
            <Property Id="SHORTCUT_SQLCIPHER_PROGRAMMENU" Secure="yes" Value="true">
                <RegistrySearch Id="RS_SC_SC_PM" Root="HKLM" Key="Software\$(var.Name)" Name="SQLCipherProgramMenuShortcut" Type="raw" />
            </Property>

            <!-- Optional text, shown at the end of installation -->
            <Property Id="WIXUI_EXITDIALOGOPTIONALTEXT" Value="Thank you for installing $(var.Name)." />
        </UI>

    <!-- ===================================== 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" />

    <!-- ======================================== Remove old NSIS installer ======================================== -->
    <!--
        When the application is installed using the NSIS installer, the installer writes a key in the registry. We will
        use this fact to check if an older version (up to v3.10.1) of the application is installed. If found, we will
        remove it before installing the application with the new MSI installer.

        NSIS installer writes the following key "HKLM\Software\<Company>\<Product>" in the registry after installation.
        So the right key to search for is "HKLM\Software\DB Browser for SQLite Team\DB Browser for SQLite".

        But the installer itself is a 32-bit application, and it can't write to the 64-bit registry. This works without
        a problem on 32-bit Windows. On 64-bit Winodws however, the key is written in the 32-bit registry, under the
        "Wow6432Node" key.

        Therefore, the `Win64="no"` attribute is needed to disable searching in the 64-bit registry. On 32-bit Windows
        the right key is searched, and on 64-bit Windows the same key is searched but under the "Wow6432Node" key.
    -->

        <!-- Search the registry to find the location of NSIS installation folder, and set "NSIS_INSTALLDIR" to its path. -->
        <Property Id="NSIS_INSTALLDIR">
            <RegistrySearch Id="RS_NSIS" Root="HKLM" Key="Software\DB Browser for SQLite Team\DB Browser for SQLite" Win64="no" Type="raw" />
        </Property>

        <!-- If registry search was successful, "NSIS_UNINSTALLER" property will hold the full path to "Uninstall.exe" -->
        <SetProperty Id="NSIS_UNINSTALLER" Value="[NSIS_INSTALLDIR]\Uninstall.exe" After="AppSearch">NSIS_INSTALLDIR</SetProperty>

        <!-- Run "Uninstall.exe /S" to silently remove the older version of the application. -->
        <CustomAction Id="CA_NSIS_UNINSTALL" Property="NSIS_UNINSTALLER" ExeCommand="/S" Execute="deferred" Impersonate="no" />

        <!-- Schedule the custom action above to run after "RemoveExistingProducts". -->
        <InstallExecuteSequence>
            <Custom Action='CA_NSIS_UNINSTALL' After='RemoveExistingProducts'>NSIS_INSTALLDIR</Custom>
        </InstallExecuteSequence>

    </Product>

</Wix>