I don't think I would merge a PR to add AddToUninstallLog:
In my opinion installing files from [Code] is the wrong approach
here. Automatic uninstallation is not the only thing you would lose.
There is much more you would need to reimplement. Some examples,
besides calling AddToUninstallLog:
- Registering with Restart Manager
- RestartReplace registration as an alternative
- Retry handling, automatic and manual, including option to abort
- Repeating the decision for the remaining files
- Atomically swapping in the new file over an existing one via a
temporary file, handling read only files
- Logging
- Including the extra file size (and name) into the progress bar,
Add/Remove Programs' EstimatedSize, and disk space calculations
- Handling file system redirection and extended length paths
Having to add all that would be the messy code. Leaving it out means
giving up robustness users expect.
Personally I think the example I showed you is the opposite of
messy, I actually think it's quite elegant how you can glue a rather
specific requirement onto the built-in engine; the glue code is
simple to understand and very straightforward, and the bit you
actually have to implement yourself is exactly your specific
requirement, and nothing more.
Greetings,
Martijn