From 697a74b0c1a5f601d8b370815ca434b14536e935 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 24 Aug 2014 00:47:10 +0530 Subject: [PATCH] Prevent calibre from installing or running on Windows XP as there have been many reports of Qt 5 crashing on Windows XP and Windows XP is now no longer supported by Microsoft. --- setup/installer/windows/wix.py | 5 ++--- src/calibre/gui2/__init__.py | 10 +++++++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/setup/installer/windows/wix.py b/setup/installer/windows/wix.py index aac599ad23..b89a402641 100644 --- a/setup/installer/windows/wix.py +++ b/setup/installer/windows/wix.py @@ -14,10 +14,9 @@ from setup.build_environment import is64bit WIXP = r'C:\Program Files (x86)\WiX Toolset v3.8' if is64bit: UPGRADE_CODE = '5DD881FF-756B-4097-9D82-8C0F11D521EA' - MINVERHUMAN = 'Windows Vista' else: UPGRADE_CODE = 'BEB2A80D-E902-4DAD-ADF9-8BD2DA42CFE1' - MINVERHUMAN = 'Windows XP SP3' +MINVERHUMAN = 'Windows Vista' CANDLE = WIXP+r'\bin\candle.exe' LIGHT = WIXP+r'\bin\light.exe' @@ -42,7 +41,7 @@ class WixMixIn: ProgramFilesFolder = 'ProgramFiles64Folder' if is64bit else 'ProgramFilesFolder', x64 = ' 64bit' if is64bit else '', minverhuman = MINVERHUMAN, - minver = '600' if is64bit else '501', + minver = '600', fix_wix = '' if is64bit else '', compression = self.opts.msi_compression, app_components = components, diff --git a/src/calibre/gui2/__init__.py b/src/calibre/gui2/__init__.py index 21da8b7209..d4d8227f7a 100644 --- a/src/calibre/gui2/__init__.py +++ b/src/calibre/gui2/__init__.py @@ -14,7 +14,7 @@ ORG_NAME = 'KovidsBrain' APP_UID = 'libprs500' from calibre import prints from calibre.constants import (islinux, iswindows, isbsd, isfrozen, isosx, - plugins, config_dir, filesystem_encoding, DEBUG) + plugins, config_dir, filesystem_encoding, DEBUG, isxp) from calibre.utils.config import Config, ConfigProxy, dynamic, JSONConfig from calibre.ebooks.metadata import MetaInformation from calibre.utils.date import UNDEFINED_DATE @@ -926,6 +926,14 @@ class Application(QApplication): self._file_open_paths = [] self._file_open_lock = RLock() + if isxp: + error_dialog(None, _('Windows XP not supported'), '

' + _( + 'calibre versions newer than 2.0 do not run on Windows XP. This is' + ' because the graphics toolkit calibre uses (Qt 5) crashes a lot' + ' on Windows XP. We suggest you stay with calibre 1.48' + ' which works well on Windows XP.') % 'http://download.calibre-ebook.com/1.48.0/', show=True) + raise SystemExit(1) + def load_builtin_fonts(self, scan_for_fonts=False): if scan_for_fonts: from calibre.utils.fonts.scanner import font_scanner