ad68bf51e7
Change f046ed395a
set the default values of VERSION and
QMAKE_TARGET_DESCRIPTION for Qt tools to generic ones. The version and
description is shown in the properties of the executable, but also
used for crash reports. For the latter it wasn't clear anymore which
tool actually crashed.
The patch therefore adds the executable name to the generic description.
Tools can still overwrite the description on their own.
Task-number: QTBUG-61970
Change-Id: I8366db22f88f0d6575e7f482f030b3c4f05af6c5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
82 lines
2.7 KiB
Plaintext
82 lines
2.7 KiB
Plaintext
#
|
|
# W A R N I N G
|
|
# -------------
|
|
#
|
|
# This file is not part of the Qt API. It exists purely as an
|
|
# implementation detail. It may change from version to version
|
|
# without notice, or even be removed.
|
|
#
|
|
# We mean it.
|
|
#
|
|
|
|
CONFIG += no_launch_target
|
|
isEmpty(VERSION): VERSION = $$MODULE_VERSION
|
|
isEmpty(QMAKE_TARGET_DESCRIPTION): QMAKE_TARGET_DESCRIPTION = \
|
|
"Tool for the Qt Application Development Framework ($$TARGET)"
|
|
load(qt_app)
|
|
|
|
CONFIG += console
|
|
DEFINES *= QT_USE_QSTRINGBUILDER
|
|
|
|
# If we are doing a prefix build, create a "module" pri which enables
|
|
# qtPrepareTool() to work with the non-installed build.
|
|
# Non-bootstrapped tools always need this because of the environment setup.
|
|
!build_pass:if(!host_build|!force_bootstrap|force_independent|!isEmpty(HOST_QT_TOOLS)) {
|
|
isEmpty(MODULE):MODULE = $$TARGET
|
|
|
|
load(qt_build_paths)
|
|
|
|
TOOL_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_tool_$${MODULE}.pri
|
|
|
|
vars = binary depends
|
|
|
|
!host_build|isEmpty(HOST_QT_TOOLS) {
|
|
load(resolve_target)
|
|
|
|
!host_build|!force_bootstrap: MODULE_DEPENDS = $$replace(QT, -private$, _private)
|
|
|
|
!isEmpty(QT_TOOL_ENV) {
|
|
vars += envvars
|
|
module_var_names =
|
|
module_var_sets =
|
|
for(var, QT_TOOL_ENV) {
|
|
vars += env.$${var}.name env.$${var}.value
|
|
module_var_names += QT_TOOL.$${MODULE}.env.$${var}
|
|
module_var_sets += \
|
|
"QT_TOOL.$${MODULE}.env.$${var}.name = $$val_escape($${var}.name)" \
|
|
"QT_TOOL.$${MODULE}.env.$${var}.value = $$val_escape($${var}.value)"
|
|
}
|
|
module_envvars = \
|
|
"QT_TOOL.$${MODULE}.envvars = $$module_var_names" \
|
|
$$module_var_sets
|
|
} else {
|
|
module_envvars =
|
|
}
|
|
|
|
bin = $$system_path($$QMAKE_RESOLVED_TARGET)
|
|
} else {
|
|
bin = $${HOST_QT_TOOLS}/$${TARGET}
|
|
equals(QMAKE_HOST.os, Windows): bin = $${bin}.exe
|
|
bin = $$system_path($$bin)
|
|
}
|
|
|
|
TOOL_PRI_CONT = \
|
|
"QT_TOOL.$${MODULE}.binary = $$val_escape(bin)" \
|
|
"QT_TOOL.$${MODULE}.depends =$$join(MODULE_DEPENDS, " ", " ")" \
|
|
$$module_envvars
|
|
write_file($$TOOL_PRI, TOOL_PRI_CONT)|error()
|
|
|
|
# Then, inject the new tool into the current cache state
|
|
!contains(QMAKE_INTERNAL_INCLUDED_FILES, $$TOOL_PRI) { # before the actual include()!
|
|
added = $$TOOL_PRI
|
|
cache(QMAKE_INTERNAL_INCLUDED_FILES, add transient, added)
|
|
unset(added)
|
|
}
|
|
include($$TOOL_PRI)
|
|
for(var, vars): \
|
|
cache(QT_TOOL.$${MODULE}.$$var, transient)
|
|
|
|
}
|
|
# The variable is re-used by qtPrepareTool(), and we really don't want that.
|
|
unset(QT_TOOL_ENV)
|