diff options
| author | ruki <[email protected]> | 2015-06-10 14:57:51 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-06-10 14:57:56 +0800 |
| commit | 112bd89dfd816cac735e447e41de0ff9c5687390 (patch) | |
| tree | 64cb4a58b97e4ed2f60c5a77c8b54368887c6559 /xmake/scripts/platform/windows | |
| parent | 5621d811df57824463d48c41c8a9ffa26864d293 (diff) | |
remove wrap config for prober
Diffstat (limited to 'xmake/scripts/platform/windows')
| -rw-r--r-- | xmake/scripts/platform/windows/prober.lua | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/xmake/scripts/platform/windows/prober.lua b/xmake/scripts/platform/windows/prober.lua index c730ad9f1..26968b0c8 100644 --- a/xmake/scripts/platform/windows/prober.lua +++ b/xmake/scripts/platform/windows/prober.lua @@ -25,31 +25,33 @@ local os = require("base/os") local path = require("base/path") local utils = require("base/utils") local string = require("base/string") +local config = require("base/config") +local global = require("base/global") -- define module: prober local prober = prober or {} -- probe the architecture -function prober._probe_arch(configs) +function prober._probe_arch() -- get the architecture - local arch = configs.arch + local arch = config.get("arch") -- ok? if arch then return true end -- init the default architecture - configs.arch = xmake._ARCH + config.set("arch", xmake._ARCH) -- ok return true end -- probe the vs version -function prober._probe_vs_version(configs) +function prober._probe_vs_version() -- get the vs version - local vs = configs.vs + local vs = config.get("vs") -- ok? if vs then return true end @@ -84,7 +86,7 @@ function prober._probe_vs_version(configs) -- probe ok? update it if vs then - configs.vs = vs + config.set("vs", vs) else -- failed utils.error("The Microsoft Visual Studio is unknown now, please config it first!") @@ -98,13 +100,13 @@ function prober._probe_vs_version(configs) end -- probe the vs path -function prober._probe_vs_path(configs) +function prober._probe_vs_path() -- ok? - if configs.__vsenv_path then return true end + if config.get("__vsenv_path") then return true end -- get the vs version - local vs = configs.vs + local vs = config.get("vs") assert(vs) -- make the map table @@ -178,7 +180,7 @@ function prober._probe_vs_path(configs) -- save the variables for k, v in pairs(variables) do - configs["__vsenv_" .. k] = v + config.set("__vsenv_" .. k, v) end -- ok @@ -186,27 +188,27 @@ function prober._probe_vs_path(configs) end -- probe the project configure -function prober.config(configs) +function prober.config() -- probe the architecture - if not prober._probe_arch(configs) then return end + if not prober._probe_arch() then return end -- probe the vs version - if not prober._probe_vs_version(configs) then return end + if not prober._probe_vs_version() then return end -- probe the vs path - if not prober._probe_vs_path(configs) then return end + if not prober._probe_vs_path() then return end end -- probe the global configure -function prober.global(configs) +function prober.global() -- probe the vs version - if not prober._probe_vs_version(configs) then return end + if not prober._probe_vs_version() then return end -- probe the vs path - if not prober._probe_vs_path(configs) then return end + if not prober._probe_vs_path() then return end end |
