Just a FYI,
For users doing builds in Microsoft Visual Studio 6, you might wonder "Why do my builds fail?"
Well when you start MSDEV, you normally get all kinds of include/libs setup based on a registry for visual studio,
these environment variables are not set… sometimes not even by vsvcvars.bat!
(Newer versions of Visual Studio such as VS2010 improved vsvcvars.bat)
At any rate… what follows is a script I run via Jenkins as LOCAL_SYSTEM that peeks the registry and attempts to set these environment variables
@rem reg query "HKCU\Software\Microsoft\DevStudio\6.0\Build
System\Components\Platforms\Win32 (x86)\Directories" /v "Include Dirs"
@rem reg query "HKCU\Software\Microsoft\DevStudio\6.0\Build
System\Components\Platforms\Win32 (x86)\Directories" /v "Library Dirs"
f@or /F "tokens=3* skip=2" %%i in ('reg query
"HKCU\Software\Microsoft\DevStudio\6.0\Build
System\Components\Platforms\Win32 (x86)\Directories" /v "Include Dirs"')
DO SET "INCLUDE=%%j"
@rem for /F "tokens=3* skip=2" %%i in ('reg query
"HKCU\Software\Microsoft\DevStudio\6.0\Build
System\Components\Platforms\Win32 (x86)\Directories" /v "Include Dirs"')
DO @echo %%i %%j %%k%
@echo INCLUDE IS %INCLUDE%
@for /F "tokens=3* skip=2" %%i in ('reg query
"HKCU\Software\Microsoft\DevStudio\6.0\Build
System\Components\Platforms\Win32 (x86)\Directories" /v "Library Dirs"')
DO SET "LIB=%%j"
@echo LIB IS %LIB%
Then you can run CC manually or NMAKE. Thats what I originally did with Jenkins.
You can also just build a MSDEV project via command line… which is what I do to do benchmarks of the old projects on various platforms with Jenkins
The following does a directory search and builds the *.dsp found in that directory.
This way I can just tell Jenkins to svn checkout something, go to that directory and build the dsp that is there.
@rem Now do a DIR, look for a .dsp, and do the build for that project.
@rem $command = "msdev ${project}.dsp /MAKE \"$project - Win32 $mode\"
/USEENV";
@for /F "tokens=1 delims=." %%i in ('dir /b *.dsp') DO (
@rem do a rebuild
msdev %%i.dsp /MAKE "%%i - Win32 Debug" /USEENV /REBUILD /Y3
@rem Thats all there is