<config-value name="searchpath">

Please post all questions on Help+Manual 8 here

Moderators: Alexander Halser, Tim Green

Post Reply
michal_novomesky
Posts: 53
Joined: Thu Jan 12, 2012 2:21 pm
Contact:

<config-value name="searchpath">

Unread post by michal_novomesky »

I have the following XML skin override for "searchpath" which is included in command-line compilation:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<helpproject xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="helpproject.xsd" version="1.5" isskin="true">
	<config>
		<config-group name="project">
			<config-value name="searchpath">.\screenshots_eav\;.\screenshots_all\;.\;.\Baggage\;.\Topics\</config-value>
		</config-group>
  </config>
</helpproject>
Overriding of <variables> or <config-group name="SEARCHCONSTANTS"> works properly if the .xml skin files are located in a different folder.

But, the override works only if the .xml file is located in the same folder as the .hmxp (.hmxz) project file.
Anyone had same experience?
Bug or feature?
User avatar
Tim Green
Site Admin
Posts: 23178
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: <config-value name="searchpath">

Unread post by Tim Green »

I assume you're referencing this in the command line with a command line switch. My guess is that when it's not in the same folder as the project you're using a relative path to reference it and finding that it's not working. You need to know that the command line interface automatically sets the session root to the folder containing the project file being compiled, so any relative paths have to be relative to that, not relative to the global root. :)
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.
michal_novomesky
Posts: 53
Joined: Thu Jan 12, 2012 2:21 pm
Contact:

Re: <config-value name="searchpath">

Unread post by michal_novomesky »

I am using absolute paths.

For example, .hmxp is in C:\projects\project\English\project.hmxp
.xml skin with "searchpath" override is loaded by a command-line parameter: /O=C:\projects\project\searchpath.xml
User avatar
Tim Green
Site Admin
Posts: 23178
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: <config-value name="searchpath">

Unread post by Tim Green »

michal_novomesky wrote: Thu Oct 21, 2021 3:20 pm I am using absolute paths.
That's a little strange. I'm checking this with our developers. In the meantime, try enclosing the reference in double quotes, even though it doesn't contain spaces. I.e. use /O="C:\projects\project\searchpath.xml" instead of what you have now. That might help.

I'll get back to you with the developer information as soon as I have it.
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
Alexander Halser
EC-Software Support
Posts: 4101
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria
Contact:

Re: <config-value name="searchpath">

Unread post by Alexander Halser »

Please add the /debug option at the end of the command line to test if the overload XML file has been loaded properly.
If the file with path contains spaces, you need to enclose it in quotes.

Note, that the <config-value name="searchpath"> just defines a string that overlwrites the very same string from the original project. The search path constants in this string are all relative path names - not relative to the source file, but relative to the .HMXP or .HMXZ file.
You do not have the required permissions to view the files attached to this post.
Alexander Halser
Senior Software Architect, EC Software GmbH
michal_novomesky
Posts: 53
Joined: Thu Jan 12, 2012 2:21 pm
Contact:

Re: <config-value name="searchpath">

Unread post by michal_novomesky »

Thans Alex and Tim for your time.
Attaching the desired outputs. It seems the file setup_eis.xml was properly loaded, but not the "searchpath" override (is it relative to the location of setup_eis.xml, or the location of .hmxp?).
I also tried adding quotes to the path (the path do not contain spaces), but it is sitll not working.

My workaround is to copy setup_eis.xml using .bat to the location where .hmxp is located, and delete it after compilation (keep it in the original location only). In this case the override is working properly.
You do not have the required permissions to view the files attached to this post.
michal_novomesky
Posts: 53
Joined: Thu Jan 12, 2012 2:21 pm
Contact:

Re: <config-value name="searchpath">

Unread post by michal_novomesky »

Adding setup_eis.xml and contents of the folder where .hmxp is located
You do not have the required permissions to view the files attached to this post.
User avatar
Alexander Halser
EC-Software Support
Posts: 4101
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria
Contact:

Re: <config-value name="searchpath">

Unread post by Alexander Halser »

(is it relative to the location of setup_eis.xml, or the location of .hmxp?).
It is relative to the .HMXP file.

The location of setup_eis.xml is completely irrelevant, once it has been loaded. It is only the content of this file, that overwrites the corresponding config entries in the .HMXP file. Think multiple layers or overlay. H&M looks in the "skin" file first and only if there is no definition for a config entry, the entry in the original .HMXP project is used as fallback. If there is no definition, either, a default value is used.

This principle is applied to publishing with skins as well. But the read method is not restricted to 1 skin, it is designed to handle chained overlays. Last one comes first.
Alexander Halser
Senior Software Architect, EC Software GmbH
michal_novomesky
Posts: 53
Joined: Thu Jan 12, 2012 2:21 pm
Contact:

Re: <config-value name="searchpath">

Unread post by michal_novomesky »

It is relative to the .HMXP file.
Then, it is a bug in Help&Manual?
  • when it's loaded from the same location as .hmxp file, "searchpath" override is applied from setup_eis.xml,
  • when it's loaded in a parent/different folder, "searchpath" from setup_eis.xml is not applied, but the value is as is set in the .hmxp file.

The "searchpath" override in setup_eis.xml is the last one while passing /O parameters.
User avatar
Tim Green
Site Admin
Posts: 23178
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: <config-value name="searchpath">

Unread post by Tim Green »

Hi Michal,

Your INI file contains a lot of overloads and there may be conflicting settings in individual referenced overload files. To check whether this is really happening, please perform a test with just a single overload file reference in a single command line (no INI file) and no other references.
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.
michal_novomesky
Posts: 53
Joined: Thu Jan 12, 2012 2:21 pm
Contact:

Re: <config-value name="searchpath">

Unread post by michal_novomesky »

There is no problem with a number of overloads.
Tim/Alex, I sent an example project with a replicated bug (with only one overload) to your email.
michal_novomesky
Posts: 53
Joined: Thu Jan 12, 2012 2:21 pm
Contact:

Re: <config-value name="searchpath">

Unread post by michal_novomesky »

Based on further troubleshooting, <config-value name="searchpath"> is relative to the location of the /O .xml include/skin file, not the .hmxp project file.
User avatar
Tim Green
Site Admin
Posts: 23178
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: <config-value name="searchpath">

Unread post by Tim Green »

Hi Michal,
michal_novomesky wrote: Wed Nov 03, 2021 8:39 am Based on further troubleshooting, <config-value name="searchpath"> is relative to the location of the /O .xml include/skin file, not the .hmxp project file.
Yes, as I informed you in our email exchange on the same subject. This can't be changed because it would break existing build configurations. What you can do is either use a relative path taking that fact into account, or simply set your search paths using absolute paths, which would circumvent the problem entirely. :)
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