I am trying to create an appx/appxupload package for my QT GUI application so that it can be published to the Windows Store. Here are the list of steps I followed to generate an appx package:
- Generate a Visual Studio project file using my QT .pro file by using the qmake -tp vc command in the directory containing my .pro file. I have used the x86 msvc-2017 kit in QT
- Opened the .vcproj file using Visual Studio 2017 ,Version 15.9.10 and built the project to check for any errors.
- Added a new project Windows Application Packaging Project (Visual C++) to the same Visual Studio solution.
- Added my QT project (now converted to Visual Studio project) as a reference to Applications in my new Packaging project
- Added all the Visual Assets, app name and other configuration settings in the Designer mode and then built the project
- Package the application to upload to Windows Store
When, I try to install and run the application, I get an error saying : This application failed to start because it could not find or load the Qt platform plugin "windows" in "".. All the QT plugins are present in the installation folder, however my application exe file is present inside an another folder in the installation directory like AppName\AppName.exe. If I copy the AppName.exe outside the AppName folder and run, the app runs fine.
I went through the various xml files and I see under Application section, Executable = "AppName\AppName.exe" instead of Executable = AppName.exe. I believe there is a configuration setting where one can configure the Application target path. If the exe file is at the same level as that of all the other QT dll's, the app will run fine without errors.
Can someone please help resolve this issue?
Thanks