Bari.Plugins.InnoSetup.Model.Discovery.InnoSetupScriptDiscovery.SetupInnoSetupPackagerFor C# (CSharp) Method

SetupInnoSetupPackagerFor() private method

private SetupInnoSetupPackagerFor ( Product product, SuiteRelativePath scriptPath ) : void
product Product
scriptPath SuiteRelativePath
return void
        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;
                }
            }
        }