diff options
| author | ruki <[email protected]> | 2020-05-30 23:18:28 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-05-30 23:18:28 +0800 |
| commit | d50200be0abb94e7e627e7a25b5bab65d420eb16 (patch) | |
| tree | 06ab0407ff802bee7e9b7275df6081d657fe3609 /xmake/rules/utils | |
| parent | 8ee95c16390e8dbac222d1c0e665eb7dc43cccc7 (diff) | |
add progress.show
Diffstat (limited to 'xmake/rules/utils')
| -rw-r--r-- | xmake/rules/utils/merge_archive/xmake.lua | 9 | ||||
| -rw-r--r-- | xmake/rules/utils/symbols/xmake.lua | 8 |
2 files changed, 4 insertions, 13 deletions
diff --git a/xmake/rules/utils/merge_archive/xmake.lua b/xmake/rules/utils/merge_archive/xmake.lua index 2361b35c0..01b56caf0 100644 --- a/xmake/rules/utils/merge_archive/xmake.lua +++ b/xmake/rules/utils/merge_archive/xmake.lua @@ -33,6 +33,7 @@ rule("utils.merge.archive") import("core.project.depend") import("core.tool.extractor") import("core.project.target", {alias = "project_target"}) + import("private.utils.progress") -- @note we cannot process archives in parallel because the current directory may be changed for i = 1, #sourcebatch.sourcefiles do @@ -55,13 +56,7 @@ rule("utils.merge.archive") end -- trace progress info - local progress_prefix = "${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} " - if option.get("verbose") then - cprint(progress_prefix .. "${dim color.build.object}inserting.$(mode) %s", opt.progress, sourcefile_lib) - print("extracting %s to %s", sourcefile_lib, objectdir) - else - cprint(progress_prefix .. "${color.build.object}inserting.$(mode) %s", opt.progress, sourcefile_lib) - end + progress.show(opt.progress, "${color.build.object}inserting.$(mode) %s", sourcefile_lib) -- extract the archive library os.tryrm(objectdir) diff --git a/xmake/rules/utils/symbols/xmake.lua b/xmake/rules/utils/symbols/xmake.lua index dae924a08..5277cd783 100644 --- a/xmake/rules/utils/symbols/xmake.lua +++ b/xmake/rules/utils/symbols/xmake.lua @@ -41,6 +41,7 @@ rule("utils.symbols.extract") import("core.theme.theme") import("core.project.depend") import("core.platform.platform") + import("private.utils.progress") -- get strip local strip = platform.tool("strip") @@ -67,12 +68,7 @@ rule("utils.symbols.extract") end -- trace progress info - local progress_prefix = "${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} " - if option.get("verbose") then - cprint(progress_prefix .. "${dim color.build.target}generating.$(mode) %s", opt.progress, path.filename(symbolfile)) - else - cprint(progress_prefix .. "${color.build.target}generating.$(mode) %s", opt.progress, path.filename(symbolfile)) - end + progress.show(opt.progress, "${color.build.target}generating.$(mode) %s", path.filename(symbolfile)) -- we remove the previous symbol file to ensure that it will be re-generated and it's mtime will be changed. local dryrun = option.get("dry-run") |
