mirror of
https://github.com/ciromattia/kcc
synced 2025-12-23 14:41:47 +00:00
Improved error messages about missing dependencies
This commit is contained in:
6
kcc.py
6
kcc.py
@@ -30,6 +30,12 @@ try:
|
|||||||
from PyQt4 import QtCore, QtGui, QtNetwork
|
from PyQt4 import QtCore, QtGui, QtNetwork
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print "ERROR: PyQT4 is not installed!"
|
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)
|
exit(1)
|
||||||
from kcc import KCC_gui
|
from kcc import KCC_gui
|
||||||
from multiprocessing import freeze_support
|
from multiprocessing import freeze_support
|
||||||
|
|||||||
@@ -45,6 +45,12 @@ try:
|
|||||||
from psutil import TOTAL_PHYMEM, Popen
|
from psutil import TOTAL_PHYMEM, Popen
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print "ERROR: Psutil is not installed!"
|
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)
|
exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,14 @@ try:
|
|||||||
from PIL import Image, ImageStat
|
from PIL import Image, ImageStat
|
||||||
if tuple(map(int, ('2.2.1'.split(".")))) > tuple(map(int, (Image.PILLOW_VERSION.split(".")))):
|
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!"
|
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)
|
exit(1)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print "ERROR: Pillow is not installed!"
|
print "ERROR: Pillow is not installed!"
|
||||||
|
|||||||
@@ -21,11 +21,20 @@ __copyright__ = '2012-2013, Ciro Mattia Gonano <ciromattia@gmail.com>, Pawel Jas
|
|||||||
__docformat__ = 'restructuredtext en'
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
from sys import platform
|
||||||
try:
|
try:
|
||||||
# noinspection PyUnresolvedReferences
|
# noinspection PyUnresolvedReferences
|
||||||
from PIL import Image, ImageOps, ImageStat, ImageChops
|
from PIL import Image, ImageOps, ImageStat, ImageChops
|
||||||
if tuple(map(int, ('2.2.1'.split(".")))) > tuple(map(int, (Image.PILLOW_VERSION.split(".")))):
|
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!"
|
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)
|
exit(1)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print "ERROR: Pillow is not installed!"
|
print "ERROR: Pillow is not installed!"
|
||||||
|
|||||||
3
setup.py
3
setup.py
@@ -55,7 +55,8 @@ elif platform == "win32":
|
|||||||
['other/UnRAR.exe', 'UnRAR.exe'],
|
['other/UnRAR.exe', 'UnRAR.exe'],
|
||||||
['other/7za.exe', '7za.exe'],
|
['other/7za.exe', '7za.exe'],
|
||||||
['other/Additional-LICENSE.txt', 'Additional-LICENSE.txt']
|
['other/Additional-LICENSE.txt', 'Additional-LICENSE.txt']
|
||||||
], "compressed": True}},
|
], "compressed": True,
|
||||||
|
"excludes": ['Tkinter']}},
|
||||||
executables=[Executable(MAIN,
|
executables=[Executable(MAIN,
|
||||||
base=base,
|
base=base,
|
||||||
targetName="KCC.exe",
|
targetName="KCC.exe",
|
||||||
|
|||||||
Reference in New Issue
Block a user