diff options
| -rw-r--r-- | CHANGELOG.md | 10 | ||||
| -rw-r--r-- | xmake/core/main.lua | 8 |
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() |
