Sign in to follow this  
Toolmaker

Setting up an automated build process

Recommended Posts

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 this post


Link to post
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 OFF
robocopy.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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this