/// <summary>
        /// Gets the directory object for the provided application root path.
        /// </summary>
        /// <param name="recalculate">Recalculate root directory.</param>
        /// <returns>Directory for root.</returns>
        public Wix.Directory GetRootDirectory(bool recalculate)
        {
            if (null == this.source)
            {
                throw new ArgumentNullException("Source");
            }

            if (recalculate || null == this.rootDirectory)
            {
                DirectoryHarvester directoryHarvester = new DirectoryHarvester();
                this.rootDirectory = directoryHarvester.HarvestDirectory(this.source, true);

                Wix.Wix      wix      = new Wix.Wix();
                Wix.Fragment fragment = new Wix.Fragment();
                wix.AddChild(fragment);
                fragment.AddChild(this.rootDirectory);

                UtilMutator utilMutator = new UtilMutator();
                utilMutator.GenerateGuids        = true;
                utilMutator.SetUniqueIdentifiers = true;
                utilMutator.Mutate(wix);

                UtilFinalizeHarvesterMutator finalMutator = new UtilFinalizeHarvesterMutator();
                finalMutator.Mutate(wix);
            }

            return(this.rootDirectory);
        }
예제 #2
0
        /// <summary>
        /// Creates a new package builder
        /// </summary>
        public PackageBuilder()
        {
            this.applicationName  = new Serialize.Name();
            this.applicationRoot  = new Serialize.Source();
            this.applicationEntry = new Serialize.EntryPoint();
            this.icon             = new Serialize.Icon();

            this.manufacturerName = new Serialize.Manufacturer();
            this.description      = new Serialize.Description();

            this.upgradeCode = Guid.Empty;

            this.directoryHarvester               = new DirectoryHarvester();
            this.utilMutator                      = new UtilMutator();
            this.utilMutator.GenerateGuids        = true;
            this.utilMutator.SetUniqueIdentifiers = true;
            this.finalMutator                     = new UtilFinalizeHarvesterMutator();
        }
 public ATLUtilMutator()
 {
     utilMutator = new UtilMutator();
     utilMutator.GenerateGuids = true;
 }
 public ATLUtilMutator()
 {
     utilMutator = new UtilMutator();
 }
예제 #5
0
        /// <summary>
        /// Gets the directory object for the provided application root path.
        /// </summary>
        /// <param name="recalculate">Flag to recalculate root directory.</param>
        /// <returns>Directory harvested from root.</returns>
        public Wix.Directory GetRootDirectory(bool recalculate)
        {
            if (null == this.source)
            {
                throw new ArgumentNullException("RootPath");
            }

            if (recalculate || null == this.rootDirectory)
            {
                DirectoryHarvester directoryHarvester = new DirectoryHarvester();
                this.rootDirectory = directoryHarvester.HarvestDirectory(this.source, true);

                Wix.Wix wix = new Wix.Wix();
                Wix.Fragment fragment = new Wix.Fragment();
                wix.AddChild(fragment);
                fragment.AddChild(this.rootDirectory);

                UtilMutator utilMutator = new UtilMutator();
                utilMutator.GenerateGuids = true;
                utilMutator.SetUniqueIdentifiers = true;
                utilMutator.Mutate(wix);

                UtilFinalizeHarvesterMutator finalMutator = new UtilFinalizeHarvesterMutator();
                finalMutator.Mutate(wix);
            }

            return this.rootDirectory;
        }