Hi, I'm extracting quite a large number of files preinstallation using unpackDirectory. I want to prevent them from being extracted again during the Installation phase of the installer. Is this possible? Thanks!

asked 07 Mar, 13:55

danish1's gravatar image

danish1
691114
accept rate: 0%


It's possible to do this. First you add a rule to the folder you want to unpack and make sure it's always false. In this way the files will be packed but never unpacked by the installer.

<folder>
      <description>Program Files</description>
      <destination>${installdir}</destination>
      <name>programfiles</name>
      <platforms>all</platforms>
      <distributionFileList>
        <distributionFile>
          <origin>files</origin>
        </distributionFile>
      </distributionFileList>
      <ruleList>
        <isTrue>
          <value>0</value>
        </isTrue>
      </ruleList>
    </folder>

You can then unpack the file and if necessary use <copyfile> to copy the unpacked file to the installdir in the <postInstallationActionList>:

<preInstallationActionList>
    <unpackDirectory>
      <component>default</component>
      <folder>programfiles</folder>
      <origin>files</origin>
      <destination>/tmp</destination>
    </unpackDirectory>
  </preInstallationActionList>
  <postInstallationActionList>
    <copyFile>
      <origin>/tmp/files</origin>
      <destination>${installdir}/files</destination>
    </copyFile>
  </postInstallationActionList>

https://installbuilder.bitrock.com/docs/installbuilder-userguide.html#_unpacking_before_installation_time

https://installbuilder.bitrock.com/docs/installbuilder-userguide.html#_copy_file

link

answered 09 Mar, 09:00

Michiel's gravatar image

Michiel ♦
50614
accept rate: 20%

Thank you, that's exactly what I needed.

(09 Mar, 09:27) danish1
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:

×2

Asked: 07 Mar, 13:55

Seen: 2,025 times

Last updated: 09 Mar, 09:27