Bill Hoffman wrote:


# if the user has set CPACK_NSIS_DISPLAY_NAME
# remember
if(DEFINED CPACK_NSIS_DISPLAY_NAME)
  SET(CPACK_NSIS_DISPLAY_NAME_SET TRUE)
endif()
cpack_set_if_not_set(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}")

# if the user has set CPACK_NSIS_DISPLAY
# explicitly, then use that as the default
# value of CPACK_NSIS_PACKAGE_NAME  instead
# of CPACK_PACKAGE_INSTALL_DIRECTORY
if(CPACK_NSIS_DISPLAY_NAME_SET)
cpack_set_if_not_set(CPACK_NSIS_PACKAGE_NAME "${CPACK_NSIS_DISPLAY_NAME}")
else()
cpack_set_if_not_set(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}")
endif()


That should keep it working like it did for 2.6 right? It works for your case, no longer crashes.

I made this commit:


RCS file: /cvsroot/CMake/CMake/Modules/CPack.cmake,v
retrieving revision 1.46
diff -r1.46 CPack.cmake
796c796,803
<
---
> # if the user has set CPACK_NSIS_DISPLAY_NAME remember it
> if(DEFINED CPACK_NSIS_DISPLAY_NAME)
>   SET(CPACK_NSIS_DISPLAY_NAME_SET TRUE)
> endif()
> # if the user has set CPACK_NSIS_DISPLAY
> # explicitly, then use that as the default
> # value of CPACK_NSIS_PACKAGE_NAME  instead
> # of CPACK_PACKAGE_INSTALL_DIRECTORY
798c805,812
< cpack_set_if_not_set(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}")
---
>
> if(CPACK_NSIS_DISPLAY_NAME_SET)
>   string(REPLACE "\\" "\\\\"
>     _NSIS_DISPLAY_NAME_TMP  "${CPACK_NSIS_DISPLAY_NAME}")
> cpack_set_if_not_set(CPACK_NSIS_PACKAGE_NAME "${_NSIS_DISPLAY_NAME_TMP}")
> else()
> cpack_set_if_not_set(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}")
> endif()

hoff...@corrin ~/My Builds/CMake/Modules
$ cvs commit -m "Fix regression with CPACK_NSIS_PACKAGE_NAME, if the project is setting the CPACK_NSIS_DISPLAY_NAME then use that as the default value and not the CPACK_PACKAGE_INSTALL_DIRECTORY, also make sure it escapes \ correctly." CPack.cmake
Committer: Bill Hoffman <[email protected]>
/cvsroot/CMake/CMake/Modules/CPack.cmake,v  <--  CPack.cmake
new revision: 1.47; previous revision: 1.46


I am most likely going to push this fix onto 2.8 branch tomorrow if the dashboards look good tonight. If anyone sees and issue with this fix please let me know!

Thanks.

-Bill
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to