/// /// Copyright © 2003-2008 JetBrains s.r.o. /// You may distribute under the terms of the GNU General Public License, as published by the Free Software Foundation, version 2 (see License.txt in the repository root folder). /// using System; using JetBrains.Build.Omea.Infra; using Microsoft.Build.Framework; namespace JetBrains.Build.Omea.Tasks { /// /// Creates a WiX source with the product biaries described in it. /// public class WixProductReferences : WixAndProductTask { #region Attributes /// /// Gets or sets the ID of the media into which the binaries will be packed. /// [Required] public string DiskId { get { return Bag.Get(AttributeName.DiskId, 0).ToString(); } set { Bag.Set(AttributeName.DiskId, int.Parse(value)); } } /// /// Gets or sets the full path to the output WiX source code file. /// [Required] public ITaskItem OutputFile { get { return Bag.Get(AttributeName.OutputFile); } set { if(value == null) throw new ArgumentNullException("value"); Bag.Set(AttributeName.OutputFile, value); } } /// /// Gets or sets the product references dir location. /// [Required] public ITaskItem ProductReferencesDir { get { return Bag.Get(AttributeName.ProductReferencesDir); } set { Bag.Set(AttributeName.ProductReferencesDir, value); } } /// /// Gets or sets the WiX ComponentGroup ID that will be created in the fragment and populated with the newly-created components, so that it could be mounted into the feature tree. /// [Required] public string WixComponentGroupId { get { return Bag.Get(AttributeName.WixComponentGroupId); } set { if(value == null) throw new ArgumentNullException("value"); Bag.Set(AttributeName.WixComponentGroupId, value); } } /// /// Gets or sets the WiX Directory ID in the WiX sources into which the created components should be mounted. /// The directory must be defined somewhere in the directories tree, and a DirectoryRef element will be added to the generated source file referencing the given ID. /// [Required] public string WixDirectoryId { get { return Bag.Get(AttributeName.WixDirectoryId); } set { if(value == null) throw new ArgumentNullException("value"); Bag.Set(AttributeName.WixDirectoryId, value); } } #endregion } }