Skip to content

CPack/NSIS: Fix uninstall command when run from installer

Marc Jeanmougin requested to merge mc/cmake:nsis-fix-uninstall-quoting into master

The quoting of path introduced in !6517 (merged) created two errors in the uninstaller call: double quoting of the uninstaller executable, and quotes added to the _?= argument which does not support them. This fix simplifies the command

This fix slightly changes the behavior, in the sense that the uninstaller will now copy itself to the temporary directory when run, to greatly simplify the NSIS code here, which I don't think has any significant negative effect. Another fix keeping the _?= would have added a char to the existing StrLen command (to get rid of the ending quote) and adding a start offset of 1 to the StrCpy to get rid of the leading quote.

Backport: release
Topic-rename: cpack-nsis-fix-uninstall-quoting

Edited by Brad King

Merge request reports