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/fonFileLib.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/fonFileLib.py')
-rw-r--r-- | devtools/create_bladerunner/subtitles/fontCreator/fonFileLib.py | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/devtools/create_bladerunner/subtitles/fontCreator/fonFileLib.py b/devtools/create_bladerunner/subtitles/fontCreator/fonFileLib.py index 9c27062bc2..7b41e8cbdb 100644 --- a/devtools/create_bladerunner/subtitles/fontCreator/fonFileLib.py +++ b/devtools/create_bladerunner/subtitles/fontCreator/fonFileLib.py @@ -1,10 +1,38 @@ #!/usr/bin/env python2.7 # -*- coding: UTF-8 -*- # -import os, sys, shutil -import struct +import os, sys + +shutilLibFound = False +structLibFound = False +imagePilLibFound = 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 + +if (not shutilLibFound) or (not structLibFound) or (not imagePilLibFound): + sys.stdout.write("Error:: Errors were found when trying to import required python libraries\n") + sys.exit(1) + from struct import * -import Image my_module_version = "0.50" my_module_name = "fonFileLib" @@ -205,7 +233,7 @@ if __name__ == '__main__': # assumes a file of name TAHOMA24.FON in same directory inFONFile = None #inFONFileName = 'TAHOMA24.FON' # USED IN CREDIT END-TITLES and SCORERS BOARD AT POLICE STATION - #inFONFileName = 'TAHOMA18.FON' # USED IN CREDIT END-TITLES + #inFONFileName = 'TAHOMA18.FON' # USED IN CREDIT END-TITLES #inFONFileName = '10PT.FON' # BLADE RUNNER UNUSED FONT? #inFONFileName = 'KIA6PT.FON' # BLADE RUNNER MAIN FONT inFONFileName = 'SUBTLS_E.FON' # Subtitles font custom |