diff options
| author | ruki <[email protected]> | 2018-10-07 00:05:45 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-10-07 00:05:45 +0800 |
| commit | fbc34dadcfdff7f06a1927fbb593503c5149995b (patch) | |
| tree | c9008e3c62e5f22e5a9e0a261b20d9c6d1b4ce21 /xmake/modules/os/winver.lua | |
| parent | 4307ac5dabce5177d1517b0e043a35b5a7c58512 (diff) | |
add macos and winos version
Diffstat (limited to 'xmake/modules/os/winver.lua')
| -rw-r--r-- | xmake/modules/os/winver.lua | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/xmake/modules/os/winver.lua b/xmake/modules/os/winver.lua index e684ffa02..92b1d6a72 100644 --- a/xmake/modules/os/winver.lua +++ b/xmake/modules/os/winver.lua @@ -119,34 +119,3 @@ function subsystem(name) } return defvals[name] or "10.00" end - --- get windows system version --- --- $ xmake l os.winver --- --- - win10: 10.0.14393 --- - xp: 5.1.2600 --- -function main() - - -- get it from cache first - if _g.winver ~= nil then - return _g.winver - end - - -- get winver - local winver = nil - local verstr = try { function () return os.iorun("cmd /c ver") end } - if verstr then - winver = verstr:match("%[.-(%d+%.%d+%.%d+)]") - if winver then - winver = winver:trim() - end - end - - -- save to cache - _g.winver = winver or false - - -- done - return winver -end |
