Thursday, March 09, 2006

Cruise Control and X10 devices - the fiddly bits

Cruise control integrates nicely with X10 - which is great if you want to light up a lavalamp (or a life sized dancing pirate) to indicate build results.

So, you'd probably want to add a line like this to your Cruise Control config file.



You'd want two for the red/green combination, passing onWhenBroken="false" to the green one and using a different device code.

The main thing to note is that the java comm library is braindead with regards to
finding the javax.comm.properties file. If you can, install Cruise Control to a
directory without any spaces. If not, follow below.

Installed Without Spaces (in windows):

The current (2.4.1) build of Cruise Control doesn't supply win32com.dll or the javax.comm.properties files, but does supply comm.jar and x10.jar. Get these from: here (Update: sun no longer distributes to windows version, GO SUN!) . Put javax.comm.properties and win32com.dll in the same directory as the comm.jar file.

Installed With Spaces
(in windows):

Follow the instructions above.

The comm jar does some lame classpath parsing to find the javax.comm.properties
file. This means that you must:

- Have the comm.jar outside of any implicitly defined library directory -
so you need to have it in the classpath somehow.

- The directory this file lives in must not have a space.

- The javax.comm.properties files must live in exactly the same place as the jar file.

So the easiest way is to:

make a c:\javacomm directory
put comm.jar and javax.comm.properties in c:\javacomm
add c:\javacomm\comm.jar to the start of the cruise control classpath

Why didn't they just do getResource("javax.comm.properties")?? I dunno.


Other notes:

- set the CCDIR environment variable to where you installed cruise control - but append \main underneath it.

so C:\Program Files\CruiseControl-x.y.x\main

Also see the note on http://cruisecontrol.sourceforge.net/main/configxml.html about copying
win32com.dll if you need to.

Hopefully that will fill in the missing bits that I've not seen anyone mention before.

No comments: