summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2016-01-14 09:19:14 +0800
committerruki <[email protected]>2016-01-14 09:19:14 +0800
commitcdcf953259aee5e7e1a06855ddbedbaabf585bc9 (patch)
tree47b8e5de10522cca3b67354fa527b3525193e880
parent8c50566e7ab2139b9f6c2976b9ce875b7ad11b7a (diff)
rename script directory to core
-rwxr-xr-xcore/src/xmake/machine.c2
-rw-r--r--xmake/core/_xmake_main.lua (renamed from xmake/scripts/_xmake_main.lua)6
-rw-r--r--xmake/core/action/_build.lua (renamed from xmake/scripts/action/_build.lua)0
-rw-r--r--xmake/core/action/_clean.lua (renamed from xmake/scripts/action/_clean.lua)0
-rw-r--r--xmake/core/action/_config.lua (renamed from xmake/scripts/action/_config.lua)0
-rw-r--r--xmake/core/action/_create.lua (renamed from xmake/scripts/action/_create.lua)0
-rw-r--r--xmake/core/action/_debug.lua (renamed from xmake/scripts/action/_debug.lua)0
-rw-r--r--xmake/core/action/_global.lua (renamed from xmake/scripts/action/_global.lua)0
-rw-r--r--xmake/core/action/_install.lua (renamed from xmake/scripts/action/_install.lua)0
-rw-r--r--xmake/core/action/_lua.lua (renamed from xmake/scripts/action/_lua.lua)2
-rw-r--r--xmake/core/action/_man.lua (renamed from xmake/scripts/action/_man.lua)0
-rw-r--r--xmake/core/action/_package.lua (renamed from xmake/scripts/action/_package.lua)0
-rw-r--r--xmake/core/action/_run.lua (renamed from xmake/scripts/action/_run.lua)0
-rw-r--r--xmake/core/action/_uninstall.lua (renamed from xmake/scripts/action/_uninstall.lua)0
-rw-r--r--xmake/core/action/action.lua (renamed from xmake/scripts/action/action.lua)2
-rw-r--r--xmake/core/base/clean.lua (renamed from xmake/scripts/base/clean.lua)0
-rw-r--r--xmake/core/base/compiler.lua (renamed from xmake/scripts/base/compiler.lua)0
-rw-r--r--xmake/core/base/config.lua (renamed from xmake/scripts/base/config.lua)0
-rw-r--r--xmake/core/base/global.lua (renamed from xmake/scripts/base/global.lua)0
-rw-r--r--xmake/core/base/install.lua (renamed from xmake/scripts/base/install.lua)0
-rw-r--r--xmake/core/base/io.lua (renamed from xmake/scripts/base/io.lua)0
-rw-r--r--xmake/core/base/linker.lua (renamed from xmake/scripts/base/linker.lua)0
-rw-r--r--xmake/core/base/main.lua (renamed from xmake/scripts/base/main.lua)0
-rw-r--r--xmake/core/base/makefile.lua (renamed from xmake/scripts/base/makefile.lua)0
-rw-r--r--xmake/core/base/option.lua (renamed from xmake/scripts/base/option.lua)0
-rw-r--r--xmake/core/base/os.lua (renamed from xmake/scripts/base/os.lua)0
-rw-r--r--xmake/core/base/package.lua (renamed from xmake/scripts/base/package.lua)0
-rw-r--r--xmake/core/base/path.lua (renamed from xmake/scripts/base/path.lua)0
-rw-r--r--xmake/core/base/project.lua (renamed from xmake/scripts/base/project.lua)6
-rw-r--r--xmake/core/base/rule.lua (renamed from xmake/scripts/base/rule.lua)0
-rw-r--r--xmake/core/base/string.lua (renamed from xmake/scripts/base/string.lua)0
-rw-r--r--xmake/core/base/table.lua (renamed from xmake/scripts/base/table.lua)0
-rw-r--r--xmake/core/base/template.lua (renamed from xmake/scripts/base/template.lua)0
-rw-r--r--xmake/core/base/uninstall.lua (renamed from xmake/scripts/base/uninstall.lua)0
-rw-r--r--xmake/core/base/utils.lua (renamed from xmake/scripts/base/utils.lua)0
-rw-r--r--xmake/core/module/os.lua (renamed from xmake/scripts/module/os.lua)0
-rw-r--r--xmake/core/module/path.lua (renamed from xmake/scripts/module/path.lua)0
-rw-r--r--xmake/core/module/project.lua (renamed from xmake/scripts/module/project.lua)0
-rw-r--r--xmake/core/module/string.lua (renamed from xmake/scripts/module/string.lua)0
-rw-r--r--xmake/core/module/utils.lua (renamed from xmake/scripts/module/utils.lua)0
-rw-r--r--xmake/core/platform/android/android.lua (renamed from xmake/scripts/platform/android/android.lua)0
-rw-r--r--xmake/core/platform/android/prober.lua (renamed from xmake/scripts/platform/android/prober.lua)0
-rw-r--r--xmake/core/platform/iphoneos/iphoneos.lua (renamed from xmake/scripts/platform/iphoneos/iphoneos.lua)0
-rw-r--r--xmake/core/platform/iphoneos/package.lua (renamed from xmake/scripts/platform/iphoneos/package.lua)0
-rw-r--r--xmake/core/platform/iphoneos/prober.lua (renamed from xmake/scripts/platform/iphoneos/prober.lua)2
-rw-r--r--xmake/core/platform/iphonesimulator/iphonesimulator.lua (renamed from xmake/scripts/platform/iphonesimulator/iphonesimulator.lua)0
-rw-r--r--xmake/core/platform/iphonesimulator/prober.lua (renamed from xmake/scripts/platform/iphonesimulator/prober.lua)0
-rw-r--r--xmake/core/platform/linux/install.lua (renamed from xmake/scripts/platform/linux/install.lua)0
-rw-r--r--xmake/core/platform/linux/linux.lua (renamed from xmake/scripts/platform/linux/linux.lua)0
-rw-r--r--xmake/core/platform/linux/prober.lua (renamed from xmake/scripts/platform/linux/prober.lua)0
-rw-r--r--xmake/core/platform/linux/uninstall.lua (renamed from xmake/scripts/platform/linux/uninstall.lua)0
-rw-r--r--xmake/core/platform/macosx/install.lua (renamed from xmake/scripts/platform/macosx/install.lua)0
-rw-r--r--xmake/core/platform/macosx/macosx.lua (renamed from xmake/scripts/platform/macosx/macosx.lua)0
-rw-r--r--xmake/core/platform/macosx/prober.lua (renamed from xmake/scripts/platform/macosx/prober.lua)0
-rw-r--r--xmake/core/platform/macosx/uninstall.lua (renamed from xmake/scripts/platform/macosx/uninstall.lua)0
-rw-r--r--xmake/core/platform/mingw/mingw.lua (renamed from xmake/scripts/platform/mingw/mingw.lua)0
-rw-r--r--xmake/core/platform/mingw/prober.lua (renamed from xmake/scripts/platform/mingw/prober.lua)0
-rw-r--r--xmake/core/platform/platform.lua (renamed from xmake/scripts/platform/platform.lua)4
-rw-r--r--xmake/core/platform/watchos/package.lua (renamed from xmake/scripts/platform/watchos/package.lua)0
-rw-r--r--xmake/core/platform/watchos/prober.lua (renamed from xmake/scripts/platform/watchos/prober.lua)2
-rw-r--r--xmake/core/platform/watchos/watchos.lua (renamed from xmake/scripts/platform/watchos/watchos.lua)0
-rw-r--r--xmake/core/platform/watchsimulator/prober.lua (renamed from xmake/scripts/platform/watchsimulator/prober.lua)0
-rw-r--r--xmake/core/platform/watchsimulator/watchsimulator.lua (renamed from xmake/scripts/platform/watchsimulator/watchsimulator.lua)0
-rw-r--r--xmake/core/platform/windows/prober.lua (renamed from xmake/scripts/platform/windows/prober.lua)0
-rw-r--r--xmake/core/platform/windows/tools/cl.lua (renamed from xmake/scripts/platform/windows/tools/cl.lua)0
-rw-r--r--xmake/core/platform/windows/tools/lib.lua (renamed from xmake/scripts/platform/windows/tools/lib.lua)0
-rw-r--r--xmake/core/platform/windows/tools/link.lua (renamed from xmake/scripts/platform/windows/tools/link.lua)0
-rw-r--r--xmake/core/platform/windows/tools/ml.lua (renamed from xmake/scripts/platform/windows/tools/ml.lua)0
-rw-r--r--xmake/core/platform/windows/tools/nmake.lua (renamed from xmake/scripts/platform/windows/tools/nmake.lua)0
-rw-r--r--xmake/core/platform/windows/windows.lua (renamed from xmake/scripts/platform/windows/windows.lua)0
-rw-r--r--xmake/core/tools/ar.lua (renamed from xmake/scripts/tools/ar.lua)0
-rw-r--r--xmake/core/tools/cat.lua (renamed from xmake/scripts/tools/cat.lua)0
-rw-r--r--xmake/core/tools/clang++.lua (renamed from xmake/scripts/tools/clang++.lua)0
-rw-r--r--xmake/core/tools/clang.lua (renamed from xmake/scripts/tools/clang.lua)0
-rw-r--r--xmake/core/tools/cp.lua (renamed from xmake/scripts/tools/cp.lua)0
-rw-r--r--xmake/core/tools/dispatcher.lua (renamed from xmake/scripts/tools/dispatcher.lua)0
-rw-r--r--xmake/core/tools/echo.lua (renamed from xmake/scripts/tools/echo.lua)0
-rw-r--r--xmake/core/tools/g++.lua (renamed from xmake/scripts/tools/g++.lua)0
-rwxr-xr-xxmake/core/tools/gas-preprocessor.pl (renamed from xmake/scripts/tools/gas-preprocessor.pl)0
-rw-r--r--xmake/core/tools/gcc.lua (renamed from xmake/scripts/tools/gcc.lua)0
-rw-r--r--xmake/core/tools/make.lua (renamed from xmake/scripts/tools/make.lua)0
-rw-r--r--xmake/core/tools/mkdir.lua (renamed from xmake/scripts/tools/mkdir.lua)0
-rw-r--r--xmake/core/tools/mv.lua (renamed from xmake/scripts/tools/mv.lua)0
-rw-r--r--xmake/core/tools/rm.lua (renamed from xmake/scripts/tools/rm.lua)0
-rw-r--r--xmake/core/tools/rmdir.lua (renamed from xmake/scripts/tools/rmdir.lua)0
-rw-r--r--xmake/core/tools/swiftc.lua (renamed from xmake/scripts/tools/swiftc.lua)0
-rw-r--r--xmake/core/tools/tools.lua (renamed from xmake/scripts/tools/tools.lua)2
-rw-r--r--xmake/core/tools/verbose.lua (renamed from xmake/scripts/tools/verbose.lua)0
88 files changed, 15 insertions, 13 deletions
diff --git a/core/src/xmake/machine.c b/core/src/xmake/machine.c
index ead646ea9..6b61be5ae 100755
--- a/core/src/xmake/machine.c
+++ b/core/src/xmake/machine.c
@@ -350,7 +350,7 @@ tb_int_t xm_machine_main(xm_machine_ref_t machine, tb_int_t argc, tb_char_t** ar
if (!xm_machine_main_get_program_directory(impl, path, sizeof(path))) return -1;
// append the main script path
- tb_strcat(path, "/scripts/_xmake_main.lua");
+ tb_strcat(path, "/core/_xmake_main.lua");
// exists this script?
if (!tb_file_info(path, tb_null))
diff --git a/xmake/scripts/_xmake_main.lua b/xmake/core/_xmake_main.lua
index 50f0d313c..49fbb0105 100644
--- a/xmake/scripts/_xmake_main.lua
+++ b/xmake/core/_xmake_main.lua
@@ -29,7 +29,7 @@ xmake._NULDEV = _NULDEV
xmake._VERSION = _VERSION
xmake._PROGRAM_DIR = _PROGRAM_DIR
xmake._PROJECT_DIR = _PROJECT_DIR
-xmake._SCRIPTS_DIR = _PROGRAM_DIR .. "/scripts"
+xmake._CORE_DIR = _PROGRAM_DIR .. "/core"
xmake._PACKAGES_DIR = _PROGRAM_DIR .. "/packages"
xmake._TEMPLATES_DIR = _PROGRAM_DIR .. "/templates"
xmake._PROJECT_FILE = "xmake.lua"
@@ -37,12 +37,14 @@ xmake._OPTIONS = {}
xmake._CONFIGS = {}
-- init package path
-package.path = xmake._SCRIPTS_DIR .. "/?.lua;" .. package.path
+package.path = xmake._CORE_DIR .. "/?.lua;" .. package.path
-- load modules
local main = require("base/main")
-- the main function
function _xmake_main()
+
+ -- done main
return main.done()
end
diff --git a/xmake/scripts/action/_build.lua b/xmake/core/action/_build.lua
index bf660eab5..bf660eab5 100644
--- a/xmake/scripts/action/_build.lua
+++ b/xmake/core/action/_build.lua
diff --git a/xmake/scripts/action/_clean.lua b/xmake/core/action/_clean.lua
index 677ff2470..677ff2470 100644
--- a/xmake/scripts/action/_clean.lua
+++ b/xmake/core/action/_clean.lua
diff --git a/xmake/scripts/action/_config.lua b/xmake/core/action/_config.lua
index a883b0499..a883b0499 100644
--- a/xmake/scripts/action/_config.lua
+++ b/xmake/core/action/_config.lua
diff --git a/xmake/scripts/action/_create.lua b/xmake/core/action/_create.lua
index 840631f65..840631f65 100644
--- a/xmake/scripts/action/_create.lua
+++ b/xmake/core/action/_create.lua
diff --git a/xmake/scripts/action/_debug.lua b/xmake/core/action/_debug.lua
index c84d78073..c84d78073 100644
--- a/xmake/scripts/action/_debug.lua
+++ b/xmake/core/action/_debug.lua
diff --git a/xmake/scripts/action/_global.lua b/xmake/core/action/_global.lua
index a8fffa0bc..a8fffa0bc 100644
--- a/xmake/scripts/action/_global.lua
+++ b/xmake/core/action/_global.lua
diff --git a/xmake/scripts/action/_install.lua b/xmake/core/action/_install.lua
index 28ef3650d..28ef3650d 100644
--- a/xmake/scripts/action/_install.lua
+++ b/xmake/core/action/_install.lua
diff --git a/xmake/scripts/action/_lua.lua b/xmake/core/action/_lua.lua
index c1a89dc39..e342d82e7 100644
--- a/xmake/scripts/action/_lua.lua
+++ b/xmake/core/action/_lua.lua
@@ -92,7 +92,7 @@ function _lua.done()
-- attempt to load script from the tools directory
if not os.isfile(file) then
- file = tools.find(options.script, xmake._SCRIPTS_DIR .. "/tools")
+ file = tools.find(options.script, xmake._CORE_DIR .. "/tools")
end
-- load and run the script file
diff --git a/xmake/scripts/action/_man.lua b/xmake/core/action/_man.lua
index feb70dd92..feb70dd92 100644
--- a/xmake/scripts/action/_man.lua
+++ b/xmake/core/action/_man.lua
diff --git a/xmake/scripts/action/_package.lua b/xmake/core/action/_package.lua
index e39604a33..e39604a33 100644
--- a/xmake/scripts/action/_package.lua
+++ b/xmake/core/action/_package.lua
diff --git a/xmake/scripts/action/_run.lua b/xmake/core/action/_run.lua
index 64649fcb8..64649fcb8 100644
--- a/xmake/scripts/action/_run.lua
+++ b/xmake/core/action/_run.lua
diff --git a/xmake/scripts/action/_uninstall.lua b/xmake/core/action/_uninstall.lua
index 8f82907d6..8f82907d6 100644
--- a/xmake/scripts/action/_uninstall.lua
+++ b/xmake/core/action/_uninstall.lua
diff --git a/xmake/scripts/action/action.lua b/xmake/core/action/action.lua
index 1174b140a..96e51b5d8 100644
--- a/xmake/scripts/action/action.lua
+++ b/xmake/core/action/action.lua
@@ -150,7 +150,7 @@ function action.list()
-- find all action scripts
local list = {}
- local files = os.match(xmake._SCRIPTS_DIR .. "/action/_*.lua")
+ local files = os.match(xmake._CORE_DIR .. "/action/_*.lua")
if files then
for _, file in ipairs(files) do
local name = path.basename(file)
diff --git a/xmake/scripts/base/clean.lua b/xmake/core/base/clean.lua
index 9fbb3258a..9fbb3258a 100644
--- a/xmake/scripts/base/clean.lua
+++ b/xmake/core/base/clean.lua
diff --git a/xmake/scripts/base/compiler.lua b/xmake/core/base/compiler.lua
index a64f8bae0..a64f8bae0 100644
--- a/xmake/scripts/base/compiler.lua
+++ b/xmake/core/base/compiler.lua
diff --git a/xmake/scripts/base/config.lua b/xmake/core/base/config.lua
index 3cea6a652..3cea6a652 100644
--- a/xmake/scripts/base/config.lua
+++ b/xmake/core/base/config.lua
diff --git a/xmake/scripts/base/global.lua b/xmake/core/base/global.lua
index 0017590c6..0017590c6 100644
--- a/xmake/scripts/base/global.lua
+++ b/xmake/core/base/global.lua
diff --git a/xmake/scripts/base/install.lua b/xmake/core/base/install.lua
index 9fc41a14a..9fc41a14a 100644
--- a/xmake/scripts/base/install.lua
+++ b/xmake/core/base/install.lua
diff --git a/xmake/scripts/base/io.lua b/xmake/core/base/io.lua
index 66b23911a..66b23911a 100644
--- a/xmake/scripts/base/io.lua
+++ b/xmake/core/base/io.lua
diff --git a/xmake/scripts/base/linker.lua b/xmake/core/base/linker.lua
index 9a0388757..9a0388757 100644
--- a/xmake/scripts/base/linker.lua
+++ b/xmake/core/base/linker.lua
diff --git a/xmake/scripts/base/main.lua b/xmake/core/base/main.lua
index 470815701..470815701 100644
--- a/xmake/scripts/base/main.lua
+++ b/xmake/core/base/main.lua
diff --git a/xmake/scripts/base/makefile.lua b/xmake/core/base/makefile.lua
index 826310d1a..826310d1a 100644
--- a/xmake/scripts/base/makefile.lua
+++ b/xmake/core/base/makefile.lua
diff --git a/xmake/scripts/base/option.lua b/xmake/core/base/option.lua
index 1c8c35573..1c8c35573 100644
--- a/xmake/scripts/base/option.lua
+++ b/xmake/core/base/option.lua
diff --git a/xmake/scripts/base/os.lua b/xmake/core/base/os.lua
index b08ac3820..b08ac3820 100644
--- a/xmake/scripts/base/os.lua
+++ b/xmake/core/base/os.lua
diff --git a/xmake/scripts/base/package.lua b/xmake/core/base/package.lua
index ffb1a0d38..ffb1a0d38 100644
--- a/xmake/scripts/base/package.lua
+++ b/xmake/core/base/package.lua
diff --git a/xmake/scripts/base/path.lua b/xmake/core/base/path.lua
index eb35283b2..eb35283b2 100644
--- a/xmake/scripts/base/path.lua
+++ b/xmake/core/base/path.lua
diff --git a/xmake/scripts/base/project.lua b/xmake/core/base/project.lua
index abc7897d4..51b46afe3 100644
--- a/xmake/scripts/base/project.lua
+++ b/xmake/core/base/project.lua
@@ -103,7 +103,7 @@ function project._api_archs(env, ...)
end
-- the current kind is belong to the given kinds?
-function project._api_kind(env, ...)
+function project._api_kinds(env, ...)
-- get the current kind
local kind = config.get("kind")
@@ -1074,7 +1074,7 @@ function project._load_options(file)
-- register interfaces for the condition
newenv.os = function (...) return project._api_os(newenv, ...) end
- newenv.kind = function (...) return project._api_kind(newenv, ...) end
+ newenv.kinds = function (...) return project._api_kinds(newenv, ...) end
newenv.modes = function (...) return project._api_modes(newenv, ...) end
newenv.plats = function (...) return project._api_plats(newenv, ...) end
newenv.archs = function (...) return project._api_archs(newenv, ...) end
@@ -1184,7 +1184,7 @@ function project._load_targets(file)
-- register interfaces for the condition
newenv.os = function (...) return project._api_os(newenv, ...) end
- newenv.kind = function (...) return project._api_kind(newenv, ...) end
+ newenv.kinds = function (...) return project._api_kinds(newenv, ...) end
newenv.modes = function (...) return project._api_modes(newenv, ...) end
newenv.plats = function (...) return project._api_plats(newenv, ...) end
newenv.archs = function (...) return project._api_archs(newenv, ...) end
diff --git a/xmake/scripts/base/rule.lua b/xmake/core/base/rule.lua
index b3dc1825c..b3dc1825c 100644
--- a/xmake/scripts/base/rule.lua
+++ b/xmake/core/base/rule.lua
diff --git a/xmake/scripts/base/string.lua b/xmake/core/base/string.lua
index b4be08cfa..b4be08cfa 100644
--- a/xmake/scripts/base/string.lua
+++ b/xmake/core/base/string.lua
diff --git a/xmake/scripts/base/table.lua b/xmake/core/base/table.lua
index 52b726412..52b726412 100644
--- a/xmake/scripts/base/table.lua
+++ b/xmake/core/base/table.lua
diff --git a/xmake/scripts/base/template.lua b/xmake/core/base/template.lua
index c02b135c3..c02b135c3 100644
--- a/xmake/scripts/base/template.lua
+++ b/xmake/core/base/template.lua
diff --git a/xmake/scripts/base/uninstall.lua b/xmake/core/base/uninstall.lua
index 304b73c92..304b73c92 100644
--- a/xmake/scripts/base/uninstall.lua
+++ b/xmake/core/base/uninstall.lua
diff --git a/xmake/scripts/base/utils.lua b/xmake/core/base/utils.lua
index fd1f053d6..fd1f053d6 100644
--- a/xmake/scripts/base/utils.lua
+++ b/xmake/core/base/utils.lua
diff --git a/xmake/scripts/module/os.lua b/xmake/core/module/os.lua
index 3689086f2..3689086f2 100644
--- a/xmake/scripts/module/os.lua
+++ b/xmake/core/module/os.lua
diff --git a/xmake/scripts/module/path.lua b/xmake/core/module/path.lua
index 9de905667..9de905667 100644
--- a/xmake/scripts/module/path.lua
+++ b/xmake/core/module/path.lua
diff --git a/xmake/scripts/module/project.lua b/xmake/core/module/project.lua
index f3f726c6f..f3f726c6f 100644
--- a/xmake/scripts/module/project.lua
+++ b/xmake/core/module/project.lua
diff --git a/xmake/scripts/module/string.lua b/xmake/core/module/string.lua
index 60d3408cf..60d3408cf 100644
--- a/xmake/scripts/module/string.lua
+++ b/xmake/core/module/string.lua
diff --git a/xmake/scripts/module/utils.lua b/xmake/core/module/utils.lua
index ab4d2c96f..ab4d2c96f 100644
--- a/xmake/scripts/module/utils.lua
+++ b/xmake/core/module/utils.lua
diff --git a/xmake/scripts/platform/android/android.lua b/xmake/core/platform/android/android.lua
index 15e3c33a2..15e3c33a2 100644
--- a/xmake/scripts/platform/android/android.lua
+++ b/xmake/core/platform/android/android.lua
diff --git a/xmake/scripts/platform/android/prober.lua b/xmake/core/platform/android/prober.lua
index a6446e0e1..a6446e0e1 100644
--- a/xmake/scripts/platform/android/prober.lua
+++ b/xmake/core/platform/android/prober.lua
diff --git a/xmake/scripts/platform/iphoneos/iphoneos.lua b/xmake/core/platform/iphoneos/iphoneos.lua
index f9147945c..f9147945c 100644
--- a/xmake/scripts/platform/iphoneos/iphoneos.lua
+++ b/xmake/core/platform/iphoneos/iphoneos.lua
diff --git a/xmake/scripts/platform/iphoneos/package.lua b/xmake/core/platform/iphoneos/package.lua
index 1e46ddadc..1e46ddadc 100644
--- a/xmake/scripts/platform/iphoneos/package.lua
+++ b/xmake/core/platform/iphoneos/package.lua
diff --git a/xmake/scripts/platform/iphoneos/prober.lua b/xmake/core/platform/iphoneos/prober.lua
index 0b4d10dc8..0de95c783 100644
--- a/xmake/scripts/platform/iphoneos/prober.lua
+++ b/xmake/core/platform/iphoneos/prober.lua
@@ -270,7 +270,7 @@ function prober._probe_toolchains(configs)
if not prober._probe_toolpath(configs, "cxx", "xcrun -sdk iphoneos ", {"clang++", "clang"}, "the c++ compiler") then return false end
if not prober._probe_toolpath(configs, "mm", "xcrun -sdk iphoneos ", "clang", "the objc compiler") then return false end
if not prober._probe_toolpath(configs, "mxx", "xcrun -sdk iphoneos ", {"clang++", "clang"}, "the objc++ compiler") then return false end
- if not prober._probe_toolpath(configs, "as", xmake._SCRIPTS_DIR .. "/tools/gas-preprocessor.pl xcrun -sdk iphoneos ", "clang", "the assember") then return false end
+ if not prober._probe_toolpath(configs, "as", xmake._CORE_DIR .. "/tools/gas-preprocessor.pl xcrun -sdk iphoneos ", "clang", "the assember") then return false end
if not prober._probe_toolpath(configs, "ld", "xcrun -sdk iphoneos ", {"clang++", "clang"}, "the linker") then return false end
if not prober._probe_toolpath(configs, "ar", "xcrun -sdk iphoneos ", "ar", "the static library linker") then return false end
if not prober._probe_toolpath(configs, "sh", "xcrun -sdk iphoneos ", {"clang++", "clang"}, "the shared library linker") then return false end
diff --git a/xmake/scripts/platform/iphonesimulator/iphonesimulator.lua b/xmake/core/platform/iphonesimulator/iphonesimulator.lua
index 4ceeb3eca..4ceeb3eca 100644
--- a/xmake/scripts/platform/iphonesimulator/iphonesimulator.lua
+++ b/xmake/core/platform/iphonesimulator/iphonesimulator.lua
diff --git a/xmake/scripts/platform/iphonesimulator/prober.lua b/xmake/core/platform/iphonesimulator/prober.lua
index a4c69c72a..a4c69c72a 100644
--- a/xmake/scripts/platform/iphonesimulator/prober.lua
+++ b/xmake/core/platform/iphonesimulator/prober.lua
diff --git a/xmake/scripts/platform/linux/install.lua b/xmake/core/platform/linux/install.lua
index 870cf5040..870cf5040 100644
--- a/xmake/scripts/platform/linux/install.lua
+++ b/xmake/core/platform/linux/install.lua
diff --git a/xmake/scripts/platform/linux/linux.lua b/xmake/core/platform/linux/linux.lua
index 406dc5c58..406dc5c58 100644
--- a/xmake/scripts/platform/linux/linux.lua
+++ b/xmake/core/platform/linux/linux.lua
diff --git a/xmake/scripts/platform/linux/prober.lua b/xmake/core/platform/linux/prober.lua
index 4e50b13cf..4e50b13cf 100644
--- a/xmake/scripts/platform/linux/prober.lua
+++ b/xmake/core/platform/linux/prober.lua
diff --git a/xmake/scripts/platform/linux/uninstall.lua b/xmake/core/platform/linux/uninstall.lua
index 468692620..468692620 100644
--- a/xmake/scripts/platform/linux/uninstall.lua
+++ b/xmake/core/platform/linux/uninstall.lua
diff --git a/xmake/scripts/platform/macosx/install.lua b/xmake/core/platform/macosx/install.lua
index 870cf5040..870cf5040 100644
--- a/xmake/scripts/platform/macosx/install.lua
+++ b/xmake/core/platform/macosx/install.lua
diff --git a/xmake/scripts/platform/macosx/macosx.lua b/xmake/core/platform/macosx/macosx.lua
index 088a01c18..088a01c18 100644
--- a/xmake/scripts/platform/macosx/macosx.lua
+++ b/xmake/core/platform/macosx/macosx.lua
diff --git a/xmake/scripts/platform/macosx/prober.lua b/xmake/core/platform/macosx/prober.lua
index e2571fdd9..e2571fdd9 100644
--- a/xmake/scripts/platform/macosx/prober.lua
+++ b/xmake/core/platform/macosx/prober.lua
diff --git a/xmake/scripts/platform/macosx/uninstall.lua b/xmake/core/platform/macosx/uninstall.lua
index 468692620..468692620 100644
--- a/xmake/scripts/platform/macosx/uninstall.lua
+++ b/xmake/core/platform/macosx/uninstall.lua
diff --git a/xmake/scripts/platform/mingw/mingw.lua b/xmake/core/platform/mingw/mingw.lua
index 7264489b2..7264489b2 100644
--- a/xmake/scripts/platform/mingw/mingw.lua
+++ b/xmake/core/platform/mingw/mingw.lua
diff --git a/xmake/scripts/platform/mingw/prober.lua b/xmake/core/platform/mingw/prober.lua
index 575e3a7ba..575e3a7ba 100644
--- a/xmake/scripts/platform/mingw/prober.lua
+++ b/xmake/core/platform/mingw/prober.lua
diff --git a/xmake/scripts/platform/platform.lua b/xmake/core/platform/platform.lua
index 38d482f44..2fc411cbf 100644
--- a/xmake/scripts/platform/platform.lua
+++ b/xmake/core/platform/platform.lua
@@ -98,7 +98,7 @@ function platform._load(plat)
if not module then module = platform._load_from(global.directory(), plat) end
-- attempt to load it from the script directory
- if not module then module = platform._load_from(xmake._SCRIPTS_DIR, plat) end
+ if not module then module = platform._load_from(xmake._CORE_DIR, plat) end
-- cache it if ok
if module then
@@ -259,7 +259,7 @@ function platform.plats()
end
-- get the platform list from the script directory
- plats = os.match(xmake._SCRIPTS_DIR .. "/platform/*", true)
+ plats = os.match(xmake._CORE_DIR .. "/platform/*", true)
if plats then
for _, v in ipairs(plats) do
table.insert(list, path.basename(v))
diff --git a/xmake/scripts/platform/watchos/package.lua b/xmake/core/platform/watchos/package.lua
index 1e46ddadc..1e46ddadc 100644
--- a/xmake/scripts/platform/watchos/package.lua
+++ b/xmake/core/platform/watchos/package.lua
diff --git a/xmake/scripts/platform/watchos/prober.lua b/xmake/core/platform/watchos/prober.lua
index 7b393f925..1a818dfdf 100644
--- a/xmake/scripts/platform/watchos/prober.lua
+++ b/xmake/core/platform/watchos/prober.lua
@@ -270,7 +270,7 @@ function prober._probe_toolchains(configs)
if not prober._probe_toolpath(configs, "cxx", "xcrun -sdk watchos ", {"clang++", "clang"}, "the c++ compiler") then return false end
if not prober._probe_toolpath(configs, "mm", "xcrun -sdk watchos ", "clang", "the objc compiler") then return false end
if not prober._probe_toolpath(configs, "mxx", "xcrun -sdk watchos ", {"clang++", "clang"}, "the objc++ compiler") then return false end
- if not prober._probe_toolpath(configs, "as", xmake._SCRIPTS_DIR .. "/tools/gas-preprocessor.pl xcrun -sdk watchos ", "clang", "the assember") then return false end
+ if not prober._probe_toolpath(configs, "as", xmake._CORE_DIR .. "/tools/gas-preprocessor.pl xcrun -sdk watchos ", "clang", "the assember") then return false end
if not prober._probe_toolpath(configs, "ld", "xcrun -sdk watchos ", {"clang++", "clang"}, "the linker") then return false end
if not prober._probe_toolpath(configs, "ar", "xcrun -sdk watchos ", "ar", "the static library linker") then return false end
if not prober._probe_toolpath(configs, "sh", "xcrun -sdk watchos ", {"clang++", "clang"}, "the shared library linker") then return false end
diff --git a/xmake/scripts/platform/watchos/watchos.lua b/xmake/core/platform/watchos/watchos.lua
index 9551084f8..9551084f8 100644
--- a/xmake/scripts/platform/watchos/watchos.lua
+++ b/xmake/core/platform/watchos/watchos.lua
diff --git a/xmake/scripts/platform/watchsimulator/prober.lua b/xmake/core/platform/watchsimulator/prober.lua
index d33059c36..d33059c36 100644
--- a/xmake/scripts/platform/watchsimulator/prober.lua
+++ b/xmake/core/platform/watchsimulator/prober.lua
diff --git a/xmake/scripts/platform/watchsimulator/watchsimulator.lua b/xmake/core/platform/watchsimulator/watchsimulator.lua
index a13bfde1e..a13bfde1e 100644
--- a/xmake/scripts/platform/watchsimulator/watchsimulator.lua
+++ b/xmake/core/platform/watchsimulator/watchsimulator.lua
diff --git a/xmake/scripts/platform/windows/prober.lua b/xmake/core/platform/windows/prober.lua
index 40d214efd..40d214efd 100644
--- a/xmake/scripts/platform/windows/prober.lua
+++ b/xmake/core/platform/windows/prober.lua
diff --git a/xmake/scripts/platform/windows/tools/cl.lua b/xmake/core/platform/windows/tools/cl.lua
index 299960bb8..299960bb8 100644
--- a/xmake/scripts/platform/windows/tools/cl.lua
+++ b/xmake/core/platform/windows/tools/cl.lua
diff --git a/xmake/scripts/platform/windows/tools/lib.lua b/xmake/core/platform/windows/tools/lib.lua
index 1d94152cc..1d94152cc 100644
--- a/xmake/scripts/platform/windows/tools/lib.lua
+++ b/xmake/core/platform/windows/tools/lib.lua
diff --git a/xmake/scripts/platform/windows/tools/link.lua b/xmake/core/platform/windows/tools/link.lua
index 66476fa41..66476fa41 100644
--- a/xmake/scripts/platform/windows/tools/link.lua
+++ b/xmake/core/platform/windows/tools/link.lua
diff --git a/xmake/scripts/platform/windows/tools/ml.lua b/xmake/core/platform/windows/tools/ml.lua
index 5a6034320..5a6034320 100644
--- a/xmake/scripts/platform/windows/tools/ml.lua
+++ b/xmake/core/platform/windows/tools/ml.lua
diff --git a/xmake/scripts/platform/windows/tools/nmake.lua b/xmake/core/platform/windows/tools/nmake.lua
index 3dddc7cf2..3dddc7cf2 100644
--- a/xmake/scripts/platform/windows/tools/nmake.lua
+++ b/xmake/core/platform/windows/tools/nmake.lua
diff --git a/xmake/scripts/platform/windows/windows.lua b/xmake/core/platform/windows/windows.lua
index 794358dc1..794358dc1 100644
--- a/xmake/scripts/platform/windows/windows.lua
+++ b/xmake/core/platform/windows/windows.lua
diff --git a/xmake/scripts/tools/ar.lua b/xmake/core/tools/ar.lua
index 75e63f83d..75e63f83d 100644
--- a/xmake/scripts/tools/ar.lua
+++ b/xmake/core/tools/ar.lua
diff --git a/xmake/scripts/tools/cat.lua b/xmake/core/tools/cat.lua
index 32fea4e24..32fea4e24 100644
--- a/xmake/scripts/tools/cat.lua
+++ b/xmake/core/tools/cat.lua
diff --git a/xmake/scripts/tools/clang++.lua b/xmake/core/tools/clang++.lua
index 37352dec4..37352dec4 100644
--- a/xmake/scripts/tools/clang++.lua
+++ b/xmake/core/tools/clang++.lua
diff --git a/xmake/scripts/tools/clang.lua b/xmake/core/tools/clang.lua
index 280ae73a6..280ae73a6 100644
--- a/xmake/scripts/tools/clang.lua
+++ b/xmake/core/tools/clang.lua
diff --git a/xmake/scripts/tools/cp.lua b/xmake/core/tools/cp.lua
index 1b3ba9843..1b3ba9843 100644
--- a/xmake/scripts/tools/cp.lua
+++ b/xmake/core/tools/cp.lua
diff --git a/xmake/scripts/tools/dispatcher.lua b/xmake/core/tools/dispatcher.lua
index d019937ec..d019937ec 100644
--- a/xmake/scripts/tools/dispatcher.lua
+++ b/xmake/core/tools/dispatcher.lua
diff --git a/xmake/scripts/tools/echo.lua b/xmake/core/tools/echo.lua
index dbfa67426..dbfa67426 100644
--- a/xmake/scripts/tools/echo.lua
+++ b/xmake/core/tools/echo.lua
diff --git a/xmake/scripts/tools/g++.lua b/xmake/core/tools/g++.lua
index 64970b039..64970b039 100644
--- a/xmake/scripts/tools/g++.lua
+++ b/xmake/core/tools/g++.lua
diff --git a/xmake/scripts/tools/gas-preprocessor.pl b/xmake/core/tools/gas-preprocessor.pl
index 98dfe4ad9..98dfe4ad9 100755
--- a/xmake/scripts/tools/gas-preprocessor.pl
+++ b/xmake/core/tools/gas-preprocessor.pl
diff --git a/xmake/scripts/tools/gcc.lua b/xmake/core/tools/gcc.lua
index ab5e94ccb..ab5e94ccb 100644
--- a/xmake/scripts/tools/gcc.lua
+++ b/xmake/core/tools/gcc.lua
diff --git a/xmake/scripts/tools/make.lua b/xmake/core/tools/make.lua
index 5d2d1f42b..5d2d1f42b 100644
--- a/xmake/scripts/tools/make.lua
+++ b/xmake/core/tools/make.lua
diff --git a/xmake/scripts/tools/mkdir.lua b/xmake/core/tools/mkdir.lua
index 9fadb875d..9fadb875d 100644
--- a/xmake/scripts/tools/mkdir.lua
+++ b/xmake/core/tools/mkdir.lua
diff --git a/xmake/scripts/tools/mv.lua b/xmake/core/tools/mv.lua
index 7af2db9ed..7af2db9ed 100644
--- a/xmake/scripts/tools/mv.lua
+++ b/xmake/core/tools/mv.lua
diff --git a/xmake/scripts/tools/rm.lua b/xmake/core/tools/rm.lua
index 47f57e68b..47f57e68b 100644
--- a/xmake/scripts/tools/rm.lua
+++ b/xmake/core/tools/rm.lua
diff --git a/xmake/scripts/tools/rmdir.lua b/xmake/core/tools/rmdir.lua
index cea1e28fa..cea1e28fa 100644
--- a/xmake/scripts/tools/rmdir.lua
+++ b/xmake/core/tools/rmdir.lua
diff --git a/xmake/scripts/tools/swiftc.lua b/xmake/core/tools/swiftc.lua
index 39142705f..39142705f 100644
--- a/xmake/scripts/tools/swiftc.lua
+++ b/xmake/core/tools/swiftc.lua
diff --git a/xmake/scripts/tools/tools.lua b/xmake/core/tools/tools.lua
index 31a68734b..a61322d3c 100644
--- a/xmake/scripts/tools/tools.lua
+++ b/xmake/core/tools/tools.lua
@@ -127,7 +127,7 @@ function tools.find(name, root)
if not filepath then filepath = tools._find_from(platform.directory() .. "/tools", name) end
-- attempt to find it from the script directory
- if not filepath then filepath = tools._find_from(xmake._SCRIPTS_DIR .. "/tools", name) end
+ if not filepath then filepath = tools._find_from(xmake._CORE_DIR .. "/tools", name) end
-- ok?
return filepath
diff --git a/xmake/scripts/tools/verbose.lua b/xmake/core/tools/verbose.lua
index b1168f29d..b1168f29d 100644
--- a/xmake/scripts/tools/verbose.lua
+++ b/xmake/core/tools/verbose.lua