From fe14723cdfd6abed07629db4145ccf4f11a0cb01 Mon Sep 17 00:00:00 2001 From: Ed Preston Date: Wed, 31 Jul 2024 19:00:29 +1000 Subject: [PATCH 1/3] Create .gitattributes stop windows contributors from modifying line endings in generated headers when running setup --- .gitattributes | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto From d8a38f4b551f7f4a223864db3c02682a12ddc128 Mon Sep 17 00:00:00 2001 From: Ed Preston Date: Wed, 31 Jul 2024 19:02:41 +1000 Subject: [PATCH 2/3] fix: setup.bat escape of parenthesis in quoted string not required, it causes directory match to fail when it exists. it is required when setting the environment variable in the following line. --- setup.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.bat b/setup.bat index d1fad60..f6909d3 100644 --- a/setup.bat +++ b/setup.bat @@ -23,7 +23,7 @@ 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 ) ) From c8c70e8b911162b21e55100e3541949c070fc705 Mon Sep 17 00:00:00 2001 From: Ed Preston Date: Wed, 31 Jul 2024 19:23:39 +1000 Subject: [PATCH 3/3] feature: add support for vs build tools support "Build Tools for Visual Studio 2019+", more commonly used to build windows apps from the CLI or during CI pipelines. --- README.md | 4 +++- setup.bat | 11 +++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d76d7df..4a795e3 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/setup.bat b/setup.bat index f6909d3..e3b4492 100644 --- a/setup.bat +++ b/setup.bat @@ -30,6 +30,17 @@ if "%VSDIR%"=="" ( ) ) +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