Flare’s help contains topics about batch targets and there is no need to cover all of that here. Briefly, you can create batch targets for a project. From the Batch Target Editor, you can select actions to take and schedule tasks. To generate output from Flare targets using commands specified outside of the Flare user interface, you can use a command line executable called madbuild.exe. This executable is located in the Flare.app folder of your folder installation. For example:
C:\Program Files (x86)\MadCap Software\MadCap Flare V8\Flare.app
The executable describes its usage as:
madbuild -project <project file> [ -target <target name> ] If no target specified, compiles all targets.
But there is also a switch to enable logging:
The primary benefit is of batch is scheduling. Scheduling builds means you don’t have to manually kick off a process, which is a time saver.
Scheduling nightly or continuous build becomes more important as the volume of content increases. For large API and database references, build times can go into hours. Waiting until the end of the day to kick off a build can be a hassle. But there are other scheduling benefits to batch processing:
- Scheduling other tasks for post-build processing
- Organizing build schedules for outputs with subsystems to build in parallel
Here are some other tasks you can perform:
- If you use source control and the source control solution supports the command line, you can automate checkouts and other actions. For example, with Team Foundation Server, there is an executable called TF.exe.
- You can perform PDF post-processing. For example, if you have a copy of Acrobat, there is an Acrobat API from Adobe which can be used to create command line utilities to run from batch.
- Copy the output or the source to an archive. For example with XCOPY or Robocopy
- Copy a different version of a stylesheet into the output.
- Copy external files into the project folder structure.
- Adjust skin CSS beyond what is possible in the Skin Editor.
Building in parallel means firstly building subsystems at the same time and then building an encompassing output after the parallel builds. For that, you need many targets.
Check out this post about a utility (made by me) to generate batch files: Targets Everywhere. This one is good for generating a file or files for all targets in any project in a folder. You can also save configurations for the utility such as which targets are selected for inclusion. And there is an interesting post at Roughly Everything about Flare about another utility to create batch scripts: Coming soon – a new batch script builder released on CodePlex. This one looks like it is good for generating the text for commands to copy into a batch.
If you use PowerShell, most of what you do from cmd.exe is portable to PowerShell. And that is a topic for another day.