Variable Files via Command Line not working

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Post Reply
User avatar
Ed Dressel
Posts: 226
Joined: Tue May 11, 2004 6:40 pm

Variable Files via Command Line not working

Unread post by Ed Dressel »

My command line builds are not picking up the values from the command line variable files. This used to work but is now broken. (I don't know when it broke, I just was doing some updates and see that there are not working. I tested a 2017 build and it worked but the late-2018 build does not work).

I run my builds with command-line and use an INI file to configure the values, which points to a variable file. Here is an example of my command line .bat file:
"C:\Program Files (x86)\EC Software\HelpAndManual7\HelpMan.exe" "..\Help Files\TRAKHelp.hmxp" "..\Compiler\HelpStreetCHM.INI"
The HelpStreetCHM.INI file has the following content:
CHM=..\Output\TRAK.CHM
I=CHM,OPT_FB,OPT_HDBG,OPT_HDLOGO,...<redacted>
V=..\Compiler\VariablesStreet.txt
O=..\Trustbuilders CHM Skin.hmskin

L=..\Logs\Street.log
Note that I have tried various path options for the variable name file.

And the variable file has the following values:
...
GAPTSPTABNAME=TSP/Federal Savings Plan
The value for the GAPTSTSPTabName variable is only using the default in the H&M file, it is not picking up the variable name.

In trying to debug this, I renamed the variable name file and no error occurred--so it might not be picking up the values in the file at all. Shouldn't an error occur if the variable file does not exist?

Any suggestions on how to debug this would be appreciated.

Ed Dressel
User avatar
Tim Green
Site Admin
Posts: 23155
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Variable Files via Command Line not working

Unread post by Tim Green »

Hi Ed,
I tested a 2017 build and it worked but the late-2018 build does not work).
Are you using the current build, which is 7.5.3 Build 4740?
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Ed Dressel
Posts: 226
Joined: Tue May 11, 2004 6:40 pm

Re: Variable Files via Command Line not working

Unread post by Ed Dressel »

Just upgraded. It did not fix it.
User avatar
Tim Green
Site Admin
Posts: 23155
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Variable Files via Command Line not working

Unread post by Tim Green »

Hi Ed,

OK, just to check all the possibilities:
  • Try putting all the referenced files in your project folder, to make absolutely sure they are available. Then just reference them with their names or .\ in front of the name.
  • Use the /debug switch to get more information about what is happening.
  • Remove the slash (/) character from the variable definition. That could conceivably be causing problems.
  • Change the name of your skin to remove the spaces in the filename.
  • Check that the variable is not being set in the skin. Just like the variables file, the skin will overload everything that is set in it and the last overload file process wins.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Ed Dressel
Posts: 226
Joined: Tue May 11, 2004 6:40 pm

Re: Variable Files via Command Line not working

Unread post by Ed Dressel »

Thank you for your response.
  • Try putting all the referenced files in your project folder, to make absolutely sure they are available. Then just reference them with their names or .\ in front of the name.
I did everything in your list (see comment below) and putting everything in the same directory fixed the problem. The path to the variable file was incorrect--I am pretty sure this used to work correctly. If I recall correctly--and this goes back 10+ years ago--the variable file path wasn't relative to the project path. It looks like that has since been corrected. It would be nice if the compile failed if the variable file was not found.

One note on the "/debug" option--it didn't change anything. I added it to the command line in the bat file, so it read:
"C:\Program Files (x86)\EC Software\HelpAndManual7\HelpMan.exe" "..\Help Files\TRAKHelp.hmxp" "..\Compiler\HelpStreetCHM.INI" /debug
This did not change anything.

Again, thank you.

Ed Dressel
User avatar
Tim Green
Site Admin
Posts: 23155
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Variable Files via Command Line not working

Unread post by Tim Green »

Hi Ed,

Glad to hear you got it sorted now. :)
If I recall correctly--and this goes back 10+ years ago--the variable file path wasn't relative to the project path.
In the command line interface all relative paths have always been relative to the project path. That has never changed because it was one of the basic principles of the interface. I'm going to check with our developers about the issues messages regarding files not being found.

I also notice that you are using a relative path to the project folder. That can be a source of confusion, because that will be relative to the location of the batch file, and all paths after that will then be relative to that, whatever it resolves to. It's safer to use an absolute path for the project location. Then the batch file can be wherever you want to have it. 8)
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Ed Dressel
Posts: 226
Joined: Tue May 11, 2004 6:40 pm

Re: Variable Files via Command Line not working

Unread post by Ed Dressel »

Tim:

I have the files on my desktop and laptop--editing on my laptop when I travel. Because of that, I use relative paths.

You didn't comment on my suggestions that it would be nice that it fails if the variable file does not exist. Even if it was noted in the log file (which I frequently review after a build).

Any comments on this?

Thank you,

Ed Dressel
User avatar
Tim Green
Site Admin
Posts: 23155
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Variable Files via Command Line not working

Unread post by Tim Green »

Ed Dressel wrote:You didn't comment on my suggestions that it would be nice that it fails if the variable file does not exist. Even if it was noted in the log file (which I frequently review after a build).
Sorry, I just forgot to mention it. I think this was actually always the case but I agree that it would be good to have at least a warning message if the variables file is not found, if not a complete abort as in the case of a skin not found. I already passed this on to the development team yesterday.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Post Reply