On Monday, September 21, 2015 12:28:37 PM Dmitry Kochkin wrote: > Hi Clint, > > >>Actually it's even worse because in current master HEAD I can see that > >>INST_DIR is empty in generated project: !define INST_DIR "" > >>(not sure if that's caused by your change) > > > >Interesting... Do you know why this happens? How is this problem related > >to extended paths (with the \\?\ prefix)? Do you have an example to > >demonstrate this problem? That was my mistake, please ignore.> > >>I've figured out that NSIS was not going to fix this (see > >>http://sourceforge.net/p/nsis/feature-requests/241/ )> > >Maybe they'll accept a patch to fix it there? Was there any effort to fix > >it there? > In the URL I've put they claim you should just use "\\?\" in your NSIS > project. I guess it's also possible to fix NSIS, but we cannot rely that > user have latest NSIS.
Using "\\?\" in a NSIS project is a workaround, not a fix. If a workaround is put into CMake, then you are relying on the latest CMake, right? > >>I've made a small patch to NSIS generator and template to put infamous > >>\\?\ there. > >> > >>I can send directly to you as I guess you know more about these parts of > >>code.> > >You can send your patch to this mailing list for review. > > Patch attached. It's a bit hacky, more fixing symptoms I guess. The purpose > is only to demonstrate the idea. Let me know if it can be done in better > way. Yes, it fixes symptoms. The correct and robust way to fix this is to fix NSIS. I have concerns with this patch: 1. Are the paths cleaned before placed into the NSIS template? Only clean paths can be prepended with \\?\. For example, these paths may not contain "." or "../" in them. 2. This patch can break UNC paths. UNC paths must be prepended with a "\\? \UNC\" prefix instead of "\\?\". If CPACK_TEMPORARY_DIRECTORY is a UNC path, this patch breaks it. 3. For the uninstall code put into the NSIS template, how do you know whether INSTDIR is a UNC path or not? INSTDIR is determined by the end-user when installing the software. Blindly prepending "\\?\" may not work all the time. Clint -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers