diff options
| author | ruki <[email protected]> | 2015-06-09 21:26:04 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-06-09 21:26:04 +0800 |
| commit | d61169b7ea72b22ca89d5a6575865af9148d958e (patch) | |
| tree | 47d83d2cc74e1762a01b837686d16f2dc41a78d4 /xmake/scripts/action/_run.lua | |
| parent | e18c9d7a5718c80852fab0eb89161b4da28b7a94 (diff) | |
list action menu automaticlly
Diffstat (limited to 'xmake/scripts/action/_run.lua')
| -rw-r--r-- | xmake/scripts/action/_run.lua | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/xmake/scripts/action/_run.lua b/xmake/scripts/action/_run.lua index 8de5ab5f1..c2b46ad9b 100644 --- a/xmake/scripts/action/_run.lua +++ b/xmake/scripts/action/_run.lua @@ -29,6 +29,7 @@ local path = require("base/path") local utils = require("base/utils") local config = require("base/config") local project = require("base/project") +local platform = require("platform/platform") -- done the given config function _run.done() @@ -87,5 +88,43 @@ function _run.done() return utils.ifelse(ok == 0, true, false) end +-- the menu +function _run.menu() + + return { + -- xmake r + shortname = 'r' + + -- usage + , usage = "xmake run|r [options] [target] [arguments]" + + -- description + , description = "Run the project target." + + -- options + , options = + { + {'d', "debug", "k", nil, "Run and debug the given target." } + , {nil, "debugger", "kv", "auto", "Set the debugger path." } + + , {} + , {'f', "file", "kv", "xmake.lua", "Read a given xmake.lua file." } + , {'P', "project", "kv", nil, "Change to the given project directory." + , "Search priority:" + , " 1. The Given Command Argument" + , " 2. The Envirnoment Variable: XMAKE_PROJECT_DIR" + , " 3. The Current Directory" } + , {} + , {'v', "verbose", "k", nil, "Print lots of verbose information." } + , {nil, "version", "k", nil, "Print the version number and exit." } + , {'h', "help", "k", nil, "Print this help message and exit." } + + , {} + , {nil, "target", "v", nil, "Run the given target." } + , {nil, "arguments", "vs", nil, "The target arguments" } + } + } +end + -- return module: _run return _run |
