Beispiel #1
0
        public void CollectAddedFiles(string contentFile, List <IDistributeFile> distrubtedFiles)
        {
            XmlDocument doc = new XmlDocument();

            doc.Load(contentFile);
            _root = new WixXmlRoot(doc.DocumentElement, contentFile);
            List <WixSourceFileNode> lst = new List <WixSourceFileNode>();

            _root.CollectAddedFiles(lst);
            foreach (WixSourceFileNode f in lst)
            {
                distrubtedFiles.Add(f);
            }
        }
Beispiel #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="pl"></param>
        /// <param name="log">logging messages</param>
        /// <param name="xmlContentFile"></param>
        /// <param name="targetName"></param>
        /// <param name="mode"></param>
        /// <returns></returns>
        public string Compile(EnumPlatform pl, IShowMessage log, string xmlContentFile, string targetName, string mode)
        {
            string      sError       = string.Empty;
            string      targetFolder = Path.Combine(Path.GetDirectoryName(xmlContentFile), string.Format(CultureInfo.InvariantCulture, "bin\\{0}", mode));
            XmlDocument doc          = new XmlDocument();

            doc.Load(xmlContentFile);
            _root = new WixXmlRoot(doc.DocumentElement, xmlContentFile);
            _root.Preprocess(targetName, mode, log);
            sError = WixUtil.start(doc, targetFolder, pl == EnumPlatform.x64 ? "x64" : "x86", log);
            if (string.IsNullOrEmpty(sError))
            {
                string curId = _root.General.ProductId;
                doc = new XmlDocument();
                doc.Load(xmlContentFile);
                _root = new WixXmlRoot(doc.DocumentElement, xmlContentFile);
                _root.General.LastProductId = curId;
                _root.Postprocess(targetName, mode, log);
            }
            return(sError);
        }
 public bool LoadData(XmlNode rootXmlNode, string filename)
 {
     _rootNode = new WixXmlRoot(rootXmlNode, filename);
     return(init());
 }