RFR: 8289174: JavaFX build fails on Windows when VS150COMNTOOLS is not set [v2]
Lukasz Kostyra
lkostyra at openjdk.org
Tue Aug 13 06:30:58 UTC 2024
On Mon, 12 Aug 2024 18:04:47 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>> buildSrc/genVSproperties.bat line 52:
>>
>>> 50: for %%a in (2022, 2019, 2017) do (
>>> 51: set year=%%a
>>> 52: for %%b in (Enterprise, Professional, Community) do (
>>
>> Quick two cents from me on this part - Microsoft also offers a free CLI-only version of Visual Studio called "Build Tools for Visual Studio" - https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022
>>
>> Those install in a separate "BuildTools" directory (so ex. `C:\Program Files\Microsoft Visual Studio\2022\BuildTools...`). Internally the directory structure is the same and all the scripts we need are also there, so it seems like this should work. I think we could also add BuildTools as an option here? I can check on my machine if it builds as part of this review.
>
> Thanks, that would be helpful. Let me know what you find.
I checked on a Win 11 system where Build Tools 2022 are installed in default directory (no other Visual Studio edition) and the build failed with "Cannot locate Visual Studio compilers" message. Adding `BuildTools` as an option to this loop fixed it and JFX built properly (checked without Media and Webkit). Alternatively, setting `VSCOMMONTOOLS` also helps, but I think we can easily add `BuildTools` as an option here.
As a side-note - building without this PR on the same system also failed so it doesn't necessarily introduce a regression, but I think it would be a worthy addition regardless.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1534#discussion_r1714733992
More information about the openjfx-dev
mailing list