mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Implement a proper check for Win10 in the MSI based on the build number from the registry
This commit is contained in:
parent
baf07dde67
commit
b8c00070d8
@ -26,6 +26,11 @@
|
||||
guarantees of anything. -->
|
||||
<Property Id='REINSTALLMODE' Value='amus'/>
|
||||
|
||||
<!-- get the windows build number -->
|
||||
<Property Id="WINDOWSBUILDNUMBER" Secure="yes">
|
||||
<RegistrySearch Id="BuildNumberSearch" Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion" Name="CurrentBuildNumber" Type="raw" />
|
||||
</Property>
|
||||
|
||||
<Upgrade Id="{upgrade_code}">
|
||||
<UpgradeVersion Maximum="{version}"
|
||||
IncludeMaximum="yes"
|
||||
@ -172,9 +177,9 @@
|
||||
<Property Id='ARPURLUPDATEINFO' Value="https://calibre-ebook.com/download_windows" />
|
||||
<SetProperty Id="ARPINSTALLLOCATION" Value="[APPLICATIONFOLDER]" After="CostFinalize" />
|
||||
|
||||
<Condition
|
||||
Message="This application is only supported on {minverhuman}, or higher.">
|
||||
<![CDATA[Installed OR (VersionNT >= {minver})]]>
|
||||
<Condition Message="calibre requires Windows 10 or newer.">
|
||||
<!-- See https://en.wikipedia.org/wiki/Windows_10_version_history for build numbers -->
|
||||
<![CDATA[Installed OR (WINDOWSBUILDNUMBER >= 10240)]]>
|
||||
</Condition>
|
||||
<!-- On 64 bit installers there is a bug in WiX that causes the
|
||||
WixSetDefaultPerMachineFolder action to incorrectly set
|
||||
|
@ -37,10 +37,6 @@ def create_installer(env):
|
||||
upgrade_code=UPGRADE_CODE,
|
||||
ProgramFilesFolder='ProgramFiles64Folder' if is64bit else 'ProgramFilesFolder',
|
||||
x64=' 64bit' if is64bit else '',
|
||||
minverhuman='Windows 10',
|
||||
# We cant actually check for windows 10 because of
|
||||
# https://community.flexera.com/t5/InstallShield-Knowledge-Base/Identifying-Windows-10-with-MSI/ta-p/4166
|
||||
minver='603',
|
||||
fix_wix='<Custom Action="OverwriteWixSetDefaultPerMachineFolder" After="WixSetDefaultPerMachineFolder" />' if is64bit else '',
|
||||
compression='high',
|
||||
app_components=components,
|
||||
|
Loading…
x
Reference in New Issue
Block a user