From 85733c17c5665df98426ab9642b2156eca8316c7 Mon Sep 17 00:00:00 2001 From: David Cole Date: Thu, 16 Jul 2009 11:48:30 -0400 Subject: [PATCH] BUG: Re-fix issue #8682. Use new variable CPACK_NSIS_PACKAGE_NAME in appropriate places rather than CPACK_NSIS_DISPLAY_NAME. CPACK_NSIS_DISPLAY_NAME is the Add/Remove control panel's description string for the installed package. Using it as the "Name" of the NSIS installer package made the CMake installer itself use really long strings in the installer GUI. This fix still allows for the original intent of the first fix for #8682 -- the ability to separate the installer name from the default install directory, but it uses a new/different variable to achieve the separation. --- Modules/CPack.cmake | 6 +++++- Modules/NSIS.template.in | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake index cd13cbf68..0f0d88033 100644 --- a/Modules/CPack.cmake +++ b/Modules/CPack.cmake @@ -136,7 +136,10 @@ # whether the program directory should be added to the system PATH # variable. # -# CPACK_NSIS_DISPLAY_NAME - The title displayed at the top of the +# CPACK_NSIS_DISPLAY_NAME - The display name string that appears in +# the Windows Add/Remove Program control panel +# +# CPACK_NSIS_PACKAGE_NAME - The title displayed at the top of the # installer. # # CPACK_NSIS_INSTALLED_ICON_NAME - A path to the executable that @@ -779,6 +782,7 @@ cpack_set_if_not_set(CPACK_CMAKE_GENERATOR "${CMAKE_GENERATOR}") cpack_set_if_not_set(CPACK_TOPLEVEL_TAG "${CPACK_SYSTEM_NAME}") cpack_set_if_not_set(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}") +cpack_set_if_not_set(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}") cpack_set_if_not_set(CPACK_OUTPUT_CONFIG_FILE "${CMAKE_BINARY_DIR}/CPackConfig.cmake") diff --git a/Modules/NSIS.template.in b/Modules/NSIS.template.in index 983ff1514..8b9608ea5 100644 --- a/Modules/NSIS.template.in +++ b/Modules/NSIS.template.in @@ -31,7 +31,7 @@ ;General ;Name and file - Name "@CPACK_NSIS_DISPLAY_NAME@" + Name "@CPACK_NSIS_PACKAGE_NAME@" OutFile "@CPACK_TOPLEVEL_DIRECTORY@/@CPACK_OUTPUT_FILE_NAME@" ;Set compression @@ -701,7 +701,7 @@ SectionEnd ;-------------------------------- ; Create custom pages Function InstallOptionsPage - !insertmacro MUI_HEADER_TEXT "Install Options" "Choose options for installing @CPACK_NSIS_DISPLAY_NAME@" + !insertmacro MUI_HEADER_TEXT "Install Options" "Choose options for installing @CPACK_NSIS_PACKAGE_NAME@" !insertmacro MUI_INSTALLOPTIONS_DISPLAY "NSIS.InstallOptions.ini" FunctionEnd