The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Using VBS for a build process

I use to work for a company that had written a VBScript to do their build and release process.  It went something like this:

Did a checkout of all files needed from CVS
Used the project settings to build the project (both C++ and VB)
Compiled the InstallShield script
And copied the Setup.exe to the deploy sever

Since I did not write it I dont remember all the commands.  Can someone point me in the right direction?
CaliforniaCoder Send private email
Wednesday, September 27, 2006
 
 
You might want to consider Ant or NAnt which are both open source projects specifically designed to do this stuff and very good they are too. However, Ant requires Java to be installed and NAnt requires the .NET runtime.
John Topley Send private email
Wednesday, September 27, 2006
 
 
What's wrong with a good ole fashioned .bat file?  All of those tasks can be accomplished easily using command line interfaces.
SomeBody Send private email
Wednesday, September 27, 2006
 
 
Bat files work up until the point you need to do an "if" or a loop. Then things fall apart pretty quickly and maintaining the build scripts becomes a major burden.

I wrote a fairly big build system a few years ago that used script to pull together a bat file created by a code generator on each build. I'm not quite sure what I was smoking, but it worked at the time. And it was actually pretty reasonable to maintain.

These days, I'd use MSBuild, NAnt, or something similar. They require .NET to be installed, but can be used for any build task.
Chris Tavares Send private email
Wednesday, September 27, 2006
 
 
>> Bat files work up until the point you need to do an "if" or a loop.

How so?  Conditionals tend to be really easy in batch files for things relevant to a build process (like error handling).  And looping through things you'd typically loop through in a build script (like source files) tends to be much simpler in batch files than in a full-blown scripting or programming language. 

For example:
for %%f in (*.cs) do csc.exe %%f || call :ErrorHandler %%f

This loops through every C# source file in the current directory, passes them to the C# compiler, and calls an ErrorHandler function defined elsewhere in the batch file that does whatever error handling is desired.

Show me that same functionality in a single line of code with VBS or Python or some other language typically used for build scripts.
SomeBody Send private email
Wednesday, September 27, 2006
 
 
Our code is using C++ and not C# can we use MSBuild or NAnt for that as well?
CaliforniaCoder Send private email
Thursday, September 28, 2006
 
 
"Our code is using C++ and not C# can we use MSBuild or NAnt for that as well?"
Sure you can. You will have to write your own compile task ofcourse. I did this with Ant for both Delphi and Excelsior Jet.
Dave
Friday, September 29, 2006
 
 
Nonsense. NAnt can compile C++ code "out of the box". See http://nant.sourceforge.net/release/latest/help/tasks/cl.html

I'd be very surprised if you have to do anything special to get MSBuild to compile C++ too.
John Topley Send private email
Friday, September 29, 2006
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz