diff options
| author | ruki <[email protected]> | 2017-05-25 13:43:01 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-05-25 13:43:01 +0800 |
| commit | 28a89ebabfaa2e1dc159591a65ab3af42d3e9152 (patch) | |
| tree | 3e72ccbe489934ac19fcf37f16ab1ee25f6bd942 | |
| parent | 90a8a85a5773c246e4330125a97940310cb63001 (diff) | |
add logo to version info
| -rw-r--r-- | xmake/core/main.lua | 39 |
1 files changed, 30 insertions, 9 deletions
diff --git a/xmake/core/main.lua b/xmake/core/main.lua index 62800d2be..05c4ed06a 100644 --- a/xmake/core/main.lua +++ b/xmake/core/main.lua @@ -43,17 +43,35 @@ local menu = title = "XMake v" .. xmake._VERSION .. ", The Make-like Build Utility based on Lua" -- copyright -, copyright = "Copyright (C) 2015-2016 Ruki Wang, ${underline}tboox.org${clear}, ${underline}xmake.io${clear}\nCopyright (C) 2005-2015 Mike Pall, ${underline}luajit.org${clear}" +, copyright = "Copyright (C) 2015-2017 Ruki Wang, ${underline}tboox.org${clear}, ${underline}xmake.io${clear}\nCopyright (C) 2005-2015 Mike Pall, ${underline}luajit.org${clear}" -- the tasks: xmake [task] , task.menu } --- done help -function main._help() - -- done help +-- show logo +function main._show_logo() + + -- define logo + local logo = [[ + _ + __ ___ __ __ __ _| | ______ + \ \/ / | \/ |/ _ | |/ / __ \ + > < | \__/ | /_| | < ___/ + /_/\_\_|_| |_|\__ \|_|\_\____| + by ruki, ${underline}tboox.org${clear} + ]] + + -- show logo + utils.cprint(logo) +end + +-- show help and version info +function main._show_help() + + -- show help if option.get("help") then -- print menu @@ -62,19 +80,22 @@ function main._help() -- ok return true - -- done version + -- show version elseif option.get("version") then - -- print title + -- show title if menu.title then utils.cprint(menu.title) end - -- print copyright + -- show copyright if menu.copyright then utils.cprint(menu.copyright) end + -- show logo + main._show_logo() + -- ok return true end @@ -168,8 +189,8 @@ Or you can add `--root` option to allow run as root temporarily. profiler:start() end - -- run help? - if main._help() then + -- show help? + if main._show_help() then return 0 end |
