From 2e6bc9480e3255e6816b647a56e50f4a88f0df31 Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 19 Sep 2018 23:21:53 +0800 Subject: improve winenv directory --- xmake/platforms/windows/environment.lua | 2 +- xmake/repository/packages/g/git/xmake.lua | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/xmake/platforms/windows/environment.lua b/xmake/platforms/windows/environment.lua index b11e0907d..426b9b4ee 100644 --- a/xmake/platforms/windows/environment.lua +++ b/xmake/platforms/windows/environment.lua @@ -82,7 +82,7 @@ function _enter_toolchains() os.addenv("path", path.join(os.programdir(), "winenv", "bin")) -- attempt to load winenv - local winenv_dir = path.translate("~/.xmake/winenv") + local winenv_dir = path.join(global.directory(), "winenv") if os.isdir(winenv_dir) then import("winenv", {rootdir = winenv_dir, try = true, anonymous = true})(winenv_dir) end diff --git a/xmake/repository/packages/g/git/xmake.lua b/xmake/repository/packages/g/git/xmake.lua index 6e3d64167..af6e88deb 100644 --- a/xmake/repository/packages/g/git/xmake.lua +++ b/xmake/repository/packages/g/git/xmake.lua @@ -27,8 +27,11 @@ package("git") on_install("windows", function (package) + -- imports + import("core.base.global") + -- install winenv with git - local winenv_dir = path.translate("~/.xmake/winenv") + local winenv_dir = path.join(global.directory(), "winenv") os.mkdir(winenv_dir) os.cp("*", winenv_dir) -- cgit v1.3.1