Automating Visual Studio build processes

Started by
6 comments, last by Promag 18 years, 5 months ago
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!
Advertisement
Hey, give CrossBuilder a try, i have a link to it in my signature.
CMake is pretty neat.
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
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 
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!
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.

(my byline from the Gamedev Collection series, which I co-edited) John Hattan has been working steadily in the casual game-space since the TRS-80 days and professionally since 1990. After seeing his small-format games turned down for what turned out to be Tandy's last PC release, he took them independent, eventually releasing them as several discount game-packs through a couple of publishers. The packs are actually still available on store-shelves, although you'll need a keen eye to find them nowadays. He continues to work in the casual game-space as an independent developer, largely working on games in Flash for his website, The Code Zone (www.thecodezone.com). His current scheme is to distribute his games virally on various web-portals and widget platforms. In addition, John writes weekly product reviews and blogs (over ten years old) for www.gamedev.net from his home office where he lives with his wife and daughter in their home in the woods near Lake Grapevine in Texas.

The VCBuild utility will build a Visual Studio 2003 solution.
@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..

GNU Tools: aclocal, automake, autoconf, make

This topic is closed to new replies.

Advertisement