diff options
| author | ruki <[email protected]> | 2019-01-03 22:35:18 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-01-03 09:31:51 +0800 |
| commit | 22a3a1c21f41205fa5ea71a4fd0a0d9caa2b8963 (patch) | |
| tree | dd5690fcf3b4168f0ba36e0c00aa84b82d728c1f | |
| parent | ec40e9e8f26530aef3fc785a8c138b4710046475 (diff) | |
add build.progress_format style
| -rw-r--r-- | xmake/actions/build/kinds/binary.lua | 5 | ||||
| -rw-r--r-- | xmake/actions/build/kinds/object.lua | 21 | ||||
| -rw-r--r-- | xmake/actions/build/kinds/shared.lua | 5 | ||||
| -rw-r--r-- | xmake/actions/build/kinds/static.lua | 5 | ||||
| -rw-r--r-- | xmake/core/base/colors.lua | 10 | ||||
| -rw-r--r-- | xmake/core/sandbox/modules/import/core/theme/theme.lua | 54 | ||||
| -rw-r--r-- | xmake/core/theme/theme.lua | 6 | ||||
| -rw-r--r-- | xmake/rules/qt/moc/xmake.lua | 6 | ||||
| -rw-r--r-- | xmake/rules/qt/qrc/xmake.lua | 6 | ||||
| -rw-r--r-- | xmake/rules/qt/ui/xmake.lua | 6 | ||||
| -rw-r--r-- | xmake/rules/wdk/inf/xmake.lua | 6 | ||||
| -rw-r--r-- | xmake/rules/wdk/man/xmake.lua | 6 | ||||
| -rw-r--r-- | xmake/rules/wdk/mc/xmake.lua | 6 | ||||
| -rw-r--r-- | xmake/rules/wdk/mof/xmake.lua | 6 | ||||
| -rw-r--r-- | xmake/rules/wdk/sign/xmake.lua | 7 | ||||
| -rw-r--r-- | xmake/rules/wdk/tracewpp/xmake.lua | 6 | ||||
| -rw-r--r-- | xmake/themes/dark/xmake.lua | 11 | ||||
| -rw-r--r-- | xmake/themes/default/xmake.lua | 12 | ||||
| -rw-r--r-- | xmake/themes/emoji/xmake.lua | 11 | ||||
| -rw-r--r-- | xmake/themes/plain/xmake.lua | 11 |
20 files changed, 150 insertions, 56 deletions
diff --git a/xmake/actions/build/kinds/binary.lua b/xmake/actions/build/kinds/binary.lua index 561ef8b1b..ed249b376 100644 --- a/xmake/actions/build/kinds/binary.lua +++ b/xmake/actions/build/kinds/binary.lua @@ -24,6 +24,7 @@ -- imports import("core.base.option") +import("core.theme.theme") import("core.tool.linker") import("core.tool.compiler") import("core.project.depend") @@ -77,7 +78,7 @@ function _build_from_objects(target, buildinfo) local verbose = option.get("verbose") -- trace progress into - cprintf("${color.build.progress}[%3d%%]:${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount) + cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount) if verbose then cprint("${color.build.target.verbose}linking.$(mode) %s", path.filename(targetfile)) else @@ -111,7 +112,7 @@ function _build_from_sources(target, buildinfo, sourcebatch, sourcekind) local verbose = option.get("verbose") -- trace progress into - cprintf("${color.build.progress}[%3d%%]:${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount) + cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount) if verbose then cprint("${color.build.target.verbose}linking.$(mode) %s", path.filename(targetfile)) else diff --git a/xmake/actions/build/kinds/object.lua b/xmake/actions/build/kinds/object.lua index ee294a255..60e3567b6 100644 --- a/xmake/actions/build/kinds/object.lua +++ b/xmake/actions/build/kinds/object.lua @@ -24,6 +24,7 @@ -- imports import("core.base.option") +import("core.theme.theme") import("core.tool.compiler") import("core.tool.extractor") import("core.project.rule") @@ -40,10 +41,11 @@ function _build_from_object(target, sourcefile, objectfile, progress) local verbose = option.get("verbose") -- trace progress info + cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", progress) if verbose then - cprint("${color.build.progress}[%3d%%]: ${clear}${color.build.object.verbose}inserting.$(mode) %s", progress, sourcefile) + cprint("${color.build.object.verbose}inserting.$(mode) %s", sourcefile) else - cprint("${color.build.progress}[%3d%%]: ${clear}${color.build.object}inserting.$(mode) %s", progress, sourcefile) + cprint("${clear}${color.build.object}inserting.$(mode) %s", sourcefile) end -- trace verbose info @@ -65,10 +67,11 @@ function _build_from_static(target, sourcefile, objectfile, progress) local verbose = option.get("verbose") -- trace progress info + cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", progress) if verbose then - cprint("${color.build.progress}[%3d%%]: ${clear}${color.build.object.verbose}inserting.$(mode) %s", progress, sourcefile) + cprint("${color.build.object.verbose}inserting.$(mode) %s", sourcefile) else - cprint("${color.build.progress}[%3d%%]: ${clear}${color.build.object}inserting.$(mode) %s", progress, sourcefile) + cprint("${color.build.object}inserting.$(mode) %s", sourcefile) end -- trace verbose info @@ -119,10 +122,11 @@ function _do_build_file(target, sourcefile, opt) local verbose = option.get("verbose") -- trace progress info + cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", progress) if verbose then - cprint("${color.build.progress}[%3d%%]:${clear}${color.build.object.verbose} %scompiling.$(mode) %s", progress, _g.ccache and "ccache " or "", sourcefile) + cprint("${color.build.object.verbose}%scompiling.$(mode) %s", _g.ccache and "ccache " or "", sourcefile) else - cprint("${color.build.progress}[%3d%%]:${clear}${color.build.object} %scompiling.$(mode) %s", progress, _g.ccache and "ccache " or "", sourcefile) + cprint("${color.build.object}%scompiling.$(mode) %s", _g.ccache and "ccache " or "", sourcefile) end -- trace verbose info @@ -218,10 +222,11 @@ function _build_files_for_single(target, sourcebatch, jobs) local progress = ((buildinfo.targetindex + (_g.sourceindex + index - 1) / _g.sourcecount) * 100 / buildinfo.targetcount) -- trace progress info + cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", progress) if verbose then - cprint("${color.build.progress}[%3d%%]:${clear}${color.build.object.verbose}%scompiling.$(mode) %s", progress, _g.ccache and "ccache " or "", sourcefile) + cprint("${color.build.object.verbose}%scompiling.$(mode) %s", _g.ccache and "ccache " or "", sourcefile) else - cprint("${color.build.progress}[%3d%%]:${clear}${color.build.object} %scompiling.$(mode) %s", progress, _g.ccache and "ccache " or "", sourcefile) + cprint("${color.build.object}%scompiling.$(mode) %s", _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 ace65cba4..0ff4554c7 100644 --- a/xmake/actions/build/kinds/shared.lua +++ b/xmake/actions/build/kinds/shared.lua @@ -24,6 +24,7 @@ -- imports import("core.base.option") +import("core.theme.theme") import("core.tool.linker") import("core.tool.compiler") import("core.project.depend") @@ -90,7 +91,7 @@ function _build_from_objects(target, buildinfo) local verbose = option.get("verbose") -- trace progress info - cprintf("${color.build.progress}[%3d%%]:${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount) + cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount) if verbose then cprint("${color.build.target.verbose}linking.$(mode) %s", path.filename(targetfile)) else @@ -124,7 +125,7 @@ function _build_from_sources(target, buildinfo, sourcebatch, sourcekind) local verbose = option.get("verbose") -- trace progress into - cprintf("${color.build.progress}[%3d%%]:${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount) + cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount) if verbose then cprint("${color.build.target.verbose}linking.$(mode) %s", path.filename(targetfile)) else diff --git a/xmake/actions/build/kinds/static.lua b/xmake/actions/build/kinds/static.lua index 16dd4b7eb..47217c7fa 100644 --- a/xmake/actions/build/kinds/static.lua +++ b/xmake/actions/build/kinds/static.lua @@ -24,6 +24,7 @@ -- imports import("core.base.option") +import("core.theme.theme") import("core.tool.linker") import("core.tool.compiler") import("core.project.depend") @@ -86,7 +87,7 @@ function _build_from_objects(target, buildinfo) local verbose = option.get("verbose") -- trace progress info - cprintf("${color.build.progress}[%3d%%]:${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount) + cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount) if verbose then cprint("${color.build.target.verbose}archiving.$(mode) %s", path.filename(targetfile)) else @@ -120,7 +121,7 @@ function _build_from_sources(target, buildinfo, sourcebatch, sourcekind) local verbose = option.get("verbose") -- trace progress into - cprintf("${color.build.progress}[%3d%%]:${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount) + cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount) if verbose then cprint("${color.build.target.verbose}archiving.$(mode) %s", path.filename(targetfile)) else diff --git a/xmake/core/base/colors.lua b/xmake/core/base/colors.lua index b0e87bcdc..cefd10774 100644 --- a/xmake/core/base/colors.lua +++ b/xmake/core/base/colors.lua @@ -304,8 +304,8 @@ function colors.translate(str) -- patch reset str = "${reset}" .. str .. "${reset}" - -- translate it - str = string.gsub(str, "(%${(.-)})", function(_, word) + -- translate color blocks, e.g. ${red}, ${color.xxx}, ${emoji} + str = str:gsub("(%${(.-)})", function(_, word) -- not supported? ignore it if not colors.color8() and not colors.color256() and not colors.truecolor() then @@ -316,7 +316,11 @@ function colors.translate(str) if theme then local theme_word = theme:get(word) if theme_word then - word = theme_word + if word:startswith("text.") then + return theme_word + else + word = theme_word + end end if word == "" then return "" diff --git a/xmake/core/sandbox/modules/import/core/theme/theme.lua b/xmake/core/sandbox/modules/import/core/theme/theme.lua new file mode 100644 index 000000000..9216c0902 --- /dev/null +++ b/xmake/core/sandbox/modules/import/core/theme/theme.lua @@ -0,0 +1,54 @@ +--!A cross-platform build utility based on Lua +-- +-- Licensed to the Apache Software Foundation (ASF) under one +-- or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information +-- regarding copyright ownership. The ASF licenses this file +-- to you under the Apache License, Version 2.0 (the +-- "License"); you may not use this file except in compliance +-- with the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- +-- Copyright (C) 2015 - 2019, TBOOX Open Source Group. +-- +-- @author ruki +-- @file theme.lua +-- + +-- define module +local sandbox_core_theme = sandbox_core_theme or {} + +-- load modules +local theme = require("theme/theme") +local raise = require("sandbox/modules/raise") + +-- get the current theme instance +function sandbox_core_theme.instance() + local instance = theme.instance() + if instance ~= nil then + return instance + else + raise("cannot get the current theme") + end +end + +-- get the theme configuration +function sandbox_core_theme.get(name) + local value = theme.get(name) + if value ~= nil then + return value + else + local instance = theme.instance() + raise("cannot get %s from the current theme(%s)", name, instance and instance:name() or "unknown") + end +end + +-- return module +return sandbox_core_theme diff --git a/xmake/core/theme/theme.lua b/xmake/core/theme/theme.lua index 5256de788..e5c109ae5 100644 --- a/xmake/core/theme/theme.lua +++ b/xmake/core/theme/theme.lua @@ -88,6 +88,7 @@ function theme._apis() { -- theme.set_xxx "theme.set_color" + , "theme.set_text" } } end @@ -154,6 +155,11 @@ function theme.load(name) return instance end +-- get the current theme instance +function theme.instance() + return theme._THEME +end + -- get the given theme configuration function theme.get(name) local instance = theme._THEME diff --git a/xmake/rules/qt/moc/xmake.lua b/xmake/rules/qt/moc/xmake.lua index 094937902..74ce3f24b 100644 --- a/xmake/rules/qt/moc/xmake.lua +++ b/xmake/rules/qt/moc/xmake.lua @@ -48,6 +48,7 @@ rule("qt.moc") -- imports import("moc") import("core.base.option") + import("core.theme.theme") import("core.project.config") import("core.tool.compiler") import("core.project.depend") @@ -81,10 +82,11 @@ rule("qt.moc") end -- trace progress info + cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) if option.get("verbose") then - cprint("${color.build.progress}[%3d%%]:${dim} compiling.qt.moc %s", opt.progress, headerfile_moc) + cprint("${color.build.object.verbose}compiling.qt.moc %s", headerfile_moc) else - cprint("${color.build.progress}[%3d%%]:${clear} compiling.qt.moc %s", opt.progress, headerfile_moc) + cprint("${color.build.object}compiling.qt.moc %s", headerfile_moc) end -- generate c++ source file for moc diff --git a/xmake/rules/qt/qrc/xmake.lua b/xmake/rules/qt/qrc/xmake.lua index e9971257c..c99ca5012 100644 --- a/xmake/rules/qt/qrc/xmake.lua +++ b/xmake/rules/qt/qrc/xmake.lua @@ -47,6 +47,7 @@ rule("qt.qrc") -- imports import("core.base.option") + import("core.theme.theme") import("core.project.config") import("core.project.depend") import("core.tool.compiler") @@ -84,10 +85,11 @@ rule("qt.qrc") end -- trace progress info + cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) if option.get("verbose") then - cprint("${color.build.progress}[%3d%%]:${dim} compiling.qt.qrc %s", opt.progress, sourcefile_qrc) + cprint("${color.build.object.verbose}compiling.qt.qrc %s", sourcefile_qrc) else - cprint("${color.build.progress}[%3d%%]:${clear} compiling.qt.qrc %s", opt.progress, sourcefile_qrc) + cprint("${color.build.object}compiling.qt.qrc %s", sourcefile_qrc) end -- ensure the source file directory diff --git a/xmake/rules/qt/ui/xmake.lua b/xmake/rules/qt/ui/xmake.lua index 454e7810b..f942512fd 100644 --- a/xmake/rules/qt/ui/xmake.lua +++ b/xmake/rules/qt/ui/xmake.lua @@ -47,6 +47,7 @@ rule("qt.ui") -- imports import("core.base.option") + import("core.theme.theme") import("core.project.config") import("core.project.depend") @@ -71,10 +72,11 @@ rule("qt.ui") end -- trace progress info + cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) if option.get("verbose") then - cprint("${color.build.progress}[%3d%%]:${dim} compiling.qt.ui %s", opt.progress, sourcefile_ui) + cprint("${color.build.object.verbose}compiling.qt.ui %s", sourcefile_ui) else - cprint("${color.build.progress}[%3d%%]:${clear} compiling.qt.ui %s", opt.progress, sourcefile_ui) + cprint("${color.build.object}compiling.qt.ui %s", sourcefile_ui) end -- ensure ui header file directory diff --git a/xmake/rules/wdk/inf/xmake.lua b/xmake/rules/wdk/inf/xmake.lua index b905bc69f..57af431a9 100644 --- a/xmake/rules/wdk/inf/xmake.lua +++ b/xmake/rules/wdk/inf/xmake.lua @@ -56,6 +56,7 @@ rule("wdk.inf") -- imports import("core.base.option") + import("core.theme.theme") import("core.project.depend") -- the target file @@ -94,10 +95,11 @@ rule("wdk.inf") end -- trace progress info + cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) if option.get("verbose") then - cprint("${color.build.progress}[%3d%%]:${dim} compiling.wdk.inf %s", opt.progress, sourcefile) + cprint("${color.build.object.verbose}compiling.wdk.inf %s", sourcefile) else - cprint("${color.build.progress}[%3d%%]:${clear} compiling.wdk.inf %s", opt.progress, sourcefile) + cprint("${color.build.object}compiling.wdk.inf %s", sourcefile) end -- get stampinf diff --git a/xmake/rules/wdk/man/xmake.lua b/xmake/rules/wdk/man/xmake.lua index e8bdeb8b5..d1211c73c 100644 --- a/xmake/rules/wdk/man/xmake.lua +++ b/xmake/rules/wdk/man/xmake.lua @@ -62,6 +62,7 @@ rule("wdk.man") -- imports import("core.base.option") + import("core.theme.theme") import("core.project.depend") -- get ctrpp @@ -124,10 +125,11 @@ rule("wdk.man") end -- trace progress info + cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) if option.get("verbose") then - cprint("${color.build.progress}[%3d%%]:${dim} compiling.wdk.man %s", opt.progress, sourcefile) + cprint("${color.build.object.verbose}compiling.wdk.man %s", sourcefile) else - cprint("${color.build.progress}[%3d%%]:${clear} compiling.wdk.man %s", opt.progress, sourcefile) + cprint("${color.build.object}compiling.wdk.man %s", sourcefile) end -- generate header and resource file diff --git a/xmake/rules/wdk/mc/xmake.lua b/xmake/rules/wdk/mc/xmake.lua index 438bd83f9..3e8f689cc 100644 --- a/xmake/rules/wdk/mc/xmake.lua +++ b/xmake/rules/wdk/mc/xmake.lua @@ -62,6 +62,7 @@ rule("wdk.mc") -- imports import("core.base.option") + import("core.theme.theme") import("core.project.depend") -- get mc @@ -104,10 +105,11 @@ rule("wdk.mc") end -- trace progress info + cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) if option.get("verbose") then - cprint("${color.build.progress}[%3d%%]:${dim} compiling.wdk.mc %s", opt.progress, sourcefile) + cprint("${color.build.object.verbose}compiling.wdk.mc %s", sourcefile) else - cprint("${color.build.progress}[%3d%%]:${clear} compiling.wdk.mc %s", opt.progress, sourcefile) + cprint("${color.build.object}compiling.wdk.mc %s", sourcefile) end -- do message compile diff --git a/xmake/rules/wdk/mof/xmake.lua b/xmake/rules/wdk/mof/xmake.lua index ca31e6eab..eb2de30bb 100644 --- a/xmake/rules/wdk/mof/xmake.lua +++ b/xmake/rules/wdk/mof/xmake.lua @@ -75,6 +75,7 @@ rule("wdk.mof") -- imports import("core.base.option") + import("core.theme.theme") import("core.project.depend") -- get mofcomp @@ -114,10 +115,11 @@ rule("wdk.mof") end -- trace progress info + cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) if option.get("verbose") then - cprint("${color.build.progress}[%3d%%]:${dim} compiling.wdk.mof %s", opt.progress, sourcefile) + cprint("${color.build.object.verbose}compiling.wdk.mof %s", sourcefile) else - cprint("${color.build.progress}[%3d%%]:${clear} compiling.wdk.mof %s", opt.progress, sourcefile) + cprint("${color.build.object}compiling.wdk.mof %s", sourcefile) end -- ensure the output directory diff --git a/xmake/rules/wdk/sign/xmake.lua b/xmake/rules/wdk/sign/xmake.lua index ea9241664..d0cb4eae4 100644 --- a/xmake/rules/wdk/sign/xmake.lua +++ b/xmake/rules/wdk/sign/xmake.lua @@ -93,6 +93,7 @@ rule("wdk.sign") -- imports import("sign") import("core.base.option") + import("core.theme.theme") import("core.project.config") import("core.project.depend") import("lib.detect.find_file") @@ -115,11 +116,11 @@ rule("wdk.sign") target:data_add("wdk.cleanfiles", {tempfile, dependfile}) -- trace progress info - cprintf("${color.build.progress}[%3d%%]:${clear} ", opt.progress) + cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) if option.get("verbose") then - cprint("${dim magenta}signing.%s %s", signmode, path.filename(target:targetfile())) + cprint("${color.build.target.verbose}signing.%s %s", signmode, path.filename(target:targetfile())) else - cprint("${magenta}signing.%s %s", signmode, path.filename(target:targetfile())) + cprint("${color.build.target}signing.%s %s", signmode, path.filename(target:targetfile())) end -- get arch diff --git a/xmake/rules/wdk/tracewpp/xmake.lua b/xmake/rules/wdk/tracewpp/xmake.lua index 094807dee..9458ead83 100644 --- a/xmake/rules/wdk/tracewpp/xmake.lua +++ b/xmake/rules/wdk/tracewpp/xmake.lua @@ -62,6 +62,7 @@ rule("wdk.tracewpp") -- imports import("core.base.option") + import("core.theme.theme") import("core.project.depend") -- get tracewpp @@ -102,10 +103,11 @@ rule("wdk.tracewpp") end -- trace progress info + cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) if option.get("verbose") then - cprint("${color.build.progress}[%3d%%]:${dim} compiling.wdk.tracewpp %s", opt.progress, sourcefile) + cprint("${color.build.object.verbose}compiling.wdk.tracewpp %s", sourcefile) else - cprint("${color.build.progress}[%3d%%]:${clear} compiling.wdk.tracewpp %s", opt.progress, sourcefile) + cprint("${color.build.object}compiling.wdk.tracewpp %s", sourcefile) end -- ensure the output directory diff --git a/xmake/themes/dark/xmake.lua b/xmake/themes/dark/xmake.lua index 11eeb3533..b9b4b66b6 100644 --- a/xmake/themes/dark/xmake.lua +++ b/xmake/themes/dark/xmake.lua @@ -25,22 +25,23 @@ -- define theme theme("dark") - -- set color of the error info + -- the error info set_color("error", "bright red") set_color("error.verbose", "dim red") - -- set color of the warning info + -- the warning info set_color("warning", "bright cyan") set_color("warning.verbose", "dim cyan") - -- the color of the building progress + -- the building progress + set_text("build.progress_format", "[%3d%%]") set_color("build.progress", "green") - -- the color of the building object file + -- the building object file set_color("build.object", "") set_color("build.object.verbose", "dim green") - -- the color of the building target file + -- the building target file set_color("build.target", "magenta") set_color("build.target.verbose", "dim magenta") diff --git a/xmake/themes/default/xmake.lua b/xmake/themes/default/xmake.lua index 5effabd96..556a80342 100644 --- a/xmake/themes/default/xmake.lua +++ b/xmake/themes/default/xmake.lua @@ -25,22 +25,24 @@ -- define theme theme("default") - -- set color of the error info + -- the error info set_color("error", "bright red") set_color("error.verbose", "dim red") - -- set color of the warning info + -- the warning info set_color("warning", "bright yellow") set_color("warning.verbose", "dim yellow") - -- the color of the building progress + -- the building progress + set_text("build.progress_format", "[%3d%%]") set_color("build.progress", "green") - -- the color of the building object file + -- the building object file set_color("build.object", "") set_color("build.object.verbose", "dim green") - -- the color of the building target file + -- the building target file set_color("build.target", "magenta") set_color("build.target.verbose", "dim magenta") + diff --git a/xmake/themes/emoji/xmake.lua b/xmake/themes/emoji/xmake.lua index f7a36a103..15ac7d23e 100644 --- a/xmake/themes/emoji/xmake.lua +++ b/xmake/themes/emoji/xmake.lua @@ -25,22 +25,23 @@ -- define theme theme("emoji") - -- set color of the error info + -- the error info set_color("error", "exclamation") set_color("error.verbose", "exclamation") - -- set color of the warning info + -- the warning info set_color("warning", "warning") set_color("warning.verbose", "warning") - -- the color of the building progress + -- the building progress + set_text("build.progress_format", "[%3d%%]") set_color("build.progress", "green") - -- the color of the building object file + -- the building object file set_color("build.object", "") set_color("build.object.verbose", "dim green") - -- the color of the building target file + -- 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 fa8353f95..7daf37ecc 100644 --- a/xmake/themes/plain/xmake.lua +++ b/xmake/themes/plain/xmake.lua @@ -25,21 +25,22 @@ -- define theme theme("plain") - -- set color of the error info + -- the error info set_color("error", "") set_color("error.verbose", "") - -- set color of the warning info + -- the warning info set_color("warning", "") set_color("warning.verbose", "") - -- the color of the building progress + -- the building progress + set_text("build.progress_format", "[%3d%%]") set_color("build.progress", "") - -- the color of the building object file + -- the building object file set_color("build.object", "") set_color("build.object.verbose", "") - -- the color of the building target file + -- the building target file set_color("build.target", "") set_color("build.target.verbose", "") |
