diff options
| author | ruki <[email protected]> | 2020-05-30 23:34:23 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-05-30 23:34:23 +0800 |
| commit | f432fd004a28db20d312fb68dfd10734ba7a2295 (patch) | |
| tree | f3b9f0f34394f76fc1b1fef143d1a752c7a45533 | |
| parent | d50200be0abb94e7e627e7a25b5bab65d420eb16 (diff) | |
improve to show progress
| -rw-r--r-- | xmake/rules/cuda/devlink/xmake.lua | 8 | ||||
| -rw-r--r-- | xmake/rules/lex_yacc/lex/xmake.lua | 8 | ||||
| -rw-r--r-- | xmake/rules/lex_yacc/yacc/xmake.lua | 8 | ||||
| -rw-r--r-- | xmake/rules/protobuf/proto.lua | 8 | ||||
| -rw-r--r-- | xmake/rules/qt/deploy/android.lua | 8 | ||||
| -rw-r--r-- | xmake/rules/qt/deploy/macosx.lua | 8 | ||||
| -rw-r--r-- | xmake/rules/qt/moc/xmake.lua | 8 | ||||
| -rw-r--r-- | xmake/rules/qt/qrc/xmake.lua | 8 | ||||
| -rw-r--r-- | xmake/rules/qt/ui/xmake.lua | 8 | ||||
| -rw-r--r-- | xmake/rules/utils/merge_object/xmake.lua | 14 | ||||
| -rw-r--r-- | xmake/rules/wdk/inf/xmake.lua | 8 | ||||
| -rw-r--r-- | xmake/rules/wdk/man/xmake.lua | 8 | ||||
| -rw-r--r-- | xmake/rules/wdk/mc/xmake.lua | 8 | ||||
| -rw-r--r-- | xmake/rules/wdk/mof/xmake.lua | 8 | ||||
| -rw-r--r-- | xmake/rules/wdk/sign/xmake.lua | 8 | ||||
| -rw-r--r-- | xmake/rules/wdk/tracewpp/xmake.lua | 8 | ||||
| -rw-r--r-- | xmake/rules/xcode/application/build.lua | 8 | ||||
| -rw-r--r-- | xmake/rules/xcode/bundle/xmake.lua | 8 | ||||
| -rw-r--r-- | xmake/rules/xcode/framework/xmake.lua | 8 | ||||
| -rw-r--r-- | xmake/rules/xcode/info_plist/xmake.lua | 8 | ||||
| -rw-r--r-- | xmake/rules/xcode/storyboard/xmake.lua | 8 | ||||
| -rw-r--r-- | xmake/rules/xcode/xcassets/xmake.lua | 8 |
22 files changed, 45 insertions, 137 deletions
diff --git a/xmake/rules/cuda/devlink/xmake.lua b/xmake/rules/cuda/devlink/xmake.lua index a2a8651e7..2b4fb64cc 100644 --- a/xmake/rules/cuda/devlink/xmake.lua +++ b/xmake/rules/cuda/devlink/xmake.lua @@ -34,6 +34,7 @@ rule("cuda.build.devlink") import("core.project.depend") import("core.tool.linker") import("core.platform.platform") + import("private.utils.progress") -- disable devlink? if target:values("cuda.build.devlink") == false then @@ -92,12 +93,7 @@ rule("cuda.build.devlink") local verbose = option.get("verbose") -- trace progress info - cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) - if verbose then - cprint("${dim color.build.target}devlinking.$(mode) %s", path.filename(targetfile)) - else - cprint("${color.build.target}devlinking.$(mode) %s", path.filename(targetfile)) - end + progress.show(opt.progress, "${color.build.target}devlinking.$(mode) %s", path.filename(targetfile)) -- trace verbose info if verbose then diff --git a/xmake/rules/lex_yacc/lex/xmake.lua b/xmake/rules/lex_yacc/lex/xmake.lua index fafdf7b8c..24c1242c8 100644 --- a/xmake/rules/lex_yacc/lex/xmake.lua +++ b/xmake/rules/lex_yacc/lex/xmake.lua @@ -50,6 +50,7 @@ rule("lex") import("core.project.config") import("core.project.depend") import("core.tool.compiler") + import("private.utils.progress") -- get lex local lex = assert(config.get("__lex"), "lex not found!") @@ -84,12 +85,7 @@ rule("lex") end -- trace progress info - cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) - if option.get("verbose") then - cprint("${dim color.build.object}compiling.lex %s", sourcefile_lex) - else - cprint("${color.build.object}compiling.lex %s", sourcefile_lex) - end + progress.show(opt.progress, "${color.build.object}compiling.lex %s", sourcefile_lex) -- ensure the source file directory if not os.isdir(sourcefile_dir) then diff --git a/xmake/rules/lex_yacc/yacc/xmake.lua b/xmake/rules/lex_yacc/yacc/xmake.lua index 710e9ebc6..6cdc731a4 100644 --- a/xmake/rules/lex_yacc/yacc/xmake.lua +++ b/xmake/rules/lex_yacc/yacc/xmake.lua @@ -50,6 +50,7 @@ rule("yacc") import("core.project.config") import("core.project.depend") import("core.tool.compiler") + import("private.utils.progress") -- get yacc local yacc = assert(config.get("__yacc"), "yacc not found!") @@ -84,12 +85,7 @@ rule("yacc") end -- trace progress info - cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) - if option.get("verbose") then - cprint("${dim color.build.object}compiling.yacc %s", sourcefile_yacc) - else - cprint("${color.build.object}compiling.yacc %s", sourcefile_yacc) - end + progress.show(opt.progress, "${color.build.object}compiling.yacc %s", sourcefile_yacc) -- ensure the source file directory if not os.isdir(sourcefile_dir) then diff --git a/xmake/rules/protobuf/proto.lua b/xmake/rules/protobuf/proto.lua index 46ab03ce3..24c482186 100644 --- a/xmake/rules/protobuf/proto.lua +++ b/xmake/rules/protobuf/proto.lua @@ -25,6 +25,7 @@ import("core.project.config") import("core.project.depend") import("core.tool.compiler") import("lib.detect.find_tool") +import("private.utils.progress") -- build protobuf file function main(target, sourcekind, sourcefile_proto, opt) @@ -84,12 +85,7 @@ function main(target, sourcekind, sourcefile_proto, opt) end -- trace progress info - cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) - if option.get("verbose") then - cprint("${dim color.build.object}compiling.proto %s", sourcefile_proto) - else - cprint("${color.build.object}compiling.proto %s", sourcefile_proto) - end + progress.show(opt.progress, "${color.build.object}compiling.proto %s", sourcefile_proto) -- ensure the source file directory if not os.isdir(sourcefile_dir) then diff --git a/xmake/rules/qt/deploy/android.lua b/xmake/rules/qt/deploy/android.lua index dd19e7318..dbd2d7e58 100644 --- a/xmake/rules/qt/deploy/android.lua +++ b/xmake/rules/qt/deploy/android.lua @@ -24,6 +24,7 @@ import("core.base.option") import("core.base.semver") import("core.project.config") import("core.project.depend") +import("private.utils.progress") -- escape path function _escape_path(p) @@ -45,12 +46,7 @@ function main(target, opt) end -- trace progress info - cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) - if option.get("verbose") then - cprint("${dim color.build.target}generating.qt.app %s.apk", target:basename()) - else - cprint("${color.build.target}generating.qt.app %s.apk", target:basename()) - end + progress.show(opt.progress, "${color.build.target}generating.qt.app %s.apk", target:basename()) -- get qt sdk local qt = target:data("qt") diff --git a/xmake/rules/qt/deploy/macosx.lua b/xmake/rules/qt/deploy/macosx.lua index b0a3c08a5..bbefe38ee 100644 --- a/xmake/rules/qt/deploy/macosx.lua +++ b/xmake/rules/qt/deploy/macosx.lua @@ -24,6 +24,7 @@ import("core.base.option") import("core.project.config") import("core.project.depend") import("lib.detect.find_path") +import("private.utils.progress") -- save Info.plist function _save_info_plist(target, info_plist_file) @@ -74,12 +75,7 @@ function main(target, opt) end -- trace progress info - cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) - if option.get("verbose") then - cprint("${dim color.build.target}generating.qt.app %s.app", target:basename()) - else - cprint("${color.build.target}generating.qt.app %s.app", target:basename()) - end + progress.show(opt.progress, "${color.build.target}generating.qt.app %s.app", target:basename()) -- get qt sdk local qt = target:data("qt") diff --git a/xmake/rules/qt/moc/xmake.lua b/xmake/rules/qt/moc/xmake.lua index d162b4e11..aad412628 100644 --- a/xmake/rules/qt/moc/xmake.lua +++ b/xmake/rules/qt/moc/xmake.lua @@ -48,6 +48,7 @@ rule("qt.moc") import("core.project.config") import("core.tool.compiler") import("core.project.depend") + import("private.utils.progress") -- get c++ source file for moc -- @@ -84,12 +85,7 @@ 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("${dim color.build.object}compiling.qt.moc %s", sourcefile) - else - cprint("${color.build.object}compiling.qt.moc %s", sourcefile) - end + progress.show(opt.progress, "${color.build.object}compiling.qt.moc %s", sourcefile) -- generate c++ source file for moc moc.generate(target, sourcefile, sourcefile_moc) diff --git a/xmake/rules/qt/qrc/xmake.lua b/xmake/rules/qt/qrc/xmake.lua index b21ce0439..132d54965 100644 --- a/xmake/rules/qt/qrc/xmake.lua +++ b/xmake/rules/qt/qrc/xmake.lua @@ -47,6 +47,7 @@ rule("qt.qrc") import("core.project.config") import("core.project.depend") import("core.tool.compiler") + import("private.utils.progress") -- get rcc local rcc = target:data("qt.rcc") @@ -78,12 +79,7 @@ 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("${dim color.build.object}compiling.qt.qrc %s", sourcefile_qrc) - else - cprint("${color.build.object}compiling.qt.qrc %s", sourcefile_qrc) - end + progress.show(opt.progress, "${color.build.object}compiling.qt.qrc %s", sourcefile_qrc) -- ensure the source file directory if not os.isdir(sourcefile_dir) then diff --git a/xmake/rules/qt/ui/xmake.lua b/xmake/rules/qt/ui/xmake.lua index 636beb478..88b23150e 100644 --- a/xmake/rules/qt/ui/xmake.lua +++ b/xmake/rules/qt/ui/xmake.lua @@ -46,6 +46,7 @@ rule("qt.ui") import("core.theme.theme") import("core.project.config") import("core.project.depend") + import("private.utils.progress") -- get uic local uic = target:data("qt.uic") @@ -65,12 +66,7 @@ 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("${dim color.build.object}compiling.qt.ui %s", sourcefile_ui) - else - cprint("${color.build.object}compiling.qt.ui %s", sourcefile_ui) - end + progress.show(opt.progress, "${color.build.object}compiling.qt.ui %s", sourcefile_ui) -- ensure ui header file directory if not os.isdir(headerfile_dir) then diff --git a/xmake/rules/utils/merge_object/xmake.lua b/xmake/rules/utils/merge_object/xmake.lua index 74cc5ac18..a826ddf36 100644 --- a/xmake/rules/utils/merge_object/xmake.lua +++ b/xmake/rules/utils/merge_object/xmake.lua @@ -31,6 +31,7 @@ rule("utils.merge.object") import("core.base.option") import("core.theme.theme") import("core.project.depend") + import("private.utils.progress") -- get object file local objectfile = target:objectfile(sourcefile_obj) @@ -48,19 +49,10 @@ rule("utils.merge.object") end -- trace progress info - cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) - if option.get("verbose") then - cprint("${dim color.build.object}inserting.$(mode) %s", sourcefile_obj) - print("copying %s to %s", sourcefile_obj, objectfile) - else - cprint("${color.build.object}inserting.$(mode) %s", sourcefile_obj) - end - - -- flush io buffer to update progress info - io.flush() + progress.show(opt.progress, "${color.build.object}inserting.$(mode) %s", sourcefile_obj) -- insert this object file - os.cp(sourcefile_obj, objectfile) + os.vcp(sourcefile_obj, objectfile) -- update files to the dependent file dependinfo.files = {} diff --git a/xmake/rules/wdk/inf/xmake.lua b/xmake/rules/wdk/inf/xmake.lua index c354c4753..6b6ca4b6f 100644 --- a/xmake/rules/wdk/inf/xmake.lua +++ b/xmake/rules/wdk/inf/xmake.lua @@ -54,6 +54,7 @@ rule("wdk.inf") import("core.base.option") import("core.theme.theme") import("core.project.depend") + import("private.utils.progress") -- the target file local targetfile = path.join(target:targetdir(), path.basename(sourcefile) .. ".inf") @@ -88,12 +89,7 @@ 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("${dim color.build.object}compiling.wdk.inf %s", sourcefile) - else - cprint("${color.build.object}compiling.wdk.inf %s", sourcefile) - end + progress.show(opt.progress, "${color.build.object}compiling.wdk.inf %s", sourcefile) -- get stampinf local stampinf = target:data("wdk.stampinf") diff --git a/xmake/rules/wdk/man/xmake.lua b/xmake/rules/wdk/man/xmake.lua index fe08f8bb3..7aeb75c20 100644 --- a/xmake/rules/wdk/man/xmake.lua +++ b/xmake/rules/wdk/man/xmake.lua @@ -57,6 +57,7 @@ rule("wdk.man") import("core.base.option") import("core.theme.theme") import("core.project.depend") + import("private.utils.progress") -- get ctrpp local ctrpp = target:data("wdk.ctrpp") @@ -115,12 +116,7 @@ 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("${dim color.build.object}compiling.wdk.man %s", sourcefile) - else - cprint("${color.build.object}compiling.wdk.man %s", sourcefile) - end + progress.show(opt.progress, "${color.build.object}compiling.wdk.man %s", sourcefile) -- generate header and resource file if not os.isdir(outputdir) then diff --git a/xmake/rules/wdk/mc/xmake.lua b/xmake/rules/wdk/mc/xmake.lua index 08d93a7b4..273ec5acd 100644 --- a/xmake/rules/wdk/mc/xmake.lua +++ b/xmake/rules/wdk/mc/xmake.lua @@ -57,6 +57,7 @@ rule("wdk.mc") import("core.base.option") import("core.theme.theme") import("core.project.depend") + import("private.utils.progress") -- get mc local mc = target:data("wdk.mc") @@ -97,12 +98,7 @@ 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("${dim color.build.object}compiling.wdk.mc %s", sourcefile) - else - cprint("${color.build.object}compiling.wdk.mc %s", sourcefile) - end + progress.show(opt.progress, "${color.build.object}compiling.wdk.mc %s", sourcefile) -- do message compile if not os.isdir(outputdir) then diff --git a/xmake/rules/wdk/mof/xmake.lua b/xmake/rules/wdk/mof/xmake.lua index c155307fa..0902ff945 100644 --- a/xmake/rules/wdk/mof/xmake.lua +++ b/xmake/rules/wdk/mof/xmake.lua @@ -73,6 +73,7 @@ rule("wdk.mof") import("core.base.option") import("core.theme.theme") import("core.project.depend") + import("private.utils.progress") -- get mofcomp local mofcomp = target:data("wdk.mofcomp") @@ -107,12 +108,7 @@ 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("${dim color.build.object}compiling.wdk.mof %s", sourcefile) - else - cprint("${color.build.object}compiling.wdk.mof %s", sourcefile) - end + progress.show(opt.progress, "${color.build.object}compiling.wdk.mof %s", sourcefile) -- ensure the output directory if not os.isdir(outputdir) then diff --git a/xmake/rules/wdk/sign/xmake.lua b/xmake/rules/wdk/sign/xmake.lua index 6e6dafa1e..5cbfd1509 100644 --- a/xmake/rules/wdk/sign/xmake.lua +++ b/xmake/rules/wdk/sign/xmake.lua @@ -93,6 +93,7 @@ rule("wdk.sign") import("core.project.config") import("core.project.depend") import("lib.detect.find_file") + import("private.utils.progress") -- need build this object? local tempfile = os.tmpfile(target:targetfile()) @@ -109,12 +110,7 @@ rule("wdk.sign") end -- trace progress info - cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) - if option.get("verbose") then - 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 + progress.show(opt.progress, "${color.build.target}signing.%s %s", signmode, path.filename(target:targetfile())) -- get arch local arch = assert(config.arch(), "arch not found!") diff --git a/xmake/rules/wdk/tracewpp/xmake.lua b/xmake/rules/wdk/tracewpp/xmake.lua index fc822b7fc..3181ec4e5 100644 --- a/xmake/rules/wdk/tracewpp/xmake.lua +++ b/xmake/rules/wdk/tracewpp/xmake.lua @@ -57,6 +57,7 @@ rule("wdk.tracewpp") import("core.base.option") import("core.theme.theme") import("core.project.depend") + import("private.utils.progress") -- get tracewpp local tracewpp = target:data("wdk.tracewpp") @@ -93,12 +94,7 @@ 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("${dim color.build.object}compiling.wdk.tracewpp %s", sourcefile) - else - cprint("${color.build.object}compiling.wdk.tracewpp %s", sourcefile) - end + progress.show(opt.progress, "${color.build.object}compiling.wdk.tracewpp %s", sourcefile) -- ensure the output directory if not os.isdir(outputdir) then diff --git a/xmake/rules/xcode/application/build.lua b/xmake/rules/xcode/application/build.lua index d46d8d985..adde11cc3 100644 --- a/xmake/rules/xcode/application/build.lua +++ b/xmake/rules/xcode/application/build.lua @@ -23,6 +23,7 @@ import("core.base.option") import("core.theme.theme") import("core.project.depend") import("private.tools.codesign") +import("private.utils.progress") -- main entry function main (target, opt) @@ -40,12 +41,7 @@ function main (target, opt) end -- trace progress info - cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) - if option.get("verbose") then - cprint("${dim color.build.target}generating.xcode.$(mode) %s", path.filename(bundledir)) - else - cprint("${color.build.target}generating.xcode.$(mode) %s", path.filename(bundledir)) - end + progress.show(opt.progress, "${color.build.target}generating.xcode.$(mode) %s", path.filename(bundledir)) -- copy target file local binarydir = contentsdir diff --git a/xmake/rules/xcode/bundle/xmake.lua b/xmake/rules/xcode/bundle/xmake.lua index 3fc54c783..183f6cb84 100644 --- a/xmake/rules/xcode/bundle/xmake.lua +++ b/xmake/rules/xcode/bundle/xmake.lua @@ -60,6 +60,7 @@ rule("xcode.bundle") import("core.theme.theme") import("core.project.depend") import("private.tools.codesign") + import("private.utils.progress") -- get bundle and resources directory local bundledir = path.absolute(target:data("xcode.bundle.rootdir")) @@ -74,12 +75,7 @@ rule("xcode.bundle") end -- trace progress info - cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) - if option.get("verbose") then - cprint("${dim color.build.target}generating.xcode.$(mode) %s", path.filename(bundledir)) - else - cprint("${color.build.target}generating.xcode.$(mode) %s", path.filename(bundledir)) - end + progress.show(opt.progress, "${color.build.target}generating.xcode.$(mode) %s", path.filename(bundledir)) -- copy target file if is_plat("macosx") then diff --git a/xmake/rules/xcode/framework/xmake.lua b/xmake/rules/xcode/framework/xmake.lua index 46bbf6476..192755729 100644 --- a/xmake/rules/xcode/framework/xmake.lua +++ b/xmake/rules/xcode/framework/xmake.lua @@ -85,6 +85,7 @@ rule("xcode.framework") import("core.theme.theme") import("core.project.depend") import("private.tools.codesign") + import("private.utils.progress") -- get framework directory local bundledir = path.absolute(target:data("xcode.bundle.rootdir")) @@ -100,12 +101,7 @@ rule("xcode.framework") end -- trace progress info - cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) - if option.get("verbose") then - cprint("${dim color.build.target}generating.xcode.$(mode) %s", path.filename(bundledir)) - else - cprint("${color.build.target}generating.xcode.$(mode) %s", path.filename(bundledir)) - end + progress.show(opt.progress, "${color.build.target}generating.xcode.$(mode) %s", path.filename(bundledir)) -- copy target file if not os.isdir(contentsdir) then diff --git a/xmake/rules/xcode/info_plist/xmake.lua b/xmake/rules/xcode/info_plist/xmake.lua index 21a514e47..5f4894824 100644 --- a/xmake/rules/xcode/info_plist/xmake.lua +++ b/xmake/rules/xcode/info_plist/xmake.lua @@ -31,6 +31,7 @@ rule("xcode.info_plist") import("core.base.option") import("core.theme.theme") import("core.project.depend") + import("private.utils.process") -- check assert(path.filename(sourcefile) == "Info.plist", "we only support Info.plist file!") @@ -47,12 +48,7 @@ rule("xcode.info_plist") end -- trace progress info - cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) - if option.get("verbose") then - cprint("${dim color.build.object}processing.xcode.$(mode) %s", sourcefile) - else - cprint("${color.build.object}processing.xcode.$(mode) %s", sourcefile) - end + progress.show(opt.progress, "${color.build.object}processing.xcode.$(mode) %s", sourcefile) -- process and generate Info.plist local info_plist_file = path.join(target:rule("xcode.framework") and resourcesdir or contentsdir, path.filename(sourcefile)) diff --git a/xmake/rules/xcode/storyboard/xmake.lua b/xmake/rules/xcode/storyboard/xmake.lua index fabc60082..bc9444d38 100644 --- a/xmake/rules/xcode/storyboard/xmake.lua +++ b/xmake/rules/xcode/storyboard/xmake.lua @@ -31,6 +31,7 @@ rule("xcode.storyboard") import("core.base.option") import("core.theme.theme") import("core.project.depend") + import("private.utils.progress") -- get xcode sdk directory local xcode_sdkdir = assert(get_config("xcode"), "xcode not found!") @@ -50,12 +51,7 @@ rule("xcode.storyboard") end -- trace progress info - cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) - if option.get("verbose") then - cprint("${dim color.build.object}compiling.xcode.$(mode) %s", sourcefile) - else - cprint("${color.build.object}compiling.xcode.$(mode) %s", sourcefile) - end + progress.show(opt.progress, "${color.build.object}compiling.xcode.$(mode) %s", sourcefile) -- clear Base.lproj first os.tryrm(base_lproj) diff --git a/xmake/rules/xcode/xcassets/xmake.lua b/xmake/rules/xcode/xcassets/xmake.lua index a84d3c8ff..df25794e5 100644 --- a/xmake/rules/xcode/xcassets/xmake.lua +++ b/xmake/rules/xcode/xcassets/xmake.lua @@ -31,6 +31,7 @@ rule("xcode.xcassets") import("core.base.option") import("core.theme.theme") import("core.project.depend") + import("private.utils.progress") -- get xcode sdk directory local xcode_sdkdir = assert(get_config("xcode"), "xcode not found!") @@ -52,12 +53,7 @@ rule("xcode.xcassets") end -- trace progress info - cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", opt.progress) - if option.get("verbose") then - cprint("${dim color.build.object}compiling.xcode.$(mode) %s", sourcefile) - else - cprint("${color.build.object}compiling.xcode.$(mode) %s", sourcefile) - end + progress.show(opt.progress, "${color.build.object}compiling.xcode.$(mode) %s", sourcefile) -- get assetcatalog_generated_info.plist local assetcatalog_generated_info_plist = path.join(target:autogendir(), "rules", "xcode", "xcassets", "assetcatalog_generated_info.plist") |
