summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@qt.io>2017-07-19 15:17:40 +0200
committerOliver Wolff <oliver.wolff@qt.io>2017-07-20 10:34:27 +0000
commitb936ce085f74fa7c563fb942290c5e8ad9517e42 (patch)
tree568c9ea9752e53fa6fca986ae29208fac814123b
parentb307d12957422f9b8118dead4cc1dfe72bbdbf29 (diff)
downloadqttools-b936ce085f74fa7c563fb942290c5e8ad9517e42.tar.gz
winrtrunner: Give additional hint in case of missing prerequisite
If the user has not added additional dependencies, winrt projects only depend on Windows.Universal and we have seen some cases, where its MinVersion was not met by the user's Windows version. We can give an additional hint if this error occurs and it might even push the user into the right direction if he has added his own dependencies. Task-number: QTBUG-61441 Change-Id: I54bbc424087dad2ffd626e58cc6f3a493b60f44e Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
-rw-r--r--src/winrtrunner/appxlocalengine.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/winrtrunner/appxlocalengine.cpp b/src/winrtrunner/appxlocalengine.cpp
index a3bee8bc7..d7cf35b31 100644
--- a/src/winrtrunner/appxlocalengine.cpp
+++ b/src/winrtrunner/appxlocalengine.cpp
@@ -421,10 +421,15 @@ bool AppxLocalEngine::installPackage(IAppxManifestReader *reader, const QString
RETURN_FALSE_IF_FAILED("Failed to retrieve extended error code.");
if (FAILED(errorCode)) {
- HString errorText;
- if (SUCCEEDED(results->get_ErrorText(errorText.GetAddressOf()))) {
- qCWarning(lcWinRtRunner) << "Unable to register package:"
- << QString::fromWCharArray(errorText.GetRawBuffer(NULL));
+ if (HRESULT_CODE(errorCode) == ERROR_INSTALL_PREREQUISITE_FAILED) {
+ qCWarning(lcWinRtRunner) << "Unable to register package: A requirement for installation was not met. "
+ "Check that your Windows version matches TargetDeviceFamily's MinVersion set in your AppxManifest.xml.";
+ } else {
+ HString errorText;
+ if (SUCCEEDED(results->get_ErrorText(errorText.GetAddressOf()))) {
+ qCWarning(lcWinRtRunner) << "Unable to register package:"
+ << QString::fromWCharArray(errorText.GetRawBuffer(NULL));
+ }
}
if (HRESULT_CODE(errorCode) == ERROR_INSTALL_POLICY_FAILURE) {
// The user's license has expired. Give them the opportunity to renew it.