Game Development Community

Windows Command Line Build?

by Jeff Leigh · in Torque Game Engine · 12/13/2004 (4:41 am) · 11 replies

Does anyone have a batch file or script that compiles and builds a TGE VC++ project from the command line (i.e. outside of the VS IDE) with all the right parameters?

If so, care to share it (them)?

#1
12/13/2004 (5:15 am)
You can get all the compiler's command line parameters by going

Project->properties->C/C++->Command line
#2
12/13/2004 (4:25 pm)
Yeah, I know, I started doing it but it got frustrated (I've never really used command line compile/build, never had a need to). Just thought it would be easier if someone had already culled it out and put it in a batch file.

I hate reinventing the wheel...
#3
12/14/2004 (10:56 pm)
When we do automated compiles, we typically use the GNU toolchain... that said I'm pretty sure that you can get VS to compile from the command line using nmake or similar.
#4
12/15/2004 (10:39 am)
FYI to anyone interested I just submitted a resource with batch building command files for VS.NET (VC7).
#5
12/15/2004 (11:15 am)
Now what I'd love to see is a script that takes a torque.targets.mk file and spits out an XCode (Mac) project file!
--mutters something about 7 months and still no progress on getting his Mac client up and running.
#6
12/16/2004 (6:23 am)
You can do a build with VS using the following command to build using the solution and it's internal settings:

syntax:
devenv /build ConfigName [/project ProjName] [/projectconfig ConfigName] SolutionName

examples:
to build release, cd into your vc6/vc7 directory and type:
devenv /build Release "Torque SDK.sln"

to compile and run:
devenv /run Release "TorqueDemo.sln"

to clean then build a solution in another directory:
devenv /rebuild Release "C:\CVSs\your mamas folder\torque\vc6\Torque SDK.sln"

See this link for more info:
msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vxgrfCom...

You must have the path to devenv.exe (located in your visual studio install directory) added to the path system environment variable to call devenv from anywhere in the console.
#7
12/17/2004 (4:04 pm)
@Jameson

Those are the commands my batch files do along with setting the VS paths and environment variables.
#8
12/17/2004 (4:09 pm)
Everyone should look at SCons it is cross platform and very very very easy to use and does everything you need to do.
There is a plugin for Eclipse that works great once you figure it out, I am writing documentation to submit to the author of the plugin.
It would be trivial to create an SCons build system for torque for those of you not using VS.
#9
12/18/2004 (4:26 am)
@Jarrod

Thanks, for this link. I'd be interested in checking out your docs when they're ready.

For the meantime I was just looking for a way to "submit and walk away" from my builds in a batch but this looks interesting.
#10
12/18/2004 (11:37 pm)
The neat thing is SCons will build the VS workspace and/or solution file for you, should be able to build the XCode project file as well.
it is truely a one stop shop! I am porting all the make files I have to SCons right now, and considerign replacing ant with it as well. . . .
#11
12/18/2004 (11:48 pm)
I've been planning on using SCons for some time... I will finally have a chance to very soon!