#include <QtCore/QStandardPaths>
#include <ShlObj.h>
+#include <wsdevlicensing.h>
#include <AppxPackaging.h>
#include <wrl.h>
#include <windows.applicationmodel.h>
qCWarning(lcWinRtRunner) << "Unable to register package:"
<< QString::fromWCharArray(WindowsGetStringRawBuffer(errorText, 0));
}
+ if (HRESULT_CODE(errorCode) == ERROR_INSTALL_POLICY_FAILURE) {
+ // The user's license has expired. Give them the opportunity to renew it.
+ FILETIME expiration;
+ hr = AcquireDeveloperLicense(GetForegroundWindow(), &expiration);
+ if (FAILED(hr)) {
+ qCWarning(lcWinRtRunner) << "Unable to renew developer license:"
+ << qt_error_string(hr);
+ }
+ if (SUCCEEDED(hr))
+ return install(false);
+ }
return false;
}
win32-msvc2012|win32-msvc2013 {
SOURCES += appxengine.cpp
HEADERS += appxengine.h
- LIBS += -lruntimeobject
+ LIBS += -lruntimeobject -lwsclient
DEFINES -= RTRUNNER_NO_APPX
include(../shared/corecon/corecon.pri)