Ejemplo n.º 1
0
        /// <summary>
        /// Writes the attributes for the project root node.
        /// </summary>
        /// <param name="writer">The writer to use.</param>
        protected override void WriteBuildSettingsAttributes(ProjectFileXmlWriter writer)
        {
            base.WriteBuildSettingsAttributes(writer);
            WixBuildSettings buildSettings = this.Project.BuildSettings;

            writer.WriteAttributeString(WixAttributeNames.OutputType, buildSettings.OutputType.ToString());
        }
        /// <summary>
        /// Updates the output file paths for candle and light when the relative file path has changed.
        /// </summary>
        protected override void UpdateOutputFiles()
        {
            WixBuildSettings buildSettings = this.Project.BuildSettings;

            // Change the output paths for candle and light
            string absoluteOutputDirectory       = PackageUtility.CanonicalizeDirectoryPath(Path.Combine(this.Project.RootDirectory, this.RelativeOutputDirectory));
            string absoluteIntermediateDirectory = PackageUtility.CanonicalizeDirectoryPath(Path.Combine(this.Project.RootDirectory, this.RelativeIntermediateDirectory));
            string lightFileName = buildSettings.OutputName + buildSettings.OutputExtension;

            this.CandleSettings.AbsoluteOutputDirectory = absoluteIntermediateDirectory;
            this.LightSettings.AbsoluteOutputFilePath   = Path.Combine(absoluteOutputDirectory, lightFileName);
        }