diff options
| author | ruki <[email protected]> | 2020-03-10 23:44:11 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-03-10 16:25:10 +0800 |
| commit | fd44c0fef3ed3bab58d27bb28da5884f9dc7945d (patch) | |
| tree | 471d1779104bb57afbe16b98f19e0e21996d8d0c /xmake/actions | |
| parent | 8db0c0d333e24556e1a40931eae9166cbd233e35 (diff) | |
fix index
Diffstat (limited to 'xmake/actions')
| -rw-r--r-- | xmake/actions/build/kinds/object.lua | 4 | ||||
| -rw-r--r-- | xmake/actions/build/main.lua | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/xmake/actions/build/kinds/object.lua b/xmake/actions/build/kinds/object.lua index 9ac489848..9c3816611 100644 --- a/xmake/actions/build/kinds/object.lua +++ b/xmake/actions/build/kinds/object.lua @@ -37,7 +37,7 @@ function _add_batchjobs_for_rule(batchjobs, rootjob, target, sourcebatch, suffix local script = ruleinst:script(scriptname) if script then if ruleinst:extraconf(scriptname, "batch") then - assert(script(target, batchjobs, sourcebatch, {rootjob = rootjob}), "rule(%s):%s(): no returned job!", rulename, scriptname) + script(target, batchjobs, sourcebatch, {rootjob = rootjob}) else batchjobs:addjob("rule/" .. rulename .. "/" .. scriptname, function (index, total) script(target, sourcebatch, {progress = (index * 100) / total}) @@ -66,7 +66,7 @@ function _add_batchjobs_for_target(batchjobs, rootjob, target, sourcebatch, suff local script = target:script(scriptname) if script then if target:extraconf(scriptname, "batch") then - assert(script(target, batchjobs, sourcebatch, {rootjob = rootjob}), "target(%s):%s(): no returned job!", target:name(), scriptname) + script(target, batchjobs, sourcebatch, {rootjob = rootjob}) else batchjobs:addjob(target:name() .. "/" .. scriptname, function (index, total) script(target, sourcebatch, {progress = (index * 100) / total}) diff --git a/xmake/actions/build/main.lua b/xmake/actions/build/main.lua index 61ee24401..4959d3e71 100644 --- a/xmake/actions/build/main.lua +++ b/xmake/actions/build/main.lua @@ -25,6 +25,7 @@ import("core.project.config") import("core.project.project") import("core.platform.platform") import("core.platform.environment") +import("core.theme.theme") import("build") import("build_files") import("cleaner") @@ -137,5 +138,6 @@ function main() os.cd(oldir) -- trace - cprint("${color.success}build ok!") + local progress_prefix = "${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} " + cprint(progress_prefix .. "${color.success}build ok!", 100) end |
