Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revise progress formatting to space-leading three digit percentages #249

Merged
merged 1 commit into from
Nov 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions xmake/actions/build/kinds/binary.lua
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function _build_from_objects(target, buildinfo)
local verbose = option.get("verbose")

-- trace progress into
cprintf("${green}[%02d%%]:${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount)
cprintf("${green}[%3d%%]:${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount)
if verbose then
cprint("${dim magenta}linking.$(mode) %s", path.filename(targetfile))
else
Expand Down Expand Up @@ -111,7 +111,7 @@ function _build_from_sources(target, buildinfo, sourcebatch, sourcekind)
local verbose = option.get("verbose")

-- trace progress into
cprintf("${green}[%02d%%]:${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount)
cprintf("${green}[%3d%%]:${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount)
if verbose then
cprint("${dim magenta}linking.$(mode) %s", path.filename(targetfile))
else
Expand Down
16 changes: 8 additions & 8 deletions xmake/actions/build/kinds/object.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ function _build_from_object(target, sourcefile, objectfile, progress)

-- trace progress info
if verbose then
cprint("${green}[%02d%%]: ${dim magenta}inserting.$(mode) %s", progress, sourcefile)
cprint("${green}[%3d%%]: ${dim magenta}inserting.$(mode) %s", progress, sourcefile)
else
cprint("${green}[%02d%%]: ${magenta}inserting.$(mode) %s", progress, sourcefile)
cprint("${green}[%3d%%]: ${magenta}inserting.$(mode) %s", progress, sourcefile)
end

-- trace verbose info
Expand All @@ -66,9 +66,9 @@ function _build_from_static(target, sourcefile, objectfile, progress)

-- trace progress info
if verbose then
cprint("${green}[%02d%%]: ${dim magenta}inserting.$(mode) %s", progress, sourcefile)
cprint("${green}[%3d%%]: ${dim magenta}inserting.$(mode) %s", progress, sourcefile)
else
cprint("${green}[%02d%%]: ${magenta}inserting.$(mode) %s", progress, sourcefile)
cprint("${green}[%3d%%]: ${magenta}inserting.$(mode) %s", progress, sourcefile)
end

-- trace verbose info
Expand Down Expand Up @@ -123,9 +123,9 @@ function _build_object(target, buildinfo, index, sourcebatch, ccache)

-- trace progress info
if verbose then
cprint("${green}[%02d%%]:${dim} %scompiling.$(mode) %s", progress, ifelse(ccache, "ccache ", ""), sourcefile)
cprint("${green}[%3d%%]:${dim} %scompiling.$(mode) %s", progress, ifelse(ccache, "ccache ", ""), sourcefile)
else
cprint("${green}[%02d%%]:${clear} %scompiling.$(mode) %s", progress, ifelse(ccache, "ccache ", ""), sourcefile)
cprint("${green}[%3d%%]:${clear} %scompiling.$(mode) %s", progress, ifelse(ccache, "ccache ", ""), sourcefile)
end

-- trace verbose info
Expand Down Expand Up @@ -184,9 +184,9 @@ function _build_single_object(target, buildinfo, sourcekind, sourcebatch, jobs,

-- trace progress info
if verbose then
cprint("${green}[%02d%%]:${clear} ${dim}%scompiling.$(mode) %s", progress, ifelse(ccache, "ccache ", ""), sourcefile)
cprint("${green}[%3d%%]:${clear} ${dim}%scompiling.$(mode) %s", progress, ifelse(ccache, "ccache ", ""), sourcefile)
else
cprint("${green}[%02d%%]:${clear} %scompiling.$(mode) %s", progress, ifelse(ccache, "ccache ", ""), sourcefile)
cprint("${green}[%3d%%]:${clear} %scompiling.$(mode) %s", progress, ifelse(ccache, "ccache ", ""), sourcefile)
end
end

Expand Down
4 changes: 2 additions & 2 deletions xmake/actions/build/kinds/shared.lua
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function _build_from_objects(target, buildinfo)
local verbose = option.get("verbose")

-- trace progress info
cprintf("${green}[%02d%%]:${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount)
cprintf("${green}[%3d%%]:${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount)
if verbose then
cprint("${dim magenta}linking.$(mode) %s", path.filename(targetfile))
else
Expand Down Expand Up @@ -124,7 +124,7 @@ function _build_from_sources(target, buildinfo, sourcebatch, sourcekind)
local verbose = option.get("verbose")

-- trace progress into
cprintf("${green}[%02d%%]:${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount)
cprintf("${green}[%3d%%]:${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount)
if verbose then
cprint("${dim magenta}linking.$(mode) %s", path.filename(targetfile))
else
Expand Down
4 changes: 2 additions & 2 deletions xmake/actions/build/kinds/static.lua
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function _build_from_objects(target, buildinfo)
local verbose = option.get("verbose")

-- trace progress info
cprintf("${green}[%02d%%]:${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount)
cprintf("${green}[%3d%%]:${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount)
if verbose then
cprint("${dim magenta}archiving.$(mode) %s", path.filename(targetfile))
else
Expand Down Expand Up @@ -120,7 +120,7 @@ function _build_from_sources(target, buildinfo, sourcebatch, sourcekind)
local verbose = option.get("verbose")

-- trace progress into
cprintf("${green}[%02d%%]:${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount)
cprintf("${green}[%3d%%]:${clear} ", (buildinfo.targetindex + 1) * 100 / buildinfo.targetcount)
if verbose then
cprint("${dim magenta}archiving.$(mode) %s", path.filename(targetfile))
else
Expand Down
4 changes: 2 additions & 2 deletions xmake/rules/qt/moc/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ rule("qt.moc")

-- trace progress info
if option.get("verbose") then
cprint("${green}[%02d%%]:${dim} compiling.qt.moc %s", opt.progress, headerfile_moc)
cprint("${green}[%3d%%]:${dim} compiling.qt.moc %s", opt.progress, headerfile_moc)
else
cprint("${green}[%02d%%]:${clear} compiling.qt.moc %s", opt.progress, headerfile_moc)
cprint("${green}[%3d%%]:${clear} compiling.qt.moc %s", opt.progress, headerfile_moc)
end

-- generate c++ source file for moc
Expand Down
4 changes: 2 additions & 2 deletions xmake/rules/qt/qrc/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ rule("qt.qrc")

-- trace progress info
if option.get("verbose") then
cprint("${green}[%02d%%]:${dim} compiling.qt.qrc %s", opt.progress, sourcefile_qrc)
cprint("${green}[%3d%%]:${dim} compiling.qt.qrc %s", opt.progress, sourcefile_qrc)
else
cprint("${green}[%02d%%]:${clear} compiling.qt.qrc %s", opt.progress, sourcefile_qrc)
cprint("${green}[%3d%%]:${clear} compiling.qt.qrc %s", opt.progress, sourcefile_qrc)
end

-- ensure the source file directory
Expand Down
4 changes: 2 additions & 2 deletions xmake/rules/qt/ui/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ rule("qt.ui")

-- trace progress info
if option.get("verbose") then
cprint("${green}[%02d%%]:${dim} compiling.qt.ui %s", opt.progress, sourcefile_ui)
cprint("${green}[%3d%%]:${dim} compiling.qt.ui %s", opt.progress, sourcefile_ui)
else
cprint("${green}[%02d%%]:${clear} compiling.qt.ui %s", opt.progress, sourcefile_ui)
cprint("${green}[%3d%%]:${clear} compiling.qt.ui %s", opt.progress, sourcefile_ui)
end

-- ensure ui header file directory
Expand Down
4 changes: 2 additions & 2 deletions xmake/rules/wdk/inf/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ rule("wdk.inf")

-- trace progress info
if option.get("verbose") then
cprint("${green}[%02d%%]:${dim} compiling.wdk.inf %s", opt.progress, sourcefile)
cprint("${green}[%3d%%]:${dim} compiling.wdk.inf %s", opt.progress, sourcefile)
else
cprint("${green}[%02d%%]:${clear} compiling.wdk.inf %s", opt.progress, sourcefile)
cprint("${green}[%3d%%]:${clear} compiling.wdk.inf %s", opt.progress, sourcefile)
end

-- get stampinf
Expand Down
4 changes: 2 additions & 2 deletions xmake/rules/wdk/man/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ rule("wdk.man")

-- trace progress info
if option.get("verbose") then
cprint("${green}[%02d%%]:${dim} compiling.wdk.man %s", opt.progress, sourcefile)
cprint("${green}[%3d%%]:${dim} compiling.wdk.man %s", opt.progress, sourcefile)
else
cprint("${green}[%02d%%]:${clear} compiling.wdk.man %s", opt.progress, sourcefile)
cprint("${green}[%3d%%]:${clear} compiling.wdk.man %s", opt.progress, sourcefile)
end

-- generate header and resource file
Expand Down
4 changes: 2 additions & 2 deletions xmake/rules/wdk/mc/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ rule("wdk.mc")

-- trace progress info
if option.get("verbose") then
cprint("${green}[%02d%%]:${dim} compiling.wdk.mc %s", opt.progress, sourcefile)
cprint("${green}[%3d%%]:${dim} compiling.wdk.mc %s", opt.progress, sourcefile)
else
cprint("${green}[%02d%%]:${clear} compiling.wdk.mc %s", opt.progress, sourcefile)
cprint("${green}[%3d%%]:${clear} compiling.wdk.mc %s", opt.progress, sourcefile)
end

-- do message compile
Expand Down
4 changes: 2 additions & 2 deletions xmake/rules/wdk/mof/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ rule("wdk.mof")

-- trace progress info
if option.get("verbose") then
cprint("${green}[%02d%%]:${dim} compiling.wdk.mof %s", opt.progress, sourcefile)
cprint("${green}[%3d%%]:${dim} compiling.wdk.mof %s", opt.progress, sourcefile)
else
cprint("${green}[%02d%%]:${clear} compiling.wdk.mof %s", opt.progress, sourcefile)
cprint("${green}[%3d%%]:${clear} compiling.wdk.mof %s", opt.progress, sourcefile)
end

-- ensure the output directory
Expand Down
2 changes: 1 addition & 1 deletion xmake/rules/wdk/sign/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ rule("wdk.sign")
target:data_add("wdk.cleanfiles", {tempfile, dependfile})

-- trace progress info
cprintf("${green}[%02d%%]:${clear} ", opt.progress)
cprintf("${green}[%3d%%]:${clear} ", opt.progress)
if option.get("verbose") then
cprint("${dim magenta}signing.%s %s", signmode, path.filename(target:targetfile()))
else
Expand Down
4 changes: 2 additions & 2 deletions xmake/rules/wdk/tracewpp/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ rule("wdk.tracewpp")

-- trace progress info
if option.get("verbose") then
cprint("${green}[%02d%%]:${dim} compiling.wdk.tracewpp %s", opt.progress, sourcefile)
cprint("${green}[%3d%%]:${dim} compiling.wdk.tracewpp %s", opt.progress, sourcefile)
else
cprint("${green}[%02d%%]:${clear} compiling.wdk.tracewpp %s", opt.progress, sourcefile)
cprint("${green}[%3d%%]:${clear} compiling.wdk.tracewpp %s", opt.progress, sourcefile)
end

-- ensure the output directory
Expand Down