-
-
Notifications
You must be signed in to change notification settings - Fork 782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support custom vc build tools #5823
base: dev
Are you sure you want to change the base?
Conversation
if file then | ||
local variables = {} | ||
for line in file:gmatch("[^\r\n]+") do | ||
local key, value = line:match("set%s+(.-)=(.*)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为啥不走运行捕获 envs,至少稳定可靠。
local outdata = try {function () return os.iorun(genvcvars_bat) end} |
直接语法解析 set,不太稳吧。如果 set 是在 if 分支里呢,怎么判断取到的当前有效值
local file = io.readfile(opt.bat) | ||
if file then | ||
local variables = {} | ||
for line in file:gmatch("[^\r\n]+") do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
file:lines()
VCToolsInstallDir = VCToolsInstallDirs[1] | ||
end | ||
|
||
local WindowsSDKDir = path.join(vs_build_tools, "Windows Kits/10") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没用到的代码 暂时去掉
@@ -43,6 +43,8 @@ platform("windows") | |||
, " e.g. --vs_sdkver=10.0.15063.0" } | |||
, {nil, "vs_runtime", "kv", nil, "The Runtime library of Visual Studio (deprecated, please use --runtimes)" | |||
, values = {"MT", "MTd", "MD", "MDd"} } | |||
, {nil, "vc_bat", "kv", nil, "The BuildTools bat file" | |||
, " e.g. --vc_bat=C:/BuildTools/devcmd.bat" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
改成 vs_devcmd 。。统一用 vs_ 前缀
function load_custom_vcenv(opt) | ||
opt = opt or {} | ||
|
||
if opt.bat and os.isfile(opt.bat) then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
改成 opt.devcmd
#5732