Fix: Pick an MSBuild instance that has ATL, not the first found
build.ps1 took the first MSBuild.exe matching a hardcoded glob under %ProgramFiles% / %ProgramFiles(x86)%. On a machine that has both a command-line build tools instance and an IDE, that is the build tools one. It ships the v142 compiler, but ATL is a separate optional component there, so the link step failed with LNK1104 on atls.lib while the same sources built cleanly in the IDE whose instance carries ATL. The vswhere lookup meant to cover installations on other drives never ran, because the glob had already matched. Candidates are now validated against VC\Tools\MSVC\*\atlmfc\lib\x86\atls.lib before being accepted, every rejected instance is reported, and the vswhere lookup enumerates all instances and applies the same check, so an installation on another drive is found as well. When no instance carries ATL the first candidate is still used, with a warning, which keeps the previous behaviour and lets MSBuild emit the more specific error. The script is also saved as UTF-8 with BOM: Windows PowerShell 5.1 reads a BOM-less UTF-8 script as ANSI, which turns some Chinese comment characters into a trailing backtick and swallows the following line. This commit also carries the pending build script work: the Go server builder, the -ClientOnly fast path, and the serverd / client debug presets in build.cmd. Skills.md documents the two new presets. Co-Authored-By: deepseek-flash
This commit is contained in:
1 parent
37d0297f07
commit
73aa2725b9
3 files changed
+111
-12
No files matched your search
@@ -9,6 +9,8 @@
|
||||
- build.cmd publish:编译YAMA.exe且通过upx压缩,所生成的可执行文件较小。
|
||||
- buld.cmd server:只编译YAMA.exe,需保证所依赖的客户端程序已经编译。
|
||||
- build.cmd go-server:编译 Go 服务端,可以选择带publish 参数进行upx压缩。
|
||||
- build.cmd serverd:编译 Debug 版服务端(x64),输出 Bin\Yama_x64d.exe。
|
||||
- build.cmd client:编译 Debug 版客户端(x64),输出 x64\Debug\ghost.exe。
|
||||
|
||||
## Go 服务端
|
||||
|
||||
|
||||
Reference in new issue
Block a user