Don't build winrtrunner on other platforms than WinRT

It isn't really useful unless your target is WinRT, in which case you
can build winrtrunner with that version of Qt.

Change-Id: Ifc2f80b0b8974e1d661894dac19d33b55f13ed7f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
windeployqt: Fixed --debug and --release together with --qmldir

If --debug or --release is used, findDependentQtLibraries should not
change the isDebug value, so another variable was introduced.
"detectedDebug" gives information about the detected debug state of
the executable/library but this value might be ignored if --debug
or --release was used.

Change-Id: I2c6d4188179f30e17d054a6821e96071a6296207
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
androiddeployqt: Fix debug deployment on Windows

There is a bug in "adb push" which makes it fail when the input
directory ends with a slash on Windows. This made it impossible
to use the debug deployment method on Windows.

[ChangeLog][Android][androiddeployqt] Fixed debug deployment on
Windows.

Task-number: QTBUG-37028
Change-Id: I99bef5f2dc879cbd08dc0c7e6765395095b264cf
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Assistant: Fixed build for QT_NO_CURSOR

Change-Id: I5f1f3774ac81ea61406c6ef964fd189051ebe994
Reviewed-by: David Schulz <david.schulz@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
Prefer to use normalised signal/slot signatures

Change-Id: I87fc653492fb5857d5ddcffad4cf762eacb5f364
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
qtd3dservice: Restructure handling for service mode

This moves qtd3dservice from a shared process to its own process. This
is required to fix problems with accessing the emulators from multiple
threads and to run qtd3dservice as the logged-on user.

- The service process which provides a thread for each worker, and can
  add and remove workers as needed.
- The same threading model is used in service and direct modes to
  reduce complexity and behavioral differences between modes.
- Device handlers can be quit from the main thread by setting their
  run lock event.

Change-Id: I8734348011a87f0f69549a11a45d70fe3a2df69d
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
qtd3dservice: Improve error messaging

Fix a number of bad error messages and make the formatting more
consistent. Also correct the error ID structure that gets passed to the
event log.

Change-Id: Ia21b87b777e8b1bd456cb3ddde21054bb1051373
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
qtd3dservice: Add output file option

This is useful for logging purposes, particularly in service mode where
it is not possible to redirect the output.

Change-Id: I965d58b1b375eb11844b486e50ccc645aa84baf5
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
qtd3dservice: Add triggers for Windows Phone devices and emulators

This adds event triggers which allow for detecting when a device or
emulator is activated. When a device comes online, it is checked for
applications, and workers are created to monitor each application.

This changes the behavior for device connections. Instead of retrying the
connection repeatedly for 30 seconds, the worker returns after the first
failure. This is acceptable, because the worker will automatically be
reactivated when the device comes online.

Change-Id: Idab622d85de314edd18fad8bf721cbae1c17ca75
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
qtd3dservice: Add self-elevation and credentials request

When installing the service, administrative privileges are required, and
the service user must be the logged-on user. This adds a self-elevation
routine to the install/remove options, and requests the user's credentials
using the native credentials UI.

Change-Id: Ib21769dc62682bf7055a3c80b9becf224612835b
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
qtd3dservice: Don't continue if XDE isn't running

For emulator operations, exit the current worker thread if the emulator
does not appear to be running.

Change-Id: Icd2dff2fff92c172dbad2cd894cd11966c3472a1
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
qtd3dservice: Add verbosity option

This adds control over the logging level, as done in related tools
winrtrunner and windeployqt.

Change-Id: If8de677c4435bac55cbecafaaf60e642a36325a5
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
CoreCon: Remove incorrect argument from SendFile()

This argument is apparently a typo in the MSDN docs. It is not
documented and not present in assembly of actual users of this API.
This change corrects all the users of the API in qttools.

Change-Id: I9cad60b3218a55271d805dad95cda4068aead21a
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
qtd3dservice: Replace a qDebug() with qCDebug()

A non-categorized logging call slipped through the cracks.

Change-Id: I68dac014bdbb41a82ce5e3a2d2fd1a97bbc28c9f
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
winrtrunner: Display developer license dialog

... when the license is expired. The installation can then continue.

Change-Id: I11bc13643406ad59611c53da22bdf32dfcd715e7
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
winrtrunner: Return from wait if the state is unknown

This prevents winrtrunner from hanging when the app quits too quickly
to identify the state.

Change-Id: Ife6231402eb302f3a86eaeaf3b0fb56c031c5282
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
qtd3dservice: Support Appx device monitoring

Like Xap monitoring, local appx packages can be automatically monitored.
This is accomplished without polling by:
 - Waiting for changes in the package registry
 - Checking the list of developer apps from the Appx manager
 - Waiting for changes in the application's shader directory

Without polling, the service has 0% CPU utilization when idle, regardless
of the number of Appx packages monitored. This is compared to Xap devices,
which may incur several fractions of a percent of CPU time during
package polling.

Change-Id: I3b0fc6fc7a8beee854c2511295b6d33b102eee88
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
windeployqt: Deploy d3dcompiler from system only if word size matches.

Look in the bin-directory of the Qt SDK first, then check system
and make sure the word size matches.

Task-number: QTBUG-37299

Change-Id: Ib1941c79cbc931aa67090bc08a5f7c1798e2a245
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Merge remote-tracking branch 'origin/stable' into dev

Change-Id: Ie0b3483867cc0c65f9b132bd520283333090db60
winrtrunner: Fix includepath

This was breaking for prefixed builds.

Change-Id: Ida0938b9d723bff81bcdc05b83d0da00bb59dc35
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>