Advanced Installer (AI) has the ability to dynamically add files into an installation using the "Synchronize content with folder from disk" option (http://www.advancedinstaller.com/user-g ... onize.html). My understanding is, this option is not compatible with patches and minor upgrades, since component guids can change, which breaks the rules (http://www.advancedinstaller.com/user-g ... tches.html).
The issue is, in some scenarios, the synchronize option is practically mandatory, because you might be dealing with folders containing hundreds of files (non Portable Executables (PE)) and subfolders. And, these files/folders might be updated (adding/removing files) on a regular basis. It is impractical to add hundreds of non-PE files to AI for two reasons:
- They will all get lumped into a single component anyways, since they are non-PE files. And, as far as I know, there is no way to define which file types are treated as PE's.
- If files are being added/removed from a folder on a regular basis, it's a pain to have to add/remove them from the installer every time.
Do we use synchronized folders, or do we support patches and minor upgrades? My understanding is, you can't have both.
So, my suggestion is to implement two features (mainly the first):
- An option to make the "Synchronize" feature create a separate component for each file (regardless of if it's a PE or not). Logic must be implemented to make sure the component guid stays the same. From what I've read, Heat (http://wixtoolset.org/documentation/man ... /heat.html) can do this with the "-ag" flag set. It sounds like the component guid is based off the file path. So, as long as the file path is the same, the guid will be the same. It also sounds like InstallShield has implemented something similar to this - the "Best Practice Method" for dynamically linked files (http://helpnet.flexerasoftware.com/isxh ... ctices.htm). Though, it's not clear to me if the component guids stay the same.
- Add an option to define file extensions to be treated as PE's. That way, they will be added as separate components when I add them to AI. Currently, if I add a bunch of *.txt files, they will all be added into a single component. Then, I have to click each one and click "Move to new component". Not practical for hundreds of files. I believe newer versions of InstallShield allow you to define file extensions to be treated as PE's.
All that being said, I don't understand why non-PE files aren't added to separate components by default. I always see warnings/recommendations about making every file a separate component to avoid issues with repairs/patches/upgrades. So, why isn't this the default behaviour (separate component for every file)? InstallShield behaves the same way. Maybe I'm missing something here, as I don't understand the design decision.
So, to sum up:
Problem - You can't use synchronized folders and support patches/minor upgrades. You can only do one.
Proposed solution - An option for synchronized folders to make every file a separate component and the components have static guids.
Also, if there is a work-around, please let me know. At this point, I'm thinking I might have to write a script to edit the AI project file, adding in my files (from the synchronized folders) as separate components (not fun ).
Thanks.