VMware Cloud Community
Lam_bui
Contributor
Contributor

How <include> tag works

Hi,


I'm trying to understand how this include tag works, so hopefully someone can help. I tried to include just a simple parameter xml file into my main xml project. It did included, but after I validated and saved, my ' include'  tag turn into the actual parameter code in the main xml project. From this, if I update my external xml, it does not get updated in my main xml... Why can't I just continue updating my external xml and it would get udpate to the main one...?


https://clients.bitrock.com/installbuilder/docs/installbuilder-userguide.html#adding_components_from...


Labels (1)
0 Kudos
9 Replies
AnonymousDefaul
Enthusiast
Enthusiast

Hi Jake,

The way `include`s work is exactly the same as if you copied the contents of the included file and pasted it in the place where the `<include>` tag is located.

Regarding the main project being saved with the contents instead of the  or ' include or '  tags, I've tried to reproduce it without success using the latest version of InstallBuilder. When I edit XML in the Builder's XML editor, an attribute named  or ' xmlOriginFile or '  appears on the included file, which will make the save process to preserve the include.

Could you provide more details on the InstallBuilder version that you are using? Could you check if the latest version works correctly for you?

Regards,

Alejandro

0 Kudos
Lam_bui
Contributor
Contributor

Hi,

Thank you clarifying. I do see the xmlOriginFile tag, but only if I opened the whole component XML Editor view. I'm okay with that though, no big deal.

Another error for me is I had to hardcode the path for some reason. I had to hardcode the path (c: or  or path to file or  or parameter.xml) for it to work...
This way gave me a  or ' The file does not exist or '  error.

<!-- parameter.xml contains a directory parameter -->
<include file= or ' ${build_project_directory}/parameter.xml or ' />
</parameterList>
0 Kudos
AnonymousDefaul
Enthusiast
Enthusiast

Hi Jake,

Please note that relative paths also work. You could place your  or ' parameter.xml or '  next to your main project file, and then use file= or ' parameter.xml or ' .

By default, when you open the project and save it, it will replace the path to the included file with its absolute path. If you want to prevent this, you can set the project property `<saveRelativePaths>` to 1.

Would that work for you?

Regards,

Alejandro

0 Kudos
Lam_bui
Contributor
Contributor

Hi,

my 'saveRelativePaths' is already set to 1. Is this what you meant by putting the xml file next to the main project file?

0 Kudos
AnonymousDefaul
Enthusiast
Enthusiast

Hi Jake,

You are right. The automatic relative normalization only works when editing the full project (if you go to Advanced->XML Editor). We have logged an improvement request in our bug tracking system to improve includes handling in GUI mode to support it in other partial edits.

In which platforms do you usually work on your installers?

0 Kudos
Lam_bui
Contributor
Contributor

Thanks.

We are using Windows and Linux.

0 Kudos
Lam_bui
Contributor
Contributor

Hello,
Just like to see if you guys have any timeline estimate for this update?

0 Kudos
Lam_bui
Contributor
Contributor

Hi,

Just want to check back if any schedule for this improvement ot?

0 Kudos
michiel_dhont
Enthusiast
Enthusiast

Hi Jake,

Please accept our apologies for the delay in our reply. Could you contact us at support@bitrock.com with this issue. We will handle it from there.

Regards,

Michiel

0 Kudos