diff options
author | David Cole <david.cole@kitware.com> | 2009-01-20 19:29:41 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2009-01-20 19:29:41 (GMT) |
commit | 03c940aeb38c1456df336262d667b69304de0504 (patch) | |
tree | e9c6ef42249e65c10673071154f18b9498779219 /Source/CPack | |
parent | 7f92b77997dcc5fa2d1e9455ad2d494fceea9786 (diff) | |
download | CMake-03c940aeb38c1456df336262d667b69304de0504.zip CMake-03c940aeb38c1456df336262d667b69304de0504.tar.gz CMake-03c940aeb38c1456df336262d667b69304de0504.tar.bz2 |
BUG: Fix for issue #7470. Allow spaces in the path names of installed files with the NSIS CPack generator and component-based installs. Add an installed file to the CPackComponents test: it failed before the fix; now it passes.
Diffstat (limited to 'Source/CPack')
-rw-r--r-- | Source/CPack/cmCPackNSISGenerator.cxx | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx index 460ede9..b90348d 100644 --- a/Source/CPack/cmCPackNSISGenerator.cxx +++ b/Source/CPack/cmCPackNSISGenerator.cxx @@ -793,20 +793,25 @@ CreateComponentDescription(cmCPackComponent *component, macrosOut << " IntCmp $" << component->Name << "_was_installed 0 noremove_" << component->Name << "\n"; std::vector<std::string>::iterator pathIt; - for (pathIt = component->Files.begin(); - pathIt != component->Files.end(); - ++pathIt) - { - macrosOut << " Delete \"$INSTDIR\\" - << cmSystemTools::ConvertToWindowsOutputPath(pathIt->c_str()) + std::string path; + for (pathIt = component->Files.begin(); + pathIt != component->Files.end(); + ++pathIt) + { + path = *pathIt; + cmSystemTools::ReplaceString(path, "/", "\\"); + macrosOut << " Delete \"$INSTDIR\\" + << path.c_str() << "\"\n"; } - for (pathIt = component->Directories.begin(); - pathIt != component->Directories.end(); - ++pathIt) + for (pathIt = component->Directories.begin(); + pathIt != component->Directories.end(); + ++pathIt) { - macrosOut << " RMDir \"$INSTDIR\\" - << cmSystemTools::ConvertToWindowsOutputPath(pathIt->c_str()) + path = *pathIt; + cmSystemTools::ReplaceString(path, "/", "\\"); + macrosOut << " RMDir \"$INSTDIR\\" + << path.c_str() << "\"\n"; } macrosOut << " noremove_" << component->Name << ":\n"; |