Fix NSIS installer continuing install before uninstall completes #1299
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an attempt to fix an issue with the NSIS installer, brought up on the forum here:
http://freeorion.org/forum/viewtopic.php?f=28&t=10402
The problem is, the fix proposed in this PR doesn't work completely satisfactorily, as it causes the previous version of FO not being uninstalled completely, theFreeOrion
folder in the Windows programs directory and theuninstall.exe
within don't get deleted (all the other contents ofFreeOrion
do though).That might not be a big issue with the "uninstall before install" feature this PR tries to fix, as FO gets installed again, most likely into the same location so the left over folder and theuninstall.exe
will get overwritten anyway. But e.g. in case the user decides to install to a different location, these bits of the old installation would be left behind.Which probably is still better than the issue described in the forum thread above, but I didn't want to make assumptions, so I'm putting this up here for review. And maybe someone has a better solution.The approach implemented by this PR has been suggested by @dbenage-cx in the thread linked above, it has one small issue though mentioned by @dbenage-cx there (referring to the filename of the uninstall executable):
Considering that the filename of the uninstall executable hasn't been changed ever, I consider this issue negligible.