A short batch file that let’s me skip typing as much as possible when using vcbuild on my present projects.
IF "%1" EQU "help" (
ECHO %0 help -- display this help
ECHO %0 clean target -- clean for "target"
ECHO %0 target [run] -- build and run "target"
IF "%1" EQU "clean" (
vcbuild /clean TheSolutionFile.sln "%2|Win32"
) ELSE (
IF "%2" EQU "run" (
vcbuild TheSolutionFile.sln "%1|Win32" && pathtothe.exe
) ELSE (
vcbuild TheSolutionFile.sln "%1|Win32"
which is (obviously) saved in the same direction as my solution file. A trivial modification would allow passing the solution file through an environment variable, and one could always use vcbuild’s understanding of a lone project file in the present directory but I tend to keep a shell open to the same location as my solution file.
Then again, at the moment I am using a file system hierarchy that looks sort of like this for most of my current stuff:
Makefile # the big thing for conventional builds
*.c, *.cpp, ...
*.h, *.hpp, ...
# project specific library files
# result of compiling (e.g. 'make target')