PDA

View Full Version : Files bean exclusion filter



phtouz
06-14-2004, 09:16 AM
I am including several directories and subdirectories in a Files bean. I want to exclude the CVS directories so I'm using an Exclusion filter. I think I've tried everything I could but although the CVS directories and files don't show up in the preview, they are still included in the build and installed.

Here are my current settings:
Apply filtering to: Directory and File Name
Exclusion Filter: CVS;Entries;Entries.log;Repository;Root;.cvsignore
Regular expressions: no

I read on the ISMP 4 or 5 forums that when including a directory and its subdirectories, one must match on the file name only, not on the full path. I'm not sure it applies to IS X. Would someone know if it's still the case for IS X?

Any help appreciated. Thanks.

brianl
06-18-2004, 06:11 PM
I couldn't repro this in InstallShield X. If the files/directories don't show up in the preview, then they should not be getting built into the archive. Could these files/directories perhaps be sneaking into the archive from a different Files bean in your project? I assume that you are seeing the files get installed, is that right?

Could you try the same settings in a new project with a single Files bean? Also try installing to a new directory.

phtouz
06-20-2004, 07:50 AM
Brian, thanks for your answer.

I did what you recommended and created a simple project with a single file bean. The structure of the files I used for the dynamic link is as follows:
/tomcat
/tomcat/CVS
/tomcat/CVS/Entries
/tomcat/bin
/tomcat/bin/CVS
/tomcat/bin/CVS/Entries
/tomcat/bin/tomcat.exe
/tomcat/conf
...

I want to exclude all CVS directories and their content. I uninstalled the product before each test and manually checked that the base directory was deleted.

Test 1:
Apply filter on file names & directories
Regex: no
Filter: CVS;Entries;Repository;Root

The preview doesn't show any CVS directory or file.
However, all the CVS directories and their content, except the top-level one, are installed. That is: /tomcat/CVS and /tomcat/CVS/Entries are not installed but /tomcat/bin/CVS and /tomcat/bin/CVS/Entries are.

Test 2:
Apply filter on file names only
Rexex: no
Filter: CVS;Entries;Repository;Root

The preview still doesn't show any CVS directory or file.
All the CVS directories are installed, but not their content.

Test 3:
Apply filter on file names & directories
Regex: yes
Filter: .*/CVS;.*/CVS/.*

The preview shows all CVS directories and files.
Only the top-level CVS directory (/tomcat/CVS) and its content is installed.

Test 4:
Apply filter on files names & directories
Regex: yes
Filter: (.*/)?CVS(/.*)?

The preview doesn't show any CVS directory or file.
No CVS directory or file is installed. (yeah!)

In conclusion, it seems that there is something wrong with the preview (tests 1,2 and 3) while exclusion works fine at build time.

Anyway, I found the answer to my problem.

brianl
06-21-2004, 12:26 PM
Thanks for the details, I was able to reproduce the problem. The problem is with the Files Preview as you suspect. The expected behavior of files filtering is that it will apply each expression to the entire absolute path, thus to correctly filter out any files or directories under a directory named "CVS", you would use:

*CVS*

Or, the better method is to use the regular expression that you specified in test 4.

The problem occurs with the Files Preview displaying files that should really be filtered. (Work order opened to fix this is # 1-QECKT).