summaryrefslogtreecommitdiff
path: root/xmake/core/base/global.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2020-04-22 23:50:51 +0800
committerruki <[email protected]>2020-04-22 17:05:10 +0800
commit00f34ec89f7735b45a3ecdb55f0952d545d73cbb (patch)
tree805b1ebb127cc86f94f1ecc6dd883294337ef00d /xmake/core/base/global.lua
parent05df31effcfc9bc701387e1383b678f0914241be (diff)
pass engine name
Diffstat (limited to 'xmake/core/base/global.lua')
-rw-r--r--xmake/core/base/global.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/xmake/core/base/global.lua b/xmake/core/base/global.lua
index b70e139fd..577eed0a9 100644
--- a/xmake/core/base/global.lua
+++ b/xmake/core/base/global.lua
@@ -88,23 +88,24 @@ end
-- get the configure file
function global.filepath()
- return path.join(global.directory(), "xmake.conf")
+ return path.join(global.directory(), xmake._NAME .. ".conf")
end
-- get the global configure directory
function global.directory()
if global._DIRECTORY == nil then
+ local name = "." .. xmake._NAME
local rootdir = os.getenv("XMAKE_GLOBALDIR")
if not rootdir then
-- compatible with the old `%appdata%/.xmake` directory if it exists
local appdata = (os.host() == "windows") and os.getenv("APPDATA")
- if appdata and os.isdir(path.join(appdata, ".xmake")) then
+ if appdata and os.isdir(path.join(appdata, name)) then
rootdir = appdata
else
rootdir = path.translate("~")
end
end
- global._DIRECTORY = path.join(rootdir, ".xmake")
+ global._DIRECTORY = path.join(rootdir, name)
end
return global._DIRECTORY
end