1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-13 01:36:27 +00:00

Improved error messages about missing dependencies

This commit is contained in:
Paweł Jastrzębski
2013-11-06 13:17:58 +01:00
parent 5b44e4bddd
commit 1b1ed7c4ab
5 changed files with 31 additions and 1 deletions

6
kcc.py
View File

@@ -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

View File

@@ -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)

View File

@@ -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!"

View File

@@ -21,11 +21,20 @@ __copyright__ = '2012-2013, Ciro Mattia Gonano <ciromattia@gmail.com>, 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!"

View File

@@ -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",