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 /xmake/rules/xcode | |
| parent | d50200be0abb94e7e627e7a25b5bab65d420eb16 (diff) | |
improve to show progress
Diffstat (limited to 'xmake/rules/xcode')
| -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 |
6 files changed, 12 insertions, 36 deletions
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") |
