Tweak SCons compilation messages to be more discreet
All compilation messages are now written in blue to ensure that compiler errors and warnings stand out more. Messages were also slightly shortened to make them easier to fit on a single line on narrow terminals.
This commit is contained in:
parent
1cbf3947d6
commit
419c0b9b11
52
methods.py
52
methods.py
|
@ -454,45 +454,39 @@ def no_verbose(sys, env):
|
||||||
# Colors are disabled in non-TTY environments such as pipes. This means
|
# Colors are disabled in non-TTY environments such as pipes. This means
|
||||||
# that if output is redirected to a file, it will not contain color codes
|
# that if output is redirected to a file, it will not contain color codes
|
||||||
if sys.stdout.isatty():
|
if sys.stdout.isatty():
|
||||||
colors["cyan"] = "\033[96m"
|
colors["blue"] = "\033[0;94m"
|
||||||
colors["purple"] = "\033[95m"
|
colors["bold_blue"] = "\033[1;94m"
|
||||||
colors["blue"] = "\033[94m"
|
colors["reset"] = "\033[0m"
|
||||||
colors["green"] = "\033[92m"
|
|
||||||
colors["yellow"] = "\033[93m"
|
|
||||||
colors["red"] = "\033[91m"
|
|
||||||
colors["end"] = "\033[0m"
|
|
||||||
else:
|
else:
|
||||||
colors["cyan"] = ""
|
|
||||||
colors["purple"] = ""
|
|
||||||
colors["blue"] = ""
|
colors["blue"] = ""
|
||||||
colors["green"] = ""
|
colors["bold_blue"] = ""
|
||||||
colors["yellow"] = ""
|
colors["reset"] = ""
|
||||||
colors["red"] = ""
|
|
||||||
colors["end"] = ""
|
|
||||||
|
|
||||||
compile_source_message = "{}Compiling {}==> {}$SOURCE{}".format(
|
# There is a space before "..." to ensure that source file names can be
|
||||||
colors["blue"], colors["purple"], colors["yellow"], colors["end"]
|
# Ctrl + clicked in the VS Code terminal.
|
||||||
|
compile_source_message = "{}Compiling {}$SOURCE{} ...{}".format(
|
||||||
|
colors["blue"], colors["bold_blue"], colors["blue"], colors["reset"]
|
||||||
)
|
)
|
||||||
java_compile_source_message = "{}Compiling {}==> {}$SOURCE{}".format(
|
java_compile_source_message = "{}Compiling {}$SOURCE{} ...{}".format(
|
||||||
colors["blue"], colors["purple"], colors["yellow"], colors["end"]
|
colors["blue"], colors["bold_blue"], colors["blue"], colors["reset"]
|
||||||
)
|
)
|
||||||
compile_shared_source_message = "{}Compiling shared {}==> {}$SOURCE{}".format(
|
compile_shared_source_message = "{}Compiling shared {}$SOURCE{} ...{}".format(
|
||||||
colors["blue"], colors["purple"], colors["yellow"], colors["end"]
|
colors["blue"], colors["bold_blue"], colors["blue"], colors["reset"]
|
||||||
)
|
)
|
||||||
link_program_message = "{}Linking Program {}==> {}$TARGET{}".format(
|
link_program_message = "{}Linking Program {}$TARGET{} ...{}".format(
|
||||||
colors["red"], colors["purple"], colors["yellow"], colors["end"]
|
colors["blue"], colors["bold_blue"], colors["blue"], colors["reset"]
|
||||||
)
|
)
|
||||||
link_library_message = "{}Linking Static Library {}==> {}$TARGET{}".format(
|
link_library_message = "{}Linking Static Library {}$TARGET{} ...{}".format(
|
||||||
colors["red"], colors["purple"], colors["yellow"], colors["end"]
|
colors["blue"], colors["bold_blue"], colors["blue"], colors["reset"]
|
||||||
)
|
)
|
||||||
ranlib_library_message = "{}Ranlib Library {}==> {}$TARGET{}".format(
|
ranlib_library_message = "{}Ranlib Library {}$TARGET{} ...{}".format(
|
||||||
colors["red"], colors["purple"], colors["yellow"], colors["end"]
|
colors["blue"], colors["bold_blue"], colors["blue"], colors["reset"]
|
||||||
)
|
)
|
||||||
link_shared_library_message = "{}Linking Shared Library {}==> {}$TARGET{}".format(
|
link_shared_library_message = "{}Linking Shared Library {}$TARGET{} ...{}".format(
|
||||||
colors["red"], colors["purple"], colors["yellow"], colors["end"]
|
colors["blue"], colors["bold_blue"], colors["blue"], colors["reset"]
|
||||||
)
|
)
|
||||||
java_library_message = "{}Creating Java Archive {}==> {}$TARGET{}".format(
|
java_library_message = "{}Creating Java Archive {}$TARGET{} ...{}".format(
|
||||||
colors["red"], colors["purple"], colors["yellow"], colors["end"]
|
colors["blue"], colors["bold_blue"], colors["blue"], colors["reset"]
|
||||||
)
|
)
|
||||||
|
|
||||||
env.Append(CXXCOMSTR=[compile_source_message])
|
env.Append(CXXCOMSTR=[compile_source_message])
|
||||||
|
|
Loading…
Reference in New Issue