Skip to content

Commit

Permalink
Merge pull request #106 from epreston/win-vc-buildtools-support
Browse files Browse the repository at this point in the history
feat: add support for visual studio build tools
  • Loading branch information
SanderMertens authored Aug 2, 2024
2 parents 12bac42 + c8c70e8 commit 10c0212
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ git clone https://github.com/SanderMertens/bake
bake/setup.sh
```

On Windows (requires `C++ CMake tools for Windows` individual component included in the `Desktop development with C++` workload for Visual Studio):
On Windows:

Requires [Visual Studio Build Tools](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022) or the full Visual Studio Community IDE installed with the `C++ CMake tools for Windows` and `Windows SDK` individual components included in the `Desktop development with C++` workload:
```
git clone https://github.com/SanderMertens/bake
cd bake
Expand Down
13 changes: 12 additions & 1 deletion setup.bat
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,24 @@ rem If not found, try in x86 program files
if "%VSDIR%"=="" (
for /l %%v in (2050, -1, 2015) do (
if "%VSDIR%"=="" (
if exist "C:\Program Files (x86^)\Microsoft Visual Studio\%%v\Community\" (
if exist "C:\Program Files (x86)\Microsoft Visual Studio\%%v\Community\" (
set VSDIR=C:\Program Files (x86^)\Microsoft Visual Studio\%%v\Community
)
)
)
)

rem If not found, find visual studio cli build tools installation
if "%VSDIR%"=="" (
for /l %%v in (2050, -1, 2019) do (
if "%VSDIR%"=="" (
if exist "C:\Program Files (x86)\Microsoft Visual Studio\%%v\BuildTools\" (
set VSDIR=C:\Program Files (x86^)\Microsoft Visual Studio\%%v\BuildTools
)
)
)
)

if "%VSDIR%"=="" (
echo No visual studio installation found! Try running again in visual studio prompt.
goto :eof
Expand Down

0 comments on commit 10c0212

Please sign in to comment.