Skip to content
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

Fix build tools detection for Windows #1713

Open
SunP04 opened this issue Dec 24, 2024 · 1 comment
Open

Fix build tools detection for Windows #1713

SunP04 opened this issue Dec 24, 2024 · 1 comment
Labels
Enhancement Request New feature or request

Comments

@SunP04
Copy link

SunP04 commented Dec 24, 2024

Hello.

Currently, for the windows build, the compiler is trying to find the vswhere tool, which could be seen here.

However that breaks when the user installs only the VS Build Tools (not the editor), which vswhere cannot detect, as it's not a complete installation of Visual Studio. Which forces most people to have a second installation just for c3, which is just a bit dumb (sry for the wording, but there isn't a better word there).

An easy fix would be just to try to find vcvarsall.bat instead of vswhere, which is installed by default at {{Program Files}}\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat (Program Files there could be x86 or not). That is also installed by the editor and it's the "default" way other compilers try to know if the user has the Build Tools installed (Examples with Odin, Rust).

This also means the python script could be better optimized to install only the necessary build tools, not the whole editor, but that's another "issue" (not really an issue).

Thanks in advance, Sun.

@lerno
Copy link
Collaborator

lerno commented Dec 24, 2024

The python script does not install VS, nor does it install the full build tools. It just installs enough to build with Windows.

@lerno lerno added the Enhancement Request New feature or request label Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants