diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CPackDeb.cmake | 147 | ||||
-rw-r--r-- | Modules/CPackIFW.cmake | 115 |
2 files changed, 206 insertions, 56 deletions
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake index 0ccb042..226153c 100644 --- a/Modules/CPackDeb.cmake +++ b/Modules/CPackDeb.cmake @@ -28,29 +28,33 @@ # # .. variable:: CPACK_DEBIAN_PACKAGE_NAME # +# The Debian package summary +# # * Mandatory : YES -# * Default : CPACK_PACKAGE_NAME (lower case) +# * Default : :variable:`CPACK_PACKAGE_NAME` (lower case) # -# The debian package summary # # .. variable:: CPACK_DEBIAN_PACKAGE_VERSION # +# The Debian package version +# # * Mandatory : YES -# * Default : CPACK_PACKAGE_VERSION +# * Default : :variable:`CPACK_PACKAGE_VERSION` # -# The debian package version # # .. variable:: CPACK_DEBIAN_PACKAGE_ARCHITECTURE # +# The Debian package architecture +# # * Mandatory : YES -# * Default : Output of dpkg --print-architecture (or i386 if dpkg is not found) +# * Default : Output of :code:`dpkg --print-architecture` (or :code:`i386` +# if :code:`dpkg` is not found) # -# The debian package architecture # # .. variable:: CPACK_DEBIAN_PACKAGE_DEPENDS # CPACK_DEBIAN_<COMPONENT>_PACKAGE_DEPENDS # -# May be used to set deb dependencies. +# Sets the Debian dependencies of this package. # # * Mandatory : NO # * Default : @@ -64,7 +68,7 @@ # If :variable:`CPACK_DEBIAN_PACKAGE_SHLIBDEPS` or # more specifically :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_SHLIBDEPS` # is set for this component, the discovered dependencies will be appended -# to :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_DEPENDS` intead of +# to :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_DEPENDS` instead of # :variable:`CPACK_DEBIAN_PACKAGE_DEPENDS`. If # :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_DEPENDS` is an empty string, # only the automatically discovered dependencies will be set for this @@ -76,15 +80,16 @@ # # .. variable:: CPACK_DEBIAN_PACKAGE_MAINTAINER # +# The Debian package maintainer +# # * Mandatory : YES -# * Default : CPACK_PACKAGE_CONTACT +# * Default : :code:`CPACK_PACKAGE_CONTACT` # -# The debian package maintainer # # .. variable:: CPACK_DEBIAN_PACKAGE_DESCRIPTION # CPACK_COMPONENT_<COMPONENT>_DESCRIPTION # -# The debian package description +# The Debian package description # # * Mandatory : YES # * Default : @@ -92,6 +97,7 @@ # - :variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION` if set or # - :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` # +# # .. variable:: CPACK_DEBIAN_PACKAGE_SECTION # # * Mandatory : YES @@ -99,33 +105,40 @@ # # .. variable:: CPACK_DEBIAN_COMPRESSION_TYPE # +# The compression used for creating the Debian package. +# Possible values are: lzma, xz, bzip2 and gzip. +# # * Mandatory : YES # * Default : 'gzip' # -# Possible values are: lzma, xz, bzip2 and gzip. # # .. variable:: CPACK_DEBIAN_PACKAGE_PRIORITY # +# The Debian package priority +# # * Mandatory : YES # * Default : 'optional' # -# The debian package priority # # .. variable:: CPACK_DEBIAN_PACKAGE_HOMEPAGE # -# * Mandatory : NO -# * Default : - -# # The URL of the web site for this package, preferably (when applicable) the # site from which the original source can be obtained and any additional # upstream documentation or information may be found. -# The content of this field is a simple URL without any surrounding -# characters such as <>. +# +# * Mandatory : NO +# * Default : - +# +# .. note:: +# +# The content of this field is a simple URL without any surrounding +# characters such as <>. +# # # .. variable:: CPACK_DEBIAN_PACKAGE_SHLIBDEPS # CPACK_DEBIAN_<COMPONENT>_PACKAGE_SHLIBDEPS # -# May be set to ON in order to use dpkg-shlibdeps to generate +# May be set to ON in order to use :code:`dpkg-shlibdeps` to generate # better package dependency list. # # * Mandatory : NO @@ -141,92 +154,132 @@ # may fail to find your own shared libs. # See http://www.cmake.org/Wiki/CMake_RPATH_handling. # -# .. variable:: CPACK_DEBIAN_PACKAGE_DEBUG # -# * Mandatory : NO -# * Default : - +# .. variable:: CPACK_DEBIAN_PACKAGE_DEBUG # # May be set when invoking cpack in order to trace debug information # during CPackDeb run. # +# * Mandatory : NO +# * Default : - +# # .. variable:: CPACK_DEBIAN_PACKAGE_PREDEPENDS # +# Sets the `Pre-Depends` field of the Debian package. +# Like :variable:`Depends <CPACK_DEBIAN_PACKAGE_DEPENDS>`, except that it +# also forces :code:`dpkg` to complete installation of the packages named +# before even starting the installation of the package which declares the +# pre-dependency. +# # * Mandatory : NO # * Default : - # -# see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps -# This field is like Depends, except that it also forces dpkg to complete installation of -# the packages named before even starting the installation of the package which declares -# the pre-dependency. +# See http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps # # .. variable:: CPACK_DEBIAN_PACKAGE_ENHANCES # +# Sets the `Enhances` field of the Debian package. +# Similar to :variable:`Suggests <CPACK_DEBIAN_PACKAGE_SUGGESTS>` but works +# in the opposite direction: declares that a package can enhance the +# functionality of another package. +# # * Mandatory : NO # * Default : - # -# see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps -# This field is similar to Suggests but works in the opposite direction. -# It is used to declare that a package can enhance the functionality of another package. +# See http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps # # .. variable:: CPACK_DEBIAN_PACKAGE_BREAKS # +# Sets the `Breaks` field of the Debian package. +# When a binary package (P) declares that it breaks other packages (B), +# :code:`dpkg` will not allow the package (P) which declares `Breaks` be +# **unpacked** unless the packages that will be broken (B) are deconfigured +# first. +# As long as the package (P) is configured, the previously deconfigured +# packages (B) cannot be reconfigured again. +# # * Mandatory : NO # * Default : - # -# see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps -# When one binary package declares that it breaks another, dpkg will refuse to allow the -# package which declares Breaks be installed unless the broken package is deconfigured first, -# and it will refuse to allow the broken package to be reconfigured. +# See https://www.debian.org/doc/debian-policy/ch-relationships.html#s-breaks +# # # .. variable:: CPACK_DEBIAN_PACKAGE_CONFLICTS # +# Sets the `Conflicts` field of the Debian package. +# When one binary package declares a conflict with another using a `Conflicts` +# field, :code:`dpkg` will not allow them to be unpacked on the system at +# the same time. +# # * Mandatory : NO # * Default : - # -# see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps -# When one binary package declares a conflict with another using a Conflicts field, -# dpkg will refuse to allow them to be installed on the system at the same time. +# See https://www.debian.org/doc/debian-policy/ch-relationships.html#s-conflicts +# +# .. note:: +# +# This is a stronger restriction than +# :variable:`Breaks <CPACK_DEBIAN_PACKAGE_BREAKS>`, which prevents the +# broken package from being configured while the breaking package is in +# the "Unpacked" state but allows both packages to be unpacked at the same +# time. # # .. variable:: CPACK_DEBIAN_PACKAGE_PROVIDES # +# Sets the `Provides` field of the Debian package. +# A virtual package is one which appears in the `Provides` control field of +# another package. +# # * Mandatory : NO # * Default : - # -# see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps -# A virtual package is one which appears in the Provides control field of another package. +# See https://www.debian.org/doc/debian-policy/ch-relationships.html#s-virtual +# # # .. variable:: CPACK_DEBIAN_PACKAGE_REPLACES # +# Sets the `Replaces` field of the Debian package. +# Packages can declare in their control file that they should overwrite +# files in certain other packages, or completely replace other packages. +# # * Mandatory : NO # * Default : - # -# see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps -# Packages can declare in their control file that they should overwrite -# files in certain other packages, or completely replace other packages. +# See http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps +# # # .. variable:: CPACK_DEBIAN_PACKAGE_RECOMMENDS # +# Sets the `Recommends` field of the Debian package. +# Allows packages to declare a strong, but not absolute, dependency on other +# packages. +# # * Mandatory : NO # * Default : - # -# see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps -# Allows packages to declare a strong, but not absolute, dependency on other packages. +# See http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps +# # # .. variable:: CPACK_DEBIAN_PACKAGE_SUGGESTS # +# Sets the `Suggests` field of the Debian package. +# Allows packages to declare a suggested package install grouping. +# # * Mandatory : NO # * Default : - # -# see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps -# Allows packages to declare a suggested package install grouping. +# See http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps +# # # .. variable:: CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA # +# This variable allow advanced user to add custom script to the +# control.tar.gz. +# Typical usage is for conffiles, postinst, postrm, prerm. +# # * Mandatory : NO # * Default : - # -# This variable allow advanced user to add custom script to the -# control.tar.gz Typical usage is for conffiles, postinst, postrm, prerm. # Usage:: # # set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA diff --git a/Modules/CPackIFW.cmake b/Modules/CPackIFW.cmake index e5b7601..6649933 100644 --- a/Modules/CPackIFW.cmake +++ b/Modules/CPackIFW.cmake @@ -2,7 +2,7 @@ # CPackIFW # -------- # -# .. _QtIFW: http://qt-project.org/doc/qtinstallerframework/index.html +# .. _QtIFW: http://doc.qt.io/qtinstallerframework/index.html # # This module looks for the location of the command line utilities supplied with # the Qt Installer Framework (QtIFW_). @@ -33,18 +33,26 @@ # # You can use the following variables to change behavior of CPack ``IFW`` generator. # +# Debug +# """""" +# +# .. variable:: CPACK_IFW_VERBOSE +# +# Set to ``ON`` to enable addition debug output. +# By default is ``OFF``. +# # Package # """"""" # # .. variable:: CPACK_IFW_PACKAGE_TITLE # # Name of the installer as displayed on the title bar. -# By default used :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` +# By default used :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY`. # # .. variable:: CPACK_IFW_PACKAGE_PUBLISHER # # Publisher of the software (as shown in the Windows Control Panel). -# By default used :variable:`CPACK_PACKAGE_VENDOR` +# By default used :variable:`CPACK_PACKAGE_VENDOR`. # # .. variable:: CPACK_IFW_PRODUCT_URL # @@ -63,6 +71,12 @@ # # Filename for a logo is used as QWizard::LogoPixmap. # +# .. variable:: CPACK_IFW_PACKAGE_START_MENU_DIRECTORY +# +# Name of the default program group for the product in the Windows Start menu. +# +# By default used :variable:`CPACK_IFW_PACKAGE_NAME`. +# # .. variable:: CPACK_IFW_TARGET_DIRECTORY # # Default target directory for installation. @@ -85,6 +99,35 @@ # The root package name, which will be used if configuration group is not # specified # +# .. variable:: CPACK_IFW_PACKAGE_MAINTENANCE_TOOL_NAME +# +# Filename of the generated maintenance tool. +# The platform-specific executable file extension is appended. +# +# By default used QtIFW_ defaults (``maintenancetool``). +# +# .. variable:: CPACK_IFW_PACKAGE_MAINTENANCE_TOOL_INI_FILE +# +# Filename for the configuration of the generated maintenance tool. +# +# By default used QtIFW_ defaults (``maintenancetool.ini``). +# +# .. variable:: CPACK_IFW_PACKAGE_ALLOW_NON_ASCII_CHARACTERS +# +# Set to ``ON`` if the installation path can contain non-ASCII characters. +# +# Is ``ON`` for QtIFW_ less 2.0 tools. +# +# .. variable:: CPACK_IFW_PACKAGE_ALLOW_SPACE_IN_PATH +# +# Set to ``OFF`` if the installation path cannot contain space characters. +# +# Is ``ON`` for QtIFW_ less 2.0 tools. +# +# .. variable:: CPACK_IFW_PACKAGE_CONTROL_SCRIPT +# +# Filename for a custom installer control script. +# # .. variable:: CPACK_IFW_REPOSITORIES_ALL # # The list of remote repositories. @@ -113,6 +156,10 @@ # Tools # """""""" # +# .. variable:: CPACK_IFW_FRAMEWORK_VERSION +# +# The version of used QtIFW_ tools. +# # .. variable:: CPACK_IFW_BINARYCREATOR_EXECUTABLE # # The path to "binarycreator" command line client. @@ -276,16 +323,16 @@ # Qt Installer Framework Manual: # # Index page -# http://qt-project.org/doc/qtinstallerframework/index.html +# http://doc.qt.io/qtinstallerframework/index.html # # Component Scripting -# http://qt-project.org/doc/qtinstallerframework/scripting.html +# http://doc.qt.io/qtinstallerframework/scripting.html # # Predefined Variables -# http://qt-project.org/doc/qtinstallerframework/scripting.html#predefined-variables +# http://doc.qt.io/qtinstallerframework/scripting.html#predefined-variables # -# Download Qt Installer Framework for you platform from Qt Project site: -# http://download.qt-project.org/official_releases/qt-installer-framework/ +# Download Qt Installer Framework for you platform from Qt site: +# http://download.qt.io/official_releases/qt-installer-framework # #============================================================================= @@ -324,8 +371,14 @@ else() endif() set(_CPACK_IFW_SUFFIXES +# Common "bin" - "QtIFW-1.7.0/bin" +# Second branch + "QtIFW2.3.0/bin" + "QtIFW2.2.0/bin" + "QtIFW2.1.0/bin" + "QtIFW2.0.0/bin" +# First branch "QtIFW-1.6.0/bin" "QtIFW-1.5.0/bin" "QtIFW-1.4.0/bin" @@ -351,6 +404,26 @@ find_program(CPACK_IFW_REPOGEN_EXECUTABLE ) mark_as_advanced(CPACK_IFW_REPOGEN_EXECUTABLE) +# Look for 'installerbase' + +find_program(CPACK_IFW_INSTALLERBASE_EXECUTABLE + NAMES installerbase + PATHS ${_CPACK_IFW_PATHS} + PATH_SUFFIXES ${_CPACK_IFW_SUFFIXES} + DOC "QtIFW installer executable base" + ) +mark_as_advanced(CPACK_IFW_INSTALLERBASE_EXECUTABLE) + +# Look for 'devtool' (appeared in the second branch) + +find_program(CPACK_IFW_DEVTOOL_EXECUTABLE + NAMES devtool + PATHS ${_CPACK_IFW_PATHS} + PATH_SUFFIXES ${_CPACK_IFW_SUFFIXES} + DOC "QtIFW devtool command line client" + ) +mark_as_advanced(CPACK_IFW_DEVTOOL_EXECUTABLE) + # ## Next code is included only once # @@ -359,6 +432,27 @@ if(NOT CPackIFW_CMake_INCLUDED) set(CPackIFW_CMake_INCLUDED 1) #============================================================================= +# Framework version +#============================================================================= + +if(CPACK_IFW_INSTALLERBASE_EXECUTABLE AND CPACK_IFW_DEVTOOL_EXECUTABLE) + execute_process(COMMAND + "${CPACK_IFW_INSTALLERBASE_EXECUTABLE}" --framework-version + OUTPUT_VARIABLE CPACK_IFW_FRAMEWORK_VERSION) + if(CPACK_IFW_FRAMEWORK_VERSION) + string(REPLACE " " "" + CPACK_IFW_FRAMEWORK_VERSION "${CPACK_IFW_FRAMEWORK_VERSION}") + string(REPLACE "\t" "" + CPACK_IFW_FRAMEWORK_VERSION "${CPACK_IFW_FRAMEWORK_VERSION}") + string(REPLACE "\n" "" + CPACK_IFW_FRAMEWORK_VERSION "${CPACK_IFW_FRAMEWORK_VERSION}") + if(CPACK_IFW_VERBOSE) + message(STATUS "Found QtIFW ${CPACK_IFW_FRAMEWORK_VERSION} version") + endif() + endif() +endif() + +#============================================================================= # Macro definition #============================================================================= @@ -514,4 +608,7 @@ macro(cpack_ifw_add_repository reponame) endmacro() +# Resolve package control script +_cpack_ifw_resolve_script(CPACK_IFW_PACKAGE_CONTROL_SCRIPT) + endif() # NOT CPackIFW_CMake_INCLUDED |