diff options
| author | ruki <[email protected]> | 2019-01-03 22:57:36 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-01-03 11:45:37 +0800 |
| commit | e6bdff43415c485114ae9a68a435923497fb3059 (patch) | |
| tree | 73145bcb0143a957e95fd6d45e8e692e232bf53e | |
| parent | 2bf304a53d08b0d2f248732b4687ae8276aa5e5f (diff) | |
simplify error and warn styles
34 files changed, 57 insertions, 78 deletions
diff --git a/xmake/actions/build/kinds/binary.lua b/xmake/actions/build/kinds/binary.lua index 9a77ed992..c9ba7dc06 100644 --- a/xmake/actions/build/kinds/binary.lua +++ b/xmake/actions/build/kinds/binary.lua @@ -80,7 +80,7 @@ function _build_from_objects(target, buildinfo) -- trace progress into cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount) if verbose then - cprint("${color.build.target.dim}linking.$(mode) %s", path.filename(targetfile)) + cprint("${dim color.build.target}linking.$(mode) %s", path.filename(targetfile)) else cprint("${color.build.target}linking.$(mode) %s", path.filename(targetfile)) end @@ -114,7 +114,7 @@ function _build_from_sources(target, buildinfo, sourcebatch, sourcekind) -- trace progress into cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount) if verbose then - cprint("${color.build.target.dim}linking.$(mode) %s", path.filename(targetfile)) + cprint("${dim color.build.target}linking.$(mode) %s", path.filename(targetfile)) else cprint("${color.build.target}linking.$(mode) %s", path.filename(targetfile)) end diff --git a/xmake/actions/build/kinds/object.lua b/xmake/actions/build/kinds/object.lua index e854be406..aa4766f33 100644 --- a/xmake/actions/build/kinds/object.lua +++ b/xmake/actions/build/kinds/object.lua @@ -43,7 +43,7 @@ function _build_from_object(target, sourcefile, objectfile, progress) -- trace progress info cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", progress) if verbose then - cprint("${color.build.object.dim}inserting.$(mode) %s", sourcefile) + cprint("${dim color.build.object}inserting.$(mode) %s", sourcefile) else cprint("${clear}${color.build.object}inserting.$(mode) %s", sourcefile) end @@ -69,7 +69,7 @@ function _build_from_static(target, sourcefile, objectfile, progress) -- trace progress info cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", progress) if verbose then - cprint("${color.build.object.dim}inserting.$(mode) %s", sourcefile) + cprint("${dim color.build.object}inserting.$(mode) %s", sourcefile) else cprint("${color.build.object}inserting.$(mode) %s", sourcefile) end @@ -124,7 +124,7 @@ function _do_build_file(target, sourcefile, opt) -- trace progress info cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", progress) if verbose then - cprint("${color.build.object.dim}%scompiling.$(mode) %s", _g.ccache and "ccache " or "", sourcefile) + cprint("${dim color.build.object}%scompiling.$(mode) %s", _g.ccache and "ccache " or "", sourcefile) else cprint("${color.build.object}%scompiling.$(mode) %s", _g.ccache and "ccache " or "", sourcefile) end @@ -224,7 +224,7 @@ function _build_files_for_single(target, sourcebatch, jobs) -- trace progress info cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", progress) if verbose then - cprint("${color.build.object.dim}%scompiling.$(mode) %s", _g.ccache and "ccache " or "", sourcefile) + cprint("${dim color.build.object}%scompiling.$(mode) %s", _g.ccache and "ccache " or "", sourcefile) else cprint("${color.build.object}%scompiling.$(mode) %s", _g.ccache and "ccache " or "", sourcefile) end diff --git a/xmake/actions/build/kinds/shared.lua b/xmake/actions/build/kinds/shared.lua index 74fda72aa..c62608053 100644 --- a/xmake/actions/build/kinds/shared.lua +++ b/xmake/actions/build/kinds/shared.lua @@ -93,7 +93,7 @@ function _build_from_objects(target, buildinfo) -- trace progress info cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount) if verbose then - cprint("${color.build.target.dim}linking.$(mode) %s", path.filename(targetfile)) + cprint("${dim color.build.target}linking.$(mode) %s", path.filename(targetfile)) else cprint("${color.build.target}linking.$(mode) %s", path.filename(targetfile)) end @@ -127,7 +127,7 @@ function _build_from_sources(target, buildinfo, sourcebatch, sourcekind) -- trace progress into cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount) if verbose then - cprint("${color.build.target.dim}linking.$(mode) %s", path.filename(targetfile)) + cprint("${dim color.build.target}linking.$(mode) %s", path.filename(targetfile)) else cprint("${color.build.target}linking.$(mode) %s", path.filename(targetfile)) end diff --git a/xmake/actions/build/kinds/static.lua b/xmake/actions/build/kinds/static.lua index 79c302218..ee5736bee 100644 --- a/xmake/actions/build/kinds/static.lua +++ b/xmake/actions/build/kinds/static.lua @@ -89,7 +89,7 @@ function _build_from_objects(target, buildinfo) -- trace progress info cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount) if verbose then - cprint("${color.build.target.dim}archiving.$(mode) %s", path.filename(targetfile)) + cprint("${dim color.build.target}archiving.$(mode) %s", path.filename(targetfile)) else cprint("${color.build.target}archiving.$(mode) %s", path.filename(targetfile)) end @@ -123,7 +123,7 @@ function _build_from_sources(target, buildinfo, sourcebatch, sourcekind) -- trace progress into cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount) if verbose then - cprint("${color.build.target.dim}archiving.$(mode) %s", path.filename(targetfile)) + cprint("${dim color.build.target}archiving.$(mode) %s", path.filename(targetfile)) else cprint("${color.build.target}archiving.$(mode) %s", path.filename(targetfile)) end diff --git a/xmake/actions/config/main.lua b/xmake/actions/config/main.lua index 67f9578d0..d6538602d 100644 --- a/xmake/actions/config/main.lua +++ b/xmake/actions/config/main.lua @@ -160,7 +160,7 @@ function main() if not option.get("quiet") and not option.get("yes") then -- show tips - cprint("${color.warning.bright}note: ${clear}xmake.lua not found, try generating it (pass -y to skip confirm)?") + cprint("${bright color.warning}note: ${clear}xmake.lua not found, try generating it (pass -y to skip confirm)?") cprint("please input: n (y/n)") -- get answer diff --git a/xmake/actions/install/main.lua b/xmake/actions/install/main.lua index f9f307175..60973fe2a 100644 --- a/xmake/actions/install/main.lua +++ b/xmake/actions/install/main.lua @@ -122,7 +122,7 @@ function main() end -- show tips - cprint("${color.error.bright}error: ${clear}installation failed, may permission denied!") + cprint("${bright color.error}error: ${clear}installation failed, may permission denied!") -- continue to install with administrator permission? if sudo.has() then @@ -132,7 +132,7 @@ function main() if confirm == nil then -- show tips - cprint("${color.warning.bright}note: ${clear}try continue to install with administrator permission again?") + cprint("${bright color.warning}note: ${clear}try continue to install with administrator permission again?") cprint("please input: y (y/n)") -- get answer diff --git a/xmake/actions/require/impl/action/download.lua b/xmake/actions/require/impl/action/download.lua index 7e7818a8c..940ef4d5c 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.error.dim}error: ${clear}%s", errors) + cprint("${dim color.error}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 eb1c6c9eb..ab51946af 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.error.dim}error: ${clear}%s", errors) + cprint("${dim color.error}error: ${clear}%s", errors) end -- trace diff --git a/xmake/actions/require/impl/package.lua b/xmake/actions/require/impl/package.lua index 3df967547..5826e3a5b 100644 --- a/xmake/actions/require/impl/package.lua +++ b/xmake/actions/require/impl/package.lua @@ -334,7 +334,7 @@ function _get_confirm(packages) if confirm == nil then -- show tips - cprint("${color.warning.bright}note: ${clear}try installing these packages (pass -y to skip confirm)?") + cprint("${bright color.warning}note: ${clear}try installing these packages (pass -y to skip confirm)?") for _, package in ipairs(packages) do print(" -> %s %s %s", package:name(), package:version_str() or "", package:debug() and "(debug)" or "") end @@ -447,7 +447,7 @@ function install_packages(requires, opt) -- exists unsupported packages? if #packages_unsupported > 0 then -- show tips - cprint("${color.warning.bright}note: ${clear}the following packages are unsupported for $(plat)/$(arch)!") + cprint("${bright color.warning}note: ${clear}the following packages are unsupported for $(plat)/$(arch)!") for _, package in ipairs(packages_unsupported) do print(" -> %s %s", package:name(), package:version_str() or "") end diff --git a/xmake/actions/uninstall/main.lua b/xmake/actions/uninstall/main.lua index 730d7c9bc..afb14f205 100644 --- a/xmake/actions/uninstall/main.lua +++ b/xmake/actions/uninstall/main.lua @@ -81,7 +81,7 @@ function main() end -- show tips - cprint("${color.error.bright}error: ${clear}failed to uninstall, may permission denied!") + cprint("${bright color.error}error: ${clear}failed to uninstall, may permission denied!") -- continue to uninstall with administrator permission? if sudo.has() then @@ -91,7 +91,7 @@ function main() if confirm == nil then -- show tips - cprint("${color.warning.bright}note: ${clear}try continue to uninstall with administrator permission again?") + cprint("${bright color.warning}note: ${clear}try continue to uninstall with administrator permission again?") cprint("please input: y (y/n)") -- get answer diff --git a/xmake/actions/update/main.lua b/xmake/actions/update/main.lua index a32798977..d39d8fc41 100644 --- a/xmake/actions/update/main.lua +++ b/xmake/actions/update/main.lua @@ -72,7 +72,7 @@ function _sudo(cmd) end -- show tips - cprint("\r${color.error.bright}error: ${clear}run `%s` failed, may permission denied!", cmd) + cprint("\r${bright color.error}error: ${clear}run `%s` failed, may permission denied!", cmd) -- continue to install with administrator permission? if sudo.has() then @@ -82,7 +82,7 @@ function _sudo(cmd) if confirm == nil then -- show tips - cprint("\r${color.warning.bright}note: ${clear}try continue to run `%s` with administrator permission again?", cmd) + cprint("\r${bright color.warning}note: ${clear}try continue to run `%s` with administrator permission again?", cmd) cprint("\rplease input: y (y/n)") -- get answer diff --git a/xmake/core/base/colors.lua b/xmake/core/base/colors.lua index 112352116..570e001fc 100644 --- a/xmake/core/base/colors.lua +++ b/xmake/core/base/colors.lua @@ -327,18 +327,14 @@ function colors.translate(str) if theme then local theme_block = theme:get(block) if theme_block then - if block:startswith("text.") then - table.insert(blocks, theme_block) - else - for _, theme_block_sub in ipairs(theme_block:split("%s+")) do - table.insert(blocks, theme_block_sub) - end + for _, theme_block_sub in ipairs(theme_block:split("%s+")) do + table.insert(blocks, theme_block_sub) end else table.insert(blocks, block) end elseif block:startswith("color.") then - local default_colors = {["color.error.bright"] = {"bright", "red"}, ["color.warning.bright"] = {"bright", "yellow"}} + local default_colors = {["bright color.error"] = {"bright", "red"}, ["bright color.warning"] = {"bright", "yellow"}} local theme_block = default_colors[block] if theme_block then table.join2(blocks, theme_block) @@ -356,7 +352,6 @@ function colors.translate(str) for _, block in ipairs(blocks) do -- get the color code - local text = false local code = keys[block] if not code then if colors.truecolor() and block:find(";", 1, true) then @@ -376,11 +371,11 @@ function colors.translate(str) local emoji_code = emoji.translate(block) if emoji_code then table.insert(text_buffer, emoji_code) - text = true + else + table.insert(text_buffer, block) end end end - assert(code or text, "unknown color: " .. block) -- save this code table.insert(color_buffer, code) @@ -392,7 +387,7 @@ function colors.translate(str) result = result .. colors._escape:format(table.concat(color_buffer, ";")) end if #text_buffer > 0 then - result = result .. table.concat(text_buffer, "") + result = result .. table.concat(text_buffer, " ") end return result end) diff --git a/xmake/core/base/deprecated.lua b/xmake/core/base/deprecated.lua index bcc2f3144..5279e81bc 100644 --- a/xmake/core/base/deprecated.lua +++ b/xmake/core/base/deprecated.lua @@ -61,11 +61,11 @@ function deprecated.dump() end -- trace - utils.cprint("${color.warning.bright}deprecated: ${clear}please uses %s instead of %s", new, old) + utils.cprint("${bright color.warning}deprecated: ${clear}please uses %s instead of %s", new, old) -- too much? if index > 6 and not option.get("verbose") then - utils.cprint("${color.warning.bright}deprecated: ${clear}add -v for getting more ..") + utils.cprint("${bright color.warning}deprecated: ${clear}add -v for getting more ..") break end diff --git a/xmake/core/base/utils.lua b/xmake/core/base/utils.lua index 786c0bc6c..a1963ea7f 100644 --- a/xmake/core/base/utils.lua +++ b/xmake/core/base/utils.lua @@ -150,7 +150,7 @@ end -- print the error information function utils.error(format, ...) if format ~= nil then - utils.cprint("${color.error.bright}error: ${clear}" .. string.tryformat(format, ...)) + utils.cprint("${bright color.error}${text.error}: ${clear}" .. string.tryformat(format, ...)) log:flush() end end @@ -162,7 +162,7 @@ function utils.warning(format, ...) assert(format) -- format message - local msg = "${color.warning.bright}warning: ${color.warning}" .. string.tryformat(format, ...) + local msg = "${bright color.warning}${text.warning}: ${color.warning}" .. string.tryformat(format, ...) -- init warnings utils._WARNINGS = utils._WARNINGS or {} diff --git a/xmake/modules/package/manager/apt/install.lua b/xmake/modules/package/manager/apt/install.lua index 838530581..12eed657b 100644 --- a/xmake/modules/package/manager/apt/install.lua +++ b/xmake/modules/package/manager/apt/install.lua @@ -59,7 +59,7 @@ function main(name, opt) if confirm == nil then -- show tips - cprint("${color.warning.bright}note: ${clear}try installing %s with administrator permission?", name) + cprint("${bright color.warning}note: ${clear}try installing %s with administrator permission?", name) cprint("please input: y (y/n)") -- get answer diff --git a/xmake/modules/package/manager/pacman/install.lua b/xmake/modules/package/manager/pacman/install.lua index 5e5101786..3c7ae5e77 100644 --- a/xmake/modules/package/manager/pacman/install.lua +++ b/xmake/modules/package/manager/pacman/install.lua @@ -62,7 +62,7 @@ function main(name, opt) if confirm == nil then -- show tips - cprint("${color.warning.bright}note: ${clear}try installing %s with administrator permission?", name) + cprint("${bright color.warning}note: ${clear}try installing %s with administrator permission?", name) cprint("please input: y (y/n)") -- get answer diff --git a/xmake/modules/package/manager/yum/install.lua b/xmake/modules/package/manager/yum/install.lua index 1d900c819..6465f7c0b 100644 --- a/xmake/modules/package/manager/yum/install.lua +++ b/xmake/modules/package/manager/yum/install.lua @@ -62,7 +62,7 @@ function main(name, opt) if confirm == nil then -- show tips - cprint("${color.warning.bright}note: ${clear}try installing %s with administrator permission?", name) + cprint("${bright color.warning}note: ${clear}try installing %s with administrator permission?", name) cprint("please input: y (y/n)") -- get answer diff --git a/xmake/modules/private/platform/check_xcode.lua b/xmake/modules/private/platform/check_xcode.lua index f503c1a13..5434d59b7 100644 --- a/xmake/modules/private/platform/check_xcode.lua +++ b/xmake/modules/private/platform/check_xcode.lua @@ -39,7 +39,7 @@ function main(config, optional) elseif not optional then -- failed - cprint("${color.error.bright}please run:") + cprint("${bright color.error}please run:") cprint(" - xmake config --xcode=xxx") cprint("or - xmake global --xcode=xxx") raise() diff --git a/xmake/platforms/android/config.lua b/xmake/platforms/android/config.lua index cc6f35ead..b81b6a208 100644 --- a/xmake/platforms/android/config.lua +++ b/xmake/platforms/android/config.lua @@ -40,7 +40,7 @@ function _check_ndk() config.set("gcc_toolchain", ndk.gcc_toolchain, {force = true, readonly = true}) else -- failed - cprint("${color.error.bright}please run:") + cprint("${bright color.error}please run:") cprint(" - xmake config --ndk=xxx") cprint("or - xmake global --ndk=xxx") raise() diff --git a/xmake/platforms/mingw/config.lua b/xmake/platforms/mingw/config.lua index 6409f4a5b..0fae4e189 100644 --- a/xmake/platforms/mingw/config.lua +++ b/xmake/platforms/mingw/config.lua @@ -39,7 +39,7 @@ function _check_mingw() config.set("bin", mingw.bindir, {readonly = true, force = true}) else -- failed - cprint("${color.error.bright}please run:") + cprint("${bright color.error}please run:") cprint(" - xmake config --ndk=xxx") cprint("or - xmake global --ndk=xxx") raise() diff --git a/xmake/plugins/project/clang/compile_commands.lua b/xmake/plugins/project/clang/compile_commands.lua index 62c419dd6..a7ae7f3f0 100644 --- a/xmake/plugins/project/clang/compile_commands.lua +++ b/xmake/plugins/project/clang/compile_commands.lua @@ -71,7 +71,7 @@ function _make_single_object(jsonfile, target, sourcekind, sourcebatch) -- not supported now, ignore it directly for _, sourcefile in ipairs(table.wrap(sourcebatch.sourcefiles)) do - cprint("${color.warning.bright}warning: ${clear}ignore[%s]: %s", target:name(), sourcefile) + cprint("${bright color.warning}warning: ${clear}ignore[%s]: %s", target:name(), sourcefile) end end diff --git a/xmake/rules/qt/moc/xmake.lua b/xmake/rules/qt/moc/xmake.lua index cffc8b7a2..e31a7de35 100644 --- a/xmake/rules/qt/moc/xmake.lua +++ b/xmake/rules/qt/moc/xmake.lua @@ -84,7 +84,7 @@ rule("qt.moc") -- trace progress info cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) if option.get("verbose") then - cprint("${color.build.object.dim}compiling.qt.moc %s", headerfile_moc) + cprint("${dim color.build.object}compiling.qt.moc %s", headerfile_moc) else cprint("${color.build.object}compiling.qt.moc %s", headerfile_moc) end diff --git a/xmake/rules/qt/qrc/xmake.lua b/xmake/rules/qt/qrc/xmake.lua index c26a0eae2..15ec2f0a4 100644 --- a/xmake/rules/qt/qrc/xmake.lua +++ b/xmake/rules/qt/qrc/xmake.lua @@ -87,7 +87,7 @@ rule("qt.qrc") -- trace progress info cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) if option.get("verbose") then - cprint("${color.build.object.dim}compiling.qt.qrc %s", sourcefile_qrc) + cprint("${dim color.build.object}compiling.qt.qrc %s", sourcefile_qrc) else cprint("${color.build.object}compiling.qt.qrc %s", sourcefile_qrc) end diff --git a/xmake/rules/qt/ui/xmake.lua b/xmake/rules/qt/ui/xmake.lua index d37abc728..873b9c058 100644 --- a/xmake/rules/qt/ui/xmake.lua +++ b/xmake/rules/qt/ui/xmake.lua @@ -74,7 +74,7 @@ rule("qt.ui") -- trace progress info cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) if option.get("verbose") then - cprint("${color.build.object.dim}compiling.qt.ui %s", sourcefile_ui) + cprint("${dim color.build.object}compiling.qt.ui %s", sourcefile_ui) else cprint("${color.build.object}compiling.qt.ui %s", sourcefile_ui) end diff --git a/xmake/rules/wdk/inf/xmake.lua b/xmake/rules/wdk/inf/xmake.lua index 828020a55..45e894cbe 100644 --- a/xmake/rules/wdk/inf/xmake.lua +++ b/xmake/rules/wdk/inf/xmake.lua @@ -97,7 +97,7 @@ rule("wdk.inf") -- trace progress info cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) if option.get("verbose") then - cprint("${color.build.object.dim}compiling.wdk.inf %s", sourcefile) + cprint("${dim color.build.object}compiling.wdk.inf %s", sourcefile) else cprint("${color.build.object}compiling.wdk.inf %s", sourcefile) end diff --git a/xmake/rules/wdk/man/xmake.lua b/xmake/rules/wdk/man/xmake.lua index 4bf90836b..fcab88d5a 100644 --- a/xmake/rules/wdk/man/xmake.lua +++ b/xmake/rules/wdk/man/xmake.lua @@ -127,7 +127,7 @@ rule("wdk.man") -- trace progress info cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) if option.get("verbose") then - cprint("${color.build.object.dim}compiling.wdk.man %s", sourcefile) + cprint("${dim color.build.object}compiling.wdk.man %s", sourcefile) else cprint("${color.build.object}compiling.wdk.man %s", sourcefile) end diff --git a/xmake/rules/wdk/mc/xmake.lua b/xmake/rules/wdk/mc/xmake.lua index 3b0ea2e6b..a91ee7beb 100644 --- a/xmake/rules/wdk/mc/xmake.lua +++ b/xmake/rules/wdk/mc/xmake.lua @@ -107,7 +107,7 @@ rule("wdk.mc") -- trace progress info cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) if option.get("verbose") then - cprint("${color.build.object.dim}compiling.wdk.mc %s", sourcefile) + cprint("${dim color.build.object}compiling.wdk.mc %s", sourcefile) else cprint("${color.build.object}compiling.wdk.mc %s", sourcefile) end diff --git a/xmake/rules/wdk/mof/xmake.lua b/xmake/rules/wdk/mof/xmake.lua index 447d0ad43..f17e1fe04 100644 --- a/xmake/rules/wdk/mof/xmake.lua +++ b/xmake/rules/wdk/mof/xmake.lua @@ -117,7 +117,7 @@ rule("wdk.mof") -- trace progress info cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) if option.get("verbose") then - cprint("${color.build.object.dim}compiling.wdk.mof %s", sourcefile) + cprint("${dim color.build.object}compiling.wdk.mof %s", sourcefile) else cprint("${color.build.object}compiling.wdk.mof %s", sourcefile) end diff --git a/xmake/rules/wdk/sign/xmake.lua b/xmake/rules/wdk/sign/xmake.lua index d5417708a..4ea1b192c 100644 --- a/xmake/rules/wdk/sign/xmake.lua +++ b/xmake/rules/wdk/sign/xmake.lua @@ -118,7 +118,7 @@ rule("wdk.sign") -- trace progress info cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) if option.get("verbose") then - cprint("${color.build.target.dim}signing.%s %s", signmode, path.filename(target:targetfile())) + cprint("${dim color.build.target}signing.%s %s", signmode, path.filename(target:targetfile())) else cprint("${color.build.target}signing.%s %s", signmode, path.filename(target:targetfile())) end diff --git a/xmake/rules/wdk/tracewpp/xmake.lua b/xmake/rules/wdk/tracewpp/xmake.lua index c7ea545ce..29ce0f80c 100644 --- a/xmake/rules/wdk/tracewpp/xmake.lua +++ b/xmake/rules/wdk/tracewpp/xmake.lua @@ -105,7 +105,7 @@ rule("wdk.tracewpp") -- trace progress info cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) if option.get("verbose") then - cprint("${color.build.object.dim}compiling.wdk.tracewpp %s", sourcefile) + cprint("${dim color.build.object}compiling.wdk.tracewpp %s", sourcefile) else cprint("${color.build.object}compiling.wdk.tracewpp %s", sourcefile) end diff --git a/xmake/themes/dark/xmake.lua b/xmake/themes/dark/xmake.lua index 333cd6b81..459721f33 100644 --- a/xmake/themes/dark/xmake.lua +++ b/xmake/themes/dark/xmake.lua @@ -38,14 +38,12 @@ theme("dark") set_color("nothing", "red") -- the error info + set_text("error", "error") set_color("error", "red") - set_color("error.dim", "dim red") - set_color("error.bright", "bright red") -- the warning info + set_text("warning", "warn") set_color("warning", "cyan") - set_color("warning.dim", "dim cyan") - set_color("warning.bright", "bright cyan") -- the building progress set_text("build.progress_format", "[%3d%%]") @@ -53,9 +51,7 @@ theme("dark") -- the building object file set_color("build.object", "") - set_color("build.object.dim", "dim green") -- the building target file set_color("build.target", "magenta") - set_color("build.target.dim", "dim magenta") diff --git a/xmake/themes/default/xmake.lua b/xmake/themes/default/xmake.lua index b8452c479..02f6a010e 100644 --- a/xmake/themes/default/xmake.lua +++ b/xmake/themes/default/xmake.lua @@ -38,14 +38,12 @@ theme("default") set_color("nothing", "red") -- the error info + set_text("error", "error") set_color("error", "red") - set_color("error.dim", "dim red") - set_color("error.bright", "bright red") -- the warning info + set_text("warning", "warn") set_color("warning", "yellow") - set_color("warning.dim", "dim yellow") - set_color("warning.bright", "bright yellow") -- the building progress set_text("build.progress_format", "[%3d%%]") @@ -53,9 +51,7 @@ theme("default") -- the building object file set_color("build.object", "") - set_color("build.object.dim", "dim green") -- the building target file set_color("build.target", "magenta") - set_color("build.target.dim", "dim magenta") diff --git a/xmake/themes/emoji/xmake.lua b/xmake/themes/emoji/xmake.lua index d00fd533b..03342ba44 100644 --- a/xmake/themes/emoji/xmake.lua +++ b/xmake/themes/emoji/xmake.lua @@ -38,14 +38,12 @@ theme("emoji") set_color("nothing", "") -- the error info - set_color("error", "exclamation red") - set_color("error.dim", "dim exclamation red") - set_color("error.bright", "bright exclamation red") + set_text("error", "exclamation error") + set_color("error", "red") -- the warning info - set_color("warning", "warning yellow") - set_color("warning.dim", "dim warning yellow") - set_color("warning.bright", "bright warning yellow") + set_text("warning", "warning warn") + set_color("warning", "yellow") -- the building progress set_text("build.progress_format", "[%3d%%]") @@ -53,9 +51,7 @@ theme("emoji") -- the building object file set_color("build.object", "") - set_color("build.object.dim", "dim green") -- the building target file set_color("build.target", "magenta") - set_color("build.target.dim", "dim magenta") diff --git a/xmake/themes/plain/xmake.lua b/xmake/themes/plain/xmake.lua index fe66f7511..b814322e0 100644 --- a/xmake/themes/plain/xmake.lua +++ b/xmake/themes/plain/xmake.lua @@ -38,14 +38,12 @@ theme("plain") set_color("nothing", "") -- the error info + set_text("error", "error") set_color("error", "") - set_color("error.dim", "") - set_color("error.bright", "") -- the warning info + set_text("warning", "warn") set_color("warning", "") - set_color("warning.dim", "") - set_color("warning.bright", "") -- the building progress set_text("build.progress_format", "[%3d%%]") @@ -53,9 +51,7 @@ theme("plain") -- the building object file set_color("build.object", "") - set_color("build.object.dim", "") -- the building target file set_color("build.target", "") - set_color("build.target.dim", "") |
