diff --git a/bin/lutin b/bin/lutin index 8a057ad..c3e1d72 100755 --- a/bin/lutin +++ b/bin/lutin @@ -47,18 +47,19 @@ localArgument = myArgs.parse() display the help of this makefile """ def usage(): + color = debug.get_color_set() # generic argument displayed : myArgs.display() print(" All target can finish with '?clean' '?dump' ... ?action") - print(" all") + print(" " + color['green'] + "all" + color['default']) print(" build all (only for the current selected board) (bynary and packages)") - print(" clean") + print(" " + color['green'] + "clean" + color['default']) print(" clean all (same as previous)") - print(" dump") + print(" " + color['green'] + "dump" + color['default']) print(" Dump all the module dependency and properties") listOfAllModule = module.list_all_module_with_desc() for mod in listOfAllModule: - print(" " + mod[0]) + print(" " + color['green'] + mod[0] + color['default']) if mod[1] != "": print(" " + mod[1]) print(" ex: " + sys.argv[0] + " all --target=Android all -t Windows -m debug all") diff --git a/lutin/arg.py b/lutin/arg.py index 0dfffee..9152853 100644 --- a/lutin/arg.py +++ b/lutin/arg.py @@ -70,12 +70,13 @@ class ArgDefine: return False def display(self): + color = debug.get_color_set() if self.m_optionSmall != "" and self.m_optionBig != "": - print(" -" + self.m_optionSmall + " / --" + self.m_optionBig) + print(" " + color['red'] + "-" + self.m_optionSmall + "" + color['default'] + " / " + color['red'] + "--" + self.m_optionBig + color['default']) elif self.m_optionSmall != "": - print(" -" + self.m_optionSmall) + print(" " + color['red'] + "-" + self.m_optionSmall + color['default']) elif self.m_optionBig != "": - print(" --" + self.m_optionBig) + print(" " + color['red'] + "--" + self.m_optionBig + color['default']) else: print(" ???? ==> internal error ...") if self.m_description != "": @@ -115,10 +116,12 @@ class ArgSection: return "" def get_porperties(self): - return " [" + self.m_section + "]" + color = debug.get_color_set() + return " [" + color['blue'] + self.m_section + color['default'] + "]" def display(self): - print(" [" + self.m_section + "] : " + self.m_description) + color = debug.get_color_set() + print(" [" + color['blue'] + self.m_section + color['default'] + "] : " + self.m_description) def parse(self, argList, currentID): return currentID; diff --git a/lutin/debug.py b/lutin/debug.py index d149a0a..c15b33d 100644 --- a/lutin/debug.py +++ b/lutin/debug.py @@ -138,4 +138,22 @@ def print_compilator(myString): debugLock.acquire() print(myString) - debugLock.release() \ No newline at end of file + debugLock.release() + +def get_color_set() : + global color_default + global color_red + global color_green + global color_yellow + global color_blue + global color_purple + global color_cyan + return { + "default": color_default, + "red": color_red, + "green": color_green, + "yellow": color_yellow, + "blue": color_blue, + "purple": color_purple, + "cyan": color_cyan, + }