|
1 | 1 | <?if $(sys.BUILDARCH) = x64 ?>
|
2 | 2 | <?define OpenSSLSuffix = "-x64" ?>
|
| 3 | + <!-- Separate upgrade code / component ID created for x64 installer because both 32- |
| 4 | + and 64-bit shell extensions are installed on x64 machine and x64 installer |
| 5 | + removes x86 component installed directly before it if same guids are used. |
| 6 | + --> |
| 7 | + <?define ShellExtId = "{5606A547-759D-43DA-AEEB-D3BF1D1E816D}" ?> |
3 | 8 | <?else?>
|
4 | 9 | <?define OpenSSLSuffix = "" ?>
|
| 10 | + <?define ShellExtId = "{310AAB39-76FE-401B-8A7F-0F578C5F6AB5}" ?> |
5 | 11 | <?endif?>
|
6 | 12 |
|
7 | 13 | <?if $(env.VisualStudioVersion) = "17.0" ?>
|
|
23 | 29 | <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
|
24 | 30 | <Icon Id="qdigidoc4.ico" SourceFile="$(var.ico_path)" />
|
25 | 31 | <Property Id="ARPPRODUCTICON" Value="qdigidoc4.ico" />
|
26 |
| - <Property Id="APPLICATIONNAME" Value="qdigidoc4" /> |
27 | 32 | <Property Id="DESKTOP_SHORTCUT" Value="0" />
|
| 33 | + <Property Id="SHELL_EXTENSION" Value="0" /> |
28 | 34 | <MajorUpgrade AllowSameVersionUpgrades="yes" Schedule="afterInstallInitialize" DowngradeErrorMessage=
|
29 | 35 | "A newer version of [ProductName] is already installed. If you are trying to downgrade, please uninstall the newer version first." />
|
30 | 36 | <Launch Condition="Installed OR (VersionNT >= 601)" Message="[ProductName] requires Windows 7 or higher." />
|
|
33 | 39 | <!-- Desktop shortcut -->
|
34 | 40 | <StandardDirectory Id="DesktopFolder">
|
35 | 41 | <Component Id="DesktopShortcut4" Guid="7B821ED0-4838-4290-997C-AA4119F99DAD" Transitive="yes" Condition="DESKTOP_SHORTCUT = 1">
|
36 |
| - <Shortcut Id="ClientDesktopShortcut4" Name="DigiDoc4" Target="[!qdigidoc4.exe]" WorkingDirectory="APPLICATIONFOLDER" /> |
37 |
| - <RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[APPLICATIONNAME]" Name="DesktopShortcut4" Value="1" Type="integer" KeyPath="yes" /> |
| 42 | + <Shortcut Id="ClientDesktopShortcut4" Name="DigiDoc4" Target="[!qdigidoc4.exe]" WorkingDirectory="INSTALLFOLDER" /> |
| 43 | + <RegistryValue Root="HKCU" Key="Software\[Manufacturer]\qdigidoc4" Name="DesktopShortcut4" Value="1" Type="integer" KeyPath="yes" /> |
38 | 44 | </Component>
|
39 | 45 | </StandardDirectory>
|
40 | 46 |
|
41 | 47 | <StandardDirectory Id="ProgramFiles6432Folder">
|
42 |
| - <Directory Id="APPLICATIONFOLDER" Name="DigiDoc4 Client" FileSource="$(var.libs_path)"> |
| 48 | + <Directory Id="INSTALLFOLDER" Name="!(bind.Property.ProductName)" FileSource="$(var.libs_path)"> |
43 | 49 | <Component Id="Application4" Guid="316B00EB-7519-476F-BCA5-7C8C1A0DF5AB" Transitive="yes">
|
44 | 50 | <File Id="qdigidoc4.exe" Source="$(var.client_path)" KeyPath="yes">
|
45 | 51 | <Shortcut Id="ClientStartMenu4" Advertise="yes" Name="DigiDoc4" Icon="qdigidoc4.ico"
|
46 |
| - Directory="ProgramMenuFolder" WorkingDirectory="APPLICATIONFOLDER" /> |
| 52 | + Directory="ProgramMenuFolder" WorkingDirectory="INSTALLFOLDER" /> |
47 | 53 | </File>
|
48 | 54 | <ProgId Id="qdigidoc4.adoc" Description="DigiDoc signed document" Icon="qdigidoc4.exe" IconIndex="1">
|
49 | 55 | <Extension Id="adoc" ContentType="application/vnd.lt.archyvai.adoc-2008">
|
|
162 | 168 | <File Source="$(var.qt_path)\..\plugins\imageformats\qsvg$(var.qt_suffix).dll" />
|
163 | 169 | </Component>
|
164 | 170 | </Directory>
|
| 171 | +<?endif?> |
| 172 | +<?ifdef var.ShellExt ?> |
| 173 | + <Component Id="ShellExt" Guid="7adaa2cc-c3f5-4e2e-a38d-5d9c9730444e" Transitive="yes" Condition="SHELL_EXTENSION = 1"> |
| 174 | + <!--Does not work with multiple files --> |
| 175 | + <!--RegistryValue Root='HKCR' Key='*\shell\[ProductName]' Type='string' Value='Sign with [ProductName]' /> |
| 176 | + <RegistryValue Root='HKCR' Key='*\shell\[ProductName]' Name="Icon" Type='string' Value='"[INSTALLFOLDER]qdigidoc4.exe",0' /> |
| 177 | + <RegistryValue Root='HKCR' Key='*\shell\[ProductName]\command' Type='string' Value='"[INSTALLFOLDER]qdigidoc4.exe" "%1"' /--> |
| 178 | + <File Source="$(var.ShellExt)"/> |
| 179 | + <RegistryKey Root="HKCR" Key="CLSID\$(var.ShellExtId)\InprocServer32"> |
| 180 | + <RegistryValue Type="string" Value="[INSTALLFOLDER]EsteidShellExtension.dll"/> |
| 181 | + <RegistryValue Type="string" Name="ThreadingModel" Value="Apartment" /> |
| 182 | + </RegistryKey> |
| 183 | + <RegistryValue Root="HKCR" Key="*\shellex\ContextMenuHandlers\DigiDoc4ShellExtension$(sys.BUILDARCH)" |
| 184 | + Value="$(var.ShellExtId)" Type="string" /> |
| 185 | + <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" |
| 186 | + Name="$(var.ShellExtId)" Value="DigiDoc4 Shell Extension" Type="string" /> |
| 187 | + </Component> |
165 | 188 | <?endif?>
|
166 | 189 | </Directory>
|
167 | 190 | </StandardDirectory>
|
|
176 | 199 | <ComponentRef Id="qwindowsvistastyle.dll" />
|
177 | 200 | <ComponentRef Id="qopensslbackend.dll" />
|
178 | 201 | <ComponentRef Id="imageformats.dll" />
|
| 202 | +<?endif?> |
| 203 | +<?ifdef var.ShellExt ?> |
| 204 | + <ComponentRef Id="ShellExt"/> |
179 | 205 | <?endif?>
|
180 | 206 | </Feature>
|
181 | 207 | </Package>
|
|
0 commit comments