diff options
| author | ruki <[email protected]> | 2019-01-03 00:29:41 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-01-02 20:58:09 +0800 |
| commit | 858030589a8747296ab94976d5fb7daf2053c150 (patch) | |
| tree | bf3a09a51c9461f752ba225a409e8637c80d3e15 | |
| parent | 9c4e0ba825b9035236fe063daf6e5dbfbe20ca04 (diff) | |
add build.object and build.target styles
| -rw-r--r-- | xmake/actions/build/kinds/binary.lua | 8 | ||||
| -rw-r--r-- | xmake/actions/build/kinds/object.lua | 16 | ||||
| -rw-r--r-- | xmake/actions/build/kinds/shared.lua | 8 | ||||
| -rw-r--r-- | xmake/actions/build/kinds/static.lua | 8 | ||||
| -rw-r--r-- | xmake/actions/require/impl/action/download.lua | 2 | ||||
| -rw-r--r-- | xmake/actions/require/impl/action/install.lua | 2 | ||||
| -rw-r--r-- | xmake/themes/default/xmake.lua | 17 | ||||
| -rw-r--r-- | xmake/themes/plain/xmake.lua | 16 |
8 files changed, 43 insertions, 34 deletions
diff --git a/xmake/actions/build/kinds/binary.lua b/xmake/actions/build/kinds/binary.lua index 280be43dc..561ef8b1b 100644 --- a/xmake/actions/build/kinds/binary.lua +++ b/xmake/actions/build/kinds/binary.lua @@ -79,9 +79,9 @@ function _build_from_objects(target, buildinfo) -- trace progress into cprintf("${color.build.progress}[%3d%%]:${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount) if verbose then - cprint("${dim magenta}linking.$(mode) %s", path.filename(targetfile)) + cprint("${color.build.target.verbose}linking.$(mode) %s", path.filename(targetfile)) else - cprint("${magenta}linking.$(mode) %s", path.filename(targetfile)) + cprint("${color.build.target}linking.$(mode) %s", path.filename(targetfile)) end -- trace verbose info @@ -113,9 +113,9 @@ function _build_from_sources(target, buildinfo, sourcebatch, sourcekind) -- trace progress into cprintf("${color.build.progress}[%3d%%]:${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount) if verbose then - cprint("${dim magenta}linking.$(mode) %s", path.filename(targetfile)) + cprint("${color.build.target.verbose}linking.$(mode) %s", path.filename(targetfile)) else - cprint("${magenta}linking.$(mode) %s", path.filename(targetfile)) + cprint("${color.build.target}linking.$(mode) %s", path.filename(targetfile)) end -- trace verbose info diff --git a/xmake/actions/build/kinds/object.lua b/xmake/actions/build/kinds/object.lua index 52db0292e..d370535cc 100644 --- a/xmake/actions/build/kinds/object.lua +++ b/xmake/actions/build/kinds/object.lua @@ -41,9 +41,9 @@ function _build_from_object(target, sourcefile, objectfile, progress) -- trace progress info if verbose then - cprint("${color.build.progress}[%3d%%]: ${dim magenta}inserting.$(mode) %s", progress, sourcefile) + cprint("${color.build.progress}[%3d%%]: ${color.build.object.verbose}inserting.$(mode) %s", progress, sourcefile) else - cprint("${color.build.progress}[%3d%%]: ${magenta}inserting.$(mode) %s", progress, sourcefile) + cprint("${color.build.progress}[%3d%%]: ${color.build.object}inserting.$(mode) %s", progress, sourcefile) end -- trace verbose info @@ -66,9 +66,9 @@ function _build_from_static(target, sourcefile, objectfile, progress) -- trace progress info if verbose then - cprint("${color.build.progress}[%3d%%]: ${dim magenta}inserting.$(mode) %s", progress, sourcefile) + cprint("${color.build.progress}[%3d%%]: ${color.build.object.verbose}inserting.$(mode) %s", progress, sourcefile) else - cprint("${color.build.progress}[%3d%%]: ${magenta}inserting.$(mode) %s", progress, sourcefile) + cprint("${color.build.progress}[%3d%%]: ${color.build.object}inserting.$(mode) %s", progress, sourcefile) end -- trace verbose info @@ -120,9 +120,9 @@ function _do_build_file(target, sourcefile, opt) -- trace progress info if verbose then - cprint("${color.build.progress}[%3d%%]:${dim} %scompiling.$(mode) %s", progress, _g.ccache and "ccache " or "", sourcefile) + cprint("${color.build.progress}[%3d%%]:${color.build.object.verbose} %scompiling.$(mode) %s", progress, _g.ccache and "ccache " or "", sourcefile) else - cprint("${color.build.progress}[%3d%%]:${clear} %scompiling.$(mode) %s", progress, _g.ccache and "ccache " or "", sourcefile) + cprint("${color.build.progress}[%3d%%]:${color.build.object} %scompiling.$(mode) %s", progress, _g.ccache and "ccache " or "", sourcefile) end -- trace verbose info @@ -219,9 +219,9 @@ function _build_files_for_single(target, sourcebatch, jobs) -- trace progress info if verbose then - cprint("${color.build.progress}[%3d%%]:${clear} ${dim}%scompiling.$(mode) %s", progress, _g.ccache and "ccache " or "", sourcefile) + cprint("${color.build.progress}[%3d%%]:${color.build.object.verbose}%scompiling.$(mode) %s", progress, _g.ccache and "ccache " or "", sourcefile) else - cprint("${color.build.progress}[%3d%%]:${clear} %scompiling.$(mode) %s", progress, _g.ccache and "ccache " or "", sourcefile) + cprint("${color.build.progress}[%3d%%]:${color.build.object} %scompiling.$(mode) %s", progress, _g.ccache and "ccache " or "", sourcefile) end end diff --git a/xmake/actions/build/kinds/shared.lua b/xmake/actions/build/kinds/shared.lua index ec9d0dcc3..ace65cba4 100644 --- a/xmake/actions/build/kinds/shared.lua +++ b/xmake/actions/build/kinds/shared.lua @@ -92,9 +92,9 @@ function _build_from_objects(target, buildinfo) -- trace progress info cprintf("${color.build.progress}[%3d%%]:${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount) if verbose then - cprint("${dim magenta}linking.$(mode) %s", path.filename(targetfile)) + cprint("${color.build.target.verbose}linking.$(mode) %s", path.filename(targetfile)) else - cprint("${magenta}linking.$(mode) %s", path.filename(targetfile)) + cprint("${color.build.target}linking.$(mode) %s", path.filename(targetfile)) end -- trace verbose info @@ -126,9 +126,9 @@ function _build_from_sources(target, buildinfo, sourcebatch, sourcekind) -- trace progress into cprintf("${color.build.progress}[%3d%%]:${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount) if verbose then - cprint("${dim magenta}linking.$(mode) %s", path.filename(targetfile)) + cprint("${color.build.target.verbose}linking.$(mode) %s", path.filename(targetfile)) else - cprint("${magenta}linking.$(mode) %s", path.filename(targetfile)) + cprint("${color.build.target}linking.$(mode) %s", path.filename(targetfile)) end -- trace verbose info diff --git a/xmake/actions/build/kinds/static.lua b/xmake/actions/build/kinds/static.lua index 24c6e4237..16dd4b7eb 100644 --- a/xmake/actions/build/kinds/static.lua +++ b/xmake/actions/build/kinds/static.lua @@ -88,9 +88,9 @@ function _build_from_objects(target, buildinfo) -- trace progress info cprintf("${color.build.progress}[%3d%%]:${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount) if verbose then - cprint("${dim magenta}archiving.$(mode) %s", path.filename(targetfile)) + cprint("${color.build.target.verbose}archiving.$(mode) %s", path.filename(targetfile)) else - cprint("${magenta}archiving.$(mode) %s", path.filename(targetfile)) + cprint("${color.build.target}archiving.$(mode) %s", path.filename(targetfile)) end -- trace verbose info @@ -122,9 +122,9 @@ function _build_from_sources(target, buildinfo, sourcebatch, sourcekind) -- trace progress into cprintf("${color.build.progress}[%3d%%]:${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount) if verbose then - cprint("${dim magenta}archiving.$(mode) %s", path.filename(targetfile)) + cprint("${color.build.target.verbose}archiving.$(mode) %s", path.filename(targetfile)) else - cprint("${magenta}archiving.$(mode) %s", path.filename(targetfile)) + cprint("${color.build.target}archiving.$(mode) %s", path.filename(targetfile)) end -- trace verbose info diff --git a/xmake/actions/require/impl/action/download.lua b/xmake/actions/require/impl/action/download.lua index ed9c52bae..67719a4bd 100644 --- a/xmake/actions/require/impl/action/download.lua +++ b/xmake/actions/require/impl/action/download.lua @@ -207,7 +207,7 @@ function main(package) -- verbose? if option.get("verbose") and errors then - cprint("${color.verbose.error}error: ${clear}%s", errors) + cprint("${color.error.verbose}error: ${clear}%s", errors) end -- trace diff --git a/xmake/actions/require/impl/action/install.lua b/xmake/actions/require/impl/action/install.lua index 7955680c7..986967329 100644 --- a/xmake/actions/require/impl/action/install.lua +++ b/xmake/actions/require/impl/action/install.lua @@ -132,7 +132,7 @@ function main(package) -- verbose? if option.get("verbose") and errors then - cprint("${color.verbose.error}error: ${clear}%s", errors) + cprint("${color.error.verbose}error: ${clear}%s", errors) end -- trace diff --git a/xmake/themes/default/xmake.lua b/xmake/themes/default/xmake.lua index 17e7c8770..cb444e626 100644 --- a/xmake/themes/default/xmake.lua +++ b/xmake/themes/default/xmake.lua @@ -27,15 +27,20 @@ theme("default") -- set color of the error info set_color("error", "bright red") + set_color("error.verbose", "dim red") -- set color of the warning info set_color("warning", "bright yellow") - - -- set color of the verbose error info - set_color("verbose.error", "dim red") - - -- set color of the verbose warning info - set_color("verbose.warning", "dim yellow") + set_color("warning.verbose", "dim yellow") -- the color of the building progress set_color("build.progress", "green") + + -- the color of the building object file + set_color("build.object", "clear") + set_color("build.object.verbose", "dim") + + -- the color of the building target file + set_color("build.target", "magenta") + set_color("build.target.verbose", "dim magenta") + diff --git a/xmake/themes/plain/xmake.lua b/xmake/themes/plain/xmake.lua index 230927720..fa8353f95 100644 --- a/xmake/themes/plain/xmake.lua +++ b/xmake/themes/plain/xmake.lua @@ -27,15 +27,19 @@ theme("plain") -- set color of the error info set_color("error", "") + set_color("error.verbose", "") -- set color of the warning info set_color("warning", "") + set_color("warning.verbose", "") - -- set color of the verbose error info - set_color("verbose.error", "") + -- the color of the building progress + set_color("build.progress", "") - -- set color of the verbose warning info - set_color("verbose.warning", "") + -- the color of the building object file + set_color("build.object", "") + set_color("build.object.verbose", "") - -- the color of the building progress - set_color("color.build.progress", "") + -- the color of the building target file + set_color("build.target", "") + set_color("build.target.verbose", "") |
