QtIFW: Developer Reference installation

This commit is contained in:
Konstantin Podsvirov 2016-08-04 13:02:39 +03:00
parent c18dc6fbe5
commit ea51b71a4f
3 changed files with 59 additions and 1 deletions

View File

@ -107,6 +107,14 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
if(SPHINX_QTHELP) if(SPHINX_QTHELP)
list(APPEND _CPACK_IFW_COMPONENTS_ALL sphinx-qthelp) list(APPEND _CPACK_IFW_COMPONENTS_ALL sphinx-qthelp)
endif() endif()
if(CMake_BUILD_DEVELOPER_REFERENCE)
if(CMake_BUILD_DEVELOPER_REFERENCE_HTML)
list(APPEND _CPACK_IFW_COMPONENTS_ALL cmake-developer-reference-html)
endif()
if(CMake_BUILD_DEVELOPER_REFERENCE_QTHELP)
list(APPEND _CPACK_IFW_COMPONENTS_ALL cmake-developer-reference-qthelp)
endif()
endif()
set(_CPACK_IFW_COMPONENTS_CONFIGURATION " set(_CPACK_IFW_COMPONENTS_CONFIGURATION "
# Components # Components
set(CPACK_COMPONENTS_ALL \"${_CPACK_IFW_COMPONENTS_ALL}\") set(CPACK_COMPONENTS_ALL \"${_CPACK_IFW_COMPONENTS_ALL}\")
@ -122,7 +130,8 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
# Components scripts configuration # Components scripts configuration
foreach(_script foreach(_script
CMake CMake
CMake.Documentation.SphinxHTML) CMake.Documentation.SphinxHTML
CMake.DeveloperReference.HTML)
configure_file("${CMake_SOURCE_DIR}/Source/QtIFW/${_script}.qs.in" configure_file("${CMake_SOURCE_DIR}/Source/QtIFW/${_script}.qs.in"
"${CMake_BINARY_DIR}/${_script}.qs" @ONLY) "${CMake_BINARY_DIR}/${_script}.qs" @ONLY)
endforeach() endforeach()
@ -136,6 +145,11 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
if(SPHINX_HTML) if(SPHINX_HTML)
set(_CPACK_IFW_SHORTCUT_OPTIONAL "${_CPACK_IFW_SHORTCUT_OPTIONAL}component.addOperation(\"CreateShortcut\", \"@TargetDir@/doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}/html/index.html\", \"@StartMenuDir@/CMake Documentation.lnk\");\n") set(_CPACK_IFW_SHORTCUT_OPTIONAL "${_CPACK_IFW_SHORTCUT_OPTIONAL}component.addOperation(\"CreateShortcut\", \"@TargetDir@/doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}/html/index.html\", \"@StartMenuDir@/CMake Documentation.lnk\");\n")
endif() endif()
if(CMake_BUILD_DEVELOPER_REFERENCE)
if(CMake_BUILD_DEVELOPER_REFERENCE_HTML)
set(_CPACK_IFW_SHORTCUT_OPTIONAL "${_CPACK_IFW_SHORTCUT_OPTIONAL}component.addOperation(\"CreateShortcut\", \"@TargetDir@/doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}/developer-reference/html/index.html\", \"@StartMenuDir@/CMake Developer Reference.lnk\");\n")
endif()
endif()
configure_file("${CMake_SOURCE_DIR}/Source/QtIFW/installscript.qs.in" configure_file("${CMake_SOURCE_DIR}/Source/QtIFW/installscript.qs.in"
"${CMake_BINARY_DIR}/installscript.qs" @ONLY "${CMake_BINARY_DIR}/installscript.qs" @ONLY
) )

View File

@ -175,6 +175,29 @@ if(CPACK_GENERATOR MATCHES "IFW")
set(CPACK_IFW_COMPONENT_SPHINX-QTHELP_NAME "SphinxQtHelp") set(CPACK_IFW_COMPONENT_SPHINX-QTHELP_NAME "SphinxQtHelp")
set(CPACK_IFW_COMPONENT_SPHINX-QTHELP_VERSION "@_CPACK_IFW_PACKAGE_VERSION@") set(CPACK_IFW_COMPONENT_SPHINX-QTHELP_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
# Developer Reference
set(CPACK_COMPONENT_GROUP_DEVELOPERREFERENCE_DISPLAY_NAME "Developer Reference")
set(CPACK_COMPONENT_GROUP_DEVELOPERREFERENCE_DESCRIPTION
"CMake Reference in different formats (html, qch)")
set(CPACK_COMPONENT_GROUP_DEVELOPERREFERENCE_PARENT_GROUP CMake)
set(CPACK_IFW_COMPONENT_GROUP_DEVELOPERREFERENCE_PRIORITY 50)
set(CPACK_IFW_COMPONENT_GROUP_DEVELOPERREFERENCE_VERSION
"@_CPACK_IFW_PACKAGE_VERSION@")
set(CPACK_COMPONENT_CMAKE-DEVELOPER-REFERENCE-HTML_DISPLAY_NAME "HTML")
set(CPACK_COMPONENT_CMAKE-DEVELOPER-REFERENCE-HTML_GROUP DeveloperReference)
set(CPACK_COMPONENT_CMAKE-DEVELOPER-REFERENCE-HTML_DISABLED TRUE)
set(CPACK_IFW_COMPONENT_CMAKE-DEVELOPER-REFERENCE-HTML_NAME "HTML")
set(CPACK_IFW_COMPONENT_CMAKE-DEVELOPER-REFERENCE-HTML_SCRIPT
"@CMake_BINARY_DIR@/CMake.DeveloperReference.HTML.qs")
set(CPACK_IFW_COMPONENT_CMAKE-DEVELOPER-REFERENCE-HTML_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
set(CPACK_COMPONENT_CMAKE-DEVELOPER-REFERENCE-QTHELP_DISPLAY_NAME "Qt Compressed Help")
set(CPACK_COMPONENT_CMAKE-DEVELOPER-REFERENCE-QTHELP_GROUP DeveloperReference)
set(CPACK_COMPONENT_CMAKE-DEVELOPER-REFERENCE-QTHELP_DISABLED TRUE)
set(CPACK_IFW_COMPONENT_CMAKE-DEVELOPER-REFERENCE-QTHELP_NAME "QtHelp")
set(CPACK_IFW_COMPONENT_CMAKE-DEVELOPER-REFERENCE-QTHELP_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
endif() endif()
if(CPACK_GENERATOR MATCHES "CygwinSource") if(CPACK_GENERATOR MATCHES "CygwinSource")

View File

@ -0,0 +1,21 @@
// Component: CMake.Reference.DoxygenHTML
function Component()
{
// Default constructor
}
Component.prototype.createOperations = function()
{
// Create shortcut
if (installer.value("os") === "win") {
component.addOperation("CreateShortcut",
installer.value("TargetDir") + "/@CMAKE_DOC_DIR@/developer-reference/html/index.html",
installer.value("StartMenuDir") + "/CMake Developer Reference.lnk");
}
// Call default implementation
component.createOperations();
}