Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        static private ProductBuildDataSet GetProductSpecificDataSet(LibraryInfo libraryInfo)
        {
            ProductBuildDataSet productSpecificDataSet = new ProductBuildDataSet();
            XmlTextReader       xtr = null;

            try {
                string productPropertiesFilename = GetProductPropertiesFilename(libraryInfo);
                if (File.Exists(productPropertiesFilename))
                {
                    xtr = new XmlTextReader(GetProductPropertiesFilename(libraryInfo));
                    productSpecificDataSet.ReadXml(xtr);
                }
                string emailRecipients = "";
                productSpecificDataSet.SetBuildProperty("EmailRecipients", emailRecipients, true);
            }
            finally {
                if (xtr != null)
                {
                    xtr.Close();
                }
            }
            return(productSpecificDataSet);
        }