Using the same project XML file, I'd like to create both a complete CDROM install and a "setup" install that downloads components from the web server. If the CDROM install is running, there's no need to show the page to set the web server details (username and password), so I could potentially add a rule to prevent that page showing if it's a CDROM installation. However, I don't seem to be able to find a build type test (e.g. similar to the platform test). Perhaps I can do it by detecting the presence of downloadable components, but I don't know how to do that either.

asked 07 Jun '12, 12:49

hulahoopian's gravatar image

hulahoopian
356710
accept rate: 0%


One option is to set an installer's hidden parameter at build time. For example setting up a hidden parameter to store the value:

<project>
  <parameterList>
    <stringParameter name="buildFlavor" value="regular" ask="0"/>
  </parameterList>
</project>

And then specify it to be cdrom or regular at build time when invoking the CLI:

$ builder build project.xml cdrom --setvars buildFlavor=cdrom
$ builder build project.xml windows --setvars buildFlavor=regular

Then the buildFlavor variable is accessible at runtime as well and the check is as simple as:

<compareText>
    <logic>equals</logic>
    <text>${buildFlavor}</text>
    <value>cdrom</value>
</compareText>

This approach is described in more details in Creating Custom Builds section of InstallBuilder user guide.

Another option is to compare installer filename. For CDROM mode it will be setup-windows.exe or in general setup-*.???. So the following check can be used:

<regExMatch>
    <logic>matches</logic>
    <pattern>{[/\\]setup-[^/\\]+\....$}</pattern>
    <text>${installer_pathname}</text>
</regExMatch>

This checks that last element of ${installer_pathname} variable matches the pattern.

link

answered 08 Jun '12, 03:14

wojciechka's gravatar image

wojciechka ♦♦
7.8k61122
accept rate: 26%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×27
×5

Asked: 07 Jun '12, 12:49

Seen: 909 times

Last updated: 08 Jun '12, 03:14