aboutsummaryrefslogtreecommitdiff
path: root/methods.py
diff options
context:
space:
mode:
authorBil Bas (Spooner)2015-02-01 20:29:11 +0000
committerBil Bas (Spooner)2015-02-01 20:29:11 +0000
commit2c1a3dfed6f9a474ace9123b46edca77be548d3e (patch)
treee1cd0db9257a5a241a1db3906041dbb9c1295c74 /methods.py
parentaf7c8bdf236b7c572bc33a44e3bb64fecdaa99d9 (diff)
parent67d357191ff74b2cfc80015941363a97e7ee19fd (diff)
downloadgodot-2c1a3dfed6f9a474ace9123b46edca77be548d3e.tar.gz
godot-2c1a3dfed6f9a474ace9123b46edca77be548d3e.tar.zst
godot-2c1a3dfed6f9a474ace9123b46edca77be548d3e.zip
Diffstat (limited to 'methods.py')
-rwxr-xr-xmethods.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/methods.py b/methods.py
index 0c0c5a05e..da1491e3f 100755
--- a/methods.py
+++ b/methods.py
@@ -1316,3 +1316,39 @@ def save_active_platforms(apnames,ap):
logow = open(wf,"wb")
logow.write(str)
+
+def colored(sys,env):
+
+ #If the output is not a terminal, do nothing
+ if not sys.stdout.isatty():
+ return
+
+ colors = {}
+ colors['cyan'] = '\033[96m'
+ colors['purple'] = '\033[95m'
+ colors['blue'] = '\033[94m'
+ colors['green'] = '\033[92m'
+ colors['yellow'] = '\033[93m'
+ colors['red'] = '\033[91m'
+ colors['end'] = '\033[0m'
+
+ compile_source_message = '%sCompiling %s==> %s$SOURCE%s' % (colors['blue'], colors['purple'], colors['yellow'], colors['end'])
+ java_compile_source_message = '%sCompiling %s==> %s$SOURCE%s' % (colors['blue'], colors['purple'], colors['yellow'], colors['end'])
+ compile_shared_source_message = '%sCompiling shared %s==> %s$SOURCE%s' % (colors['blue'], colors['purple'], colors['yellow'], colors['end'])
+ link_program_message = '%sLinking Program %s==> %s$TARGET%s' % (colors['red'], colors['purple'], colors['yellow'], colors['end'])
+ link_library_message = '%sLinking Static Library %s==> %s$TARGET%s' % (colors['red'], colors['purple'], colors['yellow'], colors['end'])
+ ranlib_library_message = '%sRanlib Library %s==> %s$TARGET%s' % (colors['red'], colors['purple'], colors['yellow'], colors['end'])
+ link_shared_library_message = '%sLinking Shared Library %s==> %s$TARGET%s' % (colors['red'], colors['purple'], colors['yellow'], colors['end'])
+ java_library_message = '%sCreating Java Archive %s==> %s$TARGET%s' % (colors['red'], colors['purple'], colors['yellow'], colors['end'])
+
+ env.Append( CXXCOMSTR=[compile_source_message] )
+ env.Append( CCCOMSTR=[compile_source_message] )
+ env.Append( SHCCCOMSTR=[compile_shared_source_message] )
+ env.Append( SHCXXCOMSTR=[compile_shared_source_message] )
+ env.Append( ARCOMSTR=[link_library_message] )
+ env.Append( RANLIBCOMSTR=[ranlib_library_message] )
+ env.Append( SHLINKCOMSTR=[link_shared_library_message] )
+ env.Append( LINKCOMSTR=[link_program_message] )
+ env.Append( JARCOMSTR=[java_library_message] )
+ env.Append( JAVACCOMSTR=[java_compile_source_message] )
+