diff options
| author | ruki <[email protected]> | 2015-07-10 16:59:16 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-07-10 16:59:16 +0800 |
| commit | e2b2d08d459dc0c3459befb443c9c76520bcf61d (patch) | |
| tree | 5a031da80823f8aade87c7d9896170d6202310c0 /xmake/scripts/action/_install.lua | |
| parent | ebd3cf08de2fea05bbf32d095f5a5c5a3c38a4f1 (diff) | |
add install for macosx
Diffstat (limited to 'xmake/scripts/action/_install.lua')
| -rw-r--r-- | xmake/scripts/action/_install.lua | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/xmake/scripts/action/_install.lua b/xmake/scripts/action/_install.lua index 5223da678..b7e392bb3 100644 --- a/xmake/scripts/action/_install.lua +++ b/xmake/scripts/action/_install.lua @@ -29,6 +29,7 @@ local config = require("base/config") local global = require("base/global") local install = require("base/install") local package = require("base/package") +local project = require("base/project") local platform = require("platform/platform") -- need access to the given file? @@ -91,6 +92,33 @@ function _install.done() return false end + -- reload configure + local errors = config.reload() + if errors then + -- error + utils.error(errors) + return false + end + + -- make the platform configure + if not platform.make() then + utils.error("make platform configure: %s failed!", config.get("plat")) + return false + end + + -- reload project + local errors = project.reload() + if errors then + -- error + utils.error(errors) + return false + end + + -- update the outputdir + for _, target in pairs(configs) do + target.outputdir = options.installdir + end + -- done package if not install.done(configs) then -- errors @@ -127,6 +155,7 @@ function _install.menu() , " 1. The Given Command Argument" , " 2. The Envirnoment Variable: XMAKE_PROJECT_DIR" , " 3. The Current Directory" } + , {'o', "installdir", "kv", nil, "Set the install directory." } , {} , {'v', "verbose", "k", nil, "Print lots of verbose information." } |
