diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 3c4cb32fda..c9cfb6fa8a 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -103,7 +103,7 @@ def parseopts(args): global VERSION,COMPRESSOR,THREADCOUNT,OSXTARGET longopts = [ "help","distributor=","verbose","runtime","osxtarget=", - "optimize=","everything","nothing","installer","rtdist", + "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","threads=","outputdir=","override="] anything = 0 optimize = "" @@ -125,6 +125,7 @@ def parseopts(args): elif (option=="--threads"): THREADCOUNT=int(value) elif (option=="--outputdir"): SetOutputDir(value.strip()) elif (option=="--osxtarget"): OSXTARGET=value.strip() + elif (option=="--nocolor"): DisableColors() elif (option=="--version"): VERSION=value if (len(VERSION.split(".")) != 3): raise "usage" diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index a6cb19c78b..b3dc8dea70 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -120,6 +120,10 @@ try: HAVE_COLORS=sys.stdout.isatty() except: pass +def DisableColors(): + global HAVE_COLORS + HAVE_COLORS = False + def GetColor(color = None): if not HAVE_COLORS: return "" if color != None: color = color.lower()