From 76550297b6670a6de24b6b58947234ce3ffb6746 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 12 Nov 2013 14:36:45 -0500 Subject: Configure NSIS-packaged CMake documentation link in Start Menu Now that we use Sphinx to generate the documentation there is a single entry point to link from the start menu. Drop all the (now broken) links to the individual html document pages and provide a single link to the index.html "CMake Documentation" entry point. --- CMakeCPackOptions.cmake.in | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in index 008a102..3ff0188 100644 --- a/CMakeCPackOptions.cmake.in +++ b/CMakeCPackOptions.cmake.in @@ -13,14 +13,7 @@ if(CPACK_GENERATOR MATCHES "NSIS") set(CPACK_PACKAGE_ICON "@CMake_SOURCE_DIR@/Utilities/Release\\CMakeInstall.bmp") # tell cpack to create links to the doc files set(CPACK_NSIS_MENU_LINKS - "doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/cmake-gui.html" "cmake-gui Help" - "doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/cmake.html" "CMake Help" - "doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/cmake-properties.html" - "CMake Properties and Variables Help" - "doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/ctest.html" "CTest Help" - "doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/cmake-modules.html" "CMake Modules Help" - "doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/cmake-commands.html" "CMake Commands Help" - "doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/cpack.html" "CPack Help" + "@CMAKE_DOC_DIR@/html/index.html" "CMake Documentation" "http://www.cmake.org" "CMake Web Site" ) # Use the icon from cmake-gui for add-remove programs -- cgit v0.12 From 84af42b989fe919fee65fa0809d053a347d3f000 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 12 Nov 2013 14:51:56 -0500 Subject: Configure NSIS-packaged CMake version and install destination Remove the version number from the default package install destination. An unversioned default allows users to upgrade their CMake installations without manually re-generating all their build trees to update the path to CMake. Users can select a versioned directory name on installation if they wish. Also name the package with the full CMake version number so it is clear exactly what version is going to be installed. This is particularly helpful for the nightly binary installers. --- CMakeCPack.cmake | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/CMakeCPack.cmake b/CMakeCPack.cmake index 2495c44..fb55bfc 100644 --- a/CMakeCPack.cmake +++ b/CMakeCPack.cmake @@ -29,27 +29,23 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") set(CPACK_PACKAGE_VENDOR "Kitware") set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt") set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt") + set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}") set(CPACK_PACKAGE_VERSION "${CMake_VERSION}") - set(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") + set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}") set(CPACK_SOURCE_PACKAGE_FILE_NAME "cmake-${CMake_VERSION}") - # Make this explicit here, rather than accepting the CPack default value, - # so we can refer to it: - set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}") - # Installers for 32- vs. 64-bit CMake: # - Root install directory (displayed to end user at installer-run time) # - "NSIS package/display name" (text used in the installer GUI) # - Registry key used to store info about the installation if(CMAKE_CL_64) set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64") - set(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} (Win64)") - set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION} (Win64)") + set(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION} (Win64)") else() set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES") - set(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}") - set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}") + set(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}") endif() + set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_NSIS_PACKAGE_NAME}") if(NOT DEFINED CPACK_SYSTEM_NAME) # make sure package is not Cygwin-unknown, for Cygwin just -- cgit v0.12 From 06b0dbe0614c08a8ec80ce69e7679b0faa7e69dc Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 12 Nov 2013 14:24:51 -0500 Subject: OS X: Drop version number from CMake.app bundle name (#11693) Always name the application bundle "CMake.app". Users can rename it after installation if they wish. This is the typical approach used by OS X applications, including Xcode. It allows CMake to be upgraded without manually re-running CMake in every build tree to update the path to CMake. It also makes the executable location in the CMake build tree more predicatable. --- CMakeLists.txt | 3 +-- Source/QtDialog/CMakeLists.txt | 8 ++++---- Source/QtDialog/postflight.sh.in | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 25cd576..d6237b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -484,7 +484,6 @@ if(BUILD_QtDialog) if(APPLE) set(CMAKE_BUNDLE_VERSION "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}") - set(CMAKE_BUNDLE_NAME "CMake ${CMAKE_BUNDLE_VERSION}") set(CMAKE_BUNDLE_LOCATION "${CMAKE_INSTALL_PREFIX}") # make sure CMAKE_INSTALL_PREFIX ends in / string(LENGTH "${CMAKE_INSTALL_PREFIX}" LEN) @@ -494,7 +493,7 @@ if(BUILD_QtDialog) set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/") endif() set(CMAKE_INSTALL_PREFIX - "${CMAKE_INSTALL_PREFIX}${CMAKE_BUNDLE_NAME}.app/Contents") + "${CMAKE_INSTALL_PREFIX}CMake.app/Contents") endif() set(QT_NEED_RPATH FALSE) diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index 88a9fc9..b17e212 100644 --- a/Source/QtDialog/CMakeLists.txt +++ b/Source/QtDialog/CMakeLists.txt @@ -112,7 +112,7 @@ endif() if(APPLE) set_target_properties(cmake-gui PROPERTIES - OUTPUT_NAME ${CMAKE_BUNDLE_NAME} + OUTPUT_NAME CMake MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in" MACOSX_BUNDLE_SHORT_VERSION_STRING "${CMAKE_BUNDLE_VERSION}" # TBD: MACOSX_BUNDLE_BUNDLE_VERSION "${CMAKE_BUNDLE_VERSION}" @@ -122,7 +122,7 @@ if(APPLE) # Create a symlink in the build tree to provide a "cmake-gui" next # to the "cmake" executable that refers to the application bundle. add_custom_command(TARGET cmake-gui POST_BUILD - COMMAND ln -sf ${CMAKE_BUNDLE_NAME}.app/Contents/MacOS/${CMAKE_BUNDLE_NAME} + COMMAND ln -sf CMake.app/Contents/MacOS/CMake $/cmake-gui ) endif() @@ -148,7 +148,7 @@ if(APPLE) "${CMake_BINARY_DIR}/Source/QtDialog/postflight.sh") configure_file("${CMake_SOURCE_DIR}/Source/QtDialog/postupgrade.sh.in" "${CMake_BINARY_DIR}/Source/QtDialog/postupgrade.sh") - install(CODE "execute_process(COMMAND ln -s \"../MacOS/${CMAKE_BUNDLE_NAME}\" cmake-gui + install(CODE "execute_process(COMMAND ln -s \"../MacOS/CMake\" cmake-gui WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin)") endif() @@ -157,7 +157,7 @@ if(APPLE OR WIN32) # if a system Qt is used (e.g. installed in /usr/lib/), it will not be included in the installation set(fixup_exe "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin/cmake-gui${CMAKE_EXECUTABLE_SUFFIX}") if(APPLE) - set(fixup_exe "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/MacOS/${CMAKE_BUNDLE_NAME}") + set(fixup_exe "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/MacOS/CMake") endif() install(CODE " include(\"${CMake_SOURCE_DIR}/Modules/BundleUtilities.cmake\") diff --git a/Source/QtDialog/postflight.sh.in b/Source/QtDialog/postflight.sh.in index 33be352..0b96889 100755 --- a/Source/QtDialog/postflight.sh.in +++ b/Source/QtDialog/postflight.sh.in @@ -1,3 +1,3 @@ #!/bin/bash -"$2@CMAKE_INSTALL_SUBDIR@/@CMAKE_BUNDLE_NAME@.app/Contents/MacOS/@CMAKE_BUNDLE_NAME@" --mac-install +"$2@CMAKE_INSTALL_SUBDIR@/CMake.app/Contents/MacOS/CMake" --mac-install exit 0 -- cgit v0.12