Sign in to follow this  
Mykei

Logging the amount of times a project has been built?

Recommended Posts

Quick question. Source games have a build number up in the corner, I'm guessing this is the amount of times the project has been built. How would I log the number of times I've built a project so I can output it? Thanks

Share this post


Link to post
Share on other sites
This is (typically) not the number of times the project is built from the IDE (because as soon as you have more than one developer, this is intractable), but rather the build number from some centralized build machine. The build number is stored somewhere on the central build server, perhaps in a simple text file, and a prebuild script reads it and embeds it into the appropriate data file for the game, updates the stored number, and continues along -- usually supporting rollback of the build ID if the build fails, but it depends.

There are simple pre-build hooks in most IDEs you can use to call a batch file or something -- in Visual Studio they're available in the project options. You can also get much more complex if you have an external build system like NAnt or MSBuild. The basic idea is that simple, though.

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