static public ProductBuildDataSet GetProfileDataSet(string profileName) { ProductBuildDataSet profileDataSet = new ProductBuildDataSet(); XmlTextReader xtr = null; try { XmlParserContext xpc = new XmlParserContext(null, new XmlNamespaceManager(new NameTable()), null, XmlSpace.None); xtr = new XmlTextReader(GetBuildProfile(profileName), XmlNodeType.Document, xpc); profileDataSet.ReadXml(xtr); profileDataSet.AcceptChanges(); profileDataSet.SetBuildProperty("BuildProfileName", profileName, false); } finally { if (xtr != null) { xtr.Close(); } } return(profileDataSet); }
static public ProductBuildDataSet GetProductBuildDataSetWithoutComplist( string profileName, string productName, string productVersion, string productPlatform, string branchOrTrunkName, string productDirectory, string libraryPath, string updateDate) { ProductBuildDataSet pbDataSet = new ProductBuildDataSet(); LibraryInfo libraryInfo = new LibraryInfo(productName, productVersion, productPlatform, branchOrTrunkName, productDirectory, libraryPath, updateDate); pbDataSet.Merge(GetProfileDataSet("default (Admin)"), false, MissingSchemaAction.Ignore); pbDataSet.Merge(GetProductSpecificDataSet(libraryInfo), false, MissingSchemaAction.Ignore); pbDataSet.Merge(GetProfileDataSet(profileName), false, MissingSchemaAction.Ignore); // Override P:\ProductBuilder environment variables in the default profile string PBPath = Environment.GetEnvironmentVariable("PBPath"); if (PBPath == null) { PBPath = "C:\\ASG\\VMS\\ProductBuilder"; // Default productbuilder client path } if (PBPath.Contains(" ")) { PBPath = "\"" + PBPath + "\""; } pbDataSet.SetBuildProperty("PBPath", PBPath, false); pbDataSet.SetBuildProperty("PBToolsPath", PBPath + "\\tools2", false); pbDataSet.SetBuildProperty("PBDataPath", PBPath + "\\Data2", false); pbDataSet.InitLibraryData(libraryInfo); pbDataSet.FinalizeProperties(); pbDataSet.Tables[on.Target].Clear(); pbDataSet.Tables[on.Component].Clear(); pbDataSet.AcceptChanges(); return(pbDataSet); }