# Automating Visual Studio build processes

## Recommended Posts

TheOther    150
Hey everyone, I'm currently building/maintaining an LGPL project which is compatible with VS6.0/.NET 2003 and soon-to-be .NET 2005 and most likely Dev-CPP (so GCC). I currently have a stupid little batch script which goes into each IDE folder, runs the vcvars32, then cd's into my project folders and runs nmake; which then builds my .lib/.dll files. It's clunky and ugly and I'm hoping there's a really easy system to accomplish this. Is there a GUI tool of some kind that will help me out? Is it worth building an ANT script to do this? In the "beginner's forum" @Kwisatz mentioned using autotools which is what the SDL maintainers use...(as far as he knew). What does everyone else do here? (Or are they sane enough to just limit themselves to one IDE *grin*) thanks in advance!

##### Share on other sites
demonkoryu    980
Hey, give CrossBuilder a try, i have a link to it in my signature.

##### Share on other sites
Arild Fines    968
CMake is pretty neat.

##### Share on other sites
JohnBolton    1372
I hope I'm not stating the obvious... You can run Visual Studio from the command line (or a batch file) and compile an entire solution or specific projects. You don't need to use nmake.

For example:
    devenv /build /projectconfig Release C:\...\solution.sln    devenv /build /project "project|Win32" /projectconfig Debug C:\...\solution.sln

##### Share on other sites
johnhattan    2346
I once put together a build system that'd build 50 executables (16 and 32-bit), a half-dozen DLL's, collapse the palettes of a few hundred BMP files to 256 colors, and compress and build installers for all of 'em. . .in six languages. Close to a thousand build-targets.

And it was all done with batch files. It worked just fine when I wrote it eight years ago, and it'd work today with only a couple of changes to build-paths.

Elegance is overrated. Go with what works.

##### Share on other sites
gregs    364
The VCBuild utility will build a Visual Studio 2003 solution.

##### Share on other sites
TheOther    150
@Konfusious: Thanks I'll give that a shot.

@Arild: Thanks I'll try that one out as well.

@gregs: Sorry but I need it to handle more than just .NET 2003 solutions.

@JohnBolton: Thanks for that tip John. I was always so used to nmake that I didn't realize you could throw command line params to DevEnv.exe like that.
Of course I'll have to add new command lines if I use GCC, but I'd have to do that anyways.

I don't mind the simple/rudimentary approach of batch files either. I was just seeing if there was "a better way" to approach this problem.

Thanks everyone, I'll be busy tonight checking these out..

##### Share on other sites
Promag    132
GNU Tools: aclocal, automake, autoconf, make