summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2017-12-08 22:23:20 +0800
committerruki <[email protected]>2017-12-08 08:20:01 +0800
commit43a7ef4eaa0a0347beee6f6cc4ef919b80e457cb (patch)
treec2c1754b0d7a65bff2ea82a43ac05515ae7e741f
parent185daf2de0ac372ed78d61b69bf65d5a69687295 (diff)
improve to search root project directory
-rw-r--r--CHANGELOG.md10
-rw-r--r--xmake/core/main.lua8
2 files changed, 17 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 630fb7382..f204627ce 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,11 @@
## master (unreleased)
+### Changes
+
+* Improve to search the root project directory
+* Improve to detect vs environment
+
## v2.1.9
### New features
@@ -413,6 +418,11 @@
## master (开发中)
+### 改进
+
+* 改进搜索工程根目录策略
+* 改进vs环境探测,支持加密文件系统下vs环境的探测
+
## v2.1.9
### 新特性
diff --git a/xmake/core/main.lua b/xmake/core/main.lua
index 5e11acd28..6706b448d 100644
--- a/xmake/core/main.lua
+++ b/xmake/core/main.lua
@@ -192,7 +192,13 @@ function main._init()
-- update and enter project
xmake._PROJECT_DIR = path.directory(projectfile)
xmake._PROJECT_FILE = projectfile
- xmake._WORKING_DIR = os.cd(xmake._PROJECT_DIR)
+
+ -- enter the project directory
+ if os.isdir(os.projectdir()) then
+ xmake._WORKING_DIR = os.cd(os.projectdir())
+ else
+ xmake._WORKING_DIR = os.curdir()
+ end
-- add the directory of the program file (xmake) to $PATH environment
local programfile = os.programfile()