diff --git a/kcc.py b/kcc.py index ac383b2..771c42f 100644 --- a/kcc.py +++ b/kcc.py @@ -30,6 +30,12 @@ try: from PyQt4 import QtCore, QtGui, QtNetwork except ImportError: print "ERROR: PyQT4 is not installed!" + if sys.platform.startswith('linux'): + import Tkinter + import tkMessageBox + importRoot = Tkinter.Tk() + importRoot.withdraw() + tkMessageBox.showerror("KCC - Error", "PyQT4 is not installed!") exit(1) from kcc import KCC_gui from multiprocessing import freeze_support diff --git a/kcc/KCC_gui.py b/kcc/KCC_gui.py index 268f72a..d00f4dc 100644 --- a/kcc/KCC_gui.py +++ b/kcc/KCC_gui.py @@ -45,6 +45,12 @@ try: from psutil import TOTAL_PHYMEM, Popen except ImportError: print "ERROR: Psutil is not installed!" + if sys.platform.startswith('linux'): + import Tkinter + import tkMessageBox + importRoot = Tkinter.Tk() + importRoot.withdraw() + tkMessageBox.showerror("KCC - Error", "Psutil is not installed!") exit(1) diff --git a/kcc/comic2panel.py b/kcc/comic2panel.py index d36bc1c..f831c28 100644 --- a/kcc/comic2panel.py +++ b/kcc/comic2panel.py @@ -33,6 +33,14 @@ try: from PIL import Image, ImageStat if tuple(map(int, ('2.2.1'.split(".")))) > tuple(map(int, (Image.PILLOW_VERSION.split(".")))): print "ERROR: Pillow 2.2.1 or newer is required!" + if sys.platform.startswith('linux'): + #noinspection PyUnresolvedReferences + import Tkinter + #noinspection PyUnresolvedReferences + import tkMessageBox + importRoot = Tkinter.Tk() + importRoot.withdraw() + tkMessageBox.showerror("KCC - Error", "Pillow 2.2.1 or newer is required!") exit(1) except ImportError: print "ERROR: Pillow is not installed!" diff --git a/kcc/image.py b/kcc/image.py index 1c10b68..3a3ed21 100755 --- a/kcc/image.py +++ b/kcc/image.py @@ -21,11 +21,20 @@ __copyright__ = '2012-2013, Ciro Mattia Gonano , Pawel Jas __docformat__ = 'restructuredtext en' import os +from sys import platform try: # noinspection PyUnresolvedReferences from PIL import Image, ImageOps, ImageStat, ImageChops if tuple(map(int, ('2.2.1'.split(".")))) > tuple(map(int, (Image.PILLOW_VERSION.split(".")))): print "ERROR: Pillow 2.2.1 or newer is required!" + if platform.startswith('linux'): + #noinspection PyUnresolvedReferences + import Tkinter + #noinspection PyUnresolvedReferences + import tkMessageBox + importRoot = Tkinter.Tk() + importRoot.withdraw() + tkMessageBox.showerror("KCC - Error", "Pillow 2.2.1 or newer is required!") exit(1) except ImportError: print "ERROR: Pillow is not installed!" diff --git a/setup.py b/setup.py index 64ebada..ea5749c 100644 --- a/setup.py +++ b/setup.py @@ -55,7 +55,8 @@ elif platform == "win32": ['other/UnRAR.exe', 'UnRAR.exe'], ['other/7za.exe', '7za.exe'], ['other/Additional-LICENSE.txt', 'Additional-LICENSE.txt'] - ], "compressed": True}}, + ], "compressed": True, + "excludes": ['Tkinter']}}, executables=[Executable(MAIN, base=base, targetName="KCC.exe",