Setting NUnit console location by scripting

I'd like to use the same FB project on different machines.  To do that I need to set the location of the NUnit console application.  The help file explains how to do it.

From the help: "FinalBuilder allows you to modify FinalBuilder options at runtime using scripting. This makes it possible to specify the path to a third party tool at runtime so that a FinalBuilder project can for example use a different version of a third party tool"

It gives an example:

dim delphiOptions

set delphiOptions = GetOptionsObject("Borland Delphi")

delphiOptions.D6LibraryPath =delphiOptions.D6LibraryPath & ";$(DELPHI)\Components\Lib"

I tried

dim NUnitOptions

set NUnitOptions = GetOptionsObject("NUnit") ' since this is the name of the option in Tools Options

The Intellisense gave no property to set but a long list of dims, Subs and Functions.  I noticed a Sub called NUnitOptions but have no idea what it is or how to use it.

Can you help please.

Hi Hamish,

Thanks for pointing this out. Code completion for some of the option objects seem to be broken, we will get this fixed ASAP.

In the mean time, here's the script you need:

dim opt
set opt = GetOptionsObject("NUnit")
Action.SendLogMessage(opt.NUnitLocation)

... that will output the full path to nunit-console.exe, as set in the options. You can also set it, in similar fashion.

Regards,

Angus

Thanks Angus - that fixed it for me (the property NUnitLocation).

Hamish