Deploy for WinRT

WangBin edited this page Dec 2, 2015 · 4 revisions

Windows store app is supported since QtAV 1.9.0. QtAV depends on ffmpeg dlls, so you have to deploy all those dlls too. But it seems that Qt does not give us a solution.

Qt5.5 and 5.6 + WinRT x64 and phone 8.1 are tested.

  • Before Build

Copy ffmpeg development files and runtime dlls to Qt include, lib and bin dir. You can use to build ffmpeg for winrt (it is a submodule under QtAV/tools).

  • Build

    You can build QtAV in QtCreator. Visual studio is not necessary unless you want to publish your app.

  • After Build

    Run sdk_install.bat under build dir

Now Start To Deploy

You can code and run your app in QtCreator. But visual studio is the only choice to publish your app.


For PC app, simply copy the dlls to bin dir under build dir. The follow is how to deploy to your phone.

windeployqt only deploys Qt own modules and files. You have to add QtAV dlls and depended dlls yourself. I find that windeployqt will create which contains the files to be deployed. winrtrunner then reads and creates an app package and install to your device. So you can add your files in

In QtCreator if you click Run located in the left side, qtcreator will run windeployqt first, all your changes in will be overwritten. So you can click Run only once(the first package is incomplete) to open Application Output panel. There you can clik run/stop without deployment. Then change At last, click the run/stop button to create a complete package and install to your device.

Of cause, you can run windeployqt and winrtrunner in cmd without qtcreator.

Here is an example to add lines in

"E:\Qt\Qt5.6WinRT\5.6\winphone_arm\qml\QtAV\QmlAV.dll" "QtAV\QmlAV.dll"
"E:\Qt\Qt5.6WinRT\5.6\winphone_arm\qml\QtAV\Video.qml" "QtAV\Video.qml"
"E:\Qt\Qt5.6WinRT\5.6\winphone_arm\qml\QtAV\qmldir" "QtAV\qmldir"
"E:\Qt\Qt5.6WinRT\5.6\winphone_arm\bin\QtAV1.dll" "QtAV1.dll"
"E:\Qt\Qt5.6WinRT\5.6\winphone_arm\bin\avutil-55.dll" "avutil-55.dll"
"E:\Qt\Qt5.6WinRT\5.6\winphone_arm\bin\avcodec-57.dll" "avcodec-57.dll"
"E:\Qt\Qt5.6WinRT\5.6\winphone_arm\bin\avformat-57.dll" "avformat-57.dll"
"E:\Qt\Qt5.6WinRT\5.6\winphone_arm\bin\avfilter-6.dll" "avfilter-6.dll"
"E:\Qt\Qt5.6WinRT\5.6\winphone_arm\bin\swscale-4.dll" "swscale-4.dll"
"E:\Qt\Qt5.6WinRT\5.6\winphone_arm\bin\swresample-2.dll" "swresample-2.dll"

If assets folder does not exist in package, add these lines too

"D:\dev\QtAV\examples\QMLPlayer\assets-winrt\logo_store.png" "assets\logo_store.png"
"D:\dev\QtAV\examples\QMLPlayer\assets-winrt\logo_150x150.png" "assets\logo_150x150.png"
"D:\dev\QtAV\examples\QMLPlayer\assets-winrt\logo_44x44.png" "assets\logo_44x44.png"
"D:\dev\QtAV\examples\QMLPlayer\assets-winrt\logo_71x71.png" "assets\logo_71x71.png"
"D:\dev\QtAV\examples\QMLPlayer\assets-winrt\logo_310x150.png" "assets\logo_310x150.png"
"D:\dev\QtAV\examples\QMLPlayer\assets-winrt\logo_480x800.png" "assets\logo_480x800.png"

The first column is the file to copy, the second column is the target path(parent folders are created automatically). The target path can not be empty.

Visual Studio

I find that the var DEPLOYMENT in of qmake can add additional files for VS to deploy. The official document says this var is only for wince. But winrt seems fine too. Read QtAV/examples/QMLPlayer/ for detail.

First, you have to create vs project. For example

qmake -tp vc QMLPlayer\ "CONFIG+=windeployqt"

Then open in vs, build and deploy.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.