use wildcards or regExMatch to specify multiple destinations?

Comments

2 comments

  • Avatar
    utdream

    Nothing wrong with using an external script in your installer in my opinion. I do it all the time. =)

    Another option might be to use the InstallBuilder "Run Program" feature and run either "cp" or "xcopy". You're still calling an external program, but you're not utilizing an actual external script. So maybe this will get you far enough away from a script that it would work for your purposes.

    Hope this helps!

    -Jordan

  • Avatar
    juanjo

    You could also use InstallBuilder built-in actions using an <unpackDirectory> instead of letting the installer automatically unpack the files:

    <component>
       <name>yourComponent</name>
        ...
       <folderList>
          <name>yourFiles</name>
          <distributionFileList>
              <distributionDirectory origin="path/to/yourdir"/>
          </distributionFileList>
          <ruleList>
                <!-- This is never true, so the folder is not automatically unpacked -->
                <isTrue value="0"/>
          </ruleList>
       </folderList>
       <postInstallationActionList>
             <!-- Get list of Destination Directories -->
             <setInstallerVariableFromScriptOutput>
                <name>dirs</name>
                <exec>find</exec>
                <execArgs>/Applications -name 'Live* ' -maxdepth 1 -exec echo \"{}\" \;</execArgs>
                <workingDirectory></workingDirectory>
             </setInstallerVariableFromScriptOutput>
             <!-- Iterater over the directories, unpacking -->
             <foreach variables="destination" values="${dirs}">
                 <actionList>
                      <unpackDirectory>
                        <component>yourComponent</component>
                        <destination>${destination}/Contents/AnotherFolder</destination>
                        <folder>yourFiles</folder>
                        <origin>yourdir</origin>
                     </unpackDirectory>
                 </actionList>
              </foreach>
       </postInstallationActionList>
    </component>
    

Please sign in to leave a comment.