trying to rewrite the bat files in light of delayed expansion... not going well. what is happening? I hate windows cmd shell

This commit is contained in:
2025-09-13 22:39:39 -05:00
parent 197ff389db
commit 53b493299b
3 changed files with 7 additions and 15 deletions

View File

@@ -1,23 +1,14 @@
FOR /r "C:\Program Files\Microsoft Visual Studio" %%G IN (*vcvars64.bat) DO (
SET "_file=%%G"
SET "_comp=%_file:\VC\=%"
IF NOT "%_comp%" == "%_file%" Call "%_file%"
)
SETLOCAL ENABLEDELAYEDEXPANSION
FOR /r "C:\Program Files\Microsoft Visual Studio" %%G IN (*vcvars64.bat) DO (
SET "_file=%%G"
SET "_comp=%_file:\VC\=%"
IF NOT "%_comp%" == "%_file%" Call "%_file%"
SET "_comp=!_file:\VC\=!"
IF NOT "!_comp!" == "!_file!" "!_file!"
)
FOR /r "C:\Program Files (x86)\Microsoft Visual Studio" %%G IN (*vcvars64.bat) DO (
SET "_file=%%G"
SET "_comp=%_file:\VC\=%"
IF NOT "%_comp%" == "%_file%" Call "%_file%"
SET "_comp=!_file:\VC\=!"
IF NOT "!_comp!" == "!_file!" "!_file!"
)
FOR /r "C:\Program Files (x86)\Microsoft Visual Studio" %%G IN (*vcvars64.bat) DO (
SET "_file=%%G"
SET "_comp=%_file:\VC\=%"
IF NOT "%_comp%" == "%_file%" Call "%_file%"
)

View File

@@ -3,7 +3,7 @@ SET flags=-Od -ZI
IF "%1" == "release" (
SET flags=-O2
)
@echo on
@ECHO on
SET srcs=src\*
mkdir bin obj
cl %srcs% Ws2_32.lib -I inc %flags% -std:c++20 -MP -Fo:obj\\ -Fe:bin\\

View File

@@ -1,3 +1,4 @@
@ECHO off
SETLOCAL ENABLEDELAYEDEXPANSION
Echo [ > compile_commands.json