diff options
| author | ruki <[email protected]> | 2018-10-07 22:23:59 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-10-07 22:37:52 +0800 |
| commit | 770782c9109bd08b89362e3df868445c24a593ad (patch) | |
| tree | b02a1accef592def73f33541d750c74066c70d3b | |
| parent | 800cc0415eee4f97ee34874a2fb14c33f7c660b6 (diff) | |
move macos and winos path
| -rw-r--r-- | xmake/core/sandbox/modules/interpreter/macos.lua | 36 | ||||
| -rw-r--r-- | xmake/core/sandbox/modules/interpreter/os.lua | 1 | ||||
| -rw-r--r-- | xmake/core/sandbox/modules/interpreter/winos.lua | 38 | ||||
| -rw-r--r-- | xmake/core/sandbox/modules/macos.lua (renamed from xmake/core/sandbox/modules/import/core/base/macos.lua) | 10 | ||||
| -rw-r--r-- | xmake/core/sandbox/modules/winos.lua (renamed from xmake/core/sandbox/modules/import/core/base/winos.lua) | 14 |
5 files changed, 86 insertions, 13 deletions
diff --git a/xmake/core/sandbox/modules/interpreter/macos.lua b/xmake/core/sandbox/modules/interpreter/macos.lua new file mode 100644 index 000000000..e554576d3 --- /dev/null +++ b/xmake/core/sandbox/modules/interpreter/macos.lua @@ -0,0 +1,36 @@ +--!A cross-platform build utility based on Lua +-- +-- Licensed to the Apache Software Foundation (ASF) under one +-- or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information +-- regarding copyright ownership. The ASF licenses this file +-- to you under the Apache License, Version 2.0 (the +-- "License"); you may not use this file except in compliance +-- with the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- +-- Copyright (C) 2015 - 2018, TBOOX Open Source Group. +-- +-- @author ruki +-- @file macos.lua +-- + +-- load modules +local macos = require("base/macos") + +-- define module +local sandbox_macos = sandbox_macos or {} + +-- export some readonly interfaces +sandbox_macos.version = macos.version + +-- return module +return sandbox_macos + diff --git a/xmake/core/sandbox/modules/interpreter/os.lua b/xmake/core/sandbox/modules/interpreter/os.lua index abb45d36d..e324e64b7 100644 --- a/xmake/core/sandbox/modules/interpreter/os.lua +++ b/xmake/core/sandbox/modules/interpreter/os.lua @@ -48,7 +48,6 @@ sandbox_os.programdir = os.programdir sandbox_os.programfile = os.programfile sandbox_os.projectdir = os.projectdir sandbox_os.projectfile = os.projectfile -sandbox_os.uuid = hash.uuid -- match files function sandbox_os.files(pattern, ...) diff --git a/xmake/core/sandbox/modules/interpreter/winos.lua b/xmake/core/sandbox/modules/interpreter/winos.lua new file mode 100644 index 000000000..18d053739 --- /dev/null +++ b/xmake/core/sandbox/modules/interpreter/winos.lua @@ -0,0 +1,38 @@ +--!A cross-platform build utility based on Lua +-- +-- Licensed to the Apache Software Foundation (ASF) under one +-- or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information +-- regarding copyright ownership. The ASF licenses this file +-- to you under the Apache License, Version 2.0 (the +-- "License"); you may not use this file except in compliance +-- with the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- +-- Copyright (C) 2015 - 2018, TBOOX Open Source Group. +-- +-- @author ruki +-- @file winos.lua +-- + +-- load modules +local winos = require("base/winos") + +-- define module +local sandbox_winos = sandbox_winos or {} + +-- export some readonly interfaces +sandbox_winos.registry_query = winos.registry_query +sandbox_winos.logical_drives = winos.logical_drives +sandbox_winos.version = winos.version + +-- return module +return sandbox_winos + diff --git a/xmake/core/sandbox/modules/import/core/base/macos.lua b/xmake/core/sandbox/modules/macos.lua index 3acbe9dce..07400eb87 100644 --- a/xmake/core/sandbox/modules/import/core/base/macos.lua +++ b/xmake/core/sandbox/modules/macos.lua @@ -23,14 +23,14 @@ -- -- load modules -local macos = require("base/macos") -local raise = require("sandbox/modules/raise") +local macos = require("base/macos") +local raise = require("sandbox/modules/raise") -- define module -local sandbox_core_base_macos = sandbox_core_base_macos or {} +local sandbox_macos = sandbox_macos or {} -- get system version -function sandbox_core_base_macos.version() +function sandbox_macos.version() local winver = macos.version() if not winver then raise("cannot get the version of the current macos!") @@ -39,5 +39,5 @@ function sandbox_core_base_macos.version() end -- return module -return sandbox_core_base_macos +return sandbox_macos diff --git a/xmake/core/sandbox/modules/import/core/base/winos.lua b/xmake/core/sandbox/modules/winos.lua index f1082dc25..79e13607b 100644 --- a/xmake/core/sandbox/modules/import/core/base/winos.lua +++ b/xmake/core/sandbox/modules/winos.lua @@ -23,18 +23,18 @@ -- -- load modules -local winos = require("base/winos") -local raise = require("sandbox/modules/raise") +local winos = require("base/winos") +local raise = require("sandbox/modules/raise") -- define module -local sandbox_core_base_winos = sandbox_core_base_winos or {} +local sandbox_winos = sandbox_winos or {} -- inherit some builtin interfaces -sandbox_core_base_winos.registry_query = winos.registry_query -sandbox_core_base_winos.logical_drives = winos.logical_drives +sandbox_winos.registry_query = winos.registry_query +sandbox_winos.logical_drives = winos.logical_drives -- get windows system version -function sandbox_core_base_winos.version() +function sandbox_winos.version() local winver = winos.version() if not winver then raise("cannot get the version of the current winos!") @@ -43,5 +43,5 @@ function sandbox_core_base_winos.version() end -- return module -return sandbox_core_base_winos +return sandbox_winos |
