# Setting up an automated build process

## Recommended Posts

Toolmaker    967
I am currently in the process of researching and testing with setting up an automated build process for our application at work. In the current situation, a developer must be present to start a build manually. This means he needs to build the project, copy the files to a new location by hand and then open up InstallShield and build the installer. I'm starting to get sick of this, and specifically, I also want the ability to run nightly builds. So, I need to setup a build process which does all of the above automatically. I intend to currently write a bunch of batch files which invoke VS and IS to run their processes and copy the files around to the desired locations. Any tips or hints on this? Good practices, bad practices, good tools to keep in mind, etc. Toolmaker

##### Share on other sites
OldProgie2    158
Take a look at CruiseControl (http://cruisecontrol.sourceforge.net/)

##### Share on other sites
I just place the following line in the post build event

robocopy.exe /E /XO . "D:\Project"

Robocopy (robust copy) is a free Microsoft tool you can find on the Net. It's much better than the standard xcopy. The switches mean to only copy files that are newer so it will only copy the files that have changed since the last compile. That can save alot of time when testing from a remote location.

Of course you could use a batch file instead and add any other steps you need.

-- PostBuild.bat --
@ECHO OFFrobocopy.exe /E /XO . "D:\Project"SET ERRORLEVEL=0

Place the PostBuild.bat line into the post build event and copy the file into the output directory. Setting the error level just prevents the compiler reporting back an error.