[CMake] CPack Uninstalling locked files

Lloyd lloydkl.tech at gmail.com
Tue Dec 8 04:29:52 EST 2015


Hi,

In CPack NSIS template I came across a variable CPACK_NSIS_DELETE_FILES.
When the NSIS script is generated, this variable is expanded to "nsis
delete commands" for all the cmake install commands.

The proble with this is, if the file is locked it will not be deleted. To
overcome this NSIS has a "REBOOTOK" flag  in the delete command. When the
system is reboot these locked files will be deleted.

eg.

Delete /REBOOTOK "$INSTDIR\uninst.exe"

Does CMake/CPack provide any mechanism for deleting locked files ?

Thanks,
  Lloyd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20151208/8515fc7f/attachment.html>


More information about the CMake mailing list