private void SetupInnoSetupPackagerFor(Product product, SuiteRelativePath scriptPath)
{
log.InfoFormat("Found InnoSetup script for product {0} at {1}", product.Name, scriptPath);
if (product.Packager == null)
{
product.Packager = new PackagerDefinition(new PackagerId("innosetup"),
new InnoSetupPackagerParameters {ScriptPath = scriptPath});
}
else
{
if (product.Packager.PackagerType == new PackagerId("innosetup"))
{
var parameters = product.Packager.Parameters as InnoSetupPackagerParameters;
if (parameters != null)
parameters.ScriptPath = scriptPath;
}
}
}