c++qtdeploymentuwpwindows-10-mobile

how to deploy qt app to UWP or Windows 10 mobile


I have very simple application in QT. Now I want to test it in my Windows phone. Do you know how can I do it?

I cann not find anything on the internet. I only need a simple description of how to do it.

Thank you.


Solution

  • Ok. There is a way descripted in this video https://www.youtube.com/watch?v=o5Xdt-j3hkA

    1. You create standard QT source (project)
    2. Copy all sources from you project to another directory (mirror)
    3. In the mirror directory run qmake.exe -tp vc CONFIG+=windeployqt
    4. qmake must be from your platform directory. Your platform must be installed. (if you heve no platform, go to the add remove programs and then run remove QT. In next dialog system ask you about remove or add features)
    5. I use qmake from D:\Develop\Qt\5.7\winrt_armv7_msvc2015\bin by add path set path=%path%;D:\Develop\Qt\5.7\winrt_armv7_msvc2015\bin
    6. This command create visual studio project
    7. Go to the visual studio by devenv yourapp.vcxproj
    8. In visual studio I must repair any problems in code (VS debugger is more strict then qt). I must right click to my project and run retarget sdk version. (without this - debuger return some error about bad sdk version 10.0.0.0)
    9. Then I enable develop mode in my WindowsPhone and connect it by usb with PC. Unlock screen on device and confirm usb connection warning (without this - deployment is not possible).
    10. Last step is Run build. Solution configuration = Release; Solution platforms=ARM; Green arrow(build)=Device;

    After build into the device, VS connect to my device. Install needed prerequisities and add to mobile menu new item with my application name. Then automaticly run app.

    If you have error:

    'uuidgen' is not recognized as an internal or external command. uuidgen.exe missing in you path. I added set path=%path%;C:\Program Files (x86)\Windows Kits\10\bin\x64, where is uudigen.exe.

    If you have error: Project ERROR: No UCRTVersion found in environment. You must open your .qmake file (some like this .qmake.winrt_uuid_yourapp) and add line WINRT_MANIFEST.minVersion = 10.0.10586.0