Perl script in post-build command

This forum is for all Flare issues not related to any of the other categories.
Post Reply
Herbert Poesch
Propeller Head
Posts: 20
Joined: Tue Aug 12, 2014 5:17 am

Perl script in post-build command

Post by Herbert Poesch »

Hello,
I have a problem using a Perl script in a post-build command that is executed from a target. The command is like this:

Code: Select all

<PostBuild>chdir /D $(OutputDirectory)\Content\htm
href2htm.pl Company_Help_k_start
</PostBuild>
The first line changes drive and directory, the second line executes the perl script "href2htm.pl". It modifies the start topic that is specified as a parameter following the script's name. The script will add a hidden list to the start topic containing links to all topics that are in the help system. That will make it possible for external search engines to find the topics in a tripane help system that is using iframes, which will usually not work.

The Problem is: It works fine when building the output on local computers, but it doesn't work on our nightly build system. Here's the message from the log file:

Code: Select all

Command Error: 'href2htm.pl' is not recognized as an internal or external command, operable program or batch file. 
So this is a typical error message if any command cannot be executed because of missing entries in the Path variable. So I tried to make sure that there are the same settings on all machines that generate output from Flare:
  • Path variable contains path to perl directory
    Path variable contains path to the script's directory
    Pathext variable contains *.pl for Perl as an executable command.
    The perl script can be executed on local machines without the calling command "Perl <Name>.pl
So this is equal on all machines, but still the nightly build system does not execute the perl script.
So my questions are:
- On the nightly build system, the Madbuild command (that executes the post-build command from the target) is running as a sub-process within another perl script that controls some steps when building the help in the common build process of the complete software. Is it possible that perl scripts cannot be run in such a nested environment?
- Does Flare's post-build command run in a CMD Environment as a standard, or do I have to specify something else, e.g. TCC.exe?
- Would it work calling the perl script from a Powershell command?

Unfortunately, I'm neither a perl programmer nor a Powershell specialist, but I happen to know some people who know about this :) . But they need more informations about how the post-build commands work in Flare. Can anybody help?

Regards
Herbert
Herbert Poesch
Propeller Head
Posts: 20
Joined: Tue Aug 12, 2014 5:17 am

Re: Perl script in post-build command

Post by Herbert Poesch »

The problem is solved. Restarting the complete build environment made the modification of the path variables take effect.
The perl script works fine now.

Regards
Herbert
Post Reply