Can I, for example, unzip or delete all .zip archives(particular file extension) in one action? Or do I have to create an action for each .zip file?

asked 24 Mar '12, 14:04

Vertius's gravatar image

Vertius
6224
accept rate: 0%


The <deleteFile>action supports patterns so you could just use the below code:

<deleteFile>
  <path>${installdir}/*.zip</path>
</deleteFile>

The <unzip> action however does not support providing multiple files at once but you could use a <foreach> action:

<foreach variables="zip">
   <values>"${installdir}/zip1.zip" "${installdir}/zip2.zip" "${installdir}/zip3.zip"</values>
   <actionList>
        <unzip>
           <destinationDirectory>${installdir}/content</destinationDirectory>
           <zipFile>${zip}</zipFile>
         </unzip>
   </actionList>
</foreach>

You could also include the deletion of the zip file inside the foreach.

link

answered 25 Mar '12, 06:58

juanjo's gravatar image

juanjo ♦♦
5.8k413
accept rate: 23%

Unzipping don't works :(

(25 Mar '12, 15:37) Vertius

Which error do you get?

(25 Mar '12, 16:13) juanjo ♦♦

Installation is completed, but archives aren't unpacked.

(26 Mar '12, 13:24) Vertius

could you execute the installer as:

installer.run --debugtrace debug.txt

And sen us the generated file to support@bitrock.com?

(26 Mar '12, 15:47) juanjo ♦♦

Code: <foreach variables="zip"> <values>"${installdir}/Duplet.zip" "${installdir}/Damage_Panel.zip"</values> <actionlist> <unzip> <destinationdirectory>${installdir}</destinationdirectory> <zipfile>${zip}</zipfile> </unzip> </actionlist> </foreach>

Error: http://i.imgur.com/mNRSv.jpg

Installdir - C:/Program Files/Sample Project. Why setup want to unzip file from BitRock Installer folder, not installdir?

(27 Mar '12, 08:56) Vertius

The explanation must be that the introduced value for the ${installdir} parameter was introduced as a relative path, that was later on normalized, resulting on the error. Which value did you introduced?

(27 Mar '12, 09:33) juanjo ♦♦

I don't fully understand you. Installdir in project: "${platform_install_prefix}/${product_shortname}-${product_version}". Then in setup I choose "C:/Program Files/Sample Project" directory.

(27 Mar '12, 09:44) Vertius
showing 5 of 7 show all
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:

×19
×6

Asked: 24 Mar '12, 14:04

Seen: 1,522 times

Last updated: 27 Mar '12, 09:44