mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Prevent the portable installer from running on windows older than w10
This commit is contained in:
parent
58e8bf98cd
commit
baf07dde67
@ -76,9 +76,6 @@ EXE_MANIFEST = '''\
|
||||
</trustInfo>
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<supportedOS Id="{w7}"/>
|
||||
<supportedOS Id="{w8}"/>
|
||||
<supportedOS Id="{w81}"/>
|
||||
<supportedOS Id="{w10}"/>
|
||||
<windowsSettings xmlns:ws2="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
|
||||
<ws2:longPathAware>true</ws2:longPathAware>
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include <io.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <VersionHelpers.h>
|
||||
|
||||
#include <easylzma/decompress.h>
|
||||
#include "XUnzip.h"
|
||||
@ -525,6 +526,7 @@ int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine
|
||||
WCHAR buf[4*MAX_PATH] = {0}, mb_msg[4*MAX_PATH] = {0}, fdest[4*MAX_PATH] = {0};
|
||||
|
||||
if (!load_data(&cdata, &csz)) return ret;
|
||||
if (!IsWindows10OrGreater()) { show_error(L"Your version of Windows is tool old. calibre requires Windows 10 or greater."); return ret; }
|
||||
|
||||
hr = CoInitialize(NULL);
|
||||
if (FAILED(hr)) { show_error(L"Failed to initialize COM"); return ret; }
|
||||
|
@ -14,7 +14,6 @@ if is64bit:
|
||||
UPGRADE_CODE = '5DD881FF-756B-4097-9D82-8C0F11D521EA'
|
||||
else:
|
||||
UPGRADE_CODE = 'BEB2A80D-E902-4DAD-ADF9-8BD2DA42CFE1'
|
||||
MINVERHUMAN = 'Windows 10'
|
||||
calibre_constants = globals()['calibre_constants']
|
||||
|
||||
CANDLE = WIXP + r'\bin\candle.exe'
|
||||
@ -38,7 +37,9 @@ def create_installer(env):
|
||||
upgrade_code=UPGRADE_CODE,
|
||||
ProgramFilesFolder='ProgramFiles64Folder' if is64bit else 'ProgramFilesFolder',
|
||||
x64=' 64bit' if is64bit else '',
|
||||
minverhuman=MINVERHUMAN,
|
||||
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',
|
||||
|
Loading…
x
Reference in New Issue
Block a user