Here's the setup of my project folder, which is identical on local and build machines (thank you SVN!):
\Content
\Project
\Output
\Word_Source - contains the source Word files and the PDFs that one of them contains links to.
project.flprj
In order to automate the build and tidy up the mess that Word creates when you import a file, I have a script that does the following:
1. Runs a target called 1_Starter to import the files (auto-sync of all import files active).
2. Runs FAR on the newly created htm files to clean up Word's mess.
3. Builds the final target (auto-sync of import files turned off) to produce the final output.
When I build the target locally (and even when I run the script locally) I end up with my main PDF and the linked PDFs sitting nicely in the \Output folder, where they should be. However, when I run the script on the build machine, for some reason the log file contains extra stuff that implies it's "lost" the PDF and the end result is that they don't end up in the Output folder.
This is what the topic looks like ON MY LOCAL MACHINE in the text editor after it's been tidied up in FAR (note that Flare has put in an absolute path):
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:sourceDocument="C:\Projects\LIBRARIES_TRUNK\Flare_Projects\US_360_docs\US_360_Tutorial\Word_Source\A_US_input_files_and_results.docx">
<head>
</head>
<body>
<h2>Blah</h2>
<p>Blah blah blah.</p>
<ul>
<li class="ListBullet"><a href="C:\Projects\LIBRARIES_TRUNK\Flare_Projects\US_360_docs\US_360_Tutorial\Word_Source\360_Product_Listing_N_ULSG.pdf">Product Listing (N_ULSG)</a>
</li>
</ul>
</body>
</html>
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:sourceDocument="C:\LibraryTrunk\Flare_Projects\US_360_docs\US_360_Tutorial\Word_Source\A_US_input_files_and_results.docx" xml:lang="en-us">
<head>
</head>
<body>
<h2>Blah</h2>
<p>Blah blah blah.</p>
<ul>
<li class="ListBullet"><a href="360_Product_Listing_N_ULSG.pdf">Product Listing (N_ULSG)</a>
</li>
</ul>
</body>
</html>
Code: Select all
Re-importing A_US_input_files_and_results.flimp...
Scanning source files...
Scanning A_US_input_files_and_results.docx...
Collecting Word styles. This may take several minutes...
Importing source files...
Converting Word document: A_US_input_files_and_results.docx...
Created topic: US Library product input files.htm...
Created topic: About the listings.htm...
Saving TOC file: A_US_input_files_and_results.fltoc...
Saving Header/Footer MasterPage: A_US_input_files_and_results.flmsp...
Created topic: A_US_input_files_and_results.flmsp...
Saving stylesheet: A_US_input_files_and_results.css...
Patching document links...
Copying generated files...
Copied file: C:\Projects\LIBRARIES_TRUNK\Flare_Projects\US_360_docs\US_360_Tutorial\Content\A_US_input_files_and_results\About the listings.htm
Copied file: C:\Projects\LIBRARIES_TRUNK\Flare_Projects\US_360_docs\US_360_Tutorial\Content\A_US_input_files_and_results\US Library product input files.htm
Copied file: C:\Projects\LIBRARIES_TRUNK\Flare_Projects\US_360_docs\US_360_Tutorial\Content\Resources\MasterPages\A_US_input_files_and_results.flmsp
Copied file: C:\Projects\LIBRARIES_TRUNK\Flare_Projects\US_360_docs\US_360_Tutorial\Content\Resources\Stylesheets\A_US_input_files_and_results.css
Copied file: C:\Projects\LIBRARIES_TRUNK\Flare_Projects\US_360_docs\US_360_Tutorial\Project\TOCs\A_US_input_files_and_results.fltoc
Saving import file A_US_input_files_and_results.flimp...
Code: Select all
Re-importing A_US_input_files_and_results.flimp...
Scanning source files...
Scanning A_US_input_files_and_results.docx...
Collecting Word styles. This may take several minutes...
Importing source files...
Converting Word document: A_US_input_files_and_results.docx...
Created topic: US Library product input files.htm...
Created topic: About the listings.htm...
Saving TOC file: A_US_input_files_and_results.fltoc...
Saving Header/Footer MasterPage: A_US_input_files_and_results.flmsp...
Created topic: A_US_input_files_and_results.flmsp...
Saving stylesheet: A_US_input_files_and_results.css...
Patching document links...
Copying generated files...
Copied file: C:\LibraryTrunk\Flare_Projects\US_360_docs\US_360_Tutorial\Content\A_US_input_files_and_results\About the listings.htm
Copied file: C:\LibraryTrunk\Flare_Projects\US_360_docs\US_360_Tutorial\Content\A_US_input_files_and_results\US Library product input files.htm
Copied file: C:\LibraryTrunk\Flare_Projects\US_360_docs\US_360_Tutorial\Content\Resources\MasterPages\A_US_input_files_and_results.flmsp
Copied file: C:\LibraryTrunk\Flare_Projects\US_360_docs\US_360_Tutorial\Content\Resources\Stylesheets\A_US_input_files_and_results.css
Copied file: C:\LibraryTrunk\Flare_Projects\US_360_docs\US_360_Tutorial\Project\TOCs\A_US_input_files_and_results.fltoc
Saving import file A_US_input_files_and_results.flimp...
Code: Select all
Processing topic: About the listings.htm
Missing linked source file: C:\LibraryTrunk\Flare_Projects\US_360_docs\US_360_Tutorial\Content\A_US_input_files_and_results\360_Product_Listing_N_ULSG.pdf
I've tried running the import on the Build machine from inside Flare, but because of assorted security issues I don't have write permissions on that machine (the "user" that does the build is the automated builder, not me).
I'll update this post tomorrow when I've managed to get access to that machine so I can run Flare in the GUI on the build machine and see what happens. But obviously, any suggestions or thoughts are very welcome. I THINK I'm looking in the right place but obviously I could be wrong.
Thanks all.