Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/5.8' into dev
Browse files Browse the repository at this point in the history
Conflicts:
	configure
	qmake/Makefile.unix.macos
	qmake/Makefile.unix.win32
	qmake/generators/win32/msvc_vcproj.cpp
	src/3rdparty/pcre/qt_attribution.json
	src/corelib/io/qsettings.cpp
	src/corelib/kernel/qdeadlinetimer.cpp
	src/platformsupport/kmsconvenience/qkmsdevice.cpp
	src/platformsupport/kmsconvenience/qkmsdevice_p.h
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.h
	tests/manual/qstorageinfo/printvolumes.cpp
	tools/configure/configureapp.cpp

Change-Id: Ibaabcc8e965c44926f9fb018466e8b132b8df49e
  • Loading branch information
liangqi committed Dec 13, 2016
2 parents 449204f + 00c9ec6 commit 6755ec8
Show file tree
Hide file tree
Showing 514 changed files with 5,926 additions and 4,843 deletions.
314 changes: 28 additions & 286 deletions configure

Large diffs are not rendered by default.

14 changes: 13 additions & 1 deletion configure.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"android-toolchain-version": "string",

"accessibility": "boolean",
"android-style-assets": "boolean",
"avx": "boolean",
"avx2": "boolean",
"avx512": { "type": "boolean", "name": "avx512f" },
Expand Down Expand Up @@ -417,6 +418,12 @@
},

