Game Development Reference
In-Depth Information
The source control type is specified in the “type” attribute of the
<sourcecontrol> tag. To let CCNet know that we are using Perforce, we set
the value to “p4.” In general, CCNet will do a sync to the latest changes by de-
fault. The <autoGetSource> tag can be set to “false” if you want CCNet to run
the build tasks without syncing. It is worth noting that it will normally only sync
file changes just as Perforce would do when going through the Perforce client. To
change this behavior, you can set the <forceSync> tagto“true”tohaveitforce
update every file in the Perforce view. It is important to note that the <client>
tag is the server's Perforce workspace. CCNet will only check the <view> directory
for changes; however, it will update the entire depot during a sync. Thus, the
<client> should be a workspace that only has the projects you want to update.
Note that this is a special case for the Perforce source control block. Changelists
are read from the sync and are posted to the Web Dashboard to keep track of what
files where changed, by whom, and any notes from when the changed files were
submitted.
4.3.3 Tasks
You need to provide the CCNet project with a task list before it will do anything.
Note that tasks run in the order that they appear. If a task should fail, CCNet
will move onto the publisher section. There are many types of tasks that CCNet
can handle, including building source projects with Nant and MSBuild. If you find
that you need to run your own tool, then CCNet can run that application through
the Windows command line utility.
One of the tasks that you can perform is using MSBuild to compile your project.
MSBuild is a separate tool that comes with Visual Studio and the .NET Framework
to compile .NET projects and has support for building C/C++ projects with the
Visual Studio compiler. If you were to look at .NET projects, you would see that
they are just MSBuild scripts. MSBuild scripts are XML files that script how a
project should be built. Listing 4.6 shows how the MSBuild task is set up.
<cruisecontrol xmlns:cb="urn:ccnet.config.builder">
<queue name="Q1" duplicates="ApplyForceBuildsReAdd"/>
<project name="MyFirstProject">
<workingDirectory>C:\WorkingDir</workingDirectory>
<artifactDirectory>C:\WorkingDir\CCNetArtifacts</artifactDirectory>
<category>Super Awesome Game</category>
<webURL> http://192.168.7.216:8080/ViewFarmReport.aspx < /webURL>
<modificationDelaySeconds>100</modificationDelaySeconds>
<triggers>
<scheduleTrigger time="00:00" buildCondition="ForceBuild"
name="Scheduled">
<weekDays>
<weekDay>Monday</weekDay>
<weekDay>Tuesday</weekDay>
Search WWH ::




Custom Search