Copy link to clipboard
Copied
Edition:
RoboHelp 2015 (with latest updates)
Operating System:
WIndows 8.1 Enterprise (64-bit)
Outputs:
Merged CHMs and merged Responsive WebHelp
The issue:
We have multiple projects that merge into a single help system. We use snippets extensively in throughout multiple topics.
Everthing works as expected when we build CHMs and WebHelp directly from the RoboHelp interface, which means the snippets are included in the output; however, when we build the same help (from the same projects) using the command line functionality, the snippets are not included.
Anyone have a clue about why that might be the case?
Thanks.
Copy link to clipboard
Copied
Turns out that the root cause was idiocy. Apparently, I'm
afflicted with it.
I was using a batch script with variable parameters to build
the RoboHelp projects, which seemed to work except for the snippets. After spending
time with the support folks, via chat, we found that the rhcl command line
syntax will not parse variables fully, so only part of the command would execute.
The input arguments to the rhcl command must be literal.
I changed the script and it worked the first time. (I also
set the path environment inside the script to indicate the location of the
rhcl.exe file for just that session. That seems to be a factor, but I wouldn’t
insist on it at this point.)
While the information at http://help.adobe.com/en_US/robohelp/robohtml/WS5b3ccc516d4fbf351e63e3d11aff59c2a0-7fe3.html
does not exclude using variables, the topic does not say they are permitted
either. I just assumed they were permitted. My mistake.
Copy link to clipboard
Copied
I'm interested in this thread because I use the rhcl.exe to compile my project. In the future, I may end up with multiple projects. I'd like to know what did and didn't work when using rhcl.exe so I can avoid what you ran into.
Can you please post your script in this thread? If possible, I'd like to see both the "broken" and the "fixed" commands so I can learn more.
Copy link to clipboard
Copied
Necessary context to understand the scripts. Each project is in a folder/directory of the same name. So the index directory contains the index.xpj project file and so on. Each lauout contained the instructions for the build target destination. Iterating through the folders to execute the project files in a single command line seemed like a simple solution compared to creating multiple command in the scripts. Sadly, that approach wasted a lot of time.
Here's a bad script, which seemed to work until we noticed snippets were not included in the built output.
set RH=C:\Program Files (x86)\Adobe\Adobe RoboHelp 2015\RoboHTML\rhcl.exe
set PJCT_ROOT=%CD%
for %%f in (index toolkit) do "%RH%" "%%f\%%f.xpj" -l %%f_chm
Here's an example of the script that worked, which can become tedious and long, but it does work.
REM Set PATH to include RoboHelp
set PATH=%PATH%;C:\Program Files (x86)\Adobe\Adobe RoboHelp 2015\RoboHTML\
REM Build CHM files
rhcl.exe index\index.xpj -l index_chm -o _AllOutputs\CHMS\
rhcl.exe toolkit\toolkit.xpj -l toolkit_chm -o _AllOutputs\CHMS\
There are probably easier or more elegant solutions. This one works for now, which is all I care about.
Copy link to clipboard
Copied
Well, I suppose first of all, I fully embrace my geeky nature to write DOS batch files to automate what would otherwise be manual work. "Back in the day" I had a single DOS batch file that compiled my 100 WinHelp projects.
Concerning what I've been using lately, this is my current batch file.
I've set up 4 different outputs [CHM, Responsive HTML (RH), PDF, and WebHelp (WH)] for the following "content" differences I need to account for:
1) No Conditions - this creates a version that has all content in the project that will not be distributed to anyone - it's for my own benefit
2) Not Nonsecure - this shows sensitive information in the output, such as a specific IP address. This will be used by my co-workers.
3) NOT Secure - this hides sensitive information in the output, such as a specific IP address. This will be given to external people, such as an auditor.
I publish all of these outputs to a network drive (S:\) and create a single folder (S:\TechDoc\DISARECO\__%today%\_Logs) to store the logs, using the current date as the first characters of the file name.
I hope this is beneficial!
|
cd\
s:
SET Today=%Date:~10,4%_%Date:~4,2%_%Date:~7,2%
REM | Create the Logs folder first
md "S:\TechDoc\DISARECO\__%today%\_Logs"
REM | The No Condition folders
md "S:\TechDoc\DISARECO\__%today%\NoConditions_CHM"
md "S:\TechDoc\DISARECO\__%today%\NoConditions_RH"
md "S:\TechDoc\DISARECO\__%today%\NoConditions_PDF"
md "S:\TechDoc\DISARECO\__%today%\NoConditions_WH"
REM | The NOT Nonsecure
md "S:\TechDoc\DISARECO\__%today%\CHM_Online_Internal"
md "S:\TechDoc\DISARECO\__%today%\PDF_Internal"
md "S:\TechDoc\DISARECO\__%today%\RH_Online_Internal"
md "S:\TechDoc\DISARECO\__%today%\WH_Online_Internal"
REM | The NOT Secure
md "S:\TechDoc\DISARECO\__%today%\PDF_External"
md "S:\TechDoc\DISARECO\__%today%\CHM_Online_External"
md "S:\TechDoc\DISARECO\__%today%\RH_Online_External"
md "S:\TechDoc\DISARECO\__%today%\WH_Online_External"
REM | Now, compile the outputs
cd\
c:
cd "C:\Program Files (x86)\Adobe\Adobe RoboHelp 2015\RoboHTML"
REM | The No Condition outputs
rhcl "c:\rh\DRM\DisasterRecoveryManual.xpj" -l "NoConditions_RH" -o "S:\TechDoc\DISARECO\__%today%\NoConditions_RH" -g "S:\TechDoc\DISARECO\__%today%\_Logs\%TODAY%_NoConditions_RH.txt"
rhcl "c:\rh\DRM\DisasterRecoveryManual.xpj" -l "NoConditions_WH" -o "S:\TechDoc\DISARECO\__%today%\NoConditions_WH" -g "S:\TechDoc\DISARECO\__%today%\_Logs\%TODAY%_NoConditions_WH.txt"
rhcl "c:\rh\DRM\DisasterRecoveryManual.xpj" -l "NoConditions_PDF" -o "S:\TechDoc\DISARECO\__%today%\NoConditions_PDF" -g "S:\TechDoc\DISARECO\__%today%\_Logs\%TODAY%_NoConditions_PDF.txt"
rhcl "c:\rh\DRM\DisasterRecoveryManual.xpj" -l "NoConditions_CHM" -o "S:\TechDoc\DISARECO\__%today%\NoConditions_CHM" -g "S:\TechDoc\DISARECO\__%today%\_Logs\%TODAY%_NoConditions_CHM.txt"
REM | Internal-Facing
rhcl "c:\rh\DRM\DisasterRecoveryManual.xpj" -l "PDF_Internal" -o "S:\TechDoc\DISARECO\__%today%\PDF_Internal" -g "S:\TechDoc\DISARECO\__%today%\_Logs\%TODAY%_PDF_Internal.txt"
rhcl "c:\rh\DRM\DisasterRecoveryManual.xpj" -l "RH_Online_Internal" -o "S:\TechDoc\DISARECO\__%today%\RH_Online_Internal" -g "S:\TechDoc\DISARECO\__%today%\_Logs\%TODAY%_RH_Online_Internal.txt"
rhcl "c:\rh\DRM\DisasterRecoveryManual.xpj" -l "WH_Online_Internal" -o "S:\TechDoc\DISARECO\__%today%\WH_Online_Internal" -g "S:\TechDoc\DISARECO\__%today%\_Logs\%TODAY%_WH_Online_Internal.txt"
rhcl "c:\rh\DRM\DisasterRecoveryManual.xpj" -l "CHM_Online_Internal" -o "S:\TechDoc\DISARECO\__%today%\CHM_Online_Internal" -g "S:\TechDoc\DISARECO\__%today%\_Logs\%TODAY%_CHM_Online_Internal.txt"
REM | External-Facing
rhcl "c:\rh\DRM\DisasterRecoveryManual.xpj" -l "WH_Online_External" -o "S:\TechDoc\DISARECO\__%today%\WH_Online_External" -g "S:\TechDoc\DISARECO\__%today%\_Logs\%TODAY%_WH_Online_External.txt"
rhcl "c:\rh\DRM\DisasterRecoveryManual.xpj" -l "RH_Online_External" -o "S:\TechDoc\DISARECO\__%today%\RH_Online_External" -g "S:\TechDoc\DISARECO\__%today%\_Logs\%TODAY%_RH_Online_External.txt"
rhcl "c:\rh\DRM\DisasterRecoveryManual.xpj" -l "PDF_External" -o "S:\TechDoc\DISARECO\__%today%\PDF_External" -g "S:\TechDoc\DISARECO\__%today%\_Logs\%TODAY%_PDF_External.txt"
rhcl "c:\rh\DRM\DisasterRecoveryManual.xpj" -l "CHM_Online_External" -o "S:\TechDoc\DISARECO\__%today%\CHM_Online_External" -g "S:\TechDoc\DISARECO\__%today%\_Logs\%TODAY%_CHM_Online_External.txt"