populate distributionFileList at runtime

Comments

1 comment

  • Avatar
    michiel

    You could either run an external script that copies the files from the list to a folder, and then pack the contents of that folder, or you could do this as a preBuild action. For example:

         <preBuildActionList>
             <readFile name="whiteList" path="${build_project_directory}/whitelist.txt"/>
             <foreach variables="file" values="${whitelist}">
               <actionList>
                   <copyFile destination="${build_project_directory}/whiteListed" origin="assets/${file}">
                       <ruleList>
                           <fileTest path="assets/${file}" condition="exists"/>
                       </ruleList>
                   </copyFile>
               </actionList>
             </foreach>
         </preBuildActionList>
    

    And then pack the folder's contents:

                 <folder>
                         <distributionFileList>
                             <distributionFile>
                                 <allowWildcards>1</allowWildcards>
                                 <origin>${build_project_directory}/whitelisted/*</origin>
                             </distributionFile>
                         </distributionFileList>
                     <name>programfiles</name>
                 </folder>

Please sign in to leave a comment.