diff options
| author | ruki <[email protected]> | 2019-06-14 22:33:57 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-06-14 09:23:48 +0800 |
| commit | 7832cdea276c9699d2b708b3e02ff1d5d443f138 (patch) | |
| tree | d372de32f589c4ffb6664d311cc1a6b676d90603 | |
| parent | a94eef283739bb13325ea1f1f77c6d2563e06953 (diff) | |
split dirs arguments for config
| -rw-r--r-- | xmake/actions/update/main.lua | 9 | ||||
| -rw-r--r-- | xmake/core/tool/builder.lua | 8 |
2 files changed, 12 insertions, 5 deletions
diff --git a/xmake/actions/update/main.lua b/xmake/actions/update/main.lua index fb463802c..060fe398c 100644 --- a/xmake/actions/update/main.lua +++ b/xmake/actions/update/main.lua @@ -30,6 +30,7 @@ import("privilege.sudo") import("actions.require.impl.environment", {rootdir = os.programdir()}) import("get_version") +-- the installer filename for windows local win_installer_name = "xmake-installer.exe" -- run program with privilege @@ -199,6 +200,8 @@ end -- do install script function _install_script(sourcedir) + + -- trace cprintf("\r${yellow} => ${clear}install script to %s .. ", os.programdir()) local source = path.join(sourcedir, "xmake") @@ -257,17 +260,15 @@ function main() -- enter environment environment.enter() - local is_official, mainurls, version, tags, branches = get_version(option.get("xmakever")) - -- has been installed? + local is_official, mainurls, version, tags, branches = get_version(option.get("xmakever")) if is_official and xmake.version():eq(version) then cprint("${bright}xmake %s has been installed!", version) return end - local script_only = option.get("scriptonly") - -- get urls on windows + local script_only = option.get("scriptonly") if is_host("windows") and not script_only then if not is_official then raise("not support to update from unofficial source on windows, missing '--scriptonly' flag?") diff --git a/xmake/core/tool/builder.lua b/xmake/core/tool/builder.lua index f06f007e7..a59dc26c5 100644 --- a/xmake/core/tool/builder.lua +++ b/xmake/core/tool/builder.lua @@ -378,7 +378,13 @@ function builder:_add_flags_from_language(flags, target, getters) -- local getters = getters or { - config = config.get + config = function (name) + local values = config.get(name) + if values and name:endswith("dirs") then + values = values:split(path.envsep(), {plain = true}) + end + return values + end , platform = platform.get , target = function (name) |
