diff --git a/bypy/windows/__main__.py b/bypy/windows/__main__.py index aff1b5a49b..e811bfb604 100644 --- a/bypy/windows/__main__.py +++ b/bypy/windows/__main__.py @@ -76,9 +76,6 @@ EXE_MANIFEST = '''\ - - - true diff --git a/bypy/windows/portable-installer.cpp b/bypy/windows/portable-installer.cpp index 68e5f3c9ec..e695f43382 100644 --- a/bypy/windows/portable-installer.cpp +++ b/bypy/windows/portable-installer.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include #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; } diff --git a/bypy/windows/wix.py b/bypy/windows/wix.py index e057f7f6f9..ad93b0d448 100644 --- a/bypy/windows/wix.py +++ b/bypy/windows/wix.py @@ -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='' if is64bit else '', compression='high',