예제 #1
0
        //step 6
        private bool OutputHtml()
        {
            Log.LogMessage("Generating html files for topic style '{0}'.", TopicStyle);

            string config = null;

            if (SandcastleConfig != null && File.Exists(SandcastleConfig.ItemSpec))
            {
                config = File.ReadAllText(SandcastleConfig.ItemSpec);
            }
            else
            {
                config = GetBuildAssemblerConfig();
            }

            //config = config.Replace("%DXROOT%", SandcastleEnviroment.SandcastleRoot);
            //config = config.Replace("%CommentsDir%", CommentsDirectory);
            //config = config.Replace("%OutputDir%", Path.Combine(OutputDirectory, "html"));
            //config = config.Replace("%reflectionfile%", ReflectionFile);

            string configFile = Path.Combine(TopicStyleDirectory, "Sandcastle.config");

            File.WriteAllText(configFile, config);

            BuildAssembler build = new BuildAssembler();

            CopyBuildEngine(build);

            build.EnviromentVariables["CommentsDir"]    = CommentsDirectory;
            build.EnviromentVariables["OutputDir"]      = Path.Combine(OutputDirectory, "html");
            build.EnviromentVariables["reflectionfile"] = ReflectionFile;

            build.ConfigFile   = new TaskItem(configFile);
            build.ManifestFile = new TaskItem(ManifestFile);
            return(build.Execute());
        }
예제 #2
0
        //step 6
        private bool OutputHtml()
        {
            Log.LogMessage("Generating html files for topic style '{0}'.", TopicStyle);

            string config = null;

            if (SandcastleConfig != null && File.Exists(SandcastleConfig.ItemSpec))
                config = File.ReadAllText(SandcastleConfig.ItemSpec);
            else
                config = GetBuildAssemblerConfig();

            //config = config.Replace("%DXROOT%", SandcastleEnviroment.SandcastleRoot);
            //config = config.Replace("%CommentsDir%", CommentsDirectory);
            //config = config.Replace("%OutputDir%", Path.Combine(OutputDirectory, "html"));
            //config = config.Replace("%reflectionfile%", ReflectionFile);

            string configFile = Path.Combine(TopicStyleDirectory, "Sandcastle.config");
            File.WriteAllText(configFile, config);

            BuildAssembler build = new BuildAssembler();
            CopyBuildEngine(build);

            build.EnviromentVariables["CommentsDir"] = CommentsDirectory;
            build.EnviromentVariables["OutputDir"] = Path.Combine(OutputDirectory, "html");
            build.EnviromentVariables["reflectionfile"] = ReflectionFile;

            build.ConfigFile = new TaskItem(configFile);
            build.ManifestFile = new TaskItem(ManifestFile);
            return build.Execute();
        }