I have a Qt (5.6) UI application, and I convert it to Visual Studio project using
qmake -tp vc MyProject.pro CONFIG+=windeployqt
When I open the vcxproj in Visual Studio, I build successfully and can debug the app, but I don't have the option to upload the app to the Windows Store (Project->Store->Create/upload App Packages), because the Project menu doesn't contain Store submenu.
How can I upload my app to the Windows Store?
You should have at least Visual Studio 2015 installed (with Universal Windows Platform SDK) and Qt build for WinRT. Qt 5.8.0 WinRT installer can be downloaded here. To get the most for Windows 10 Universal Windows Platform you should use the latest version of the Qt.
Once you have installed Qt WinRT, you can ask qmake to generate Visual Studio project file. Qt WinRT package provides 3 separate Qt builds per each supported CPU platform: x86, x64 and armv7. I recommend to keep generated Visual Studio project files for each platform in separate directories outside of your sources directory. CONFIG+=windeployqt is not required. Command line for x86 platform:
cd %YOUR_PROJECT_ROOT%
mkdir x86-VS-build
cd x86-VS-build
%x86_qt5.8.0_bin_path%/qmake.exe -tp vc "../MyProject.pro"
Similar steps can be done for x64 and armv7 platforms, but in separate working directory to not mess the files.
After opening of generated project file in Visual Studio, you should see missed menu options to interact with Windows Store. You should be able access Store menu in pop-up by mouse click on project files tree as well as from main menu.
Related
I'm trying to setup qtcreator using Microsoft Enterprise WDK.
I want to build MSVC and UWP apps, but I do not want to install MS VisualStudio.
Does anyone know howto setup debugger cdb, c and c++ compiler, ... for qtcreator. Since MS EWDK is unzipped in a folder like C:\Dev qtcreator cannot auto-detect it.
I also flipped through the QT documentation, but it is confusing me.
I still have no solution to integrate EWDK into qtcreator.
But there is an alternative to install a "minimum" Microsoft environment for qtcreator:
Install the Visual Studio Build-Tools, which is new as of 2017 and only select the build-tools for C++
Install only the debugger from Windows SDK
My app is Qt Quick Controls 2 based app. Qt 5.7.1, Windows 10, Visual Studio 2015.
Desktop 32bit version works fine.
But when I switch to Qt 5.7.1 for Universal Windows Platform 32bit kit, it fails to run with the following error:
winrtrunner --device 0 --start --stop --install --wait 0 --profile appx C:/Work/Source/build-MusicPlayer-Qt_5_7_1_for_Universal_Windows_Platform_32bit-Release/bin/player.exe
qt.winrtrunner: Using the Appx profile.
qt.winrtrunner: Failed to activate application: 0x8027025b "The app didn't start."
Error while executing the WinRT Runner Tool: Process crashed
It states here that some dependency is missing. I've checked it using Dependency Walker and it seems that all the required DLLs are in the application's folder. I've also tried to copy just all the files from Qt kit installation into app's dir.
My application consists of one main executable and three .DLL files. I've launched windeployqt for the each of them. Tried both debug and release versions.
I have the same problem on Windows 10, Qt 5.8 (also 5.7), Windows Runtime 64bit VC2015.
This topic was opened on Qt website here: https://forum.qt.io/topic/73272/qt-5-7-for-winrt-and-dynamic-libraries, but it did not help in my case :(. I opened a new topic here: https://forum.qt.io/topic/75424/cannot-start-qt-quick-winrt-application
I had same issue.
You need to recompile all static / dynamic libraries that your application uses for Windows 10 SDK. The issue is that you need to use WinRT dll's which provide sandbox environment instead of "normal" Windows libraries. Windows Store applications require that.
In my case I was using zip static library (zlibstat.lib) with Quazip static library (quazip.lib), compiled in Windows 7 with Visual Studio 2012.
Instead, I used Qt zip, as Qt provides zip library inside QtCore.dll, (just use #include instead of #include "zlib.h") and recompiled Quazip as a static library for Windows 10 SDK.
I am having trouble getting my app to build for ARM target after adding the SQLite-WinRT database wrapper. I could reproduce this with a simple test app as follows:
(This is done in Visual Studio 2013.)
Create an empty Windows 8.1 universal app (WinRT)
Download SQLite for Windows Phone 8.1 and SQLite for Windows Runtime (Windows 8.1) using Tools/Extensions and Updates. Add them to the respective projects' references.
Using NuGet, add SQLite-WinRT package to each project.
Build for x86 (local machine or phone emulator) -> no problems.
Build for ARM (phone device) -> build error shown below (independent of debug or release builds).
There was a mismatch between the processor architecture of the project being built "ARM" and the processor architecture, "x86", of the implementation file "C:\Users\jr\Documents\Visual Studio 2015\Projects\sqlite-test\packages\Sqlite-Winrt.3.8.7.1\lib\wpa81\SQLiteWinRT.dll" for "C:\Users\jr\Documents\Visual Studio 2015\Projects\sqlite-test\packages\Sqlite-Winrt.3.8.7.1\lib\wpa81\SQLiteWinRT.winmd". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and implementation file, or choose a winmd file with an implementation file that has a processor architecture which matches the targeted processor architecture of your project.
I posted a small test project here (Windows Phone 8.1 empty project, added SQLite, added SQLite-WinRT via NuGet).
Go to project properties open build tab and set target platform to ARM
Edit
You have added WinRt sqlite. it is buid on x86 and when you want to build it on ARM process Architecture it cannot build you need to remove WinRTSQlite dll than your project will work fine. Here is Code
Hope this helps
One workaround for the problems with the NuGet package is adding the sqlite-winrt sources to your phone or universal app.
install SQLite for Windows Phone 8.1 (and for universal also Windows Runtime (Windows 8.1)) in Tools -> Extensions and Updates if not done already
add references to the respective projects
download the sources for the sqlite-winrt wrapper
copy the SQLiteWinRTPhone81(RT) (and SQLiteWinRT81 if needed) folders to your solution
add the projects to your solution in Visual Studio (right-click on solution -> Add -> Existing Project)
add references to the respective projects
edit the references for the sqlite-winrt project(s) to point to the correct version of SQLite (right-click project -> Properties -> Common Porperties -> References): add a reference to the current SQLite version in your project and remove the old reference
build your solution
I have downloaded your project and on the references i have found that you are using SQLite-WinRT and sqlite for windows phone 8.1, you don't need both.
as soon as you remove SQLite-WinRT your project start compiling.
EDIT:
inside a universal app you have to add only the right references, if is a phone project just add sqlite for windows phone 8.1, instead on the windows 8.1 app add only the SQLite-WinRT
I use Qt 5.0.1 and Qt Creator 2.6.2 in W7. I tried to run a simple app from examples which contains only a window ("Widgets tutorial - creating a window"). When I run it in Qt Creator, it works. But when I run it as a standalone app (Release), it doesn't.
I filled the folder with every dll it had asked (26 MB of dlls, while the app is 10KB!!!). Now it doesn't ask for any files, it just doesn't run at all with no explanations.
I tried to add some files as it is advised in Application deployed with QT5 libraries does not start on Windows 7
but no luck. In
HelloWorld Deployment with QtQuick 2.0 in Windows 7 and XP
there are no problems in w7.
May be this a dependency problem, These links describes it:
Qt 5.0 program runs in QtCreator but not outside
How to build QTcore4.dll without dependency to MSVCx80.dll?
platforms/qwindows.dll is a "non-required" required DLL to run Qt5 apps. Build your app in Release mode and steal the DLL from Qt Creator's folder (or find it into Qt's bin/platforms folder)
When installed QT creator on my Ubuntu I was able to create simple console app gui app and so on .
But when I installed it on my windows , and trying to create a project QT asks for
target :
Symbian,
Qt simulator,
Harmattan
But I need a simple win console app.
What im doing wrong ?.
Are you sure you installed the correct version of the Qt SDK? There used to be a separate "Nokia Qt SDK" which only contained the libraries for the mobile targets.
This link should always point you to the latest installer for the complete Windows SDK.