Can Readme File View be launched in background?

Comments

1 comment

  • Avatar
    wojciechka

    It is not possible to configure it for <readmeFile>.

    What can be done is ship the README file as part of installed files, instead of <readmeFile> option and then add a <showText> action as last option:

    <finalPageActionList> <!-- ... --> <!-- read the README file, setting show to 0 prevents it from being shown as an option --> <readFile> <name>readme_contents</name> <path>${installdir}/README.txt</path> <show>0</show> </readFile> <!-- add option to show the README file --> <showText> <progressText>Show readme file</progressText> <text>${readme_contents}</text> <title>Readme</title> </showText> </finalPageActionList>

    The action still runs in the foreground and it cannot be run in the background (i.e. as a child process). However, this will work fine if the checkbutton is shown as last entry.

    If you want to show the checkbutton before other entries, but still run the <showText> at the end, you can simply have a visible action that sets a variable and then a hidden <showText> action at the end that is only run if the visible checkbutton was selected. For example:

    <finalPageActionList> <!-- the actual checkbutton that is shown to the user --> <setInstallerVariable> <name>show_readme_file</name> <progressText>Show readme file</progressText> <value>1</value> </setInstallerVariable> <!-- ... --> <!-- read the README file, setting show to 0 prevents it from being shown as an option --> <readFile> <name>readme_contents</name> <path>${installdir}/README.txt</path> <show>0</show> <ruleList> <isTrue> <value>${show_readme_file}</value> </isTrue> </ruleList> </readFile> <!-- add option to show the README file --> <showText> <progressText>Show readme file</progressText> <text>${readme_contents}</text> <title>Readme</title> <show>0</show> <ruleList> <isTrue> <value>${show_readme_file}</value> </isTrue> </ruleList> </showText> </finalPageActionList>

    This way the action is always run last and only if the user has selected the Show readme file checkbutton.

Please sign in to leave a comment.