//===================================================================== /// <summary> /// This is used to generate the website helper files and copy the output to the project output folder /// ready for use as a website. /// </summary> private void GenerateWebsite() { string webWorkingFolder = String.Format(CultureInfo.InvariantCulture, "{0}Output\\{1}", workingFolder, HelpFileFormats.Website); int fileCount = 0; // Generate the full-text index for the ASP.NET search option this.ReportProgress(BuildStep.GenerateFullTextIndex, "Generating full-text index for the website...\r\n"); if (!this.ExecutePlugIns(ExecutionBehaviors.InsteadOf)) { this.ExecutePlugIns(ExecutionBehaviors.Before); FullTextIndex index = new FullTextIndex(workingFolder + "StopWordList.txt", language); index.CreateFullTextIndex(webWorkingFolder); index.SaveIndex(webWorkingFolder + @"\fti\"); this.ExecutePlugIns(ExecutionBehaviors.After); } this.ReportProgress(BuildStep.CopyingWebsiteFiles, "Copying website files to output folder...\r\n"); if (this.ExecutePlugIns(ExecutionBehaviors.InsteadOf)) { return; } this.ExecutePlugIns(ExecutionBehaviors.Before); // Copy the TOC, keyword index, index pages, and tree view stuff File.Copy(workingFolder + "WebTOC.xml", outputFolder + "WebTOC.xml"); File.Copy(workingFolder + "WebKI.xml", outputFolder + "WebKI.xml"); // Copy the help pages and related content this.RecursiveCopy(webWorkingFolder + @"\*.*", outputFolder, ref fileCount); this.ReportProgress("Copied {0} files for the website content", fileCount); this.GatherBuildOutputFilenames(); this.ExecutePlugIns(ExecutionBehaviors.After); }
//===================================================================== /// <summary> /// This is used to generate the website helper files and copy the output to the project output folder /// ready for use as a website. /// </summary> private void GenerateWebsite() { string webWorkingFolder = String.Format(CultureInfo.InvariantCulture, "{0}Output\\{1}", workingFolder, HelpFileFormats.Website); int fileCount = 0; // Generate the full-text index for the ASP.NET search option this.ReportProgress(BuildStep.GenerateFullTextIndex, "Generating full-text index for the website...\r\n"); if(!this.ExecutePlugIns(ExecutionBehaviors.InsteadOf)) { this.ExecutePlugIns(ExecutionBehaviors.Before); FullTextIndex index = new FullTextIndex(workingFolder + "StopWordList.txt", language); index.CreateFullTextIndex(webWorkingFolder); index.SaveIndex(webWorkingFolder + @"\fti\"); this.ExecutePlugIns(ExecutionBehaviors.After); } this.ReportProgress(BuildStep.CopyingWebsiteFiles, "Copying website files to output folder...\r\n"); if(this.ExecutePlugIns(ExecutionBehaviors.InsteadOf)) return; this.ExecutePlugIns(ExecutionBehaviors.Before); // Copy the TOC, keyword index, index pages, and tree view stuff File.Copy(workingFolder + "WebTOC.xml", outputFolder + "WebTOC.xml"); File.Copy(workingFolder + "WebKI.xml", outputFolder + "WebKI.xml"); // Copy the help pages and related content this.RecursiveCopy(webWorkingFolder + @"\*.*", outputFolder, ref fileCount); this.ReportProgress("Copied {0} files for the website content", fileCount); this.GatherBuildOutputFilenames(); this.ExecutePlugIns(ExecutionBehaviors.After); }
/// <summary> /// This is used to generate the website helper files and copy the /// output to the project output folder ready for use as a website. /// </summary> protected void GenerateWebsite() { string destFile, webWorkingFolder = String.Format(CultureInfo.InvariantCulture, "{0}Output\\{1}", workingFolder, HelpFileFormat.Website); // Generate the full-text index for the ASP.NET search option this.ReportProgress(BuildStep.GenerateFullTextIndex, "Generating full-text index for the website...\r\n"); if(!this.ExecutePlugIns(ExecutionBehaviors.InsteadOf)) { this.ExecutePlugIns(ExecutionBehaviors.Before); FullTextIndex index = new FullTextIndex(workingFolder + "StopWordList.txt", language); index.CreateFullTextIndex(webWorkingFolder); index.SaveIndex(webWorkingFolder + @"\fti\"); this.ExecutePlugIns(ExecutionBehaviors.After); } this.ReportProgress(BuildStep.CopyingWebsiteFiles, "Copying website files to output folder...\r\n"); if(this.ExecutePlugIns(ExecutionBehaviors.InsteadOf)) return; this.ExecutePlugIns(ExecutionBehaviors.Before); // Copy the TOC, keyword index, index pages, and tree view stuff File.Copy(workingFolder + "WebTOC.xml", outputFolder + "WebTOC.xml"); File.Copy(workingFolder + "WebKI.xml", outputFolder + "WebKI.xml"); foreach(string file in Directory.GetFiles(webFolder)) if(file.EndsWith("html", StringComparison.OrdinalIgnoreCase) || file.EndsWith("aspx", StringComparison.OrdinalIgnoreCase)) this.TransformTemplate(Path.GetFileName(file), webFolder, outputFolder); else { destFile = outputFolder + Path.GetFileName(file); File.Copy(file, destFile, true); File.SetAttributes(destFile, FileAttributes.Normal); } // Copy the help pages and related content this.RecursiveCopy(webWorkingFolder + @"\*.*", outputFolder); this.GatherBuildOutputFilenames(); this.ExecutePlugIns(ExecutionBehaviors.After); }