Closed Zmmfly closed 2 days ago
Bot detected the issue body's language is not English, translate it automatically.
Title: Add includes functionality to include paths from environment variables
有些工具链需要些一堆 xmake.lua ,而作为远程包又无法去 includes 这些。感觉这个接口还有扩展空间。
比如工程初始化前可以先执行 setup.lua 调用 xrepo install
安装工具链,然后 includes package:installdir
Bot detected the issue body's language is not English, translate it automatically.
Some tool chains require a bunch of xmake.lua, but as a remote package, you cannot include these. It feels like this interface still has room for expansion. For example, before initializing the project, you can first execute setup.lua to call
xrepo install
to install the tool chain, and then includepackage:installdir
原本就支持,用 os.getenv
includes(os.getenv("SDK_PATH"))
Bot detected the issue body's language is not English, translate it automatically.
Originally supported, use os.getenv
includes(os.getenv("SDK_PATH"))
原本就支持,用 os.getenv
includes(os.getenv("SDK_PATH"))
没想到这一点,看了内置变量后思维停留在 $(env SDK_PATH)
这种方法上,然后学着@builtin
就变成了@env:SDK_PATH
Bot detected the issue body's language is not English, translate it automatically.
Originally supported, use os.getenv
``lua includes(os.getenv("SDK_PATH"))
I didn't expect this. After looking at the built-in variables, my mind stayed on the method $(env SDK_PATH)
, and then I learned @builtin
and became @env:SDK_PATH
你在什么场景下需要该功能?
使用 xmake 制作 SDK,需要将SDK与工程分离,并且需要避免使用
git submodule
的场景描述可能的解决方案
目录结构:
app/xmake.lua
内容:描述你认为的候选方案
includes("@env:SDK_PATH")
fork中已实现 https://github.com/Zmmfly/xmake/blob/f04be61e0ce31a83a3646f8a510e9dd0c2e2f60d/xmake/core/base/interpreter.lua#L1713-L1730
其他信息
No response