How <include> tag works

Comments

7 comments

  • Avatar
    BitRock support

    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 "include" 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 "xmlOriginFile" 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
    Comment actions Permalink
  • Avatar
    Jake
    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:\path to file\parameter.xml) for it to work...
    This way gave me a "The file does not exist" error.

    <!-- parameter.xml contains a directory parameter -->
    <include file="${build_project_directory}/parameter.xml"/>
    </parameterList>
    0
    Comment actions Permalink
  • Avatar
    BitRock support

    Hi Jake,

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

    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
    Comment actions Permalink
  • Avatar
    Jake

    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
    Comment actions Permalink
  • Avatar
    BitRock support

    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
    Comment actions Permalink
  • Avatar
    Jake

    Thanks. 

    We are using Windows and Linux.

    0
    Comment actions Permalink
  • Avatar
    Jake

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

    0
    Comment actions Permalink

Please sign in to leave a comment.