mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Windows installer: Remember and use previous installation folder when upgrading
This commit is contained in:
parent
fb26c223a7
commit
a6ece012ea
@ -26,6 +26,11 @@
|
|||||||
</Upgrade>
|
</Upgrade>
|
||||||
<CustomAction Id="PreventDowngrading" Error="Newer version already installed."/>
|
<CustomAction Id="PreventDowngrading" Error="Newer version already installed."/>
|
||||||
|
|
||||||
|
<Property Id="APPLICATIONFOLDER">
|
||||||
|
<RegistrySearch Id='calibreInstDir' Type='raw'
|
||||||
|
Root='HKLM' Key="Software\{app}\Installer" Name="InstallPath" />
|
||||||
|
</Property>
|
||||||
|
|
||||||
<Directory Id='TARGETDIR' Name='SourceDir'>
|
<Directory Id='TARGETDIR' Name='SourceDir'>
|
||||||
<Merge Id="VCRedist" SourceFile="{crt_msm}" DiskId="1" Language="0"/>
|
<Merge Id="VCRedist" SourceFile="{crt_msm}" DiskId="1" Language="0"/>
|
||||||
<Directory Id='ProgramFilesFolder' Name='PFiles'>
|
<Directory Id='ProgramFilesFolder' Name='PFiles'>
|
||||||
@ -43,6 +48,9 @@
|
|||||||
<Environment Id='UpdatePath' Name='PATH' Action='set' System='yes' Part='last' Value='[APPLICATIONFOLDER]' />
|
<Environment Id='UpdatePath' Name='PATH' Action='set' System='yes' Part='last' Value='[APPLICATIONFOLDER]' />
|
||||||
<RegistryValue Root="HKCU" Key="Software\Microsoft\{app}" Name="system_path_updated" Type="integer" Value="1" KeyPath="yes"/>
|
<RegistryValue Root="HKCU" Key="Software\Microsoft\{app}" Name="system_path_updated" Type="integer" Value="1" KeyPath="yes"/>
|
||||||
</Component>
|
</Component>
|
||||||
|
<Component Id="RememberInstallDir" Guid="*">
|
||||||
|
<RegistryValue Root="HKLM" Key="Software\{app}\Installer" Name="InstallPath" Type="string" Value="[APPLICATIONFOLDER]" KeyPath="yes"/>
|
||||||
|
</Component>
|
||||||
</DirectoryRef>
|
</DirectoryRef>
|
||||||
|
|
||||||
<DirectoryRef Id="ApplicationProgramsFolder">
|
<DirectoryRef Id="ApplicationProgramsFolder">
|
||||||
@ -87,7 +95,8 @@
|
|||||||
ConfigurableDirectory="APPLICATIONFOLDER">
|
ConfigurableDirectory="APPLICATIONFOLDER">
|
||||||
|
|
||||||
<Feature Id="MainApplication" Title="Program Files" Level="1"
|
<Feature Id="MainApplication" Title="Program Files" Level="1"
|
||||||
Description="All the files need to run {app}" Absent="disallow">
|
Description="All the files needed to run {app}" Absent="disallow">
|
||||||
|
<ComponentRef Id="RememberInstallDir"/>
|
||||||
</Feature>
|
</Feature>
|
||||||
|
|
||||||
<Feature Id="VCRedist" Title="Visual C++ 8.0 Runtime" AllowAdvertise="no" Display="hidden" Level="1">
|
<Feature Id="VCRedist" Title="Visual C++ 8.0 Runtime" AllowAdvertise="no" Display="hidden" Level="1">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user