diff options
author | antoniou79 | 2018-12-28 19:07:12 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2019-01-06 17:12:02 +0100 |
commit | 24e3118b0889117208b66f7aa5dc68b79b8bb9d9 (patch) | |
tree | d6bb284983acf9330600ee5f5526f83a46302b79 /devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py | |
parent | d724df4662dcb2777f635d7a8ec08788e726e869 (diff) | |
download | scummvm-rg350-24e3118b0889117208b66f7aa5dc68b79b8bb9d9.tar.gz scummvm-rg350-24e3118b0889117208b66f7aa5dc68b79b8bb9d9.tar.bz2 scummvm-rg350-24e3118b0889117208b66f7aa5dc68b79b8bb9d9.zip |
DEVTOOLS: Bladerunner python libs in try except
Also added missing (renamed) script for MIX packer
Diffstat (limited to 'devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py')
-rw-r--r-- | devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py | 45 |
1 files changed, 40 insertions, 5 deletions
diff --git a/devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py b/devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py index 629f0e25c5..4687c01c7e 100644 --- a/devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py +++ b/devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py @@ -67,12 +67,47 @@ # DONE: make space pixels (var spaceWidthInPixels) into an external param? # DONE: INFO NOTE IT IS NOT POSSIBLE TO have partial transparency -import os, sys, shutil -from os import walk, errno -import Image +import os, sys + +shutilLibFound = False +structLibFound = False +imagePilLibFound = False +reLibFound = False + +try: + import shutil +except ImportError: + print "Error:: Shutil python library is required to be installed!" +else: + shutilLibFound = True + +try: + import struct +except ImportError: + print "Error:: struct python library is required to be installed!" +else: + structLibFound = True + +try: + import Image +except ImportError: + print "Error:: Image python library (PIL) is required to be installed!" +else: + imagePilLibFound = True + +try: + import re +except ImportError: + print "Error:: re (Regular expression operations) python library is required to be installed!" +else: + reLibFound = True + +if (not shutilLibFound) or (not structLibFound) or (not imagePilLibFound) or (not reLibFound): + sys.stdout.write("Error:: Errors were found when trying to import required python libraries\n") + sys.exit(1) + +from os import walk, errno, path from struct import * -import re -import os.path from fonFileLib import * company_email = "classic.adventures.in.greek@gmail.com" |