"features": {
"android-style-assets": {
"label": "Android Style Assets",
"condition": "config.android",
"output": [ "privateFeature" ],
"comment": "This belongs into gui, but the license check needs it here already."
},
"shared": {
"label": "Building shared libraries",
"autoDetect": "!config.uikit",
Expand Down Expand Up @@ -516,7 +523,7 @@
},
"release_tools": {
"label": "Compile tools in release mode",
"autoDetect": "!features.debug",
"autoDetect": "features.debug",
"output": [ "privateFeature", "publicQtConfig" ]
},
"simulator_and_device": {
Expand Down Expand Up @@ -964,6 +971,11 @@
},

"earlyReport": [
{
"type": "fatal",
"condition": "!call.licenseCheck",
"message": "You are not licensed to use this software."
},
{
"type": "warning",
"condition": "input.debug_and_release == 'yes' && !config.darwin && !config.win32",
Expand Down
179 changes: 173 additions & 6 deletions configure.pri
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# this must be done outside any function
QT_SOURCE_TREE = $$PWD
QT_BUILD_TREE = $$shadowed($$PWD)

# custom command line handling

defineTest(qtConfCommandline_qmakeArgs) {
Expand Down Expand Up @@ -63,6 +67,165 @@ defineReplace(qtConfFunc_crossCompile) {
return(false)
}

defineReplace(qtConfFunc_licenseCheck) {
exists($$QT_SOURCE_TREE/LICENSE.LGPL3)|exists($$QT_SOURCE_TREE/LICENSE.GPL2): \
hasOpenSource = true
else: \
hasOpenSource = false
exists($$QT_SOURCE_TREE/LICENSE.PREVIEW.COMMERCIAL)|exists($$QT_SOURCE_TREE/bin/licheck*): \
hasCommercial = true
else: \
hasCommercial = false

commercial = $$config.input.commercial
isEmpty(commercial) {
$$hasOpenSource {
$$hasCommercial {
logn()
logn("Selecting Qt Edition.")
logn()
logn("Type 'c' if you want to use the Commercial Edition.")
logn("Type 'o' if you want to use the Open Source Edition.")
logn()
for(ever) {
val = $$lower($$prompt("Which edition of Qt do you want to use? ", false))
equals(val, c) {
commercial = yes
} else: equals(val, o) {
commercial = no
} else {
next()
}
break()
}
} else {
commercial = no
}
} else {
!$$hasCommercial: \
qtConfFatalError("No license files and no licheck executables found." \
"Cannot proceed. Try re-installing Qt.")
commercial = yes
}
}

equals(commercial, no) {
!$$hasOpenSource: \
qtConfFatalError("This is the Qt Commercial Edition." \
"Cannot proceed with -opensource.")

logn()
logn("This is the Qt Open Source Edition.")

EditionString = "Open Source"
config.input.qt_edition = OpenSource
export(config.input.qt_edition)
} else {
!$$hasCommercial: \
qtConfFatalError("This is the Qt Open Source Edition." \
"Cannot proceed with -commercial.")

exists($$QT_SOURCE_TREE/LICENSE.PREVIEW.COMMERCIAL) {
logn()
logn("This is the Qt Technology Preview Edition.")

EditionString = "Technology Preview"
config.input.qt_edition = Preview
export(config.input.qt_edition)
} else {
equals(QMAKE_HOST.os, Linux) {
equals(QMAKE_HOST.arch, x86): \
Licheck = licheck32
else: \
Licheck = licheck64
} else: equals(QMAKE_HOST.os, Darwin) {
Licheck = licheck_mac
} else: equals(QMAKE_HOST.os, Windows) {
Licheck = licheck.exe
} else {
qtConfFatalError("Host operating system not supported by this edition of Qt.")
}

!qtRunLoggedCommand("$$system_quote($$QT_SOURCE_TREE/bin/$$Licheck) \
$$eval(config.input.confirm-license) \
$$system_quote($$QT_SOURCE_TREE) $$system_quote($$QT_BUILD_TREE) \
$$[QMAKE_SPEC] $$[QMAKE_XSPEC]", \
LicheckOutput): \
return(false)
eval($$LicheckOutput)
config.input.qt_edition = $$Edition
config.input.qt_licheck = $$Licheck
config.input.qt_release_date = $$ReleaseDate
export(config.input.qt_edition)
export(config.input.qt_licheck)
export(config.input.qt_release_date)
return(true)
}
}

!isEmpty(config.input.confirm-license) {
logn()
logn("You have already accepted the terms of the $$EditionString license.")
return(true)
}

affix = the
equals(commercial, no) {
theLicense = "GNU Lesser General Public License (LGPL) version 3"
showWhat = "Type 'L' to view the GNU Lesser General Public License version 3 (LGPLv3)."
gpl2Ok = false
winrt {
notTheLicense = "Note: GPL version 2 is not available on WinRT."
} else: $$qtConfEvaluate("features.android-style-assets") {
notTheLicense = "Note: GPL version 2 is not available due to using Android style assets."
} else {
theLicense += "or the GNU General Public License (GPL) version 2"
showWhat += "Type 'G' to view the GNU General Public License version 2 (GPLv2)."
gpl2Ok = true
affix = either
}
} else {
theLicense = $$cat($$QT_SOURCE_TREE/LICENSE.PREVIEW.COMMERCIAL, lines)
theLicense = $$first(theLicense)
showWhat = "Type '?' to view the $${theLicense}."
}
msg = \
" " \
"You are licensed to use this software under the terms of" \
"the "$$theLicense"." \
$$notTheLicense \
" " \
$$showWhat \
"Type 'y' to accept this license offer." \
"Type 'n' to decline this license offer." \
" "

for(ever) {
logn($$join(msg, $$escape_expand(\\n)))
for(ever) {
val = $$lower($$prompt("Do you accept the terms of $$affix license? ", false))
equals(val, y)|equals(val, yes) {
logn()
return(true)
} else: equals(val, n)|equals(val, no) {
return(false)
} else: equals(commercial, yes):equals(val, ?) {
licenseFile = $$QT_SOURCE_TREE/LICENSE.PREVIEW.COMMERCIAL
} else: equals(commercial, no):equals(val, l) {
licenseFile = $$QT_SOURCE_TREE/LICENSE.LGPL3
} else: equals(commercial, no):equals(val, g):$$gpl2Ok {
licenseFile = $$QT_SOURCE_TREE/LICENSE.GPL2
} else {
next()
}
break()
}
system("more $$system_quote($$system_path($$licenseFile))")
logn()
logn()
}
}

# custom tests

defineTest(qtConfTest_architecture) {
Expand Down Expand Up @@ -510,12 +673,19 @@ defineTest(qtConfReport_buildParts) {
qtConfReportPadded($${1}, $$qtConfEvaluate("tests.build_parts.value"))
}

defineReplace(qtConfReportArch) {
arch = $$qtConfEvaluate('tests.$${1}.arch')
subarch = $$qtConfEvaluate('tests.$${1}.subarch')
isEmpty(subarch): subarch = <none>
return("$$arch, CPU features: $$subarch")
}

defineTest(qtConfReport_buildTypeAndConfig) {
!$$qtConfEvaluate("features.cross_compile") {
qtConfAddReport("Build type: $$qtConfEvaluate('tests.architecture.arch')")
qtConfAddReport("Build type: $$[QMAKE_SPEC] ($$qtConfReportArch(architecture))")
} else {
qtConfAddReport("Building on: $$qtConfEvaluate('tests.host_architecture.arch')")
qtConfAddReport("Building for: $$qtConfEvaluate('tests.architecture.arch')")
qtConfAddReport("Building on: $$[QMAKE_SPEC] ($$qtConfReportArch(host_architecture))")
qtConfAddReport("Building for: $$[QMAKE_XSPEC] ($$qtConfReportArch(architecture))")
}
qtConfAddReport()
qtConfAddReport("Configuration: $$eval($${currentConfig}.output.privatePro.append.CONFIG) $$eval($${currentConfig}.output.publicPro.append.QT_CONFIG)")
Expand Down Expand Up @@ -552,6 +722,3 @@ discard_from($$[QT_HOST_DATA/get]/mkspecs/qmodule.pri)
QMAKE_POST_CONFIGURE += \
"include(\$\$[QT_HOST_DATA/get]/mkspecs/qconfig.pri)" \
"include(\$\$[QT_HOST_DATA/get]/mkspecs/qmodule.pri)"

# load and process input from configure.sh/.exe
include($$shadowed($$PWD)/config.tests/configure.cfg)
Loading

0 comments on commit 6755ec8

Please sign in to comment.