Open Zcaic opened 6 days ago
Bot detected the issue body's language is not English, translate it automatically.
Title: Does Xmake support customizing the msvc compilation chain when plat=windows?
这边支持 vcvarsall.bat 的探测和加载,以及支持 vs prompt cmd 环境。。其他的环境不支持
Bot detected the issue body's language is not English, translate it automatically.
This supports the detection and loading of vcvarsall.bat, as well as the vs prompt cmd environment. . Other environments are not supported
如果要支持,需要 config 新增几个参数专门设置 INCLUDE
/LIBPATH
,然后还是在 find_vstudio
基于这些值去查找吧。
这样貌似也能无缝支持 wine-msvc 的工具链,包管理那边继续走环境变量。
Bot detected the issue body's language is not English, translate it automatically.
If you want to support it, you need to add several parameters to config to specifically set
INCLUDE
/LIBPATH
, and then usefind_vstudio
to search based on these values. This seems to be able to seamlessly support the wine-msvc tool chain, and the package management will continue to use environment variables.
我看了下源码,xmake好像是根据注册表去找vs的,而且构建工具好像用的是msbuild,不知道我理解的对不对
Bot detected the issue body's language is not English, translate it automatically.
I looked at the source code. It seems that xmake looks for VS based on the registry, and the build tool seems to use msbuild. I don’t know if I understand it correctly.
跟 msbuild 有啥关系,xmake 直接调用的编译器。
环境加载依赖 vcallvars.bat 你可以自己看下源码
https://github.com/xmake-io/xmake/blob/dev/xmake/modules/detect/sdks/find_vstudio.lua
我没用过便携版的msvc,可以提供下 安装包,或者直接提 pr 到 xmake-repo 收录进来。后面倒是可以考虑整合进来
好的嘞,大佬,这是便携版MSVC的下载开源工具,https://github.com/Data-Oriented-House/PortableBuildTools
Bot detected the issue body's language is not English, translate it automatically.
What does it have to do with msbuild, the compiler called directly by xmake.
Environment loading depends on vcallvars.bat. You can look at the source code yourself.
https://github.com/xmake-io/xmake/blob/dev/xmake/modules/detect/sdks/find_vstudio.lua
Bot detected the issue body's language is not English, translate it automatically.
I have never used the portable version of msvc. You can provide the installation package, or directly upload the pr to xmake-repo for inclusion. You can consider integrating it later.
Bot detected the issue body's language is not English, translate it automatically.
Okay, boss, this is the downloadable open source tool for the portable version of MSVC, https://github.com/Data-Oriented-House/PortableBuildTools
Xmake Version
2.9.5
Operating System Version and Architecture
Windows10
Describe Bug
我电脑由于不能联网,所以安装的是便携版的msvc,并设置好相应的
PATH
、INLCUDE
、`LIB``环境变量,用cmake是能够正确识别和编译的,但是用xmake的时候,发现会提示找不到vs。Expected Behavior
无
Project Configuration
无
Additional Information and Error Logs
无