summaryrefslogtreecommitdiff
path: root/xmake/core/sandbox
diff options
context:
space:
mode:
authorruki <[email protected]>2016-03-03 11:07:43 +0800
committerruki <[email protected]>2016-03-03 11:07:43 +0800
commitaf8e19e9b32faeadc816087a8d0b86e13e8f948c (patch)
treed660c23f8803dcd82917aa002c03137ba25d9113 /xmake/core/sandbox
parent4fa3ca927a032f57aaae44156ceeec6732c159f6 (diff)
adjust core architecture
Diffstat (limited to 'xmake/core/sandbox')
-rw-r--r--xmake/core/sandbox/import/core/global.lua69
-rw-r--r--xmake/core/sandbox/import/core/option.lua37
-rw-r--r--xmake/core/sandbox/import/core/platform.lua59
-rw-r--r--xmake/core/sandbox/import/core/project.lua74
-rw-r--r--xmake/core/sandbox/import/core/template.lua52
5 files changed, 0 insertions, 291 deletions
diff --git a/xmake/core/sandbox/import/core/global.lua b/xmake/core/sandbox/import/core/global.lua
deleted file mode 100644
index b4f6460df..000000000
--- a/xmake/core/sandbox/import/core/global.lua
+++ /dev/null
@@ -1,69 +0,0 @@
---!The Automatic Cross-platform Build Tool
---
--- XMake is free software; you can redistribute it and/or modify
--- it under the terms of the GNU Lesser General Public License as published by
--- the Free Software Foundation; either version 2.1 of the License, or
--- (at your option) any later version.
---
--- XMake is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--- GNU Lesser General Public License for more details.
---
--- You should have received a copy of the GNU Lesser General Public License
--- along with XMake;
--- If not, see <a href="http://www.gnu.org/licenses/"> http://www.gnu.org/licenses/</a>
---
--- Copyright (C) 2015 - 2016, ruki All rights reserved.
---
--- @author ruki
--- @file global.lua
---
-
--- define module
-local sandbox_global = sandbox_global or {}
-
--- load modules
-local global = require("base/global")
-local raise = require("sandbox/raise")
-
--- get the configure
-function sandbox_global.get(name)
-
- -- get it
- return global.get(name)
-end
-
--- set the configure
-function sandbox_global.set(name, value)
-
- -- set it
- global.set(name, value)
-end
-
--- get the configure directory
-function sandbox_global.directory()
-
- -- get it
- local dir = global.directory()
- assert(dir)
-
- -- ok?
- return dir
-end
-
--- save the current configure
-function sandbox_global.save()
-
- -- save it
- local ok, errors = global.save()
- if not ok then
- raise("cannot save global configure, %s", errors)
- end
-
- -- ok
- return true
-end
-
--- return module
-return sandbox_global
diff --git a/xmake/core/sandbox/import/core/option.lua b/xmake/core/sandbox/import/core/option.lua
deleted file mode 100644
index d45363dbc..000000000
--- a/xmake/core/sandbox/import/core/option.lua
+++ /dev/null
@@ -1,37 +0,0 @@
---!The Automatic Cross-platform Build Tool
---
--- XMake is free software; you can redistribute it and/or modify
--- it under the terms of the GNU Lesser General Public License as published by
--- the Free Software Foundation; either version 2.1 of the License, or
--- (at your option) any later version.
---
--- XMake is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--- GNU Lesser General Public License for more details.
---
--- You should have received a copy of the GNU Lesser General Public License
--- along with XMake;
--- If not, see <a href="http://www.gnu.org/licenses/"> http://www.gnu.org/licenses/</a>
---
--- Copyright (C) 2015 - 2016, ruki All rights reserved.
---
--- @author ruki
--- @file option.lua
---
-
--- define module
-local sandbox_option = sandbox_option or {}
-
--- load modules
-local option = require("base/option")
-
--- get the option
-function sandbox_option.get(name)
-
- -- get it
- return option.get(name)
-end
-
--- return module
-return sandbox_option
diff --git a/xmake/core/sandbox/import/core/platform.lua b/xmake/core/sandbox/import/core/platform.lua
deleted file mode 100644
index e6de93681..000000000
--- a/xmake/core/sandbox/import/core/platform.lua
+++ /dev/null
@@ -1,59 +0,0 @@
---!The Automatic Cross-platform Build Tool
---
--- XMake is free software; you can redistribute it and/or modify
--- it under the terms of the GNU Lesser General Public License as published by
--- the Free Software Foundation; either version 2.1 of the License, or
--- (at your option) any later version.
---
--- XMake is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--- GNU Lesser General Public License for more details.
---
--- You should have received a copy of the GNU Lesser General Public License
--- along with XMake;
--- If not, see <a href="http://www.gnu.org/licenses/"> http://www.gnu.org/licenses/</a>
---
--- Copyright (C) 2015 - 2016, ruki All rights reserved.
---
--- @author ruki
--- @file platform.lua
---
-
--- define module
-local sandbox_platform = sandbox_platform or {}
-
--- load modules
-local platform = require("base/platform")
-
--- get the platform menu
-function sandbox_platform.menu(action)
-
- -- get it
- return platform.menu(action)
-end
-
--- get the all platforms
-function sandbox_platform.plats()
-
- -- get it
- local plats = platform.plats()
- assert(plats)
-
- -- ok
- return plats
-end
-
--- get the all architectures for the given platform
-function sandbox_platform.archs(plat)
-
- -- get it
- local archs = platform.archs(plat)
- assert(archs)
-
- -- ok
- return archs
-end
-
--- return module
-return sandbox_platform
diff --git a/xmake/core/sandbox/import/core/project.lua b/xmake/core/sandbox/import/core/project.lua
deleted file mode 100644
index 3d65b8768..000000000
--- a/xmake/core/sandbox/import/core/project.lua
+++ /dev/null
@@ -1,74 +0,0 @@
---!The Automatic Cross-platform Build Tool
---
--- XMake is free software; you can redistribute it and/or modify
--- it under the terms of the GNU Lesser General Public License as published by
--- the Free Software Foundation; either version 2.1 of the License, or
--- (at your option) any later version.
---
--- XMake is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--- GNU Lesser General Public License for more details.
---
--- You should have received a copy of the GNU Lesser General Public License
--- along with XMake;
--- If not, see <a href="http://www.gnu.org/licenses/"> http://www.gnu.org/licenses/</a>
---
--- Copyright (C) 2015 - 2016, ruki All rights reserved.
---
--- @author ruki
--- @file project.lua
---
-
--- define module
-local sandbox_project = sandbox_project or {}
-
--- load modules
-local rule = require("base/rule")
-local config = require("base/config")
-local project = require("base/project")
-
--- get the build directory
-function sandbox_project.buildir()
-
- -- get it
- return config.get("buildir")
-end
-
--- get the project directory
-function sandbox_project.projectdir()
-
- -- get it
- return xmake._PROJECT_DIR
-end
-
--- get the current platform
-function sandbox_project.plat()
-
- -- get it
- return config.get("plat")
-end
-
--- get the current architecture
-function sandbox_project.arch()
-
- -- get it
- return config.get("arch")
-end
-
--- get the current mode
-function sandbox_project.mode()
-
- -- get it
- return config.get("mode")
-end
-
--- get the menu
-function sandbox_project.menu()
-
- -- get it
- return project.menu()
-end
-
--- return module
-return sandbox_project
diff --git a/xmake/core/sandbox/import/core/template.lua b/xmake/core/sandbox/import/core/template.lua
deleted file mode 100644
index 980e98a52..000000000
--- a/xmake/core/sandbox/import/core/template.lua
+++ /dev/null
@@ -1,52 +0,0 @@
---!The Automatic Cross-platform Build Tool
---
--- XMake is free software; you can redistribute it and/or modify
--- it under the terms of the GNU Lesser General Public License as published by
--- the Free Software Foundation; either version 2.1 of the License, or
--- (at your option) any later version.
---
--- XMake is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--- GNU Lesser General Public License for more details.
---
--- You should have received a copy of the GNU Lesser General Public License
--- along with XMake;
--- If not, see <a href="http://www.gnu.org/licenses/"> http://www.gnu.org/licenses/</a>
---
--- Copyright (C) 2015 - 2016, ruki All rights reserved.
---
--- @author ruki
--- @file template.lua
---
-
--- define module
-local sandbox_template = sandbox_template or {}
-
--- load modules
-local template = require("base/template")
-
--- get all languages
-function sandbox_template.languages()
-
- -- get it
- local languages = template.languages()
- assert(languages)
-
- -- ok
- return languages
-end
-
--- load all templates from the given language
-function sandbox_template.templates(language)
-
- -- get it
- local templates = template.templates(language)
- assert(templates)
-
- -- ok
- return templates
-end
-
--- return module
-return sandbox_template